diff options
author | Icenowy Zheng <icenowy@aosc.xyz> | 2017-03-25 10:50:15 -0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-03-27 07:44:52 -0400 |
commit | 5313ea66a458bdbd1077a3b9366efba64daa699d (patch) | |
tree | 6272439975ee180504ef654440519d1c0d513a1d | |
parent | 9d41bbb6e13f7a3209ea4c4d86c2753c8f075a32 (diff) |
arm64: allwinner: h5: enable USB OTG on Orange Pi PC 2 board
Orange Pi PC 2 board features a OTG port like the one on older H3 Orange
Pi's, with PG12 pin being the id det pin and PL2 being the vbus driver
pin.
Add support for it.
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r-- | arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts index 30639729920d..dfecc17dcc92 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | |||
@@ -90,6 +90,16 @@ | |||
90 | gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; | 90 | gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; |
91 | }; | 91 | }; |
92 | }; | 92 | }; |
93 | |||
94 | reg_usb0_vbus: usb0-vbus { | ||
95 | compatible = "regulator-fixed"; | ||
96 | regulator-name = "usb0-vbus"; | ||
97 | regulator-min-microvolt = <5000000>; | ||
98 | regulator-max-microvolt = <5000000>; | ||
99 | enable-active-high; | ||
100 | gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ | ||
101 | status = "okay"; | ||
102 | }; | ||
93 | }; | 103 | }; |
94 | 104 | ||
95 | &codec { | 105 | &codec { |
@@ -100,6 +110,10 @@ | |||
100 | status = "okay"; | 110 | status = "okay"; |
101 | }; | 111 | }; |
102 | 112 | ||
113 | &ehci0 { | ||
114 | status = "okay"; | ||
115 | }; | ||
116 | |||
103 | &ehci1 { | 117 | &ehci1 { |
104 | status = "okay"; | 118 | status = "okay"; |
105 | }; | 119 | }; |
@@ -127,6 +141,10 @@ | |||
127 | status = "okay"; | 141 | status = "okay"; |
128 | }; | 142 | }; |
129 | 143 | ||
144 | &ohci0 { | ||
145 | status = "okay"; | ||
146 | }; | ||
147 | |||
130 | &ohci1 { | 148 | &ohci1 { |
131 | status = "okay"; | 149 | status = "okay"; |
132 | }; | 150 | }; |
@@ -157,7 +175,14 @@ | |||
157 | status = "disabled"; | 175 | status = "disabled"; |
158 | }; | 176 | }; |
159 | 177 | ||
178 | &usb_otg { | ||
179 | dr_mode = "otg"; | ||
180 | status = "okay"; | ||
181 | }; | ||
182 | |||
160 | &usbphy { | 183 | &usbphy { |
161 | /* USB VBUS is always on */ | 184 | /* USB Type-A ports' VBUS is always on */ |
185 | usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ | ||
186 | usb0_vbus-supply = <®_usb0_vbus>; | ||
162 | status = "okay"; | 187 | status = "okay"; |
163 | }; | 188 | }; |