public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lothar Felten <lothar.felten@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/5] sunxi: R40: add gigabit ethernet gpio pinmux
Date: Tue, 17 Apr 2018 15:42:33 +0200	[thread overview]
Message-ID: <20180417134235.10502-3-lothar.felten@gmail.com> (raw)
In-Reply-To: <20180417134235.10502-1-lothar.felten@gmail.com>

Add gpio mux settings for the Allwinner R40/V40 CPU.
The gigabit ethernet interface can only be routed to a fixed set of pins.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 arch/arm/dts/sun8i-r40.dtsi | 9 +++++++++
 drivers/net/sun8i_emac.c    | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/arch/arm/dts/sun8i-r40.dtsi b/arch/arm/dts/sun8i-r40.dtsi
index 48ec2e855a..ee22f6eb3a 100644
--- a/arch/arm/dts/sun8i-r40.dtsi
+++ b/arch/arm/dts/sun8i-r40.dtsi
@@ -126,6 +126,15 @@
 			#interrupt-cells = <3>;
 			#gpio-cells = <3>;
 
+			gmac_pins_rgmii: gmac_rgmii {
+				pins =	"PA0", "PA1", "PA2",
+					"PA3", "PA4", "PA5", "PA6",
+					"PA7", "PA8", "PA10",
+					"PA11", "PA12", "PA13",
+					"PA15", "PA16";
+				function = "gmac";
+			};
+
 			i2c0_pins: i2c0_pins {
 				pins = "PB0", "PB1";
 				function = "i2c0";
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index b6e5dafe83..0cb1a697f3 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -68,6 +68,8 @@
 
 #if defined(CONFIG_MACH_SUNXI_H3_H5)
 #define SUN8I_GPD8_GMAC		2
+#elif defined(CONFIG_MACH_SUN8I_R40)
+#define SUN8I_GPD8_GMAC		5
 #else
 #define SUN8I_GPD8_GMAC		4
 #endif
-- 
2.14.1

  parent reply	other threads:[~2018-04-17 13:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 13:42 [U-Boot] [PATCH v2 1/5] sunxi: R40: add gigabit ethernet clocks Lothar Felten
2018-04-17 13:42 ` [U-Boot] [PATCH v2 2/5] sunxi: R40: add gigabit ethernet reset Lothar Felten
2018-04-19  8:35   ` Maxime Ripard
2018-04-17 13:42 ` Lothar Felten [this message]
2018-04-19  8:35   ` [U-Boot] [PATCH v2 3/5] sunxi: R40: add gigabit ethernet gpio pinmux Maxime Ripard
2018-04-17 13:42 ` [U-Boot] [PATCH v2 4/5] sunxi: R40: add gigabit ethernet devicetree node Lothar Felten
2018-04-19  8:40   ` Maxime Ripard
2018-04-17 13:42 ` [U-Boot] [PATCH v2 5/5] configs: Bananapi_M2_Ultra: enable gigabit on the Bananapi M2U Lothar Felten
2018-04-19  8:41   ` Maxime Ripard
2018-04-23 17:39     ` Lothar Felten
2018-04-19  8:34 ` [U-Boot] [PATCH v2 1/5] sunxi: R40: add gigabit ethernet clocks Maxime Ripard

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=20180417134235.10502-3-lothar.felten@gmail.com \
    --to=lothar.felten@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