Skip to content

Commit 07f1034

Browse files
xhackerustcRevySR
authored andcommitted
XUANTIE: riscv: dts: thead: Enable Lichee Pi 4A USB
From: 9f2a969 Signed-off-by: Jisheng Zhang <[email protected]> [esmil: fix gpio references] Signed-off-by: Emil Renner Berthing <[email protected]> [ Han Gao: remove audio_i2c ] Signed-off-by: Han Gao <[email protected]>
1 parent 79e62f5 commit 07f1034

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55

66
#include "th1520-lichee-module-4a.dtsi"
7+
#include <dt-bindings/gpio/gpio.h>
78

89
/ {
910
model = "Sipeed Lichee Pi 4A";
@@ -23,6 +24,11 @@
2324
serial4 = &uart4;
2425
serial5 = &uart5;
2526
spi0 = &spi0;
27+
i2c0 = &i2c0;
28+
i2c1 = &i2c1;
29+
i2c2 = &i2c2;
30+
i2c3 = &i2c3;
31+
i2c4 = &i2c4;
2632
};
2733

2834
chosen {
@@ -49,6 +55,26 @@
4955
cooling-levels = <0 66 196 255>;
5056
};
5157

58+
hub_5v: regulator-hub_5v {
59+
compatible = "regulator-fixed";
60+
regulator-name = "HUB_5V";
61+
regulator-min-microvolt = <5000000>;
62+
regulator-max-microvolt = <5000000>;
63+
gpio = <&ioexp3 3 GPIO_ACTIVE_HIGH>;
64+
enable-active-high;
65+
regulator-always-on;
66+
};
67+
68+
vcc5v_usb: regulator-vcc5v_usb {
69+
compatible = "regulator-fixed";
70+
regulator-name = "VCC5V_USB";
71+
regulator-min-microvolt = <5000000>;
72+
regulator-max-microvolt = <5000000>;
73+
gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
74+
enable-active-high;
75+
regulator-always-on;
76+
};
77+
5278
thermal-zones {
5379
cpu-thermal {
5480
polling-delay = <1000>;
@@ -95,6 +121,14 @@
95121
};
96122
};
97123

124+
&aogpio {
125+
sel-usb-hub-hog {
126+
gpio-hog;
127+
gpios = <4 GPIO_ACTIVE_HIGH>;
128+
output-high;
129+
};
130+
};
131+
98132
&i2c0 {
99133
pinctrl-names = "default";
100134
pinctrl-0 = <&i2c0_pins>;
@@ -259,3 +293,28 @@
259293
pinctrl-0 = <&uart0_pins>;
260294
status = "okay";
261295
};
296+
297+
&usb {
298+
status = "okay";
299+
};
300+
301+
&usb_dwc3 {
302+
status = "okay";
303+
#address-cells = <1>;
304+
#size-cells = <0>;
305+
306+
hub_2_0: hub@1 {
307+
compatible = "usb2109,2817";
308+
reg = <1>;
309+
peer-hub = <&hub_3_0>;
310+
vdd-supply = <&hub_5v>;
311+
vbus-supply = <&vcc5v_usb>;
312+
};
313+
314+
hub_3_0: hub@2 {
315+
compatible = "usb2109,817";
316+
reg = <2>;
317+
peer-hub = <&hub_2_0>;
318+
vbus-supply = <&vcc5v_usb>;
319+
};
320+
};

0 commit comments

Comments
 (0)