Re: [PATCH] arm: sun8i: nanopi-neo: Enable USB OTG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在 2017-08-28 08:12,David Disseldorp 写道:
From: David Disseldorp <ddiss@xxxxxxxxx>

The NanoPi NEO features a MicroUSB port that can work in both host mode
and peripheral mode. Switching is handled via GPIO PG12.

How's the Vbus of the OTG handled?


Signed-off-by: David Disseldorp <ddiss@xxxxxxxxx>
---
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
index 78f6c24952dd..5abf430ac5a6 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
@@ -47,9 +47,36 @@
 	compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
 };

+&ehci0 {
+	status = "okay";
+};
+
+&ehci3 {
+	status = "okay";
+};

Why do you also enable ehci/ohci3 here?
I think they're already enabled in sun8i-h3-nanopi.dtsi .

+
 &emac {
 	phy-handle = <&int_mii_phy>;
 	phy-mode = "mii";
 	allwinner,leds-active-low;
 	status = "okay";
 };
+
+&ohci0 {
+	status = "okay";
+};
+
+&ohci3 {
+	status = "okay";
+};
+
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usbphy {
+	/* USB Type-A port's VBUS is always on */
+	usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+	status = "okay";
+};
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux