Nanopi Air/Duo. Enable USB0 by default to have USB serial working out of the box.

This commit is contained in:
Igor Pecovnik 2018-01-29 07:54:56 +01:00
parent 02bfcbd94d
commit 446295ee28
2 changed files with 34 additions and 6 deletions

View File

@ -15,7 +15,7 @@ new file mode 100644
index 0000000..5ab58f0
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-h2-plus-nanopi-duo.dts
@@ -0,0 +1,223 @@
@@ -0,0 +1,236 @@
+/*
+ * adapted by <github.com/karabek>, based on
+ * Copyright (C) 2016 James Pettigrew <james@innovum.com.au>
@ -223,6 +223,15 @@ index 0000000..5ab58f0
+ };
+};
+
+
+&ehci0 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins_a>;
@ -230,12 +239,16 @@ index 0000000..5ab58f0
+};
+
+&usb_otg {
+ dr_mode = "otg";
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usbphy {
+ /*
+ * 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 */
+};
+
+

View File

@ -2,12 +2,27 @@ diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/s
index ddbb92b..14339c5 100755
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
@@ -135,6 +135,14 @@
bias-pull-up;
};
+&ehci0 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
@@ -141,6 +141,11 @@
status = "okay";
};
+&usb_otg {
+ dr_mode = "otg";
+ dr_mode = "peripheral";
+ status = "okay";
+};
+