Commit 72897fa3 authored by Icenowy Zheng's avatar Icenowy Zheng Committed by Maxime Ripard

ARM: sun8i: h2+: enable USB OTG for Orange Pi Zero board

Orange Pi Zero board features a USB OTG port, which has a ID pin, and
can be used to power up the board. However, even if the board is powered
via +5V pin in GPIO/expansion headers, the VBUS in the OTG port cannot
be powered up, thus it's impossible to use it in host mode with simple
OTG cables.

Add support for it in peripheral mode.

If someone really want to use it in host mode, the mode of PHY can be
switch via sysfs, then use a powered USB OTG cable or powered USB HUB to
power up external USB devices.
Signed-off-by: default avatarIcenowy Zheng <icenowy@aosc.xyz>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 2e77b3af
......@@ -96,6 +96,10 @@ wifi_pwrseq: wifi_pwrseq {
};
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
......@@ -132,6 +136,10 @@ &mmc1_pins_a {
bias-pull-up;
};
&ohci0 {
status = "okay";
};
&ohci1 {
status = "okay";
};
......@@ -154,7 +162,17 @@ &uart2 {
status = "disabled";
};
&usb_otg {
dr_mode = "peripheral";
status = "okay";
};
&usbphy {
/* USB VBUS is always on */
/*
* USB Type-A port VBUS is always on. However, MicroUSB VBUS can only
* power up the board; when it's used as OTG port, this VBUS is
* always off even if the board is powered via GPIO pins.
*/
status = "okay";
usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment