public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Philipp Rossak <embed3d@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] sunxi: dts: added emac node for nanopi m1 plus
Date: Wed, 30 Aug 2017 02:32:41 +0200	[thread overview]
Message-ID: <1504053161-27814-5-git-send-email-embed3d@gmail.com> (raw)
In-Reply-To: <1504053161-27814-1-git-send-email-embed3d@gmail.com>

From: Philipp Rossak <embed3d@gmail.com>

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

Signed-off-by: Philipp Rossak <embed3d@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

      parent reply	other threads:[~2017-08-30  0:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30  0:32 [U-Boot] [PATCH 0/4] Enable ethernet on nanopi m1 and nanopi m1 plus Philipp Rossak
2017-08-30  0:32 ` [U-Boot] [PATCH 1/4] sunxi: defconfig: enable sun8i emac on nanopi m1 Philipp Rossak
2017-08-30  0:32 ` [U-Boot] [PATCH 2/4] sunxi: defconfig: enable sun8i emac on nanopi m1 plus Philipp Rossak
2017-08-30  0:32 ` [U-Boot] [PATCH 3/4] sunxi: dts: added emac node for nanopi m1 Philipp Rossak
2017-08-30  6:47   ` Jagan Teki
2017-08-30  9:10     ` Philipp Rossak
2017-08-30 14:18       ` Jagan Teki
2017-08-30 14:36         ` [U-Boot] [linux-sunxi] " Ondřej Jirman
2017-08-30 16:59           ` Jagan Teki
2017-08-30 23:10             ` Philipp Rossak
2017-08-31  1:31               ` Chen-Yu Tsai
2017-08-30  0:32 ` Philipp Rossak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1504053161-27814-5-git-send-email-embed3d@gmail.com \
    --to=embed3d@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox