* [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3588s-roc-pc
@ 2026-07-09 0:50 Fabio Estevam
2026-07-12 20:33 ` Heiko Stuebner
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2026-07-09 0:50 UTC (permalink / raw)
To: heiko
Cc: robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
linux-rockchip, Fabio Estevam
From: Fabio Estevam <festevam@nabladev.com>
The USB3 OTG controller on the ROC-PC can be used in device mode,
but the board description only enabled the DWC3 controller and USB2 PHY.
The USBDP PHY remained disabled and the controller had no role-switch
default, so DWC3 did not register a UDC and USB gadget drivers such
as g_mass_storage failed to bind.
Enable the USBDP PHY and describe the controller as a USB role switch
with peripheral as the default role. This lets the controller register
as a UDC when no external role provider has selected a host role.
Tested on a Firefly Station M3 by binding g_mass_storage to expose the
eMMC as a USB mass-storage gadget.
Signed-off-by: Fabio Estevam <festevam@nabladev.com>
---
arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts b/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts
index 99853880aaac..7150d5f7684d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts
@@ -833,6 +833,12 @@ &usb_host0_ohci {
&usb_host0_xhci {
extcon = <&u2phy0>;
+ role-switch-default-mode = "peripheral";
+ usb-role-switch;
+ status = "okay";
+};
+
+&usbdp_phy0 {
status = "okay";
};
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3588s-roc-pc
2026-07-09 0:50 [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3588s-roc-pc Fabio Estevam
@ 2026-07-12 20:33 ` Heiko Stuebner
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stuebner @ 2026-07-12 20:33 UTC (permalink / raw)
To: Fabio Estevam
Cc: Heiko Stuebner, robh, krzk+dt, conor+dt, devicetree,
linux-arm-kernel, linux-rockchip, Fabio Estevam
On Wed, 08 Jul 2026 21:50:05 -0300, Fabio Estevam wrote:
> The USB3 OTG controller on the ROC-PC can be used in device mode,
> but the board description only enabled the DWC3 controller and USB2 PHY.
> The USBDP PHY remained disabled and the controller had no role-switch
> default, so DWC3 did not register a UDC and USB gadget drivers such
> as g_mass_storage failed to bind.
>
> Enable the USBDP PHY and describe the controller as a USB role switch
> with peripheral as the default role. This lets the controller register
> as a UDC when no external role provider has selected a host role.
>
> [...]
Applied, thanks!
[1/1] arm64: dts: rockchip: Enable USB device mode on rk3588s-roc-pc
commit: 9d1e32bfdda1aef3291e47c2949b3b9978162a5c
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-12 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09 0:50 [PATCH] arm64: dts: rockchip: Enable USB device mode on rk3588s-roc-pc Fabio Estevam
2026-07-12 20:33 ` Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox