From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] sunxi: A64: (re-)add sun8i emac DT nodes
Date: Mon, 22 May 2017 01:59:33 +0100 [thread overview]
Message-ID: <1495414773-3466-3-git-send-email-andre.przywara@arm.com> (raw)
In-Reply-To: <1495414773-3466-1-git-send-email-andre.przywara@arm.com>
As the kernel DT does not have an Ethernet driver and bindings, lets
(re-)add the DT bindings for U-Boot's sun8i EMAC Ethernet driver, which
got lost when syncing the kernel DT to U-Boot.
This slightly updates the DT nodes to adapt to the new DT (clock and
reset nodes), but keeps the rest the same to let it work with the
existing U-Boot driver.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
arch/arm/dts/sun50i-a64-pine64-plus.dts | 14 +++++++++++++-
arch/arm/dts/sun50i-a64-pine64.dts | 1 +
arch/arm/dts/sun50i-a64.dtsi | 33 +++++++++++++++++++++++++++++++++
3 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/sun50i-a64-pine64-plus.dts b/arch/arm/dts/sun50i-a64-pine64-plus.dts
index 790d14d..948cb19 100644
--- a/arch/arm/dts/sun50i-a64-pine64-plus.dts
+++ b/arch/arm/dts/sun50i-a64-pine64-plus.dts
@@ -46,5 +46,17 @@
model = "Pine64+";
compatible = "pine64,pine64-plus", "allwinner,sun50i-a64";
- /* TODO: Camera, Ethernet PHY, touchscreen, etc. */
+ /* TODO: Camera, touchscreen, etc. */
+};
+
+&emac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii_pins>;
+ phy-mode = "rgmii";
+ phy = <&phy1>;
+ status = "okay";
+
+ phy1: ethernet-phy at 1 {
+ reg = <1>;
+ };
};
diff --git a/arch/arm/dts/sun50i-a64-pine64.dts b/arch/arm/dts/sun50i-a64-pine64.dts
index c680ed3..6c15040 100644
--- a/arch/arm/dts/sun50i-a64-pine64.dts
+++ b/arch/arm/dts/sun50i-a64-pine64.dts
@@ -52,6 +52,7 @@
aliases {
serial0 = &uart0;
+ ethernet0 = &emac;
};
chosen {
diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi
index c7f669f..121e660 100644
--- a/arch/arm/dts/sun50i-a64.dtsi
+++ b/arch/arm/dts/sun50i-a64.dtsi
@@ -295,6 +295,25 @@
pins = "PG8", "PG9";
function = "uart1";
};
+
+ rmii_pins: rmii_pins {
+ allwinner,pins = "PD10", "PD11", "PD13", "PD14",
+ "PD17", "PD18", "PD19", "PD20",
+ "PD22", "PD23";
+ allwinner,function = "emac";
+ allwinner,drive = <3>;
+ allwinner,pull = <0>;
+ };
+
+ rgmii_pins: rgmii_pins {
+ allwinner,pins = "PD8", "PD9", "PD10", "PD11",
+ "PD12", "PD13", "PD15",
+ "PD16", "PD17", "PD18", "PD19",
+ "PD20", "PD21", "PD22", "PD23";
+ allwinner,function = "emac";
+ allwinner,drive = <3>;
+ allwinner,pull = <0>;
+ };
};
uart0: serial at 1c28000 {
@@ -423,5 +442,19 @@
interrupt-controller;
#interrupt-cells = <3>;
};
+
+ emac: ethernet at 01c30000 {
+ compatible = "allwinner,sun50i-a64-emac";
+ reg = <0x01c30000 0x2000>, <0x01c00030 0x4>;
+ reg-names = "emac", "syscon";
+ interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&ccu RST_BUS_EMAC>;
+ reset-names = "ahb";
+ clocks = <&ccu CLK_BUS_EMAC>;
+ clock-names = "ahb";
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
};
};
--
2.8.2
next prev parent reply other threads:[~2017-05-22 0:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 0:59 [U-Boot] [PATCH 0/2] sunxi: update Pine64 device tree Andre Przywara
2017-05-22 0:59 ` [U-Boot] [PATCH 1/2] arm64: A64/Pine64: update device tree from Linux Andre Przywara
2017-05-22 6:52 ` Maxime Ripard
2017-05-22 0:59 ` Andre Przywara [this message]
2017-05-22 6:52 ` [U-Boot] [PATCH 2/2] sunxi: A64: (re-)add sun8i emac DT nodes Maxime Ripard
2017-05-22 20:49 ` Tom Rini
2017-05-23 9:32 ` Andre Przywara
2017-05-23 11:16 ` Tom Rini
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=1495414773-3466-3-git-send-email-andre.przywara@arm.com \
--to=andre.przywara@arm.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