Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: sun8i: h3: enable USB OTG for NanoPi Neo board

Similarly to Orange Pi Zero, NanoPi Neo board has an USB OTG port with
an ID pin but with unpowered VBUS. This patch enables this port in
forced peripheral mode.

ohci/ehci nodes are still enabled since the host mode may work if
external power source is used. In that case, the mode can be switched
for example via sysfs. The same strategy is used for Orange Pi Zero
board DTS.

Signed-off-by: Krzysztof Adamski <k@japko.eu>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

authored by

Krzysztof Adamski and committed by
Maxime Ripard
90706eb8 6ca35864

+17
+17
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
··· 47 47 compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; 48 48 }; 49 49 50 + &ehci0 { 51 + status = "okay"; 52 + }; 53 + 50 54 &emac { 51 55 phy-handle = <&int_mii_phy>; 52 56 phy-mode = "mii"; 53 57 allwinner,leds-active-low; 54 58 status = "okay"; 59 + }; 60 + 61 + &ohci0 { 62 + status = "okay"; 63 + }; 64 + 65 + &usb_otg { 66 + status = "okay"; 67 + dr_mode = "peripheral"; 68 + }; 69 + 70 + &usbphy { 71 + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 55 72 };