Skip to contentSkip to conversation

rockchip: rk3588-rock-5b: Remove USB-C controller from u-boot.dtsi

PATCH Superseded Jonas Karlman 4 participants 6 messages Jan 26 – Mar 9 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rockchip: rk3588-rock-5b: Remove USB-C controller from u-boot.dtsi

The commit 12049db76437 ("rockchip: rk3588-rock-5b: Add USB-C controller to u-boot.dtsi") added the USB-C controller node to the ROCK 5B board u-boot.dtsi, this and related usb nodes are now part of upstream DT.

Remove the upstream USB-C controller related DT nodes from u-boot.dtsi, keep usbc0 status = "okay" to keep USB-C power delivery working.

---
 arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 43 +------------------------
 1 file changed, 1 insertion(+), 42 deletions(-)
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +1 -42
index e07b549c767f..ddc177344ebd 100644
@@ -19,33 +19,6 @@
 	bootph-some-ram;
 };
 
-&i2c4 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c4m1_xfer>;
-	status = "okay";
-
-	usbc0: usb-typec@22 {
-		compatible = "fcs,fusb302";
-		reg = <0x22>;
-		interrupt-parent = <&gpio3>;
-		interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
-		pinctrl-names = "default";
-		status = "okay";
-
-		usb_con: connector {
-			compatible = "usb-c-connector";
-			label = "USB-C";
-			data-role = "dual";
-			power-role = "sink";
-			try-power-role = "sink";
-			op-sink-microwatt = <1000000>;
-			sink-pdos =
-				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
-				<PDO_VAR(5000, 20000, 5000)>;
-		};
-	};
-};
-
 &saradc {
 	bootph-pre-ram;
 	vdd-microvolts = <1800000>;
@@ -63,20 +36,6 @@
 	};
 };
 
-&u2phy0 {
-	status = "okay";
-};
-
-&u2phy0_otg {
-	status = "okay";
-};
-
-&usbdp_phy0 {
-	status = "okay";
-};
-
-&usb_host0_xhci {
-	dr_mode = "peripheral";
-	maximum-speed = "high-speed";
+&usbc0 {
 	status = "okay";
 };
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 9 lines · Jonas Karlman

The commit 12049db76437 ("rockchip: rk3588-rock-5b: Add USB-C controller to u-boot.dtsi") added the USB-C controller node to the ROCK 5B board u-boot.dtsi, this and related usb nodes are now part of upstream DT.

Remove the upstream USB-C controller related DT nodes from u-boot.dtsi, keep usbc0 status = "okay" to keep USB-C power delivery working.

---

Greetings,

-- Sebastian

Quoted 66 lines
 arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 43 +------------------------
 1 file changed, 1 insertion(+), 42 deletions(-)
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +1 -42
index e07b549c767f..ddc177344ebd 100644
@@ -19,33 +19,6 @@
 	bootph-some-ram;
 };
 
-&i2c4 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c4m1_xfer>;
-	status = "okay";
-
-	usbc0: usb-typec@22 {
-		compatible = "fcs,fusb302";
-		reg = <0x22>;
-		interrupt-parent = <&gpio3>;
-		interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
-		pinctrl-names = "default";
-		status = "okay";
-
-		usb_con: connector {
-			compatible = "usb-c-connector";
-			label = "USB-C";
-			data-role = "dual";
-			power-role = "sink";
-			try-power-role = "sink";
-			op-sink-microwatt = <1000000>;
-			sink-pdos =
-				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
-				<PDO_VAR(5000, 20000, 5000)>;
-		};
-	};
-};
-
 &saradc {
 	bootph-pre-ram;
 	vdd-microvolts = <1800000>;
@@ -63,20 +36,6 @@
 	};
 };
 
-&u2phy0 {
-	status = "okay";
-};
-
-&u2phy0_otg {
-	status = "okay";
-};
-
-&usbdp_phy0 {
-	status = "okay";
-};
-
-&usb_host0_xhci {
-	dr_mode = "peripheral";
-	maximum-speed = "high-speed";
+&usbc0 {
 	status = "okay";
 };
Signature · 1 line
2.52.0
#2 lore raw
In reply to Jonas Karlman

Hi Jonas,

On 1/26/26 10:55 PM, Jonas Karlman wrote:

[...]

arch/arm/dts/rk3588-rock-5b-u-boot.dtsi line 80

Quoted 3 lines

-&usb_host0_xhci {

arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +0 -2
-	dr_mode = "peripheral";
-	maximum-speed = "high-speed";

This is not set anymore after this patch is applied (dr_mode = otg and no maximum-speed). Please keep this part as is and if actually fine to remove, have a separate commit motivating the removal.

Cheers,
Quentin

#3 lore raw

Hi Quentin,

Quoted 6 lines · Quentin Schulz

Hi Jonas,

On 1/26/26 10:55 PM, Jonas Karlman wrote:

[...]

Quoted 7 lines

arch/arm/dts/rk3588-rock-5b-u-boot.dtsi line 80

Quoted 3 lines

-&usb_host0_xhci {

arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +0 -2
-	dr_mode = "peripheral";
-	maximum-speed = "high-speed";

This is not set anymore after this patch is applied (dr_mode = otg and no maximum-speed). Please keep this part as is and if actually fine to remove, have a separate commit motivating the removal.

I disagree, these props may differ but the function they result in for U-Boot is the same, i.e. ums and rockusb commands can be used before and after this patch.

The board u-boot.dtsi included something minimal required to have ums and rockusb working, this can fully be replaced with upstream DT and U-Boot functionality stay the same. Something I think current commit message is already covering.

Regards,
Jonas

Quoted 2 lines

Cheers,
Quentin

#4 lore raw

Hi Jonas,

Quoted 17 lines · Jonas Karlman

Hi Quentin,

Quoted 6 lines · Quentin Schulz

Hi Jonas,

On 1/26/26 10:55 PM, Jonas Karlman wrote:

[...]

Quoted 7 lines

arch/arm/dts/rk3588-rock-5b-u-boot.dtsi line 80

Quoted 3 lines

-&usb_host0_xhci {

arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +0 -2
-	dr_mode = "peripheral";
-	maximum-speed = "high-speed";

This is not set anymore after this patch is applied (dr_mode = otg and no maximum-speed). Please keep this part as is and if actually fine to remove, have a separate commit motivating the removal.

Quoted 9 lines

I disagree, these props may differ but the function they result in for U-Boot is the same, i.e. ums and rockusb commands can be used before and after this patch.

The board u-boot.dtsi included something minimal required to have ums and rockusb working, this can fully be replaced with upstream DT and U-Boot functionality stay the same. Something I think current commit message is already covering.

I read the commit log as "code is already in upstream DTS so remove duplicated code", which isn't true as two properties aren't making/haven't made it.

At the very least, highlight those two changes and justify why it's fine not to have them anymore.

Can we enter SPL_DFU mode with dr_mode = otg? (I assume we could in the past?) You are the one who added those two properties in 2024 and it also wasn't really motivated back then, so why maximum-speed as well? And why is it fine to remove now?

Cheers,
Quentin

Reviewed-by on v1 1/1
#5 lore raw
In reply to Jonas Karlman
Quoted 8 lines · Jonas Karlman

The commit 12049db76437 ("rockchip: rk3588-rock-5b: Add USB-C controller to u-boot.dtsi") added the USB-C controller node to the ROCK 5B board u-boot.dtsi, this and related usb nodes are now part of upstream DT.

Remove the upstream USB-C controller related DT nodes from u-boot.dtsi, keep usbc0 status = "okay" to keep USB-C power delivery working.

Thanks,
- Kever

Quoted 64 lines
---
  arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 43 +------------------------
  1 file changed, 1 insertion(+), 42 deletions(-)
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi +1 -42
index e07b549c767f..ddc177344ebd 100644
@@ -19,33 +19,6 @@
  	bootph-some-ram;
  };
 
-&i2c4 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c4m1_xfer>;
-	status = "okay";
-
-	usbc0: usb-typec@22 {
-		compatible = "fcs,fusb302";
-		reg = <0x22>;
-		interrupt-parent = <&gpio3>;
-		interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
-		pinctrl-names = "default";
-		status = "okay";
-
-		usb_con: connector {
-			compatible = "usb-c-connector";
-			label = "USB-C";
-			data-role = "dual";
-			power-role = "sink";
-			try-power-role = "sink";
-			op-sink-microwatt = <1000000>;
-			sink-pdos =
-				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
-				<PDO_VAR(5000, 20000, 5000)>;
-		};
-	};
-};
-
  &saradc {
  	bootph-pre-ram;
  	vdd-microvolts = <1800000>;
@@ -63,20 +36,6 @@
  	};
  };
 
-&u2phy0 {
-	status = "okay";
-};
-
-&u2phy0_otg {
-	status = "okay";
-};
-
-&usbdp_phy0 {
-	status = "okay";
-};
-
-&usb_host0_xhci {
-	dr_mode = "peripheral";
-	maximum-speed = "high-speed";
+&usbc0 {
  	status = "okay";
  };