From: Lothar Felten <lothar.felten@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v6 5/6] sunxi: R40: add gigabit ethernet devicetree node
Date: Fri, 13 Jul 2018 10:45:29 +0200 [thread overview]
Message-ID: <20180713084530.13029-5-lothar.felten@gmail.com> (raw)
In-Reply-To: <20180713084530.13029-1-lothar.felten@gmail.com>
Add a device tree node for the Allwinner R40/V40 GMAC gigabit
ethernet interface.
The R40 SoC does not use the syscon register for GMAC settings.
The gigabit ethernet interface can only be routed to a fixed set of
pins.
Updated to match the Linux kernel's device tree.
Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@openedev.com>
---
Changelog:
new in v2
v2 -> v3 omit syscon node for R40
v3 -> v4 remove phy-mode from gmac node
v4 -> v5 match Linux device tree suggested by Chen-Yu Tsai
v5 -> v6 none
---
arch/arm/dts/sun8i-r40.dtsi | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm/dts/sun8i-r40.dtsi b/arch/arm/dts/sun8i-r40.dtsi
index 0aa76a2f10..2cdfb54282 100644
--- a/arch/arm/dts/sun8i-r40.dtsi
+++ b/arch/arm/dts/sun8i-r40.dtsi
@@ -161,6 +161,19 @@
#interrupt-cells = <3>;
#gpio-cells = <3>;
+ gmac_rgmii_pins: gmac-rgmii-pins {
+ pins = "PA0", "PA1", "PA2", "PA3",
+ "PA4", "PA5", "PA6", "PA7",
+ "PA8", "PA10", "PA11", "PA12",
+ "PA13", "PA15", "PA16";
+ function = "gmac";
+ /*
+ * data lines in RGMII mode use DDR mode
+ * and need a higher signal drive strength
+ */
+ drive-strength = <40>;
+ };
+
i2c0_pins: i2c0_pins {
pins = "PB0", "PB1";
function = "i2c0";
@@ -202,6 +215,27 @@
#size-cells = <0>;
};
+ gmac: ethernet at 1c50000 {
+ compatible = "allwinner,sun8i-r40-gmac";
+ syscon = <&ccu>;
+ reg = <0x01c50000 0x10000>;
+ interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ resets = <&ccu RST_BUS_GMAC>;
+ reset-names = "stmmaceth";
+ clocks = <&ccu CLK_BUS_GMAC>;
+ clock-names = "stmmaceth";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+
+ gmac_mdio: mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
gic: interrupt-controller at 1c81000 {
compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
reg = <0x01c81000 0x1000>,
--
2.14.1
next prev parent reply other threads:[~2018-07-13 8:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 8:45 [U-Boot] [PATCH v6 1/6] sunxi: R40: add gigabit ethernet clocks Lothar Felten
2018-07-13 8:45 ` [U-Boot] [PATCH v6 2/6] net: sun8i-emac: fix printing NULL character Lothar Felten
2018-07-13 8:45 ` [U-Boot] [PATCH v6 3/6] net: sun8i-emac: set mux and clock by driver data Lothar Felten
2018-07-13 8:45 ` [U-Boot] [PATCH v6 4/6] net: sun8i-emac: support R40 GMAC Lothar Felten
2018-07-13 8:45 ` Lothar Felten [this message]
2018-07-13 8:45 ` [U-Boot] [PATCH v6 6/6] configs: Bananapi_M2_Ultra: enable gigabit ethernet Lothar Felten
2018-07-13 9:11 ` Maxime Ripard
2018-07-16 7:00 ` Jagan Teki
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=20180713084530.13029-5-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