OSDN Git Service

arm64: dts: allwinner: a64: Orange Pi Win: Enable USB OTG socket
authorSamuel Holland <samuel@sholland.org>
Mon, 30 Jul 2018 12:31:23 +0000 (13:31 +0100)
committerChen-Yu Tsai <wens@csie.org>
Mon, 27 Aug 2018 07:42:53 +0000 (15:42 +0800)
The Orange Pi Win has a micro USB-B socket, connected to the SoC's
USB-OTG port. Its power is supplied by the AXP PMIC, and the ID pin is
connected to GPIO PH9. It can serve both as a host or a client port.

Add the respective DT nodes to enable it.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
[wens@csie.org: enable paired EHCI/OHCI device nodes and regulator supply]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts

index a734898..e3a9bc3 100644 (file)
        };
 };
 
+&ehci0 {
+       status = "okay";
+};
+
 &ehci1 {
        status = "okay";
 };
        status = "okay";
 };
 
+&ohci0 {
+       status = "okay";
+};
+
 &ohci1 {
        status = "okay";
 };
        regulator-name = "vcc-wifi-io";
 };
 
+&reg_drivevbus {
+       regulator-name = "usb0-vbus";
+       status = "okay";
+};
+
 &reg_eldo1 {
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        status = "okay";
 };
 
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
 &usbphy {
+       usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
+       usb0_vbus-supply = <&reg_drivevbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        status = "okay";
 };
-