[U-Boot] [PATCH 4/4] sunxi: dts: added emac node for nanopi m1 plus

Philipp Rossak embed3d at gmail.com
Wed Aug 30 00:32:41 UTC 2017


From: Philipp Rossak <embed3d at gmail.com>

The sun8i emac hardware is present on the Nanopi M1.
It uses an external PHY.

Signed-off-by: Philipp Rossak <embed3d at gmail.com>
---
 arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts
index 8ddd1b2..1cc9185 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts
@@ -45,6 +45,18 @@
 / {
 	model = "FriendlyArm NanoPi M1 Plus";
 	compatible = "friendlyarm,nanopi-m1-plus", "allwinner,sun8i-h3";
+
+	reg_gmac_3v3: gmac-3v3 {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gmac_power_pin_nanopi_m1_plus>;
+		regulator-name = "gmac-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <100000>;
+		enable-active-high;
+		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &ehci1 {
@@ -55,6 +67,15 @@
 	status = "okay";
 };
 
+&emac {
+	/* The Nanopi M1 Plus uses an external phy */
+	pinctrl-names = "default";
+	pinctrl-0 = <&emac_rgmii_pins>;
+	phy-supply = <&reg_gmac_3v3>;
+	phy-mode = "rgmii";
+	/delete-property/allwinner,use-internal-phy;
+};
+
 &ohci1 {
 	status = "okay";
 };
@@ -62,3 +83,12 @@
 &ohci2 {
 	status = "okay";
 };
+
+&pio {
+	gmac_power_pin_nanopi_m1_plus: gmac_power_pin at 0 {
+		allwinner,pins = "PD6";
+		allwinner,function = "gpio_out";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+};
-- 
2.7.4



More information about the U-Boot mailing list