arm64: dts: rockchip: Fix USB Type-C host mode for Radxa ROCK 5B+/5T
Subsystems (2)
PATCH v3 1/1 arm64: dts: rockchip: Fix USB Type-C host mode for Radxa ROCK 5B+/5T
The Radxa ROCK 5B+/5T USB Type-C port supports Dual Role Data and should also act as a host. However, currently, when acting as a host, only self-powered devices work.
Since the ROCK 5B+ supports Dual Role Power, set the power-role property to "dual" and the try-power-role property to "sink". (along with related properties)
The ROCK 5T should only support the "source" power-role.
This allows the port to act as a host, supply power to the port, and allow bus-powered devices to work.
Note that on the ROCK 5T, with this patch applied, it has been observed that some bus-powered devices do not work correctly. Also, it has been observed that after connecting a device (and the data-role switches to host), connecting a host device does not switch the data-role back to the device role. These issues should be addressed separately.
Note that there is a separate known issue where USB 3.0 SuperSpeed devices do not work when oriented in reverse. This issue should also be addressed separately. (USB 2.0/1.1 devices work in both orientations)
---
Changes in v3:
- Use power-role = "source" for ROCK 5T Changes in v2:
- Refine commit message
- Use board-specific dts to describe (try-)power-role
--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi | 4 ++-- arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts | 5 +++++ arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 4 ++++ arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts | 4 ++++ 4 files changed, 15 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi +2 -2
@@ -331,12 +331,12 @@ usb_con: connector { data-role = "dual"; /* fusb302 supports PD Rev 2.0 Ver 1.2 */ pd-revision = /bits/ 8 <0x2 0x0 0x1 0x2>; - 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)>; + source-pdos = + <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>; altmodes { displayport {
arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus.dts +5 -0
@@ -110,6 +110,11 @@ vcc5v0_host_en: vcc5v0-host-en { }; }; +&usb_con { + power-role = "dual"; + try-power-role = "sink"; +}; + &usbdp_phy0 { pinctrl-names = "default"; pinctrl-0 = <&usbc_sbu_dc>;
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +4 -0
@@ -49,6 +49,10 @@ vcc5v0_host_en: vcc5v0-host-en { }; }; +&usb_con { + power-role = "sink"; +}; + &usbdp_phy0 { pinctrl-names = "default"; pinctrl-0 = <&usbc_sbu_dc>;
arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts +4 -0
@@ -130,6 +130,10 @@ usbc_sbu_dc: usbc-sbu-dc { }; }; +&usb_con { + power-role = "source"; +}; + &usbdp_phy0 { pinctrl-names = "default"; pinctrl-0 = <&usbc_sbu_dc>;
Signature · 7 lines
2.43.0 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Quoted 9 lines · FUKAUMI Naoki
The Radxa ROCK 5B+/5T USB Type-C port supports Dual Role Data and should also act as a host. However, currently, when acting as a host, only self-powered devices work.
Since the ROCK 5B+ supports Dual Role Power, set the power-role property to "dual" and the try-power-role property to "sink". (along with related properties)
[...]
Applied, thanks!
[1/1] arm64: dts: rockchip: Fix USB Type-C host mode for Radxa ROCK 5B+/5T
commit: fbf90d1b697faf61bb8b3ed72be6a8ebeb09de3d
Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>