arm64: dts: rockchip: use Type-C port as USB HOST port for Radxa ROCK 5B
Subsystems (2)
PATCH 1/2 arm64: dts: rockchip: use Type-C port as USB HOST port for Radxa ROCK 5B
Type-C port is dual-role USB 3.0 port. add usb_host0_xhci and phy nodes to use it as HOST port.
--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +17 -0
@@ -840,6 +840,14 @@ &tsadc { status = "okay"; }; +&u2phy0 { + status = "okay"; +}; + +&u2phy0_otg { + status = "okay"; +}; + &u2phy1 { status = "okay"; };
@@ -883,6 +891,11 @@ &usb_host0_ehci { status = "okay"; }; +&usb_host0_xhci { + dr_mode = "host"; + status = "okay"; +}; + &usb_host1_ehci { status = "okay"; };
@@ -900,6 +913,10 @@ &usb_host2_xhci { status = "okay"; }; +&usbdp_phy0 { + status = "okay"; +}; + &usbdp_phy1 { status = "okay"; };
Signature · 7 lines
2.43.0 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH 2/2 arm64: dts: rockchip: fix USB 3.0 bottom port for Radxa ROCK 5B
add rockchip,dp-lane-mux to usbdp_phy1 to make it work properly.
tested with ELECOM U3HC-A424P10BK[1]:
$ lsusb -t
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M
|__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 003: Dev 003, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 003: Dev 003, If 1, Class=Wireless, Driver=btusb, 12M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M
/: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 005.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/5p, 480M
|__ Port 005: Dev 003, If 0, Class=Billboard, Driver=[none], 480M
/: Bus 007.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 004: Dev 003, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 008.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 009.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M[1] https://www.elecom.co.jp/products/U3HC-A424P10BK.html
--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +1 -0
@@ -918,6 +918,7 @@ &usbdp_phy0 { }; &usbdp_phy1 { + rockchip,dp-lane-mux = <2 3>; status = "okay"; };
Signature · 7 lines
2.43.0 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Heiko Stübner
maintainerRe: [PATCH 2/2] arm64: dts: rockchip: fix USB 3.0 bottom port for Radxa ROCK 5B
Am Samstag, 30. November 2024, 02:40:43 CET schrieb FUKAUMI Naoki:
Quoted 1 line
add rockchip,dp-lane-mux to
usbdp_phy1to make it work properly.
Make it work properly is not an ideal commit description.
I guess the lane assignment for the dp port should be discoverable in the device schematics, so the commit description should explain as much.
Heiko
Quoted 42 lines
tested with ELECOM U3HC-A424P10BK[1]:
$ lsusb -t /: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 003: Dev 003, If 0, Class=Wireless, Driver=btusb, 12M |__ Port 003: Dev 003, If 1, Class=Wireless, Driver=btusb, 12M /: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ohci-platform/1p, 12M /: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M /: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 005.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M /: Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/5p, 480M |__ Port 005: Dev 003, If 0, Class=Billboard, Driver=[none], 480M /: Bus 007.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M |__ Port 004: Dev 003, If 0, Class=Mass Storage, Driver=usb-storage, 5000M /: Bus 008.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 009.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M[1] https://www.elecom.co.jp/products/U3HC-A424P10BK.html
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 1 + 1 file changed, 1 insertion(+)arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +1
-0@@ -918,6 +918,7 @@ &usbdp_phy0 { }; &usbdp_phy1 { + rockchip,dp-lane-mux = <2 3>; status = "okay"; };
Re: [PATCH 2/2] arm64: dts: rockchip: fix USB 3.0 bottom port for Radxa ROCK 5B
Hi,
Quoted 8 lines · Heiko Stübner
Am Samstag, 30. November 2024, 02:40:43 CET schrieb FUKAUMI Naoki:
Quoted 1 line
add rockchip,dp-lane-mux to
usbdp_phy1to make it work properly.Make it work properly is not an ideal commit description.
I guess the lane assignment for the dp port should be discoverable in the device schematics, so the commit description should explain as much.
Rock 5B does not have SSRX2P/SSRX2N and SSTX2P/SSTX2N connected to anything, so this description is just wrong. The other lanes are connected to a USB-A port and thus no USB-C controller is involved, which takes care of any muxing. Not specifying any rockchip,dp-lane-mux configuration sets mode to UDPHY_MODE_USB, which is correct.
Naoki, if you see any problems, it is most likely a bug in the USBDP PHY or DWC3 driver.
Greetings,
-- Sebastian
Quoted 47 lines
Quoted 43 lines
tested with ELECOM U3HC-A424P10BK[1]:
$ lsusb -t /: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 003: Dev 003, If 0, Class=Wireless, Driver=btusb, 12M |__ Port 003: Dev 003, If 1, Class=Wireless, Driver=btusb, 12M /: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ohci-platform/1p, 12M /: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M /: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 005.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M /: Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/5p, 480M |__ Port 005: Dev 003, If 0, Class=Billboard, Driver=[none], 480M /: Bus 007.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M |__ Port 004: Dev 003, If 0, Class=Mass Storage, Driver=usb-storage, 5000M /: Bus 008.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 009.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M[1] https://www.elecom.co.jp/products/U3HC-A424P10BK.html
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 1 + 1 file changed, 1 insertion(+)arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +1
-0@@ -918,6 +918,7 @@ &usbdp_phy0 { }; &usbdp_phy1 { + rockchip,dp-lane-mux = <2 3>; status = "okay"; };
Re: [PATCH 2/2] arm64: dts: rockchip: fix USB 3.0 bottom port for Radxa ROCK 5B
Hi,
Quoted 19 lines · Sebastian Reichel
Hi,
Quoted 8 lines · Heiko Stübner
Am Samstag, 30. November 2024, 02:40:43 CET schrieb FUKAUMI Naoki:
Quoted 1 line
add rockchip,dp-lane-mux to
usbdp_phy1to make it work properly.Make it work properly is not an ideal commit description.
I guess the lane assignment for the dp port should be discoverable in the device schematics, so the commit description should explain as much.
Rock 5B does not have SSRX2P/SSRX2N and SSTX2P/SSTX2N connected to anything, so this description is just wrong. The other lanes are connected to a USB-A port and thus no USB-C controller is involved, which takes care of any muxing. Not specifying any rockchip,dp-lane-mux configuration sets mode to
UDPHY_MODE_USB, which is correct.
Quoted 2 lines
Naoki, if you see any problems, it is most likely a bug in the USBDP PHY or DWC3 driver.
sorry, I should write error message. I understand it, please ignore my patch.
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 51 lines
Greetings,
-- Sebastian
Quoted 47 lines
Quoted 43 lines
tested with ELECOM U3HC-A424P10BK[1]:
$ lsusb -t /: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 003: Dev 003, If 0, Class=Wireless, Driver=btusb, 12M |__ Port 003: Dev 003, If 1, Class=Wireless, Driver=btusb, 12M /: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ohci-platform/1p, 12M /: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M /: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 005.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M /: Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/5p, 480M |__ Port 005: Dev 003, If 0, Class=Billboard, Driver=[none], 480M /: Bus 007.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M |__ Port 004: Dev 003, If 0, Class=Mass Storage, Driver=usb-storage, 5000M /: Bus 008.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M /: Bus 009.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M[1] https://www.elecom.co.jp/products/U3HC-A424P10BK.html
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 1 + 1 file changed, 1 insertion(+)arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +1
-0@@ -918,6 +918,7 @@ &usbdp_phy0 { }; &usbdp_phy1 { + rockchip,dp-lane-mux = <2 3>; status = "okay"; };
Heiko Stübner
maintainerAm Samstag, 30. November 2024, 02:40:42 CET schrieb FUKAUMI Naoki:
Quoted 2 lines
Type-C port is dual-role USB 3.0 port. add
usb_host0_xhciand phy nodes to use it as HOST port.
This needs a bit more explanation on _why_ you're statically setting this to host-mode.
Heiko
Quoted 48 lines
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +17
-0@@ -840,6 +840,14 @@ &tsadc { status = "okay"; }; +&u2phy0 { + status = "okay"; +}; + +&u2phy0_otg { + status = "okay"; +}; + &u2phy1 { status = "okay"; };@@ -883,6 +891,11 @@ &usb_host0_ehci { status = "okay"; }; +&usb_host0_xhci { + dr_mode = "host"; + status = "okay"; +}; + &usb_host1_ehci { status = "okay"; };@@ -900,6 +913,10 @@ &usb_host2_xhci { status = "okay"; }; +&usbdp_phy0 { + status = "okay"; +}; + &usbdp_phy1 { status = "okay"; };
Hi,
Quoted 6 lines · Heiko Stübner
Am Samstag, 30. November 2024, 02:40:42 CET schrieb FUKAUMI Naoki:
Quoted 2 lines
Type-C port is dual-role USB 3.0 port. add
usb_host0_xhciand phy nodes to use it as HOST port.This needs a bit more explanation on _why_ you're statically setting this to host-mode.
The USB-C port can be used in peripheral mode, so this is just wrong. Also it should be added together with the USB PD controller for proper muxing and role switch support. The reason I have not yet send the patch is that this needed a fix in U-Boot first.
Most users are powering their Rock 5Bs via the USB-C port and a bad description results in unexpected hardware resets at boot time.
I mostly waited for the rc1 tag to happen now that U-Boot support has landed. Also I expect that even with all those precautions some people will start seeing issues. Unfortunately there are many non-compliant USB-PD power sources :(
-- Sebastian
Quoted 43 lines
Heiko
Quoted 40 lines
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +13
-0@@ -840,6 +840,14 @@ &tsadc { status = "okay"; }; +&u2phy0 { + status = "okay"; +}; + +&u2phy0_otg { + status = "okay"; +}; + &u2phy1 { status = "okay"; };@@ -883,6 +891,11 @@ &usb_host0_ehci { status = "okay"; }; +&usb_host0_xhci { + dr_mode = "host"; + status = "okay"; +}; + &usb_host1_ehci { status = "okay"; };@@ -900,6 +913,10 @@ &usb_host2_xhci { status = "okay"; };
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts &usb_host2_xhci { · line 922
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +4
-0+&usbdp_phy0 { + status = "okay"; +}; + &usbdp_phy1 { status = "okay"; };
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hi Heiko and Sebastian,
thank you for your comments!
Quoted 15 lines · Sebastian Reichel
Hi,
Quoted 6 lines · Heiko Stübner
Am Samstag, 30. November 2024, 02:40:42 CET schrieb FUKAUMI Naoki:
Quoted 2 lines
Type-C port is dual-role USB 3.0 port. add
usb_host0_xhciand phy nodes to use it as HOST port.This needs a bit more explanation on _why_ you're statically setting this to host-mode.
The USB-C port can be used in peripheral mode, so this is just wrong. Also it should be added together with the USB PD controller for proper muxing and role switch support. The reason I have not yet send the patch is that this needed a fix in U-Boot first.
Quoted 8 lines
Most users are powering their Rock 5Bs via the USB-C port and a bad description results in unexpected hardware resets at boot time.
I mostly waited for the rc1 tag to happen now that U-Boot support has landed. Also I expect that even with all those precautions some people will start seeing issues. Unfortunately there are many non-compliant USB-PD power sources :(
I see. I'll wait proper implementation.
please ignore my patch.
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 57 lines
-- Sebastian
Quoted 55 lines
Heiko
Quoted 48 lines
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +17
-0@@ -840,6 +840,14 @@ &tsadc { status = "okay"; }; +&u2phy0 { + status = "okay"; +}; + +&u2phy0_otg { + status = "okay"; +}; + &u2phy1 { status = "okay"; };@@ -883,6 +891,11 @@ &usb_host0_ehci { status = "okay"; }; +&usb_host0_xhci { + dr_mode = "host"; + status = "okay"; +}; + &usb_host1_ehci { status = "okay"; };@@ -900,6 +913,10 @@ &usb_host2_xhci { status = "okay"; }; +&usbdp_phy0 { + status = "okay"; +}; + &usbdp_phy1 { status = "okay"; };
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip