Skip to contentSkip to conversation

rockchip: Fix several DT validation errors

PATCH Superseded Diederik de Haas 3 participants 10 messages Oct 7, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

This is a set of 4 small device-tree validation fixes.

Patch 1 adds the power-domains property to the csi dphy node on rk356x. Patch 2 removes the 2nd interrupt from the hdmi node on rk3328. Patch 3 replaces 'wake' with 'wakeup' on brcm BT nodes. Patch 4 replaces 'reset-gpios' with 'shutdown-gpios' on brcm BT nodes.

 arch/arm64/boot/dts/rockchip/rk3328.dtsi           | 3 +--
 arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts   | 4 ++--
 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi  | 6 +++---
 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
 arch/arm64/boot/dts/rockchip/rk356x.dtsi           | 1 +
 5 files changed, 8 insertions(+), 8 deletions(-)
#1 lore raw

PATCH 1/4 arm64: dts: rockchip: Add PD to csi dphy node on rk356x

The "rockchip-inno-csi-dphy.yaml" binding requires the power-domains property. According to RK3568 TRM Part 1 section 7.3 (page 475) the CSIHOST is placed in the PD_VI power domain.
So set the csi_dphy node power-domains property accordingly.

Fixes b6c228401b25 ("arm64: dts: rockchip: add csi dphy node to rk356x")
---
 arch/arm64/boot/dts/rockchip/rk356x.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk356x.dtsi +1 -0
index 0ee0ada6f0ab..d581170914f9 100644
@@ -1790,6 +1790,7 @@ csi_dphy: phy@fe870000 {
 		clocks = <&cru PCLK_MIPICSIPHY>;
 		clock-names = "pclk";
 		#phy-cells = <0>;
+		power-domains = <&power RK3568_PD_VI>;
 		resets = <&cru SRST_P_MIPICSIPHY>;
 		reset-names = "apb";
 		rockchip,grf = <&grf>;
Signature · 1 line
2.45.2
#2 lore raw

PATCH 2/4 arm64: dts: rockchip: Remove hdmi's 2nd interrupt on rk3328

In reply to Diederik de Haas

The "synopsys,dw-hdmi.yaml" binding specifies that the interrupts property of the hdmi node has 'maxItems: 1', so the hdmi node in rk3328.dtsi having 2 is incorrect.

Paragraph 1.3 ("System Interrupt connection") of the RK3328 TRM v1.1 page 16 and 17 define the following hdmi related interrupts:
- 67 hdmi_intr
- 103 hdmi_intr_wakeup

The difference of 32 is due to a different base used in the TRM.

The RK3399 (which uses the same binding) has '23: hdmi_irq' and '24: hdmi_wakeup_irq' according to its TRM (page 19).
The RK3568 (also same binding) has '76: hdmi_wakeup' and '77: hdmi' according to page 17 of its TRM.
In both cases the non-wakeup IRQ was used, so use that too for rk3328.

---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +1 -2
index b5cbe7cab10b..0597de415fe0 100644
@@ -754,8 +754,7 @@ hdmi: hdmi@ff3c0000 {
 		compatible = "rockchip,rk3328-dw-hdmi";
 		reg = <0x0 0xff3c0000 0x0 0x20000>;
 		reg-io-width = <4>;
-		interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+		interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&cru PCLK_HDMI>,
 			 <&cru SCLK_HDMI_SFC>,
 			 <&cru SCLK_RTC32K>;
Signature · 1 line
2.45.2
#3 lore raw

PATCH 3/4 arm64: dts: rockchip: Fix wakeup prop names on brcm BT nodes

In reply to Diederik de Haas

The "brcm,bluetooth.yaml" binding has 'device-wakeup-gpios' and 'host-wakeup-gpios' property names.
Fix the ones where '*-wake-gpios' was used.

Note that the "realtek,bluetooth.yaml" binding does use the '*-wake-gpios' property names.

---
 arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts  | 4 ++--
 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts +2 -2
index 0c18406e4c59..16fd98698db3 100644
@@ -450,8 +450,8 @@ bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&pmucru CLK_RTC_32K>;
 		clock-names = "ext_clock";
-		device-wake-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
-		host-wake-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
+		device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
 		shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +2 -2
index de4c082dce07..7381bb751852 100644
@@ -684,8 +684,8 @@ bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&rk817 1>;
 		clock-names = "lpo";
-		device-wake-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
-		host-wake-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
+		device-wakeup-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
 		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
 		pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
 		pinctrl-names = "default";
Signature · 1 line
2.45.2
maintainer
#4 lore raw

Re: [PATCH 3/4] arm64: dts: rockchip: Fix wakeup prop names on brcm BT nodes

Am Montag, 7. Oktober 2024, 12:28:18 CEST schrieb Diederik de Haas:

Quoted 8 lines

The "brcm,bluetooth.yaml" binding has 'device-wakeup-gpios' and 'host-wakeup-gpios' property names.
Fix the ones where '*-wake-gpios' was used.

Note that the "realtek,bluetooth.yaml" binding does use the '*-wake-gpios' property names.

parts of the commit conflict with a previous one from me ;-) [0]

[0] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#m59bdb72d6c22f85fe79716761fedaea2a2e1c73e

Quoted 36 lines
---
 arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts  | 4 ++--
 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts +2 -2
index 0c18406e4c59..16fd98698db3 100644
@@ -450,8 +450,8 @@ bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&pmucru CLK_RTC_32K>;
 		clock-names = "ext_clock";
-		device-wake-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
-		host-wake-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
+		device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
 		shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +2 -2
index de4c082dce07..7381bb751852 100644
@@ -684,8 +684,8 @@ bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&rk817 1>;
 		clock-names = "lpo";
-		device-wake-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
-		host-wake-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
+		device-wakeup-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
 		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
 		pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
 		pinctrl-names = "default";
#5 lore raw

Re: [PATCH 3/4] arm64: dts: rockchip: Fix wakeup prop names on brcm BT nodes

Hi,

Quoted 8 lines · Heiko Stübner

Am Montag, 7. Oktober 2024, 12:28:18 CEST schrieb Diederik de Haas:

Quoted 7 lines

The "brcm,bluetooth.yaml" binding has 'device-wakeup-gpios' and 'host-wakeup-gpios' property names.
Fix the ones where '*-wake-gpios' was used.

Note that the "realtek,bluetooth.yaml" binding does use the '*-wake-gpios' property names.

Quoted 6 lines
Quoted 1 line

parts of the commit conflict with a previous one from me ;-) [0]

[0] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#m59bdb72d6c22f85fe79716761fedaea2a2e1c73e

Haha, I actually did base my changes on one of your patch submissions ("rk3328 cru dt-binding conversion"), but that's the 'wrong' one ;-)

Will drop the rk3566-box-demo.dts one in v2.

Cheers,
Diederik

Quoted 36 lines
Quoted 36 lines
---
 arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts  | 4 ++--
 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts +2 -2
index 0c18406e4c59..16fd98698db3 100644
@@ -450,8 +450,8 @@ bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&pmucru CLK_RTC_32K>;
 		clock-names = "ext_clock";
-		device-wake-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
-		host-wake-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
+		device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
 		shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +2 -2
index de4c082dce07..7381bb751852 100644
@@ -684,8 +684,8 @@ bluetooth {
 		compatible = "brcm,bcm43438-bt";
 		clocks = <&rk817 1>;
 		clock-names = "lpo";
-		device-wake-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
-		host-wake-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
+		device-wakeup-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
+		host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
 		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
 		pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
 		pinctrl-names = "default";
#6 lore raw

PATCH 4/4 arm64: dts: rockchip: Fix reset-gpios prop on brcm BT nodes

In reply to Diederik de Haas

Except for some compatibles, the "brcm,bluetooth.yaml" binding doesn't allow the 'reset-gpios' property, so replace the invalid ones with the 'shutdown-gpios' property.

---
 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi  | 2 +-
 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +1 -1
index 7381bb751852..100a2774bbb5 100644
@@ -686,9 +686,9 @@ bluetooth {
 		clock-names = "lpo";
 		device-wakeup-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
-		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
 		pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
 		pinctrl-names = "default";
+		shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
 		vbat-supply = <&vcc_wl>;
 		vddio-supply = <&vcca_1v8_pmu>;
 	};
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi +1 -1
index d09e6542e236..3e0cbfff96d8 100644
@@ -402,9 +402,9 @@ bluetooth {
 		clock-names = "lpo";
 		device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
-		reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
+		shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
 		vbat-supply = <&vcc_3v3>;
 		vddio-supply = <&vcc_1v8>;
 	};
Signature · 1 line
2.45.2
maintainer
#7 lore raw

Re: [PATCH 4/4] arm64: dts: rockchip: Fix reset-gpios prop on brcm BT nodes

Hey :-) ,

Am Montag, 7. Oktober 2024, 12:28:19 CEST schrieb Diederik de Haas:

Quoted 3 lines

Except for some compatibles, the "brcm,bluetooth.yaml" binding doesn't allow the 'reset-gpios' property, so replace the invalid ones with the 'shutdown-gpios' property.

this probably needs more explanation in the commit message, because by name I'd expect reset and shutdown being different functionalities.

But for these cases, things should be good, simply because when looking at the bt_enable_h pinctrl, that pin really provides the shutdown functionality.

Heiko

Quoted 37 lines
---
 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi  | 2 +-
 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +1 -1
index 7381bb751852..100a2774bbb5 100644
@@ -686,9 +686,9 @@ bluetooth {
 		clock-names = "lpo";
 		device-wakeup-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
-		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
 		pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
 		pinctrl-names = "default";
+		shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
 		vbat-supply = <&vcc_wl>;
 		vddio-supply = <&vcca_1v8_pmu>;
 	};
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi +1 -1
index d09e6542e236..3e0cbfff96d8 100644
@@ -402,9 +402,9 @@ bluetooth {
 		clock-names = "lpo";
 		device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
-		reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
+		shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
 		vbat-supply = <&vcc_3v3>;
 		vddio-supply = <&vcc_1v8>;
 	};
#8 lore raw

Re: [PATCH 4/4] arm64: dts: rockchip: Fix reset-gpios prop on brcm BT nodes

Hello :)

Quoted 11 lines · Heiko Stübner

Am Montag, 7. Oktober 2024, 12:28:19 CEST schrieb Diederik de Haas:

Quoted 3 lines

Except for some compatibles, the "brcm,bluetooth.yaml" binding doesn't allow the 'reset-gpios' property, so replace the invalid ones with the 'shutdown-gpios' property.

this probably needs more explanation in the commit message, because by name I'd expect reset and shutdown being different functionalities.

But for these cases, things should be good, simply because when looking at the bt_enable_h pinctrl, that pin really provides the shutdown functionality.

I guess I forgot to add the reference to page 12 of the AzureWave-CM256SM datasheet (v1.9):

Pin 34 'BT_REG_ON':
Used by PMU to power up or power down the internal regulators used by the Bluetooth section. Also, when deasserted, this pin holds the Bluetooth section in reset. This pin has an internal 200k ohm pull down resistor that is enabled by default. It can be disabled through programming.

So my research was more extensive then I actually put in the commit message ... will fix that in v2.

Cheers,
Diederik

Quoted 37 lines
Quoted 37 lines
---
 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi  | 2 +-
 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +1 -1
index 7381bb751852..100a2774bbb5 100644
@@ -686,9 +686,9 @@ bluetooth {
 		clock-names = "lpo";
 		device-wakeup-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
-		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
 		pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
 		pinctrl-names = "default";
+		shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
 		vbat-supply = <&vcc_wl>;
 		vddio-supply = <&vcca_1v8_pmu>;
 	};
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi +1 -1
index d09e6542e236..3e0cbfff96d8 100644
@@ -402,9 +402,9 @@ bluetooth {
 		clock-names = "lpo";
 		device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
 		host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
-		reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
+		shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
 		vbat-supply = <&vcc_3v3>;
 		vddio-supply = <&vcc_1v8>;
 	};
#9 lore raw
In reply to Diederik de Haas
Quoted 7 lines · Diederik de Haas

This is a set of 4 small device-tree validation fixes.

Patch 1 adds the power-domains property to the csi dphy node on rk356x. Patch 2 removes the 2nd interrupt from the hdmi node on rk3328. Patch 3 replaces 'wake' with 'wakeup' on brcm BT nodes. Patch 4 replaces 'reset-gpios' with 'shutdown-gpios' on brcm BT nodes.

Quoted 8 lines
 arch/arm64/boot/dts/rockchip/rk3328.dtsi           | 3 +--
 arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts   | 4 ++--
 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi  | 6 +++---
 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
 arch/arm64/boot/dts/rockchip/rk356x.dtsi           | 1 +
 5 files changed, 8 insertions(+), 8 deletions(-)

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

  pip3 install dtschema --upgrade

New warnings running 'make CHECK_DTBS=y rockchip/rk3566-box-demo.dtb' for [email protected]:

arch/arm64/boot/dts/rockchip/rk3566-box-demo.dtb: bluetooth: Unevaluated properties are not allowed ('clock-names' was unexpected)
from schema $id: http://devicetree.org/schemas/net/bluetooth/brcm,bluetooth.yaml#