All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs
@ 2017-07-17 20:24 Andrew Lunn
  2017-07-17 20:25 ` [PATCH 1/5] ARM: dts: imx6: RDU2: Add Micrel PHY to FEC Andrew Lunn
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Andrew Lunn @ 2017-07-17 20:24 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset extends the RDU2 to support its Ethernet switch, the
PHYs within the switch, the switches EEPROM, and the Micrel
PHY connected to the FEC.

Andrew Lunn (5):
  ARM: dts: imx6: RDU2: Add Micrel PHY to FEC
  ARM: dts: imx6: RDU2: Add DSA support for the Marvell 88E6352
  ARM: dts: imx6: RDU2: Add Switch EEPROM
  ARM: dts: imx6: RDU2: Add Switch interrupts
  ARM: dts: imx6: RDU2: Add Micrel PHY interrupt

 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 112 +++++++++++++++++++++++++++++++-
 1 file changed, 109 insertions(+), 3 deletions(-)

-- 
2.13.2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/5] ARM: dts: imx6: RDU2: Add Micrel PHY to FEC
  2017-07-17 20:24 [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Andrew Lunn
@ 2017-07-17 20:25 ` Andrew Lunn
  2017-07-17 20:25 ` [PATCH 2/5] ARM: dts: imx6: RDU2: Add DSA support for the Marvell 88E6352 Andrew Lunn
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2017-07-17 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

The FEC has a Micrel PHY connected to it. This PHY is managed using
the bit-banging MDIO bus. Add this to the device tree.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
index 5d94b5ee6aa0..d7328e9166e9 100644
--- a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
@@ -59,6 +59,10 @@
 		pinctrl-0 = <&pinctrl_mdio1>;
 		gpios = <&gpio6 5 GPIO_ACTIVE_HIGH
 		         &gpio6 4 GPIO_ACTIVE_HIGH>;
+
+		phy: ethernet-phy at 0 {
+			reg = <0>;
+		};
 	};
 
 	reg_28p0v: regulator-28p0v {
@@ -615,15 +619,11 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet>;
 	phy-mode = "rmii";
+	phy-handle = <&phy>;
 	phy-reset-gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
 	phy-reset-duration = <100>;
 	phy-supply = <&reg_3p3v>;
 	status = "okay";
-
-	fixed-link {
-		speed = <100>;
-		full-duplex;
-	};
 };
 
 &usbh1 {
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/5] ARM: dts: imx6: RDU2: Add DSA support for the Marvell 88E6352
  2017-07-17 20:24 [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Andrew Lunn
  2017-07-17 20:25 ` [PATCH 1/5] ARM: dts: imx6: RDU2: Add Micrel PHY to FEC Andrew Lunn
@ 2017-07-17 20:25 ` Andrew Lunn
  2017-07-17 20:25 ` [PATCH 3/5] ARM: dts: imx6: RDU2: Add Switch EEPROM Andrew Lunn
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2017-07-17 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

The RDU2 has a Marvell 88E6352 switch. Both the FEC and the i210
Ethernet interfaces are connected to the switch. Make the FEC the DSA
"CPU" port, and the i210 as a regular port on the switch.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 50 +++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
index d7328e9166e9..add53277379d 100644
--- a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
@@ -624,6 +624,56 @@
 	phy-reset-duration = <100>;
 	phy-supply = <&reg_3p3v>;
 	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "okay";
+
+		switch at 0 {
+			compatible = "marvell,mv88e6085";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0>;
+			dsa,member = <0 0>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+					label = "gigabit_proc";
+				};
+
+				port at 1 {
+					reg = <1>;
+					label = "netaux";
+				};
+
+				port at 2 {
+					reg = <2>;
+					label = "cpu";
+					ethernet = <&fec>;
+
+					fixed-link {
+						speed = <100>;
+						full-duplex;
+					};
+				};
+
+				port at 3 {
+					reg = <3>;
+					label = "netright";
+				};
+
+				port at 4 {
+					reg = <4>;
+					label = "netleft";
+				};
+			};
+		};
+	};
 };
 
 &usbh1 {
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/5] ARM: dts: imx6: RDU2: Add Switch EEPROM
  2017-07-17 20:24 [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Andrew Lunn
  2017-07-17 20:25 ` [PATCH 1/5] ARM: dts: imx6: RDU2: Add Micrel PHY to FEC Andrew Lunn
  2017-07-17 20:25 ` [PATCH 2/5] ARM: dts: imx6: RDU2: Add DSA support for the Marvell 88E6352 Andrew Lunn
@ 2017-07-17 20:25 ` Andrew Lunn
  2017-07-17 20:25 ` [PATCH 4/5] ARM: dts: imx6: RDU2: Add Switch interrupts Andrew Lunn
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2017-07-17 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

The Marvell switch has an EEPROM connected to it. List the size in DT,
in order to enable access to it via ethtool.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
index add53277379d..d67bf81524a2 100644
--- a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
@@ -636,6 +636,7 @@
 			#size-cells = <0>;
 			reg = <0>;
 			dsa,member = <0 0>;
+			eeprom-length = <512>;
 
 			ports {
 				#address-cells = <1>;
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/5] ARM: dts: imx6: RDU2: Add Switch interrupts
  2017-07-17 20:24 [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Andrew Lunn
                   ` (2 preceding siblings ...)
  2017-07-17 20:25 ` [PATCH 3/5] ARM: dts: imx6: RDU2: Add Switch EEPROM Andrew Lunn
@ 2017-07-17 20:25 ` Andrew Lunn
  2017-07-17 20:25 ` [PATCH 5/5] ARM: dts: imx6: RDU2: Add Micrel PHY interrupt Andrew Lunn
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2017-07-17 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

The Marvell switch has its interrupt pin connected to a GPIO
line. Wire this up in the device tree. This then allows us to use
interrupts from the embedded Ethernet PHYs in the switch. Also wire
them up in device tree.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 53 ++++++++++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
index d67bf81524a2..83f311a51cca 100644
--- a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
@@ -630,13 +630,19 @@
 		#size-cells = <0>;
 		status = "okay";
 
-		switch at 0 {
+		switch: switch at 0 {
 			compatible = "marvell,mv88e6085";
+			pinctrl-0 = <&pinctrl_switch_irq>;
+			pinctrl-names = "default";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <0>;
 			dsa,member = <0 0>;
 			eeprom-length = <512>;
+			interrupt-parent = <&gpio6>;
+			interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
 
 			ports {
 				#address-cells = <1>;
@@ -645,11 +651,13 @@
 				port at 0 {
 					reg = <0>;
 					label = "gigabit_proc";
+					phy-handle = <&switchphy0>;
 				};
 
 				port at 1 {
 					reg = <1>;
 					label = "netaux";
+					phy-handle = <&switchphy1>;
 				};
 
 				port at 2 {
@@ -666,11 +674,48 @@
 				port at 3 {
 					reg = <3>;
 					label = "netright";
+					phy-handle = <&switchphy3>;
 				};
 
 				port at 4 {
 					reg = <4>;
 					label = "netleft";
+					phy-handle = <&switchphy4>;
+				};
+			};
+
+			mdio {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				switchphy0: switchphy at 0 {
+					reg = <0>;
+					interrupt-parent = <&switch>;
+					interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+				};
+
+				switchphy1: switchphy at 1 {
+					reg = <1>;
+					interrupt-parent = <&switch>;
+					interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+				};
+
+				switchphy2: switchphy at 2 {
+					reg = <2>;
+					interrupt-parent = <&switch>;
+					interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+				};
+
+				switchphy3: switchphy at 3 {
+					reg = <3>;
+					interrupt-parent = <&switch>;
+					interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+				};
+
+				switchphy4: switchphy at 4 {
+					reg = <4>;
+					interrupt-parent = <&switch>;
+					interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
 				};
 			};
 		};
@@ -891,6 +936,12 @@
 		>;
 	};
 
+	pinctrl_switch_irq: switchgrp {
+		fsl,pins = <
+			MX6QDL_PAD_CSI0_DAT17__GPIO6_IO03	0x4001b000
+		>;
+	};
+
 	pinctrl_tc358767: tc358767grp {
 		fsl,pins = <
 			MX6QDL_PAD_GPIO_9__GPIO1_IO09		0x10
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/5] ARM: dts: imx6: RDU2: Add Micrel PHY interrupt
  2017-07-17 20:24 [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Andrew Lunn
                   ` (3 preceding siblings ...)
  2017-07-17 20:25 ` [PATCH 4/5] ARM: dts: imx6: RDU2: Add Switch interrupts Andrew Lunn
@ 2017-07-17 20:25 ` Andrew Lunn
  2017-07-18  0:42 ` [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Chris Healy
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2017-07-17 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

The Micrel PHY has its interrupt pin connected to a GPIO line. Wire
this up in the device tree.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
index 83f311a51cca..eeb7679fd348 100644
--- a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
@@ -61,7 +61,11 @@
 		         &gpio6 4 GPIO_ACTIVE_HIGH>;
 
 		phy: ethernet-phy at 0 {
+			pinctrl-0 = <&pinctrl_rmii_phy_irq>;
+			pinctrl-names = "default";
 			reg = <0>;
+			interrupt-parent = <&gpio3>;
+			interrupts = <30 IRQ_TYPE_LEVEL_LOW>;
 		};
 	};
 
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs
  2017-07-17 20:24 [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Andrew Lunn
                   ` (4 preceding siblings ...)
  2017-07-17 20:25 ` [PATCH 5/5] ARM: dts: imx6: RDU2: Add Micrel PHY interrupt Andrew Lunn
@ 2017-07-18  0:42 ` Chris Healy
  2017-07-24 15:26 ` Fabio Estevam
  2017-07-25  9:07 ` Shawn Guo
  7 siblings, 0 replies; 9+ messages in thread
From: Chris Healy @ 2017-07-18  0:42 UTC (permalink / raw)
  To: linux-arm-kernel

I tested the full series successfully on the RDU2 platform.

Tested-by: Chris Healy <cphealy@gmail.com>


On Mon, Jul 17, 2017 at 1:24 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> This patchset extends the RDU2 to support its Ethernet switch, the
> PHYs within the switch, the switches EEPROM, and the Micrel
> PHY connected to the FEC.
>
> Andrew Lunn (5):
>   ARM: dts: imx6: RDU2: Add Micrel PHY to FEC
>   ARM: dts: imx6: RDU2: Add DSA support for the Marvell 88E6352
>   ARM: dts: imx6: RDU2: Add Switch EEPROM
>   ARM: dts: imx6: RDU2: Add Switch interrupts
>   ARM: dts: imx6: RDU2: Add Micrel PHY interrupt
>
>  arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 112 +++++++++++++++++++++++++++++++-
>  1 file changed, 109 insertions(+), 3 deletions(-)
>
> --
> 2.13.2
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs
  2017-07-17 20:24 [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Andrew Lunn
                   ` (5 preceding siblings ...)
  2017-07-18  0:42 ` [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Chris Healy
@ 2017-07-24 15:26 ` Fabio Estevam
  2017-07-25  9:07 ` Shawn Guo
  7 siblings, 0 replies; 9+ messages in thread
From: Fabio Estevam @ 2017-07-24 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 17, 2017 at 5:24 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> This patchset extends the RDU2 to support its Ethernet switch, the
> PHYs within the switch, the switches EEPROM, and the Micrel
> PHY connected to the FEC.
>
> Andrew Lunn (5):
>   ARM: dts: imx6: RDU2: Add Micrel PHY to FEC
>   ARM: dts: imx6: RDU2: Add DSA support for the Marvell 88E6352
>   ARM: dts: imx6: RDU2: Add Switch EEPROM
>   ARM: dts: imx6: RDU2: Add Switch interrupts
>   ARM: dts: imx6: RDU2: Add Micrel PHY interrupt

Series looks good:

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs
  2017-07-17 20:24 [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Andrew Lunn
                   ` (6 preceding siblings ...)
  2017-07-24 15:26 ` Fabio Estevam
@ 2017-07-25  9:07 ` Shawn Guo
  7 siblings, 0 replies; 9+ messages in thread
From: Shawn Guo @ 2017-07-25  9:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 17, 2017 at 10:24:59PM +0200, Andrew Lunn wrote:
> This patchset extends the RDU2 to support its Ethernet switch, the
> PHYs within the switch, the switches EEPROM, and the Micrel
> PHY connected to the FEC.
> 
> Andrew Lunn (5):
>   ARM: dts: imx6: RDU2: Add Micrel PHY to FEC
>   ARM: dts: imx6: RDU2: Add DSA support for the Marvell 88E6352
>   ARM: dts: imx6: RDU2: Add Switch EEPROM
>   ARM: dts: imx6: RDU2: Add Switch interrupts
>   ARM: dts: imx6: RDU2: Add Micrel PHY interrupt

Applied all, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-07-25  9:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17 20:24 [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Andrew Lunn
2017-07-17 20:25 ` [PATCH 1/5] ARM: dts: imx6: RDU2: Add Micrel PHY to FEC Andrew Lunn
2017-07-17 20:25 ` [PATCH 2/5] ARM: dts: imx6: RDU2: Add DSA support for the Marvell 88E6352 Andrew Lunn
2017-07-17 20:25 ` [PATCH 3/5] ARM: dts: imx6: RDU2: Add Switch EEPROM Andrew Lunn
2017-07-17 20:25 ` [PATCH 4/5] ARM: dts: imx6: RDU2: Add Switch interrupts Andrew Lunn
2017-07-17 20:25 ` [PATCH 5/5] ARM: dts: imx6: RDU2: Add Micrel PHY interrupt Andrew Lunn
2017-07-18  0:42 ` [PATCH 0/5] ARM: dts: imx6: RDU2: Ethernet switch and PHYs Chris Healy
2017-07-24 15:26 ` Fabio Estevam
2017-07-25  9:07 ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.