Skip to content

Commit c7e62c4

Browse files
Sutter099Yixun Lan
authored andcommitted
riscv: dts: spacemit: Enable USB3.0 on BananaPi-F3
Enable the DWC3 USB 3.0 controller and its associated usbphy2 on the Banana Pi F3 board. The board utilizes a VLI VL817 hub, which requires two separate power supplies: one VBUS and one for hub itself. Add two GPIO-controlled fixed-regulators to manage this. Tested-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Ze Huang <huang.ze@linux.dev> Reviewed-by: Yixun Lan <dlan@gentoo.org> Link: https://lore.kernel.org/r/20260111-k1-usb3dts-v2-v3-3-f5ebd546e904@linux.dev Signed-off-by: Yixun Lan <dlan@gentoo.org>
1 parent 6e8dcd1 commit c7e62c4

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@
5959
regulator-always-on;
6060
vin-supply = <&reg_dc_in>;
6161
};
62+
63+
usb3-vbus-5v {
64+
compatible = "regulator-fixed";
65+
regulator-name = "USB30_VBUS";
66+
regulator-min-microvolt = <5000000>;
67+
regulator-max-microvolt = <5000000>;
68+
regulator-always-on;
69+
gpio = <&gpio K1_GPIO(97) GPIO_ACTIVE_HIGH>;
70+
enable-active-high;
71+
};
72+
73+
usb3_hub_5v: usb3-hub-5v {
74+
compatible = "regulator-fixed";
75+
regulator-name = "USB30_HUB";
76+
regulator-min-microvolt = <5000000>;
77+
regulator-max-microvolt = <5000000>;
78+
gpio = <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>;
79+
enable-active-high;
80+
};
6281
};
6382

6483
&combo_phy {
@@ -313,3 +332,30 @@
313332
pinctrl-0 = <&uart0_2_cfg>;
314333
status = "okay";
315334
};
335+
336+
&usbphy2 {
337+
status = "okay";
338+
};
339+
340+
&usb_dwc3 {
341+
dr_mode = "host";
342+
#address-cells = <1>;
343+
#size-cells = <0>;
344+
status = "okay";
345+
346+
hub_2_0: hub@1 {
347+
compatible = "usb2109,2817";
348+
reg = <0x1>;
349+
vdd-supply = <&usb3_hub_5v>;
350+
peer-hub = <&hub_3_0>;
351+
reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
352+
};
353+
354+
hub_3_0: hub@2 {
355+
compatible = "usb2109,817";
356+
reg = <0x2>;
357+
vdd-supply = <&usb3_hub_5v>;
358+
peer-hub = <&hub_2_0>;
359+
reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
360+
};
361+
};

0 commit comments

Comments
 (0)