From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 06/20] arm: dts: sunxi: update H3 to new EMAC binding
Date: Fri, 2 Mar 2018 00:56:45 +0000 [thread overview]
Message-ID: <20180302005659.28728-7-andre.przywara@arm.com> (raw)
In-Reply-To: <20180302005659.28728-1-andre.przywara@arm.com>
The U-Boot driver for the sun8i-emac was using some preliminary DT
binding. Now since Linux got its own driver in v4.15 and our driver
can now cope with both bindings, let's convert the DT nodes used by the
various H3 boards over to the new bindings used by the kernel.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 6 +--
arch/arm/dts/sun8i-h3-libretech-all-h3-cc.dts | 7 +--
arch/arm/dts/sun8i-h3-nanopi-neo.dts | 6 +--
arch/arm/dts/sun8i-h3-orangepi-2.dts | 7 +--
arch/arm/dts/sun8i-h3-orangepi-one.dts | 7 +--
arch/arm/dts/sun8i-h3-orangepi-pc.dts | 7 +--
arch/arm/dts/sun8i-h3-orangepi-plus.dts | 8 +++-
arch/arm/dts/sun8i-h3-orangepi-plus2e.dts | 9 +++-
arch/arm/dts/sun8i-h3.dtsi | 69 ++++++++++++++++++++-------
9 files changed, 75 insertions(+), 51 deletions(-)
diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
index 20d489cb2a..e0efcb3ba3 100644
--- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -100,14 +100,10 @@
};
&emac {
- phy = <&phy1>;
+ phy-handle = <&int_mii_phy>;
phy-mode = "mii";
- allwinner,use-internal-phy;
allwinner,leds-active-low;
status = "okay";
- phy1: ethernet-phy at 1 {
- reg = <1>;
- };
};
&mmc0 {
diff --git a/arch/arm/dts/sun8i-h3-libretech-all-h3-cc.dts b/arch/arm/dts/sun8i-h3-libretech-all-h3-cc.dts
index 97b993f636..c8fd69f0a4 100644
--- a/arch/arm/dts/sun8i-h3-libretech-all-h3-cc.dts
+++ b/arch/arm/dts/sun8i-h3-libretech-all-h3-cc.dts
@@ -125,15 +125,10 @@
};
&emac {
- phy = <&phy1>;
+ phy-handle = <&int_mii_phy>;
phy-mode = "mii";
- allwinner,use-internal-phy;
allwinner,leds-active-low;
status = "okay";
-
- phy1: ethernet-phy at 1 {
- reg = <1>;
- };
};
&ir {
diff --git a/arch/arm/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
index 5113059098..78f6c24952 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
@@ -48,12 +48,8 @@
};
&emac {
- phy = <&phy1>;
+ phy-handle = <&int_mii_phy>;
phy-mode = "mii";
- allwinner,use-internal-phy;
allwinner,leds-active-low;
status = "okay";
- phy1: ethernet-phy at 1 {
- reg = <1>;
- };
};
diff --git a/arch/arm/dts/sun8i-h3-orangepi-2.dts b/arch/arm/dts/sun8i-h3-orangepi-2.dts
index caa1a6959c..d97fdacb35 100644
--- a/arch/arm/dts/sun8i-h3-orangepi-2.dts
+++ b/arch/arm/dts/sun8i-h3-orangepi-2.dts
@@ -55,6 +55,7 @@
aliases {
serial0 = &uart0;
/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+ ethernet0 = &emac;
ethernet1 = &rtl8189;
};
@@ -110,14 +111,10 @@
};
&emac {
- phy = <&phy1>;
+ phy-handle = <&int_mii_phy>;
phy-mode = "mii";
- allwinner,use-internal-phy;
allwinner,leds-active-low;
status = "okay";
- phy1: ethernet-phy at 1 {
- reg = <1>;
- };
};
&ir {
diff --git a/arch/arm/dts/sun8i-h3-orangepi-one.dts b/arch/arm/dts/sun8i-h3-orangepi-one.dts
index 8df5c74f04..adab1cbfc9 100644
--- a/arch/arm/dts/sun8i-h3-orangepi-one.dts
+++ b/arch/arm/dts/sun8i-h3-orangepi-one.dts
@@ -53,6 +53,7 @@
compatible = "xunlong,orangepi-one", "allwinner,sun8i-h3";
aliases {
+ ethernet0 = &emac;
serial0 = &uart0;
};
@@ -95,14 +96,10 @@
};
&emac {
- phy = <&phy1>;
+ phy-handle = <&int_mii_phy>;
phy-mode = "mii";
- allwinner,use-internal-phy;
allwinner,leds-active-low;
status = "okay";
- phy1: ethernet-phy at 1 {
- reg = <1>;
- };
};
&mmc0 {
diff --git a/arch/arm/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/dts/sun8i-h3-orangepi-pc.dts
index b8340f74e7..afba264ea5 100644
--- a/arch/arm/dts/sun8i-h3-orangepi-pc.dts
+++ b/arch/arm/dts/sun8i-h3-orangepi-pc.dts
@@ -53,6 +53,7 @@
compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
aliases {
+ ethernet0 = &emac;
serial0 = &uart0;
};
@@ -167,12 +168,8 @@
};
&emac {
- phy = <&phy1>;
+ phy-handle = <&int_mii_phy>;
phy-mode = "mii";
- allwinner,use-internal-phy;
allwinner,leds-active-low;
status = "okay";
- phy1: ethernet-phy at 1 {
- reg = <1>;
- };
};
diff --git a/arch/arm/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
index e7079b26bc..136e4414a4 100644
--- a/arch/arm/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
@@ -82,7 +82,13 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <®_gmac_3v3>;
phy-mode = "rgmii";
- /delete-property/allwinner,use-internal-phy;
+};
+
+&external_mdio {
+ ext_rgmii_phy: ethernet-phy at 1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+ };
};
&mmc2 {
diff --git a/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts b/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts
index f97b040b35..51aaf49b6d 100644
--- a/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts
+++ b/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts
@@ -69,8 +69,15 @@
pinctrl-names = "default";
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <®_gmac_3v3>;
+ phy-handle = <&ext_rgmii_phy>;
phy-mode = "rgmii";
- /delete-property/allwinner,use-internal-phy;
+};
+
+&external_mdio {
+ ext_rgmii_phy: ethernet-phy at 1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ };
};
&pio {
diff --git a/arch/arm/dts/sun8i-h3.dtsi b/arch/arm/dts/sun8i-h3.dtsi
index afa60793a2..39a6438ec4 100644
--- a/arch/arm/dts/sun8i-h3.dtsi
+++ b/arch/arm/dts/sun8i-h3.dtsi
@@ -144,9 +144,10 @@
#size-cells = <1>;
ranges;
- syscon: syscon at 01c00000 {
- compatible = "allwinner,sun8i-h3-syscon","syscon";
- reg = <0x01c00000 0x34>;
+ syscon: syscon at 1c00000 {
+ compatible = "allwinner,sun8i-h3-system-controller",
+ "syscon";
+ reg = <0x01c00000 0x1000>;
};
dma: dma-controller at 01c02000 {
@@ -339,15 +340,12 @@
interrupt-controller;
#interrupt-cells = <3>;
- emac_rgmii_pins: emac0 at 0 {
- allwinner,pins = "PD0", "PD1", "PD2", "PD3",
- "PD4", "PD5", "PD7",
- "PD8", "PD9", "PD10",
- "PD12", "PD13", "PD15",
- "PD16", "PD17";
- allwinner,function = "emac";
- allwinner,drive = <SUN4I_PINCTRL_40_MA>;
- allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ emac_rgmii_pins: emac0 {
+ pins = "PD0", "PD1", "PD2", "PD3", "PD4",
+ "PD5", "PD7", "PD8", "PD9", "PD10",
+ "PD12", "PD13", "PD15", "PD16", "PD17";
+ function = "emac";
+ drive-strength = <40>;
};
mmc0_pins_a: mmc0 at 0 {
@@ -466,16 +464,51 @@
emac: ethernet at 1c30000 {
compatible = "allwinner,sun8i-h3-emac";
- reg = <0x01c30000 0x104>, <0x01c00030 0x4>;
- reg-names = "emac", "syscon";
+ syscon = <&syscon>;
+ reg = <0x01c30000 0x10000>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
- resets = <&ccu RST_BUS_EMAC>, <&ccu RST_BUS_EPHY>;
- reset-names = "ahb", "ephy";
- clocks = <&ccu CLK_BUS_EMAC>, <&ccu CLK_BUS_EPHY>;
- clock-names = "ahb", "ephy";
+ interrupt-names = "macirq";
+ resets = <&ccu RST_BUS_EMAC>;
+ reset-names = "stmmaceth";
+ clocks = <&ccu CLK_BUS_EMAC>;
+ clock-names = "stmmaceth";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
+
+ mdio: mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwmac-mdio";
+ };
+
+ mdio-mux {
+ compatible = "allwinner,sun8i-h3-mdio-mux";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio-parent-bus = <&mdio>;
+ /* Only one MDIO is usable at the time */
+ internal_mdio: mdio at 1 {
+ compatible = "allwinner,sun8i-h3-mdio-internal";
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ int_mii_phy: ethernet-phy at 1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ clocks = <&ccu CLK_BUS_EPHY>;
+ resets = <&ccu RST_BUS_EPHY>;
+ };
+ };
+
+ external_mdio: mdio at 2 {
+ reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
};
gic: interrupt-controller at 01c81000 {
--
2.14.1
next prev parent reply other threads:[~2018-03-02 0:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 0:56 [U-Boot] [PATCH v3 00/20] sunxi: sync H3, H5, A64 DTs from mainline Linux Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 01/20] sunxi: README.sunxi64: Add hint about non-debug of ARM Trusted Firmware Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 02/20] sunxi: gpio: add missing compatible strings Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 03/20] net: sun8i-emac: support new pinctrl DT bindings Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 04/20] net: sun8i-emac: add support for new EMAC DT binding Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 05/20] arm: dts: sunxi: update A64 to new EMAC binding Andre Przywara
2018-03-02 0:56 ` Andre Przywara [this message]
2018-03-02 0:56 ` [U-Boot] [PATCH v3 07/20] arm: dts: sunxi: update H5 " Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 08/20] net: sun8i-emac: remove support for old binding Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 09/20] sunxi: disable direct MMC environment for 64 bit boards Andre Przywara
2018-03-02 15:56 ` Maxime Ripard
2018-03-02 16:00 ` Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 10/20] sunxi: revert disabling of features Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 11/20] sunxi: DT: A64: update device tree file for Allwinner A64 SoC Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 12/20] sunxi: DT: A64: update board .dts files from Linux Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 13/20] Revert: arm64: allwinner: a64: pine64: Use dcdc1 regulator for mmc0 Andre Przywara
2018-03-02 15:58 ` Maxime Ripard
2018-03-02 16:24 ` Andre Przywara
2018-03-02 16:32 ` [U-Boot] [linux-sunxi] " Vincent Legoll
2018-03-02 16:42 ` Andre Przywara
2018-03-03 14:59 ` [U-Boot] " Emmanuel Vadot
2018-03-09 9:50 ` Maxime Ripard
2018-03-02 0:56 ` [U-Boot] [PATCH v3 14/20] sunxi: dts: A64 boards: Use fixed " Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 15/20] sunxi: DT: update device tree files for Allwinner H3 and H5 SoCs Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 16/20] sunxi: DT: H5: update board .dts files from Linux Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 17/20] sunxi: DT: H3: " Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 18/20] sunxi: DT: H3: update libre-cc board .dts file Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 19/20] sunxi: DT: H2+: update Opi-zero .dts Andre Przywara
2018-03-02 0:56 ` [U-Boot] [PATCH v3 20/20] sunxi: DT: A64: add proper SoPine baseboard device tree Andre Przywara
2018-03-02 15:59 ` [U-Boot] [PATCH v3 00/20] sunxi: sync H3, H5, A64 DTs from mainline Linux 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=20180302005659.28728-7-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