From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Rossak Date: Wed, 30 Aug 2017 02:32:41 +0200 Subject: [U-Boot] [PATCH 4/4] sunxi: dts: added emac node for nanopi m1 plus In-Reply-To: <1504053161-27814-1-git-send-email-embed3d@gmail.com> References: <1504053161-27814-1-git-send-email-embed3d@gmail.com> Message-ID: <1504053161-27814-5-git-send-email-embed3d@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Philipp Rossak The sun8i emac hardware is present on the Nanopi M1. It uses an external PHY. Signed-off-by: Philipp Rossak --- 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 = <®_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 = ; + allwinner,pull = ; + }; +}; -- 2.7.4