Skip to content

Commit dce01d8

Browse files
aurel32Yixun Lan
authored andcommitted
riscv: dts: spacemit: enable USB 3 ports on Milk-V Jupiter
Enable the DWC3 USB 3.0 controller (USB#2 port in the K1 datasheet) and its associated combo_phy (USB 3 PHY) and usbphy2 (USB 2 PHY) on the Milk-V Jupiter board. The board uses a VLI VL817 hub, providing four ports. Two are routed to the 3.0 type-A connectors, and two to the F_USB3 front USB header. The hub requires two separate 5V power supplies: one for the hub itself and one for the USB connectors. Add an always-on regulator sourcing 5V from the DC-IN input, along with two GPIO-controlled fixed regulators to manage the hub and connectors power supplies. Note that the board also provides four USB 2.0 ports (two via type-A connectors and two via the F_USB2 front USB header), but these are handled by a different controller (USB#1 port in the K1 datasheet). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Yixun Lan <dlan@kernel.org> Link: https://lore.kernel.org/r/20260326183745.1370642-6-aurelien@aurel32.net Signed-off-by: Yixun Lan <dlan@kernel.org>
1 parent 2829823 commit dce01d8

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,41 @@
5858
regulator-always-on;
5959
vin-supply = <&reg_dc_in>;
6060
};
61+
62+
reg_vcc_5v: regulator-vcc-5v {
63+
compatible = "regulator-fixed";
64+
regulator-name = "vcc_5v";
65+
regulator-min-microvolt = <5000000>;
66+
regulator-max-microvolt = <5000000>;
67+
regulator-boot-on;
68+
regulator-always-on;
69+
vin-supply = <&reg_dc_in>;
70+
};
71+
72+
regulator-usb3-vbus-5v {
73+
compatible = "regulator-fixed";
74+
regulator-name = "USB30_VBUS";
75+
regulator-min-microvolt = <5000000>;
76+
regulator-max-microvolt = <5000000>;
77+
regulator-always-on;
78+
vin-supply = <&reg_vcc_5v>;
79+
gpio = <&gpio K1_GPIO(97) GPIO_ACTIVE_HIGH>;
80+
enable-active-high;
81+
};
82+
83+
usb3_hub_5v: regulator-usb3-hub-5v {
84+
compatible = "regulator-fixed";
85+
regulator-name = "USB30_HUB";
86+
regulator-min-microvolt = <5000000>;
87+
regulator-max-microvolt = <5000000>;
88+
vin-supply = <&reg_vcc_5v>;
89+
gpio = <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>;
90+
enable-active-high;
91+
};
92+
};
93+
94+
&combo_phy {
95+
status = "okay";
6196
};
6297

6398
&eth0 {
@@ -302,3 +337,30 @@
302337
pinctrl-0 = <&uart0_2_cfg>;
303338
status = "okay";
304339
};
340+
341+
&usbphy2 {
342+
status = "okay";
343+
};
344+
345+
&usb_dwc3 {
346+
dr_mode = "host";
347+
#address-cells = <1>;
348+
#size-cells = <0>;
349+
status = "okay";
350+
351+
hub_2_0: hub@1 {
352+
compatible = "usb2109,2817";
353+
reg = <0x1>;
354+
vdd-supply = <&usb3_hub_5v>;
355+
peer-hub = <&hub_3_0>;
356+
reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
357+
};
358+
359+
hub_3_0: hub@2 {
360+
compatible = "usb2109,817";
361+
reg = <0x2>;
362+
vdd-supply = <&usb3_hub_5v>;
363+
peer-hub = <&hub_2_0>;
364+
reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
365+
};
366+
};

0 commit comments

Comments
 (0)