ARM: dts: orange-pi-zero-plus2: enable USB OTG port
authorDiego Rondini <diego.rondini@kynetics.com>
Mon, 15 Jun 2020 13:02:23 +0000 (15:02 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 16 Jun 2020 10:35:33 +0000 (12:35 +0200)
Enable support for USB OTG port on Orange Pi Zero Plus 2 (both H3 and H5
variants). As, according to the board schematics, the USB OTG port cannot
provide power to external devices, we set dr_mode to peripheral.

Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
Link: https://lore.kernel.org/r/20200615130223.34464-1-diego.rondini@kynetics.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts

index b8f46e2802fd31c5a127a961c3c7693244dee1e3..cbe32b975c5fe213e799dc367d24a47c3dbbce26 100644 (file)
        status = "okay";
 };
 
+&ehci0 {
+       status = "okay";
+};
+
 &hdmi {
        status = "okay";
 };
        status = "okay";
 };
 
+&ohci0 {
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pa_pins>;
        status = "okay";
 };
+
+&usb_otg {
+       /*
+        * According to schematics CN1 MicroUSB port can be used to take
+        * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB
+        * port cannot provide power externally even if the board is powered
+        * via GPIO pins. It thus makes sense to force peripheral mode.
+        */
+       dr_mode = "peripheral";
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index c95a68541309c88091d905644ed65957e9ba3096..e67733d133bb4ef9ab37157c329337215f576963 100644 (file)
        status = "okay";
 };
 
+&ehci0 {
+       status = "okay";
+};
+
 &hdmi {
        status = "okay";
 };
        status = "okay";
 };
 
+&ohci0 {
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pa_pins>;
        pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
        status = "okay";
 };
+
+&usb_otg {
+       /*
+        * According to schematics CN1 MicroUSB port can be used to take
+        * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB
+        * port cannot provide power externally even if the board is powered
+        * via GPIO pins. It thus makes sense to force peripheral mode.
+        */
+       dr_mode = "peripheral";
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};