Skip to content

Commit e897bcf

Browse files
Kwiboommind
authored andcommitted
arm64: dts: rockchip: Enable USB 2.0 ports on Radxa E20C
The Radxa E20C has one USB2.0 Type-A HOST port and one USB2.0 Type-C port. The Type-C port is conneced to a FE1.1s_QFN USB hub on the board, with its ports being connected to the XHCI usb controller and an usb-uart bridge. This also means, the XHCI controller can only be used in device-mode. Add support for using the USB 2.0 ports on Radxa E20C. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> [set xhci to peripheral and add comment about the outward-facing hub] Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/20260529190355.4148175-3-heiko@sntech.de
1 parent 5f3ae9b commit e897bcf

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,18 @@
134134
regulator-max-microvolt = <5000000>;
135135
};
136136

137+
vcc5v0_usb20: regulator-5v0-vcc-usb20 {
138+
compatible = "regulator-fixed";
139+
enable-active-high;
140+
gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
141+
pinctrl-names = "default";
142+
pinctrl-0 = <&usb_host_en>;
143+
regulator-name = "vcc5v0_usb20";
144+
regulator-min-microvolt = <5000000>;
145+
regulator-max-microvolt = <5000000>;
146+
vin-supply = <&vcc5v0_sys>;
147+
};
148+
137149
vccio_sd: regulator-vccio-sd {
138150
compatible = "regulator-gpio";
139151
gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
@@ -273,6 +285,12 @@
273285
rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
274286
};
275287
};
288+
289+
usb {
290+
usb_host_en: usb-host-en {
291+
rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
292+
};
293+
};
276294
};
277295

278296
&pwm1 {
@@ -320,3 +338,45 @@
320338
pinctrl-0 = <&uart0m0_xfer>;
321339
status = "okay";
322340
};
341+
342+
&usb_host0_ehci {
343+
status = "okay";
344+
};
345+
346+
&usb_host0_ohci {
347+
status = "okay";
348+
};
349+
350+
/*
351+
* The usb controller can only work in peripheral mode, as it is
352+
* connected to one of the ports of an outward-facing usb hub.
353+
*
354+
* type_c-port (hub-input)
355+
* |
356+
* usb-hub
357+
* | |
358+
* uart-usb usb-host0
359+
* |
360+
* uart0
361+
*/
362+
&usb_host0_xhci {
363+
dr_mode = "peripheral";
364+
extcon = <&usb2phy>;
365+
maximum-speed = "high-speed";
366+
phys = <&usb2phy_otg>;
367+
phy-names = "usb2-phy";
368+
status = "okay";
369+
};
370+
371+
&usb2phy {
372+
status = "okay";
373+
};
374+
375+
&usb2phy_host {
376+
phy-supply = <&vcc5v0_usb20>;
377+
status = "okay";
378+
};
379+
380+
&usb2phy_otg {
381+
status = "okay";
382+
};

0 commit comments

Comments
 (0)