Skip to content
Permalink
Browse files

Nanopi Air/Duo. Enable USB0 by default to have USB serial working out…

… of the box.
  • Loading branch information...
igorpecovnik committed Jan 29, 2018
1 parent 02bfcbd commit 446295ee282c4ff064c78ef5ff31be963222c82c
Showing with 34 additions and 6 deletions.
  1. +17 −4 patch/kernel/sunxi-next/add-nanopi-duo.patch
  2. +17 −2 patch/kernel/sunxi-next/add_otg_neoair.patch
@@ -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,19 +223,32 @@ index 0000000..5ab58f0
+ };
+};
+
+
+&ehci0 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins_a>;
+ status = "okay";
+};
+
+&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 */
+};
+
+
@@ -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";
+};
+

0 comments on commit 446295e

Please sign in to comment.
You can’t perform that action at this time.