[OpenWrt-Devel] [PATCH] sunxi: NanoPi NEO Plus2 backport Gigabit Ethernet DT node

Antony Antony antony at phenome.org
Tue Mar 6 14:08:42 EST 2018


Kernel 4.16 commit 27d7f9297027

Signed-off-by: Antony Antony <antony at phenome.org>
---
 ...sun50i-support-for-nanopi-neo-plus2-board.patch | 33 ++++++++++++++++++----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/target/linux/sunxi/patches-4.14/061-arm-dts-sun50i-support-for-nanopi-neo-plus2-board.patch b/target/linux/sunxi/patches-4.14/061-arm-dts-sun50i-support-for-nanopi-neo-plus2-board.patch
index 535c8b6..69b6955 100644
--- a/target/linux/sunxi/patches-4.14/061-arm-dts-sun50i-support-for-nanopi-neo-plus2-board.patch
+++ b/target/linux/sunxi/patches-4.14/061-arm-dts-sun50i-support-for-nanopi-neo-plus2-board.patch
@@ -1,6 +1,6 @@
-From d7341305863bcc054ee168bd77864100e0c3b144 Mon Sep 17 00:00:00 2001
+From 54cc3330c2334a0cea8cafc105a29c5d67f9fd32 Mon Sep 17 00:00:00 2001
 From: Antony Antony <antony at phenome.org>
-Date: Thu, 7 Sep 2017 18:42:22 +0200
+Date: Fri, 2 Mar 2018 10:50:48 +0100
 Subject: [PATCH] arm64: allwinner: h5: add NanoPi NEO Plus2 DT support
 
 Add initial DT for NanoPi NEO Plus2 by FriendlyARM
@@ -13,22 +13,28 @@ Add initial DT for NanoPi NEO Plus2 by FriendlyARM
 - 2x USB 2.0 host ports & 2x USB via headers
 
 Kernel 4.15 commit d7341305863b
+Kernel 4.16 commit 27d7f9297027
 
 Signed-off-by: Antony Antony <antony at phenome.org>
 
+diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
+index ff35e18..16fa7b9 100644
 --- a/arch/arm64/boot/dts/allwinner/Makefile
 +++ b/arch/arm64/boot/dts/allwinner/Makefile
-@@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-or
+@@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
 +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
- 
+
  always		:= $(dtb-y)
  subdir-y	:= $(dts-dirs)
+diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
+new file mode 100644
+index 0000000..01dace4
 --- /dev/null
 +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
-@@ -0,0 +1,193 @@
+@@ -0,0 +1,210 @@
 +/*
 + * Copyright (C) 2017 Antony Antony <antony at phenome.org>
 + * Copyright (C) 2016 ARM Ltd.
@@ -84,6 +90,7 @@ Signed-off-by: Antony Antony <antony at phenome.org>
 +	compatible = "friendlyarm,nanopi-neo-plus2", "allwinner,sun50i-h5";
 +
 +	aliases {
++		ethernet0 = &emac;
 +		serial0 = &uart0;
 +	};
 +
@@ -164,6 +171,22 @@ Signed-off-by: Antony Antony <antony at phenome.org>
 +	status = "okay";
 +};
 +
++&emac {
++	pinctrl-names = "default";
++	pinctrl-0 = <&emac_rgmii_pins>;
++	phy-supply = <&reg_gmac_3v3>;
++	phy-handle = <&ext_rgmii_phy>;
++	phy-mode = "rgmii";
++	status = "okay";
++};
++
++&external_mdio {
++	ext_rgmii_phy: ethernet-phy at 7 {
++		compatible = "ethernet-phy-ieee802.3-c22";
++		reg = <7>;
++	};
++};
++
 +&mmc0 {
 +	pinctrl-names = "default";
 +	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
-- 
2.7.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list