From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: kernel@pengutronix.de, netdev@vger.kernel.org, mdf@kernel.org,
Brad Mouring <brad.mouring@ni.com>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH 4/4] ARM: dts: macb: wrap macb PHYs in a mdio container
Date: Mon, 20 Aug 2018 14:12:38 +0200 [thread overview]
Message-ID: <20180820121238.7779-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20180820121238.7779-1-a.fatoum@pengutronix.de>
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
.../devicetree/bindings/net/macb.txt | 13 +++--
arch/arm/boot/dts/at91-sam9_l9260.dts | 6 ++-
arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 14 ++---
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 10 ++--
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 10 ++--
arch/arm/boot/dts/at91-sama5d3_xplained.dts | 12 +++--
arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts | 6 ++-
arch/arm/boot/dts/at91-sama5d4_xplained.dts | 10 ++--
arch/arm/boot/dts/at91-sama5d4ek.dts | 10 ++--
arch/arm/boot/dts/at91-vinco.dts | 24 +++++----
arch/arm/boot/dts/at91rm9200ek.dts | 8 +--
arch/arm/boot/dts/sama5d2.dtsi | 5 ++
arch/arm/boot/dts/sama5d3_emac.dtsi | 5 ++
arch/arm/boot/dts/sama5d3_gmac.dtsi | 5 ++
arch/arm/boot/dts/sama5d3xcm_cmp.dtsi | 52 ++++++++++---------
arch/arm/boot/dts/sama5d3xmb_gmac.dtsi | 52 ++++++++++---------
arch/arm/boot/dts/sama5d4.dtsi | 10 ++++
17 files changed, 155 insertions(+), 97 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
index 457d5ae16f23..f39732372538 100644
--- a/Documentation/devicetree/bindings/net/macb.txt
+++ b/Documentation/devicetree/bindings/net/macb.txt
@@ -25,7 +25,8 @@ Required properties:
Optional elements: 'tsu_clk'
- clocks: Phandles to input clocks.
-Optional properties for PHY child node:
+PHY child nodes should be grouped in a mdio container,
+they have following optional properties:
- reset-gpios : Should specify the gpio for phy reset
- magic-packet : If present, indicates that the hardware supports waking
up via magic packet.
@@ -41,8 +42,12 @@ Examples:
local-mac-address = [3a 0e 03 04 05 06];
clock-names = "pclk", "hclk", "tx_clk";
clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
- ethernet-phy@1 {
- reg = <0x1>;
- reset-gpios = <&pioE 6 1>;
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ethernet-phy@1 {
+ reg = <0x1>;
+ reset-gpios = <&pioE 6 1>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91-sam9_l9260.dts b/arch/arm/boot/dts/at91-sam9_l9260.dts
index 70cb36f7a9d7..9d1fbd3afaea 100644
--- a/arch/arm/boot/dts/at91-sam9_l9260.dts
+++ b/arch/arm/boot/dts/at91-sam9_l9260.dts
@@ -67,8 +67,10 @@
#size-cells = <0>;
status = "okay";
- ethernet-phy@1 {
- reg = <0x1>;
+ mdio {
+ ethernet-phy@1 {
+ reg = <0x1>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
index cf0087b4c9e1..f729f128e68e 100644
--- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
+++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
@@ -67,12 +67,14 @@
pinctrl-0 = <&pinctrl_macb0_default>;
phy-mode = "rmii";
- ethernet-phy@0 {
- reg = <0x0>;
- interrupt-parent = <&pioA>;
- interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_macb0_phy_irq>;
+ mdio {
+ ethernet-phy@0 {
+ reg = <0x0>;
+ interrupt-parent = <&pioA>;
+ interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_macb0_phy_irq>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts b/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
index b10dccd0958f..1ba4bad8189b 100644
--- a/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
@@ -142,10 +142,12 @@
phy-mode = "rmii";
status = "okay";
- ethernet-phy@1 {
- reg = <0x1>;
- interrupt-parent = <&pioA>;
- interrupts = <56 IRQ_TYPE_LEVEL_LOW>;
+ mdio {
+ ethernet-phy@1 {
+ reg = <0x1>;
+ interrupt-parent = <&pioA>;
+ interrupts = <56 IRQ_TYPE_LEVEL_LOW>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index fcc85d70f36e..83b435744ffd 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -126,10 +126,12 @@
phy-mode = "rmii";
status = "okay";
- ethernet-phy@1 {
- reg = <0x1>;
- interrupt-parent = <&pioA>;
- interrupts = <PIN_PC9 IRQ_TYPE_LEVEL_LOW>;
+ mdio {
+ ethernet-phy@1 {
+ reg = <0x1>;
+ interrupt-parent = <&pioA>;
+ interrupts = <PIN_PC9 IRQ_TYPE_LEVEL_LOW>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
index 02c1d2958d78..a84fec83f0a5 100644
--- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
@@ -134,8 +134,10 @@
#size-cells = <0>;
status = "okay";
- ethernet-phy@7 {
- reg = <0x7>;
+ mdio {
+ ethernet-phy@7 {
+ reg = <0x7>;
+ };
};
};
@@ -201,8 +203,10 @@
#size-cells = <0>;
status = "okay";
- ethernet-phy@1 {
- reg = <0x1>;
+ mdio {
+ ethernet-phy@1 {
+ reg = <0x1>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts b/arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts
index fe05aaa7ac87..a361423a3969 100644
--- a/arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts
+++ b/arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts
@@ -63,8 +63,10 @@
phy-mode = "rmii";
status = "okay";
- phy0: ethernet-phy@0 {
- reg = <0>;
+ mdio {
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91-sama5d4_xplained.dts b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
index 4b7c762d5f22..8b22ff53b40a 100644
--- a/arch/arm/boot/dts/at91-sama5d4_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
@@ -95,10 +95,12 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>;
- phy0: ethernet-phy@1 {
- interrupt-parent = <&pioE>;
- interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
- reg = <1>;
+ mdio {
+ phy0: ethernet-phy@1 {
+ interrupt-parent = <&pioE>;
+ interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+ reg = <1>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91-sama5d4ek.dts b/arch/arm/boot/dts/at91-sama5d4ek.dts
index 0702a2f2b336..35ccba00b8cb 100644
--- a/arch/arm/boot/dts/at91-sama5d4ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d4ek.dts
@@ -144,10 +144,12 @@
phy-mode = "rmii";
status = "okay";
- ethernet-phy@1 {
- reg = <0x1>;
- interrupt-parent = <&pioE>;
- interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+ mdio {
+ ethernet-phy@1 {
+ reg = <0x1>;
+ interrupt-parent = <&pioE>;
+ interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91-vinco.dts b/arch/arm/boot/dts/at91-vinco.dts
index 1be9889a2b3a..b690031ada28 100644
--- a/arch/arm/boot/dts/at91-vinco.dts
+++ b/arch/arm/boot/dts/at91-vinco.dts
@@ -116,11 +116,13 @@
phy-mode = "rmii";
status = "okay";
- ethernet-phy@1 {
- reg = <0x1>;
- reset-gpios = <&pioE 8 GPIO_ACTIVE_LOW>;
- interrupt-parent = <&pioB>;
- interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
+ mdio {
+ ethernet-phy@1 {
+ reg = <0x1>;
+ reset-gpios = <&pioE 8 GPIO_ACTIVE_LOW>;
+ interrupt-parent = <&pioB>;
+ interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
+ };
};
};
@@ -170,11 +172,13 @@
#size-cells = <0>;
status = "okay";
- ethernet-phy@1 {
- reg = <0x1>;
- interrupt-parent = <&pioB>;
- interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
- reset-gpios = <&pioE 6 GPIO_ACTIVE_LOW>;
+ mdio {
+ ethernet-phy@1 {
+ reg = <0x1>;
+ interrupt-parent = <&pioB>;
+ interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&pioE 6 GPIO_ACTIVE_LOW>;
+ };
};
};
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index 81aaf8151c76..1b1cc47b2376 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -54,9 +54,11 @@
phy-mode = "rmii";
status = "okay";
- phy0: ethernet-phy {
- interrupt-parent = <&pioC>;
- interrupts = <4 IRQ_TYPE_EDGE_BOTH>;
+ mdio {
+ phy0: ethernet-phy {
+ interrupt-parent = <&pioC>;
+ interrupts = <4 IRQ_TYPE_EDGE_BOTH>;
+ };
};
};
diff --git a/arch/arm/boot/dts/sama5d2.dtsi b/arch/arm/boot/dts/sama5d2.dtsi
index 61f68e5c48e9..424aabd0db68 100644
--- a/arch/arm/boot/dts/sama5d2.dtsi
+++ b/arch/arm/boot/dts/sama5d2.dtsi
@@ -1091,6 +1091,11 @@
clocks = <&macb0_clk>, <&macb0_clk>;
clock-names = "hclk", "pclk";
status = "disabled";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
};
tcb0: timer@f800c000 {
diff --git a/arch/arm/boot/dts/sama5d3_emac.dtsi b/arch/arm/boot/dts/sama5d3_emac.dtsi
index 7cb235ef0fb6..d0187d4da1da 100644
--- a/arch/arm/boot/dts/sama5d3_emac.dtsi
+++ b/arch/arm/boot/dts/sama5d3_emac.dtsi
@@ -49,6 +49,11 @@
clocks = <&macb1_clk>, <&macb1_clk>;
clock-names = "hclk", "pclk";
status = "disabled";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
};
};
};
diff --git a/arch/arm/boot/dts/sama5d3_gmac.dtsi b/arch/arm/boot/dts/sama5d3_gmac.dtsi
index 23f225fbb756..826d5891a2da 100644
--- a/arch/arm/boot/dts/sama5d3_gmac.dtsi
+++ b/arch/arm/boot/dts/sama5d3_gmac.dtsi
@@ -82,6 +82,11 @@
clocks = <&macb0_clk>, <&macb0_clk>;
clock-names = "hclk", "pclk";
status = "disabled";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
};
};
};
diff --git a/arch/arm/boot/dts/sama5d3xcm_cmp.dtsi b/arch/arm/boot/dts/sama5d3xcm_cmp.dtsi
index a02f59021364..948df9aa40ac 100644
--- a/arch/arm/boot/dts/sama5d3xcm_cmp.dtsi
+++ b/arch/arm/boot/dts/sama5d3xcm_cmp.dtsi
@@ -86,32 +86,34 @@
#address-cells = <1>;
#size-cells = <0>;
- ethernet-phy@1 {
- reg = <0x1>;
- interrupt-parent = <&pioB>;
- interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
- txen-skew-ps = <800>;
- txc-skew-ps = <3000>;
- rxdv-skew-ps = <400>;
- rxc-skew-ps = <3000>;
- rxd0-skew-ps = <400>;
- rxd1-skew-ps = <400>;
- rxd2-skew-ps = <400>;
- rxd3-skew-ps = <400>;
- };
+ mdio {
+ ethernet-phy@1 {
+ reg = <0x1>;
+ interrupt-parent = <&pioB>;
+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+ txen-skew-ps = <800>;
+ txc-skew-ps = <3000>;
+ rxdv-skew-ps = <400>;
+ rxc-skew-ps = <3000>;
+ rxd0-skew-ps = <400>;
+ rxd1-skew-ps = <400>;
+ rxd2-skew-ps = <400>;
+ rxd3-skew-ps = <400>;
+ };
- ethernet-phy@7 {
- reg = <0x7>;
- interrupt-parent = <&pioB>;
- interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
- txen-skew-ps = <800>;
- txc-skew-ps = <3000>;
- rxdv-skew-ps = <400>;
- rxc-skew-ps = <3000>;
- rxd0-skew-ps = <400>;
- rxd1-skew-ps = <400>;
- rxd2-skew-ps = <400>;
- rxd3-skew-ps = <400>;
+ ethernet-phy@7 {
+ reg = <0x7>;
+ interrupt-parent = <&pioB>;
+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+ txen-skew-ps = <800>;
+ txc-skew-ps = <3000>;
+ rxdv-skew-ps = <400>;
+ rxc-skew-ps = <3000>;
+ rxd0-skew-ps = <400>;
+ rxd1-skew-ps = <400>;
+ rxd2-skew-ps = <400>;
+ rxd3-skew-ps = <400>;
+ };
};
};
diff --git a/arch/arm/boot/dts/sama5d3xmb_gmac.dtsi b/arch/arm/boot/dts/sama5d3xmb_gmac.dtsi
index 65aea7a75b1d..af097ff8bee4 100644
--- a/arch/arm/boot/dts/sama5d3xmb_gmac.dtsi
+++ b/arch/arm/boot/dts/sama5d3xmb_gmac.dtsi
@@ -15,32 +15,34 @@
#address-cells = <1>;
#size-cells = <0>;
- ethernet-phy@1 {
- reg = <0x1>;
- interrupt-parent = <&pioB>;
- interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
- txen-skew-ps = <800>;
- txc-skew-ps = <3000>;
- rxdv-skew-ps = <400>;
- rxc-skew-ps = <3000>;
- rxd0-skew-ps = <400>;
- rxd1-skew-ps = <400>;
- rxd2-skew-ps = <400>;
- rxd3-skew-ps = <400>;
- };
+ mdio {
+ ethernet-phy@1 {
+ reg = <0x1>;
+ interrupt-parent = <&pioB>;
+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+ txen-skew-ps = <800>;
+ txc-skew-ps = <3000>;
+ rxdv-skew-ps = <400>;
+ rxc-skew-ps = <3000>;
+ rxd0-skew-ps = <400>;
+ rxd1-skew-ps = <400>;
+ rxd2-skew-ps = <400>;
+ rxd3-skew-ps = <400>;
+ };
- ethernet-phy@7 {
- reg = <0x7>;
- interrupt-parent = <&pioB>;
- interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
- txen-skew-ps = <800>;
- txc-skew-ps = <3000>;
- rxdv-skew-ps = <400>;
- rxc-skew-ps = <3000>;
- rxd0-skew-ps = <400>;
- rxd1-skew-ps = <400>;
- rxd2-skew-ps = <400>;
- rxd3-skew-ps = <400>;
+ ethernet-phy@7 {
+ reg = <0x7>;
+ interrupt-parent = <&pioB>;
+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+ txen-skew-ps = <800>;
+ txc-skew-ps = <3000>;
+ rxdv-skew-ps = <400>;
+ rxc-skew-ps = <3000>;
+ rxd0-skew-ps = <400>;
+ rxd1-skew-ps = <400>;
+ rxd2-skew-ps = <400>;
+ rxd3-skew-ps = <400>;
+ };
};
};
};
diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi
index 0cf9beddd556..d623a8dc0116 100644
--- a/arch/arm/boot/dts/sama5d4.dtsi
+++ b/arch/arm/boot/dts/sama5d4.dtsi
@@ -980,6 +980,11 @@
clocks = <&macb0_clk>, <&macb0_clk>;
clock-names = "hclk", "pclk";
status = "disabled";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
};
i2c2: i2c@f8024000 {
@@ -1220,6 +1225,11 @@
clocks = <&macb1_clk>, <&macb1_clk>;
clock-names = "hclk", "pclk";
status = "disabled";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
};
trng@fc030000 {
--
2.18.0
next prev parent reply other threads:[~2018-08-20 15:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-20 12:12 [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs Ahmad Fatoum
2018-08-20 12:12 ` [PATCH 2/4] of: phy: Warn about unexpected fixed-links in of_mdiobus_register Ahmad Fatoum
2018-08-20 12:31 ` Ahmad Fatoum
2018-08-20 13:37 ` Andrew Lunn
2018-08-20 13:51 ` Ahmad Fatoum
2018-08-20 12:12 ` [PATCH 3/4] net: macb: Support specifying PHYs in a mdio container dts node Ahmad Fatoum
2018-08-20 13:42 ` Andrew Lunn
2018-08-20 13:45 ` Ahmad Fatoum
2018-08-20 13:56 ` Andrew Lunn
2018-08-20 12:12 ` Ahmad Fatoum [this message]
2018-08-20 13:55 ` [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs Andrew Lunn
2018-08-20 15:56 ` Ahmad Fatoum
2018-08-20 19:06 ` Andrew Lunn
2018-08-21 8:26 ` Ahmad Fatoum
2018-08-21 13:34 ` Andrew Lunn
2018-08-21 14:59 ` Ahmad Fatoum
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=20180820121238.7779-4-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=brad.mouring@ni.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=mdf@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
/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;
as well as URLs for NNTP newsgroup(s).