Skip to content

Commit d7b8392

Browse files
Heiko Stuebnermmind
authored andcommitted
arm64: dts: rockchip: add dual-role usb3 hosts to rk3588 Tiger-Haikou
Apart from the host-only usb3 controller (host2) the rk3588 also provides two dual-role controllers. On the Tiger-Haikou combination these are connected to the lower usb3-host port in host-only mode and the micro-usb3 port for dual-role operation. Add the necessary controllers, phys to the Tiger-Haikou board and enable the usb-id extcon. Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://lore.kernel.org/r/20240422163951.2604273-4-heiko@sntech.de Signed-off-by: Heiko Stuebner <heiko@sntech.de>
1 parent eabb53f commit d7b8392

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@
113113
vin-supply = <&dc_12v>;
114114
};
115115

116+
vcc5v0_otg: vcc5v0-otg-regulator {
117+
compatible = "regulator-fixed";
118+
enable-active-high;
119+
gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
120+
pinctrl-names = "default";
121+
pinctrl-0 = <&otg_vbus_drv>;
122+
regulator-name = "vcc5v0_otg";
123+
regulator-always-on;
124+
};
125+
116126
vcc5v0_usb: vcc5v0-usb-regulator {
117127
compatible = "regulator-fixed";
118128
regulator-name = "vcc5v0_usb";
@@ -137,6 +147,10 @@
137147
status = "okay";
138148
};
139149

150+
&extcon_usb3 {
151+
status = "okay";
152+
};
153+
140154
&gmac0 {
141155
status = "okay";
142156
};
@@ -199,6 +213,13 @@
199213
<3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
200214
};
201215
};
216+
217+
usb2 {
218+
otg_vbus_drv: otg-vbus-drv {
219+
rockchip,pins =
220+
<1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
221+
};
222+
};
202223
};
203224

204225
&sdmmc {
@@ -214,6 +235,23 @@
214235
status = "okay";
215236
};
216237

238+
&u2phy0 {
239+
status = "okay";
240+
};
241+
242+
&u2phy0_otg {
243+
phy-supply = <&vcc5v0_otg>;
244+
status = "okay";
245+
};
246+
247+
&u2phy1 {
248+
status = "okay";
249+
};
250+
251+
&u2phy1_otg {
252+
status = "okay";
253+
};
254+
217255
&u2phy2 {
218256
status = "okay";
219257
};
@@ -236,6 +274,13 @@
236274

237275
&uart5 {
238276
rts-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>;
277+
};
278+
279+
&usbdp_phy0 {
280+
status = "okay";
281+
};
282+
283+
&usbdp_phy1 {
239284
status = "okay";
240285
};
241286

@@ -249,6 +294,13 @@
249294
status = "okay";
250295
};
251296

297+
/* host0_xhci on Q7_USB_P1, usb3-otg port */
298+
&usb_host0_xhci {
299+
dr_mode = "otg";
300+
extcon = <&extcon_usb3>;
301+
status = "okay";
302+
};
303+
252304
/* host1 on Q7_USB_P3, usb2 port */
253305
&usb_host1_ehci {
254306
status = "okay";
@@ -259,6 +311,12 @@
259311
status = "okay";
260312
};
261313

314+
/* host1_xhci on Q7_USB_P0, lower usb3 port */
315+
&usb_host1_xhci {
316+
dr_mode = "host";
317+
status = "okay";
318+
};
319+
262320
/* host2 on Q7_USB_P2, upper usb3 port */
263321
&usb_host2_xhci {
264322
status = "okay";

0 commit comments

Comments
 (0)