Skip to content

Commit b67379a

Browse files
wensmripard
authored andcommitted
ARM: dts: sun6i: hummingbird: Enable USB OTG
The A31 Hummingbird has a mini USB OTG port, and uses GPIO pins from the SoC for ID pin and VBUS detection and VBUS control. The PMIC can also do VBUS detection and control. Here we prefer to use the PMIC's DRIVEVBUS function to control VBUS for USB OTG, as that is the hardware default. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
1 parent 80ee72e commit b67379a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

arch/arm/boot/dts/sun6i-a31-hummingbird.dts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@
244244
reg = <0x68>;
245245
interrupt-parent = <&nmi_intc>;
246246
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
247+
x-powers,drive-vbus-en;
247248
};
248249
};
249250

@@ -302,6 +303,11 @@
302303
regulator-name = "vcc-dram";
303304
};
304305

306+
&reg_drivevbus {
307+
regulator-name = "usb0-vbus";
308+
status = "okay";
309+
};
310+
305311
&reg_usb1_vbus {
306312
gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
307313
status = "okay";
@@ -326,12 +332,25 @@
326332
status = "okay";
327333
};
328334

335+
&usb_otg {
336+
dr_mode = "otg";
337+
status = "okay";
338+
};
339+
340+
&usb_power_supply {
341+
status = "okay";
342+
};
343+
329344
&usb1_vbus_pin_a {
330345
/* different pin from sunxi-common-regulators */
331346
pins = "PH24";
332347
};
333348

334349
&usbphy {
350+
usb0_id_det-gpio = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */
351+
usb0_vbus_det-gpio = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */
352+
usb0_vbus_power-supply = <&usb_power_supply>;
353+
usb0_vbus-supply = <&reg_drivevbus>;
335354
usb1_vbus-supply = <&reg_usb1_vbus>;
336355
status = "okay";
337356
};

0 commit comments

Comments
 (0)