Skip to contentSkip to conversation

arm64: dts: rockchip: Fix the BT clock-names on rk3399-hugsun-x99

PATCH Superseded Fabio Estevam 2 participants 4 messages Aug 6

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm64: dts: rockchip: Fix the BT clock-names on rk3399-hugsun-x99

According to brcm,bluetooth.yaml, the correct clock-names to describe an external reference clock is "txco".

Change it accordingly to fix the following dt-schema warning:

clock-names: 'oneOf' conditional failed, one must be fixed:
['ext_clock'] is too short
'extclk' was expected
'txco' was expected
'lpo' was expected

---
 arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -1
index 352c8efb37e0..27ebbbc66633 100644
@@ -703,7 +703,7 @@ &uart0 {
 	bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&rk808 1>;
-		clock-names = "ext_clock";
+		clock-names = "txco";
 		device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
 		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 arm64: dts: rockchip: Fix the BT clock-names on rk3399-leez-p710

According to brcm,bluetooth.yaml, the correct clock-names to describe an external reference clock is "txco".

Change it accordingly to fix the following dt-schema warning:

clock-names: 'oneOf' conditional failed, one must be fixed:
['ext_clock'] is too short
'extclk' was expected
'txco' was expected
'lpo' was expected

---
 arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -1
index 2cdc2013c320..c449eaa84edc 100644
@@ -588,7 +588,7 @@ &uart0 {
 	bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&rk808 1>;
-		clock-names = "ext_clock";
+		clock-names = "txco";
 		device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
 		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
Signature · 1 line
2.43.0
#3 lore raw
In reply to Fabio Estevam
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Incorrect DT clock-name misrepresents a 32.768kHz LPO clock as a high-frequency txco clock…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incorrect DT clock-name misrepresents a 32.768kHz LPO clock as a high-frequency txco clock, bypassing driver rate enforcement. --

--- Patch [1]: [PATCH 1/2] arm64: dts: rockchip: Fix the BT clock-names on rk3399-hugsun-x99 --- commit 9f58538cc4607e21e187cba8faf882820a368c05
Author: Fabio Estevam <[email protected]>

arm64: dts: rockchip: Fix the BT clock-names on rk3399-hugsun-x99

This commit updates the clock-names property for the Bluetooth node on the rk3399-hugsun-x99 board to fix a dt-schema warning. It changes the name from ext_clock to txco.

arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts &uart0 { · line 706

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +1 -1
@@ -703,7 +703,7 @@ &uart0 {
 	bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&rk808 1>;
-		clock-names = "ext_clock";
+		clock-names = "txco";

[Severity: Low]
Should this clock be named lpo instead of txco?

The clock source <&rk808 1> is the PMIC's rtc_clko_wifi output, which is a fixed 32.768kHz clock. According to the Bluetooth architecture and brcm,bluetooth.yaml, a 32.768kHz clock represents the Low Power Oscillator (lpo), while txco is typically reserved for high-frequency reference clocks (like 26MHz or 37.4MHz).

If it is named txco, does the hci_bcm driver misclassify it and leave its internal lpo_clk reference NULL? This would bypass the driver's explicit 32kHz rate enforcement via clk_set_rate(dev->lpo_clk, 32768).

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts +0 -0
 		device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
 		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw

Re: [PATCH 2/2] arm64: dts: rockchip: Fix the BT clock-names on rk3399-leez-p710

In reply to Fabio Estevam
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Incorrect clock-name 'txco' used for a 32.768 kHz LPO clock. --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incorrect clock-name 'txco' used for a 32.768 kHz LPO clock.
--

--- Patch [2]: [PATCH 2/2] arm64: dts: rockchip: Fix the BT clock-names on rk3399-leez-p710 --- commit 6ad4dd81542316e95c763ba942c066130a8d8bba
Author: Fabio Estevam <[email protected]>

arm64: dts: rockchip: Fix the BT clock-names on rk3399-leez-p710

This commit changes the bluetooth clock-names property from ext_clock to txco to resolve a dt-schema warning.

arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts &uart0 { · line 591

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +1 -1
@@ -588,7 +588,7 @@ &uart0 {
 	bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&rk808 1>;
-		clock-names = "ext_clock";
+		clock-names = "txco";

[Severity: Low]
Should this be named lpo instead of txco?

The clock provided by <&rk808 1> corresponds to the RK808 PMIC's clkout2, which is a fixed 32.768 kHz clock.

According to the brcm,bluetooth.yaml dt-bindings, an external low-power 32.768 kHz clock must be named lpo, whereas txco is reserved for high-frequency reference clocks. Other boards with the exact same hardware configuration correctly use lpo for <&rk808 1>.

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts +0 -0
 		device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
 		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2