Skip to content
Permalink
Browse files

[ nanopi boards ] adjust default settings like they are in stock FA k…

…ernel
  • Loading branch information...
igorpecovnik committed Apr 22, 2019
1 parent 43e1f75 commit 390a5a2e90c99bcb643ea975b0f7d66695c38d53

This file was deleted.

@@ -0,0 +1,97 @@
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
index f110ee382..c25c08bae 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
@@ -51,6 +51,10 @@
/ {
aliases {
serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
+ ethernet0 = &emac;
};

chosen {
@@ -89,10 +93,38 @@
};
};

+&ehci0 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&ehci2 {
+ status = "okay";
+};
+
+&ohci2 {
+ status = "okay";
+};
+
&ehci3 {
status = "okay";
};

+&ohci3 {
+ status = "okay";
+};
+
&mmc0 {
bus-width = <4>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
@@ -100,10 +132,6 @@
vmmc-supply = <&reg_vcc3v3>;
};

-&ohci3 {
- status = "okay";
-};
-
&pio {
leds_npi: led_pins {
pins = "PA10";
@@ -129,6 +157,31 @@
status = "okay";
};

+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>;
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+ rtc@68 {
+ compatible = "dallas,ds1307";
+ reg = <0x68>;
+ };
+};
+
+&usb_otg {
+ // OTG is not stable.
+ // most nanopi-h3's MicroUSB support OTG, except:
+ // 1. nanopi-neo-V1.4 support OTG, nanopi-neo-V1.3/1.2... support USB device.
+ // 2. nanopi-k1 only use as power.
+ dr_mode = "otg";
+ status = "okay";
+};
+
&usbphy {
+ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+ usb0_vbus-supply = <&reg_usb0_vbus>;
status = "okay";
};

This file was deleted.

@@ -0,0 +1,97 @@
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
index f110ee382..c25c08bae 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
@@ -51,6 +51,10 @@
/ {
aliases {
serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
+ ethernet0 = &emac;
};

chosen {
@@ -89,10 +93,38 @@
};
};

+&ehci0 {
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&ehci2 {
+ status = "okay";
+};
+
+&ohci2 {
+ status = "okay";
+};
+
&ehci3 {
status = "okay";
};

+&ohci3 {
+ status = "okay";
+};
+
&mmc0 {
bus-width = <4>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
@@ -100,10 +132,6 @@
vmmc-supply = <&reg_vcc3v3>;
};

-&ohci3 {
- status = "okay";
-};
-
&pio {
leds_npi: led_pins {
pins = "PA10";
@@ -129,6 +157,31 @@
status = "okay";
};

+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>;
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+ rtc@68 {
+ compatible = "dallas,ds1307";
+ reg = <0x68>;
+ };
+};
+
+&usb_otg {
+ // OTG is not stable.
+ // most nanopi-h3's MicroUSB support OTG, except:
+ // 1. nanopi-neo-V1.4 support OTG, nanopi-neo-V1.3/1.2... support USB device.
+ // 2. nanopi-k1 only use as power.
+ dr_mode = "otg";
+ status = "okay";
+};
+
&usbphy {
+ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+ usb0_vbus-supply = <&reg_usb0_vbus>;
status = "okay";
};

2 comments on commit 390a5a2

@martinayotte

This comment has been minimized.

Copy link
Contributor

replied Jul 5, 2019

@igorpecovnik ,
Is there any reason why this piece of DTS is present for all NanoPi ?

+		rtc@68 {
+				compatible = "dallas,ds1307";
+				reg = <0x68>;
+		};

I think we should remove it and add it only for the specific NanoPi that has it onboard ...

@igorpecovnik

This comment has been minimized.

Copy link
Member Author

replied Jul 5, 2019

No reason. Probably copy/paste error, remove.

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