All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA.
@ 2014-09-01 17:35 Andrew Lunn
  2014-09-09 16:06 ` Jason Cooper
  2014-09-13 21:06 ` Jason Cooper
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Lunn @ 2014-09-01 17:35 UTC (permalink / raw)
  To: linux-arm-kernel

During the conversion of boards to use DT to instantiate Distributed
Switch Architecture, nobody volunteered to test. As to be expected,
the conversion was flawed. Testers and access to hardware has now
become available, and this patch hopefully fixes the problems.

dsa,mii-bus must be a phandle to the top level mdio node, not the port
specific subnode of the mdio device.

dsa,ethernet must be a phandle to the port subnode within the ethernet
DT node, not the ethernet node.

Don't pinctrl hog the card detect gpio for mvsdio.

Rename the .dts files to make it clearer which file is for the Z0
stepping and which for the A0 or later stepping.

Fixes: e2eaa339af441b3d51cdaa16870065c4154ce13c
Fixes: e7c8f3808be854379c9784745663a55371cbf232

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Cc: seugene at marvell.com
---
v2:
  Fix duplex typo
  Feedback after testing
  Fix mvsdio card detect gpio
---
 arch/arm/boot/dts/Makefile                         |  4 +-
 arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts     | 16 +++-----
 arch/arm/boot/dts/kirkwood-rd88f6281-a.dts         | 43 ++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts        | 26 -------------
 ...-rd88f6281-a1.dts => kirkwood-rd88f6281-z0.dts} | 18 +++++----
 arch/arm/boot/dts/kirkwood-rd88f6281.dtsi          | 27 +++-----------
 arch/arm/boot/dts/kirkwood.dtsi                    |  4 +-
 7 files changed, 69 insertions(+), 69 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
 delete mode 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
 rename arch/arm/boot/dts/{kirkwood-rd88f6281-a1.dts => kirkwood-rd88f6281-z0.dts} (57%)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 89b54fd77732..0ac6476bc312 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -145,8 +145,8 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood-b3.dtb \
 	kirkwood-openrd-client.dtb \
 	kirkwood-openrd-ultimate.dtb \
 	kirkwood-rd88f6192.dtb \
-	kirkwood-rd88f6281-a0.dtb \
-	kirkwood-rd88f6281-a1.dtb \
+	kirkwood-rd88f6281-z0.dtb \
+	kirkwood-rd88f6281-a.dtb \
 	kirkwood-rs212.dtb \
 	kirkwood-rs409.dtb \
 	kirkwood-rs411.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
index 8f76d28759a3..f82827d6fcff 100644
--- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
+++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
@@ -123,11 +123,11 @@
 
 	dsa at 0 {
 		compatible = "marvell,dsa";
-		#address-cells = <2>;
+		#address-cells = <1>;
 		#size-cells = <0>;
 
-		dsa,ethernet = <&eth0>;
-		dsa,mii-bus = <&ethphy0>;
+		dsa,ethernet = <&eth0port>;
+		dsa,mii-bus = <&mdio>;
 
 		switch at 0 {
 			#address-cells = <1>;
@@ -169,17 +169,13 @@
 
 &mdio {
 	status = "okay";
-
-	ethphy0: ethernet-phy at ff {
-		reg = <0xff>; 	/* No phy attached */
-		speed = <1000>;
-		duplex = <1>;
-	};
 };
 
 &eth0 {
 	status = "okay";
+
 	ethernet0-port at 0 {
-		phy-handle = <&ethphy0>;
+		speed = <1000>;
+		duplex = <1>;
 	};
 };
diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts b/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
new file mode 100644
index 000000000000..f2e08b3b33ea
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
@@ -0,0 +1,43 @@
+/*
+ * Marvell RD88F6181 A Board descrition
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ *
+ * This file contains the definitions for the board with the A0 or
+ * higher stepping of the SoC. The ethernet switch does not have a
+ * "wan" port.
+ */
+
+/dts-v1/;
+#include "kirkwood-rd88f6281.dtsi"
+
+/ {
+	model = "Marvell RD88f6281 Reference design, with A0 or higher SoC";
+	compatible = "marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+	dsa at 0 {
+		switch at 0 {
+			reg = <10 0>;	 /* MDIO address 10, switch 0 in tree */
+		};
+	};
+};
+
+&mdio {
+	status = "okay";
+
+	ethphy1: ethernet-phy at 11 {
+		 reg = <11>;
+	};
+};
+
+&eth1 {
+	status = "okay";
+
+	ethernet1-port at 0 {
+		 phy-handle = <&ethphy1>;
+	};
+};
diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts b/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
deleted file mode 100644
index a803bbb70bc8..000000000000
--- a/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Marvell RD88F6181 A0 Board descrition
- *
- * Andrew Lunn <andrew@lunn.ch>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- *
- * This file contains the definitions for the board with the A0 variant of
- * the SoC. The ethernet switch does not have a "wan" port.
- */
-
-/dts-v1/;
-#include "kirkwood-rd88f6281.dtsi"
-
-/ {
-	model = "Marvell RD88f6281 Reference design, with A0 SoC";
-	compatible = "marvell,rd88f6281-a0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
-
-	dsa at 0 {
-		switch at 0 {
-			reg = <10 0>;    /* MDIO address 10, switch 0 in tree */
-		};
-	};
-};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts b/arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
similarity index 57%
rename from arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts
rename to arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
index baeebbf1d8c7..f4272b64ed7f 100644
--- a/arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts
+++ b/arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
@@ -1,5 +1,5 @@
 /*
- * Marvell RD88F6181 A1 Board descrition
+ * Marvell RD88F6181 Z0 stepping descrition
  *
  * Andrew Lunn <andrew@lunn.ch>
  *
@@ -7,17 +7,17 @@
  * License version 2.  This program is licensed "as is" without any
  * warranty of any kind, whether express or implied.
  *
- * This file contains the definitions for the board with the A1 variant of
- * the SoC. The ethernet switch has a "wan" port.
- */
+ * This file contains the definitions for the board using the Z0
+ * stepping of the SoC. The ethernet switch has a "wan" port.
+*/
 
 /dts-v1/;
 
 #include "kirkwood-rd88f6281.dtsi"
 
 / {
-	model = "Marvell RD88f6281 Reference design, with A1 SoC";
-	compatible = "marvell,rd88f6281-a1", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
+	model = "Marvell RD88f6281 Reference design, with Z0 SoC";
+	compatible = "marvell,rd88f6281-z0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
 
 	dsa at 0 {
 		switch at 0 {
@@ -28,4 +28,8 @@
 			};
 		};
 	};
-};
\ No newline at end of file
+};
+
+&eth1 {
+      status = "disabled";
+};
diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
index 26cf0e0ccefd..d195e884b3b5 100644
--- a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
+++ b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
@@ -37,7 +37,6 @@
 
 	ocp at f1000000 {
 		pinctrl: pin-controller at 10000 {
-			pinctrl-0 = <&pmx_sdio_cd>;
 			pinctrl-names = "default";
 
 			pmx_sdio_cd: pmx-sdio-cd {
@@ -69,8 +68,8 @@
 		#address-cells = <2>;
 		#size-cells = <0>;
 
-		dsa,ethernet = <&eth0>;
-		dsa,mii-bus = <&ethphy1>;
+		dsa,ethernet = <&eth0port>;
+		dsa,mii-bus = <&mdio>;
 
 		switch at 0 {
 			#address-cells = <1>;
@@ -119,35 +118,19 @@
 	};
 
 	partition at 300000 {
-		label = "data";
+		label = "rootfs";
 		reg = <0x0300000 0x500000>;
 	};
 };
 
 &mdio {
 	status = "okay";
-
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
-
-	ethphy1: ethernet-phy at ff {
-		reg = <0xff>; /* No PHY attached */
-		speed = <1000>;
-		duple = <1>;
-	};
 };
 
 &eth0 {
 	status = "okay";
 	ethernet0-port at 0 {
-		phy-handle = <&ethphy0>;
-	};
-};
-
-&eth1 {
-	status = "okay";
-	ethernet1-port at 0 {
-		phy-handle = <&ethphy1>;
+		speed = <1000>;
+		duplex = <1>;
 	};
 };
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index afc640cd80c5..464f09a1a4a5 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -309,7 +309,7 @@
 			marvell,tx-checksum-limit = <1600>;
 			status = "disabled";
 
-			ethernet0-port at 0 {
+			eth0port: ethernet0-port at 0 {
 				compatible = "marvell,kirkwood-eth-port";
 				reg = <0>;
 				interrupts = <11>;
@@ -342,7 +342,7 @@
 			pinctrl-names = "default";
 			status = "disabled";
 
-			ethernet1-port at 0 {
+			eth1port: ethernet1-port at 0 {
 				compatible = "marvell,kirkwood-eth-port";
 				reg = <0>;
 				interrupts = <15>;
-- 
2.1.0

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

* [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA.
  2014-09-01 17:35 [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA Andrew Lunn
@ 2014-09-09 16:06 ` Jason Cooper
  2014-09-09 16:44   ` Eugene Sanivsky
  2014-09-13 21:06 ` Jason Cooper
  1 sibling, 1 reply; 7+ messages in thread
From: Jason Cooper @ 2014-09-09 16:06 UTC (permalink / raw)
  To: linux-arm-kernel

All,

On Mon, Sep 01, 2014 at 07:35:41PM +0200, Andrew Lunn wrote:
> During the conversion of boards to use DT to instantiate Distributed
> Switch Architecture, nobody volunteered to test. As to be expected,
> the conversion was flawed. Testers and access to hardware has now
> become available, and this patch hopefully fixes the problems.
> 
> dsa,mii-bus must be a phandle to the top level mdio node, not the port
> specific subnode of the mdio device.
> 
> dsa,ethernet must be a phandle to the port subnode within the ethernet
> DT node, not the ethernet node.
> 
> Don't pinctrl hog the card detect gpio for mvsdio.
> 
> Rename the .dts files to make it clearer which file is for the Z0
> stepping and which for the A0 or later stepping.
> 
> Fixes: e2eaa339af441b3d51cdaa16870065c4154ce13c
> Fixes: e7c8f3808be854379c9784745663a55371cbf232
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> Cc: seugene at marvell.com
> ---
> v2:
>   Fix duplex typo
>   Feedback after testing
>   Fix mvsdio card detect gpio
> ---
>  arch/arm/boot/dts/Makefile                         |  4 +-
>  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts     | 16 +++-----
>  arch/arm/boot/dts/kirkwood-rd88f6281-a.dts         | 43 ++++++++++++++++++++++
>  arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts        | 26 -------------
>  ...-rd88f6281-a1.dts => kirkwood-rd88f6281-z0.dts} | 18 +++++----
>  arch/arm/boot/dts/kirkwood-rd88f6281.dtsi          | 27 +++-----------
>  arch/arm/boot/dts/kirkwood.dtsi                    |  4 +-
>  7 files changed, 69 insertions(+), 69 deletions(-)
>  create mode 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
>  delete mode 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
>  rename arch/arm/boot/dts/{kirkwood-rd88f6281-a1.dts => kirkwood-rd88f6281-z0.dts} (57%)

Has anyone had a chance to test these changes?  If so, can we get some
Tested-by's?

thx,

Jason.

> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 89b54fd77732..0ac6476bc312 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -145,8 +145,8 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood-b3.dtb \
>  	kirkwood-openrd-client.dtb \
>  	kirkwood-openrd-ultimate.dtb \
>  	kirkwood-rd88f6192.dtb \
> -	kirkwood-rd88f6281-a0.dtb \
> -	kirkwood-rd88f6281-a1.dtb \
> +	kirkwood-rd88f6281-z0.dtb \
> +	kirkwood-rd88f6281-a.dtb \
>  	kirkwood-rs212.dtb \
>  	kirkwood-rs409.dtb \
>  	kirkwood-rs411.dtb \
> diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
> index 8f76d28759a3..f82827d6fcff 100644
> --- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
> +++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
> @@ -123,11 +123,11 @@
>  
>  	dsa at 0 {
>  		compatible = "marvell,dsa";
> -		#address-cells = <2>;
> +		#address-cells = <1>;
>  		#size-cells = <0>;
>  
> -		dsa,ethernet = <&eth0>;
> -		dsa,mii-bus = <&ethphy0>;
> +		dsa,ethernet = <&eth0port>;
> +		dsa,mii-bus = <&mdio>;
>  
>  		switch at 0 {
>  			#address-cells = <1>;
> @@ -169,17 +169,13 @@
>  
>  &mdio {
>  	status = "okay";
> -
> -	ethphy0: ethernet-phy at ff {
> -		reg = <0xff>; 	/* No phy attached */
> -		speed = <1000>;
> -		duplex = <1>;
> -	};
>  };
>  
>  &eth0 {
>  	status = "okay";
> +
>  	ethernet0-port at 0 {
> -		phy-handle = <&ethphy0>;
> +		speed = <1000>;
> +		duplex = <1>;
>  	};
>  };
> diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts b/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
> new file mode 100644
> index 000000000000..f2e08b3b33ea
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
> @@ -0,0 +1,43 @@
> +/*
> + * Marvell RD88F6181 A Board descrition
> + *
> + * Andrew Lunn <andrew@lunn.ch>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2.  This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + *
> + * This file contains the definitions for the board with the A0 or
> + * higher stepping of the SoC. The ethernet switch does not have a
> + * "wan" port.
> + */
> +
> +/dts-v1/;
> +#include "kirkwood-rd88f6281.dtsi"
> +
> +/ {
> +	model = "Marvell RD88f6281 Reference design, with A0 or higher SoC";
> +	compatible = "marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> +
> +	dsa at 0 {
> +		switch at 0 {
> +			reg = <10 0>;	 /* MDIO address 10, switch 0 in tree */
> +		};
> +	};
> +};
> +
> +&mdio {
> +	status = "okay";
> +
> +	ethphy1: ethernet-phy at 11 {
> +		 reg = <11>;
> +	};
> +};
> +
> +&eth1 {
> +	status = "okay";
> +
> +	ethernet1-port at 0 {
> +		 phy-handle = <&ethphy1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts b/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
> deleted file mode 100644
> index a803bbb70bc8..000000000000
> --- a/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -/*
> - * Marvell RD88F6181 A0 Board descrition
> - *
> - * Andrew Lunn <andrew@lunn.ch>
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2.  This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - *
> - * This file contains the definitions for the board with the A0 variant of
> - * the SoC. The ethernet switch does not have a "wan" port.
> - */
> -
> -/dts-v1/;
> -#include "kirkwood-rd88f6281.dtsi"
> -
> -/ {
> -	model = "Marvell RD88f6281 Reference design, with A0 SoC";
> -	compatible = "marvell,rd88f6281-a0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> -
> -	dsa at 0 {
> -		switch at 0 {
> -			reg = <10 0>;    /* MDIO address 10, switch 0 in tree */
> -		};
> -	};
> -};
> \ No newline at end of file
> diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts b/arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
> similarity index 57%
> rename from arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts
> rename to arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
> index baeebbf1d8c7..f4272b64ed7f 100644
> --- a/arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts
> +++ b/arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
> @@ -1,5 +1,5 @@
>  /*
> - * Marvell RD88F6181 A1 Board descrition
> + * Marvell RD88F6181 Z0 stepping descrition
>   *
>   * Andrew Lunn <andrew@lunn.ch>
>   *
> @@ -7,17 +7,17 @@
>   * License version 2.  This program is licensed "as is" without any
>   * warranty of any kind, whether express or implied.
>   *
> - * This file contains the definitions for the board with the A1 variant of
> - * the SoC. The ethernet switch has a "wan" port.
> - */
> + * This file contains the definitions for the board using the Z0
> + * stepping of the SoC. The ethernet switch has a "wan" port.
> +*/
>  
>  /dts-v1/;
>  
>  #include "kirkwood-rd88f6281.dtsi"
>  
>  / {
> -	model = "Marvell RD88f6281 Reference design, with A1 SoC";
> -	compatible = "marvell,rd88f6281-a1", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> +	model = "Marvell RD88f6281 Reference design, with Z0 SoC";
> +	compatible = "marvell,rd88f6281-z0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
>  
>  	dsa at 0 {
>  		switch at 0 {
> @@ -28,4 +28,8 @@
>  			};
>  		};
>  	};
> -};
> \ No newline at end of file
> +};
> +
> +&eth1 {
> +      status = "disabled";
> +};
> diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
> index 26cf0e0ccefd..d195e884b3b5 100644
> --- a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
> @@ -37,7 +37,6 @@
>  
>  	ocp at f1000000 {
>  		pinctrl: pin-controller at 10000 {
> -			pinctrl-0 = <&pmx_sdio_cd>;
>  			pinctrl-names = "default";
>  
>  			pmx_sdio_cd: pmx-sdio-cd {
> @@ -69,8 +68,8 @@
>  		#address-cells = <2>;
>  		#size-cells = <0>;
>  
> -		dsa,ethernet = <&eth0>;
> -		dsa,mii-bus = <&ethphy1>;
> +		dsa,ethernet = <&eth0port>;
> +		dsa,mii-bus = <&mdio>;
>  
>  		switch at 0 {
>  			#address-cells = <1>;
> @@ -119,35 +118,19 @@
>  	};
>  
>  	partition at 300000 {
> -		label = "data";
> +		label = "rootfs";
>  		reg = <0x0300000 0x500000>;
>  	};
>  };
>  
>  &mdio {
>  	status = "okay";
> -
> -	ethphy0: ethernet-phy at 0 {
> -		reg = <0>;
> -	};
> -
> -	ethphy1: ethernet-phy at ff {
> -		reg = <0xff>; /* No PHY attached */
> -		speed = <1000>;
> -		duple = <1>;
> -	};
>  };
>  
>  &eth0 {
>  	status = "okay";
>  	ethernet0-port at 0 {
> -		phy-handle = <&ethphy0>;
> -	};
> -};
> -
> -&eth1 {
> -	status = "okay";
> -	ethernet1-port at 0 {
> -		phy-handle = <&ethphy1>;
> +		speed = <1000>;
> +		duplex = <1>;
>  	};
>  };
> diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
> index afc640cd80c5..464f09a1a4a5 100644
> --- a/arch/arm/boot/dts/kirkwood.dtsi
> +++ b/arch/arm/boot/dts/kirkwood.dtsi
> @@ -309,7 +309,7 @@
>  			marvell,tx-checksum-limit = <1600>;
>  			status = "disabled";
>  
> -			ethernet0-port at 0 {
> +			eth0port: ethernet0-port at 0 {
>  				compatible = "marvell,kirkwood-eth-port";
>  				reg = <0>;
>  				interrupts = <11>;
> @@ -342,7 +342,7 @@
>  			pinctrl-names = "default";
>  			status = "disabled";
>  
> -			ethernet1-port at 0 {
> +			eth1port: ethernet1-port at 0 {
>  				compatible = "marvell,kirkwood-eth-port";
>  				reg = <0>;
>  				interrupts = <15>;
> -- 
> 2.1.0
> 

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

* [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA.
  2014-09-09 16:06 ` Jason Cooper
@ 2014-09-09 16:44   ` Eugene Sanivsky
  2014-09-09 17:17     ` Jason Cooper
  0 siblings, 1 reply; 7+ messages in thread
From: Eugene Sanivsky @ 2014-09-09 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

I've tested v2 of the patch and it worked fine.

Though, I had a couple of comments:

1) I have concerns regarding naming of the boards.
Since distros use those names to identify boards, we should use shorter and consistent naming.
I suggest we use "Marvell RD-88F6281 Reference Board" for A0+ boards, as it was before DT.
As for Z0 board we can use "Marvell RD-88F6281-Z0 Reference Board".
Note, this conflicts a little with physical marking of the boards (Z0 marked as "RD-88F6281" and later versions marked as "RD-88F6281-A"),
 but this way we will maintain previous naming.
Another solution would be to use same name (pre-DT one) for both boards, which is best option from distros perspective.

2) There is a problem with network throughput on those devices (maybe other too).
With 3.17rc2 I am not able to get more then ~50Mbps while same board with in same setup running v3.2 or v3.10 easily pass 650Mbps mark.
Above is correct for both DSA connected and PHY connected ports.
We must make sure above is not a side effect of conversion to DT.

Since author (Andrew Lunn) is on vacation, maybe it's better to wait for his response before any action.

Regards

-----Original Message-----
From: Jason Cooper [mailto:jason at lakedaemon.net] 
Sent: Tuesday, September 09, 2014 7:07 PM
To: Andrew Lunn
Cc: linux ARM; Eugene Sanivsky
Subject: Re: [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA.

All,

On Mon, Sep 01, 2014 at 07:35:41PM +0200, Andrew Lunn wrote:
> During the conversion of boards to use DT to instantiate Distributed 
> Switch Architecture, nobody volunteered to test. As to be expected, 
> the conversion was flawed. Testers and access to hardware has now 
> become available, and this patch hopefully fixes the problems.
> 
> dsa,mii-bus must be a phandle to the top level mdio node, not the port 
> specific subnode of the mdio device.
> 
> dsa,ethernet must be a phandle to the port subnode within the ethernet 
> DT node, not the ethernet node.
> 
> Don't pinctrl hog the card detect gpio for mvsdio.
> 
> Rename the .dts files to make it clearer which file is for the Z0 
> stepping and which for the A0 or later stepping.
> 
> Fixes: e2eaa339af441b3d51cdaa16870065c4154ce13c
> Fixes: e7c8f3808be854379c9784745663a55371cbf232
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> Cc: seugene at marvell.com
> ---
> v2:
>   Fix duplex typo
>   Feedback after testing
>   Fix mvsdio card detect gpio
> ---
>  arch/arm/boot/dts/Makefile                         |  4 +-
>  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts     | 16 +++-----
>  arch/arm/boot/dts/kirkwood-rd88f6281-a.dts         | 43 ++++++++++++++++++++++
>  arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts        | 26 -------------
>  ...-rd88f6281-a1.dts => kirkwood-rd88f6281-z0.dts} | 18 +++++----
>  arch/arm/boot/dts/kirkwood-rd88f6281.dtsi          | 27 +++-----------
>  arch/arm/boot/dts/kirkwood.dtsi                    |  4 +-
>  7 files changed, 69 insertions(+), 69 deletions(-)  create mode 
> 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
>  delete mode 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
>  rename arch/arm/boot/dts/{kirkwood-rd88f6281-a1.dts => 
> kirkwood-rd88f6281-z0.dts} (57%)

Has anyone had a chance to test these changes?  If so, can we get some Tested-by's?

thx,

Jason.

> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile 
> index 89b54fd77732..0ac6476bc312 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -145,8 +145,8 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood-b3.dtb \
>  	kirkwood-openrd-client.dtb \
>  	kirkwood-openrd-ultimate.dtb \
>  	kirkwood-rd88f6192.dtb \
> -	kirkwood-rd88f6281-a0.dtb \
> -	kirkwood-rd88f6281-a1.dtb \
> +	kirkwood-rd88f6281-z0.dtb \
> +	kirkwood-rd88f6281-a.dtb \
>  	kirkwood-rs212.dtb \
>  	kirkwood-rs409.dtb \
>  	kirkwood-rs411.dtb \
> diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts 
> b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
> index 8f76d28759a3..f82827d6fcff 100644
> --- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
> +++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
> @@ -123,11 +123,11 @@
>  
>  	dsa at 0 {
>  		compatible = "marvell,dsa";
> -		#address-cells = <2>;
> +		#address-cells = <1>;
>  		#size-cells = <0>;
>  
> -		dsa,ethernet = <&eth0>;
> -		dsa,mii-bus = <&ethphy0>;
> +		dsa,ethernet = <&eth0port>;
> +		dsa,mii-bus = <&mdio>;
>  
>  		switch at 0 {
>  			#address-cells = <1>;
> @@ -169,17 +169,13 @@
>  
>  &mdio {
>  	status = "okay";
> -
> -	ethphy0: ethernet-phy at ff {
> -		reg = <0xff>; 	/* No phy attached */
> -		speed = <1000>;
> -		duplex = <1>;
> -	};
>  };
>  
>  &eth0 {
>  	status = "okay";
> +
>  	ethernet0-port at 0 {
> -		phy-handle = <&ethphy0>;
> +		speed = <1000>;
> +		duplex = <1>;
>  	};
>  };
> diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts 
> b/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
> new file mode 100644
> index 000000000000..f2e08b3b33ea
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
> @@ -0,0 +1,43 @@
> +/*
> + * Marvell RD88F6181 A Board descrition
> + *
> + * Andrew Lunn <andrew@lunn.ch>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2.  This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + *
> + * This file contains the definitions for the board with the A0 or
> + * higher stepping of the SoC. The ethernet switch does not have a
> + * "wan" port.
> + */
> +
> +/dts-v1/;
> +#include "kirkwood-rd88f6281.dtsi"
> +
> +/ {
> +	model = "Marvell RD88f6281 Reference design, with A0 or higher SoC";
> +	compatible = "marvell,rd88f6281-a", 
> +"marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> +
> +	dsa at 0 {
> +		switch at 0 {
> +			reg = <10 0>;	 /* MDIO address 10, switch 0 in tree */
> +		};
> +	};
> +};
> +
> +&mdio {
> +	status = "okay";
> +
> +	ethphy1: ethernet-phy at 11 {
> +		 reg = <11>;
> +	};
> +};
> +
> +&eth1 {
> +	status = "okay";
> +
> +	ethernet1-port at 0 {
> +		 phy-handle = <&ethphy1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts 
> b/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
> deleted file mode 100644
> index a803bbb70bc8..000000000000
> --- a/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -/*
> - * Marvell RD88F6181 A0 Board descrition
> - *
> - * Andrew Lunn <andrew@lunn.ch>
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2.  This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - *
> - * This file contains the definitions for the board with the A0 
> variant of
> - * the SoC. The ethernet switch does not have a "wan" port.
> - */
> -
> -/dts-v1/;
> -#include "kirkwood-rd88f6281.dtsi"
> -
> -/ {
> -	model = "Marvell RD88f6281 Reference design, with A0 SoC";
> -	compatible = "marvell,rd88f6281-a0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> -
> -	dsa at 0 {
> -		switch at 0 {
> -			reg = <10 0>;    /* MDIO address 10, switch 0 in tree */
> -		};
> -	};
> -};
> \ No newline at end of file
> diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts 
> b/arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
> similarity index 57%
> rename from arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts
> rename to arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
> index baeebbf1d8c7..f4272b64ed7f 100644
> --- a/arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts
> +++ b/arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
> @@ -1,5 +1,5 @@
>  /*
> - * Marvell RD88F6181 A1 Board descrition
> + * Marvell RD88F6181 Z0 stepping descrition
>   *
>   * Andrew Lunn <andrew@lunn.ch>
>   *
> @@ -7,17 +7,17 @@
>   * License version 2.  This program is licensed "as is" without any
>   * warranty of any kind, whether express or implied.
>   *
> - * This file contains the definitions for the board with the A1 
> variant of
> - * the SoC. The ethernet switch has a "wan" port.
> - */
> + * This file contains the definitions for the board using the Z0
> + * stepping of the SoC. The ethernet switch has a "wan" port.
> +*/
>  
>  /dts-v1/;
>  
>  #include "kirkwood-rd88f6281.dtsi"
>  
>  / {
> -	model = "Marvell RD88f6281 Reference design, with A1 SoC";
> -	compatible = "marvell,rd88f6281-a1", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> +	model = "Marvell RD88f6281 Reference design, with Z0 SoC";
> +	compatible = "marvell,rd88f6281-z0", 
> +"marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
>  
>  	dsa at 0 {
>  		switch at 0 {
> @@ -28,4 +28,8 @@
>  			};
>  		};
>  	};
> -};
> \ No newline at end of file
> +};
> +
> +&eth1 {
> +      status = "disabled";
> +};
> diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi 
> b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
> index 26cf0e0ccefd..d195e884b3b5 100644
> --- a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
> @@ -37,7 +37,6 @@
>  
>  	ocp at f1000000 {
>  		pinctrl: pin-controller at 10000 {
> -			pinctrl-0 = <&pmx_sdio_cd>;
>  			pinctrl-names = "default";
>  
>  			pmx_sdio_cd: pmx-sdio-cd {
> @@ -69,8 +68,8 @@
>  		#address-cells = <2>;
>  		#size-cells = <0>;
>  
> -		dsa,ethernet = <&eth0>;
> -		dsa,mii-bus = <&ethphy1>;
> +		dsa,ethernet = <&eth0port>;
> +		dsa,mii-bus = <&mdio>;
>  
>  		switch at 0 {
>  			#address-cells = <1>;
> @@ -119,35 +118,19 @@
>  	};
>  
>  	partition at 300000 {
> -		label = "data";
> +		label = "rootfs";
>  		reg = <0x0300000 0x500000>;
>  	};
>  };
>  
>  &mdio {
>  	status = "okay";
> -
> -	ethphy0: ethernet-phy at 0 {
> -		reg = <0>;
> -	};
> -
> -	ethphy1: ethernet-phy at ff {
> -		reg = <0xff>; /* No PHY attached */
> -		speed = <1000>;
> -		duple = <1>;
> -	};
>  };
>  
>  &eth0 {
>  	status = "okay";
>  	ethernet0-port at 0 {
> -		phy-handle = <&ethphy0>;
> -	};
> -};
> -
> -&eth1 {
> -	status = "okay";
> -	ethernet1-port at 0 {
> -		phy-handle = <&ethphy1>;
> +		speed = <1000>;
> +		duplex = <1>;
>  	};
>  };
> diff --git a/arch/arm/boot/dts/kirkwood.dtsi 
> b/arch/arm/boot/dts/kirkwood.dtsi index afc640cd80c5..464f09a1a4a5 
> 100644
> --- a/arch/arm/boot/dts/kirkwood.dtsi
> +++ b/arch/arm/boot/dts/kirkwood.dtsi
> @@ -309,7 +309,7 @@
>  			marvell,tx-checksum-limit = <1600>;
>  			status = "disabled";
>  
> -			ethernet0-port at 0 {
> +			eth0port: ethernet0-port at 0 {
>  				compatible = "marvell,kirkwood-eth-port";
>  				reg = <0>;
>  				interrupts = <11>;
> @@ -342,7 +342,7 @@
>  			pinctrl-names = "default";
>  			status = "disabled";
>  
> -			ethernet1-port at 0 {
> +			eth1port: ethernet1-port at 0 {
>  				compatible = "marvell,kirkwood-eth-port";
>  				reg = <0>;
>  				interrupts = <15>;
> --
> 2.1.0
> 

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

* [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA.
  2014-09-09 16:44   ` Eugene Sanivsky
@ 2014-09-09 17:17     ` Jason Cooper
  2014-09-10 14:08       ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Jason Cooper @ 2014-09-09 17:17 UTC (permalink / raw)
  To: linux-arm-kernel

Eugene,

Please fix your mailer, I had to manually edit this to look legible.
Also, please don't top-post.

On Tue, Sep 09, 2014 at 04:44:07PM +0000, Eugene Sanivsky wrote:
> On .... Jason Cooper wrote:
> > On Mon, Sep 01, 2014 at 07:35:41PM +0200, Andrew Lunn wrote:
> > > During the conversion of boards to use DT to instantiate Distributed 
> > > Switch Architecture, nobody volunteered to test. As to be expected, 
> > > the conversion was flawed. Testers and access to hardware has now 
> > > become available, and this patch hopefully fixes the problems.
> > > 
> > > dsa,mii-bus must be a phandle to the top level mdio node, not the port 
> > > specific subnode of the mdio device.
> > > 
> > > dsa,ethernet must be a phandle to the port subnode within the ethernet 
> > > DT node, not the ethernet node.
> > > 
> > > Don't pinctrl hog the card detect gpio for mvsdio.
> > > 
> > > Rename the .dts files to make it clearer which file is for the Z0 
> > > stepping and which for the A0 or later stepping.
> > > 
> > > Fixes: e2eaa339af441b3d51cdaa16870065c4154ce13c
> > > Fixes: e7c8f3808be854379c9784745663a55371cbf232
> > > 
> > > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > > Cc: seugene at marvell.com
> > > ---
> > > v2:
> > >   Fix duplex typo
> > >   Feedback after testing
> > >   Fix mvsdio card detect gpio
> > > ---
> > >  arch/arm/boot/dts/Makefile                         |  4 +-
> > >  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts     | 16 +++-----
> > >  arch/arm/boot/dts/kirkwood-rd88f6281-a.dts         | 43 ++++++++++++++++++++++
> > >  arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts        | 26 -------------
> > >  ...-rd88f6281-a1.dts => kirkwood-rd88f6281-z0.dts} | 18 +++++----
> > >  arch/arm/boot/dts/kirkwood-rd88f6281.dtsi          | 27 +++-----------
> > >  arch/arm/boot/dts/kirkwood.dtsi                    |  4 +-
> > >  7 files changed, 69 insertions(+), 69 deletions(-)  create mode 
> > > 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
> > >  delete mode 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
> > >  rename arch/arm/boot/dts/{kirkwood-rd88f6281-a1.dts => 
> > > kirkwood-rd88f6281-z0.dts} (57%)
> > 
> > Has anyone had a chance to test these changes?  If so, can we get some Tested-by's?
> 
> I've tested v2 of the patch and it worked fine.

Ok, I'll consider that a Tested-by...

> Though, I had a couple of comments:
> 
> 1) I have concerns regarding naming of the boards.
> Since distros use those names to identify boards, we should use
> shorter and consistent naming.

No, the filenames within the kernel source tree are *not* an ABI, and we
should avoid treating them as such.  That's why when we added the
dtbs_install target:

  f4d4ffc03efc8 kbuild: dtbs_install: new make target

We discussed this exact problem and settled on letting distros process
the dtb's in the install directory.

I personally think using fdtget to fetch the board compatible string is
much more reliable than file names.  My original version of the above
patch renamed the files as it installed them to
<most_specific_board_compatible>.dtb but that was deemed too heavy
weight and we settled on the above.

> 2) There is a problem with network throughput on those devices (maybe
> other too).  With 3.17rc2 I am not able to get more then ~50Mbps while
> same board with in same setup running v3.2 or v3.10 easily pass
> 650Mbps mark.

Is this with/without this particular patch?  Or is this a separate
issue?

> Since author (Andrew Lunn) is on vacation, maybe it's better to wait
> for his response before any action.

Yes, which will be near the end of the window for getting this in.  I'd
like to have everything hammered out _before_ he returns so he can Ack a
(potentially) new version that I can apply.

thx,

Jason.

> > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile 
> > > index 89b54fd77732..0ac6476bc312 100644
> > > --- a/arch/arm/boot/dts/Makefile
> > > +++ b/arch/arm/boot/dts/Makefile
> > > @@ -145,8 +145,8 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood-b3.dtb \
> > >  	kirkwood-openrd-client.dtb \
> > >  	kirkwood-openrd-ultimate.dtb \
> > >  	kirkwood-rd88f6192.dtb \
> > > -	kirkwood-rd88f6281-a0.dtb \
> > > -	kirkwood-rd88f6281-a1.dtb \
> > > +	kirkwood-rd88f6281-z0.dtb \
> > > +	kirkwood-rd88f6281-a.dtb \
> > >  	kirkwood-rs212.dtb \
> > >  	kirkwood-rs409.dtb \
> > >  	kirkwood-rs411.dtb \
> > > diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts 
> > > b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
> > > index 8f76d28759a3..f82827d6fcff 100644
> > > --- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
> > > +++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
> > > @@ -123,11 +123,11 @@
> > >  
> > >  	dsa at 0 {
> > >  		compatible = "marvell,dsa";
> > > -		#address-cells = <2>;
> > > +		#address-cells = <1>;
> > >  		#size-cells = <0>;
> > >  
> > > -		dsa,ethernet = <&eth0>;
> > > -		dsa,mii-bus = <&ethphy0>;
> > > +		dsa,ethernet = <&eth0port>;
> > > +		dsa,mii-bus = <&mdio>;
> > >  
> > >  		switch at 0 {
> > >  			#address-cells = <1>;
> > > @@ -169,17 +169,13 @@
> > >  
> > >  &mdio {
> > >  	status = "okay";
> > > -
> > > -	ethphy0: ethernet-phy at ff {
> > > -		reg = <0xff>; 	/* No phy attached */
> > > -		speed = <1000>;
> > > -		duplex = <1>;
> > > -	};
> > >  };
> > >  
> > >  &eth0 {
> > >  	status = "okay";
> > > +
> > >  	ethernet0-port at 0 {
> > > -		phy-handle = <&ethphy0>;
> > > +		speed = <1000>;
> > > +		duplex = <1>;
> > >  	};
> > >  };
> > > diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts 
> > > b/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
> > > new file mode 100644
> > > index 000000000000..f2e08b3b33ea
> > > --- /dev/null
> > > +++ b/arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
> > > @@ -0,0 +1,43 @@
> > > +/*
> > > + * Marvell RD88F6181 A Board descrition
> > > + *
> > > + * Andrew Lunn <andrew@lunn.ch>
> > > + *
> > > + * This file is licensed under the terms of the GNU General Public
> > > + * License version 2.  This program is licensed "as is" without any
> > > + * warranty of any kind, whether express or implied.
> > > + *
> > > + * This file contains the definitions for the board with the A0 or
> > > + * higher stepping of the SoC. The ethernet switch does not have a
> > > + * "wan" port.
> > > + */
> > > +
> > > +/dts-v1/;
> > > +#include "kirkwood-rd88f6281.dtsi"
> > > +
> > > +/ {
> > > +	model = "Marvell RD88f6281 Reference design, with A0 or higher SoC";
> > > +	compatible = "marvell,rd88f6281-a", 
> > > +"marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> > > +
> > > +	dsa at 0 {
> > > +		switch at 0 {
> > > +			reg = <10 0>;	 /* MDIO address 10, switch 0 in tree */
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&mdio {
> > > +	status = "okay";
> > > +
> > > +	ethphy1: ethernet-phy at 11 {
> > > +		 reg = <11>;
> > > +	};
> > > +};
> > > +
> > > +&eth1 {
> > > +	status = "okay";
> > > +
> > > +	ethernet1-port at 0 {
> > > +		 phy-handle = <&ethphy1>;
> > > +	};
> > > +};
> > > diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts 
> > > b/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
> > > deleted file mode 100644
> > > index a803bbb70bc8..000000000000
> > > --- a/arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
> > > +++ /dev/null
> > > @@ -1,26 +0,0 @@
> > > -/*
> > > - * Marvell RD88F6181 A0 Board descrition
> > > - *
> > > - * Andrew Lunn <andrew@lunn.ch>
> > > - *
> > > - * This file is licensed under the terms of the GNU General Public
> > > - * License version 2.  This program is licensed "as is" without any
> > > - * warranty of any kind, whether express or implied.
> > > - *
> > > - * This file contains the definitions for the board with the A0 
> > > variant of
> > > - * the SoC. The ethernet switch does not have a "wan" port.
> > > - */
> > > -
> > > -/dts-v1/;
> > > -#include "kirkwood-rd88f6281.dtsi"
> > > -
> > > -/ {
> > > -	model = "Marvell RD88f6281 Reference design, with A0 SoC";
> > > -	compatible = "marvell,rd88f6281-a0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> > > -
> > > -	dsa at 0 {
> > > -		switch at 0 {
> > > -			reg = <10 0>;    /* MDIO address 10, switch 0 in tree */
> > > -		};
> > > -	};
> > > -};
> > > \ No newline at end of file
> > > diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts 
> > > b/arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
> > > similarity index 57%
> > > rename from arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts
> > > rename to arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
> > > index baeebbf1d8c7..f4272b64ed7f 100644
> > > --- a/arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts
> > > +++ b/arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
> > > @@ -1,5 +1,5 @@
> > >  /*
> > > - * Marvell RD88F6181 A1 Board descrition
> > > + * Marvell RD88F6181 Z0 stepping descrition
> > >   *
> > >   * Andrew Lunn <andrew@lunn.ch>
> > >   *
> > > @@ -7,17 +7,17 @@
> > >   * License version 2.  This program is licensed "as is" without any
> > >   * warranty of any kind, whether express or implied.
> > >   *
> > > - * This file contains the definitions for the board with the A1 
> > > variant of
> > > - * the SoC. The ethernet switch has a "wan" port.
> > > - */
> > > + * This file contains the definitions for the board using the Z0
> > > + * stepping of the SoC. The ethernet switch has a "wan" port.
> > > +*/
> > >  
> > >  /dts-v1/;
> > >  
> > >  #include "kirkwood-rd88f6281.dtsi"
> > >  
> > >  / {
> > > -	model = "Marvell RD88f6281 Reference design, with A1 SoC";
> > > -	compatible = "marvell,rd88f6281-a1", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> > > +	model = "Marvell RD88f6281 Reference design, with Z0 SoC";
> > > +	compatible = "marvell,rd88f6281-z0", 
> > > +"marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
> > >  
> > >  	dsa at 0 {
> > >  		switch at 0 {
> > > @@ -28,4 +28,8 @@
> > >  			};
> > >  		};
> > >  	};
> > > -};
> > > \ No newline at end of file
> > > +};
> > > +
> > > +&eth1 {
> > > +      status = "disabled";
> > > +};
> > > diff --git a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi 
> > > b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
> > > index 26cf0e0ccefd..d195e884b3b5 100644
> > > --- a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
> > > +++ b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
> > > @@ -37,7 +37,6 @@
> > >  
> > >  	ocp at f1000000 {
> > >  		pinctrl: pin-controller at 10000 {
> > > -			pinctrl-0 = <&pmx_sdio_cd>;
> > >  			pinctrl-names = "default";
> > >  
> > >  			pmx_sdio_cd: pmx-sdio-cd {
> > > @@ -69,8 +68,8 @@
> > >  		#address-cells = <2>;
> > >  		#size-cells = <0>;
> > >  
> > > -		dsa,ethernet = <&eth0>;
> > > -		dsa,mii-bus = <&ethphy1>;
> > > +		dsa,ethernet = <&eth0port>;
> > > +		dsa,mii-bus = <&mdio>;
> > >  
> > >  		switch at 0 {
> > >  			#address-cells = <1>;
> > > @@ -119,35 +118,19 @@
> > >  	};
> > >  
> > >  	partition at 300000 {
> > > -		label = "data";
> > > +		label = "rootfs";
> > >  		reg = <0x0300000 0x500000>;
> > >  	};
> > >  };
> > >  
> > >  &mdio {
> > >  	status = "okay";
> > > -
> > > -	ethphy0: ethernet-phy at 0 {
> > > -		reg = <0>;
> > > -	};
> > > -
> > > -	ethphy1: ethernet-phy at ff {
> > > -		reg = <0xff>; /* No PHY attached */
> > > -		speed = <1000>;
> > > -		duple = <1>;
> > > -	};
> > >  };
> > >  
> > >  &eth0 {
> > >  	status = "okay";
> > >  	ethernet0-port at 0 {
> > > -		phy-handle = <&ethphy0>;
> > > -	};
> > > -};
> > > -
> > > -&eth1 {
> > > -	status = "okay";
> > > -	ethernet1-port at 0 {
> > > -		phy-handle = <&ethphy1>;
> > > +		speed = <1000>;
> > > +		duplex = <1>;
> > >  	};
> > >  };
> > > diff --git a/arch/arm/boot/dts/kirkwood.dtsi 
> > > b/arch/arm/boot/dts/kirkwood.dtsi index afc640cd80c5..464f09a1a4a5 
> > > 100644
> > > --- a/arch/arm/boot/dts/kirkwood.dtsi
> > > +++ b/arch/arm/boot/dts/kirkwood.dtsi
> > > @@ -309,7 +309,7 @@
> > >  			marvell,tx-checksum-limit = <1600>;
> > >  			status = "disabled";
> > >  
> > > -			ethernet0-port at 0 {
> > > +			eth0port: ethernet0-port at 0 {
> > >  				compatible = "marvell,kirkwood-eth-port";
> > >  				reg = <0>;
> > >  				interrupts = <11>;
> > > @@ -342,7 +342,7 @@
> > >  			pinctrl-names = "default";
> > >  			status = "disabled";
> > >  
> > > -			ethernet1-port at 0 {
> > > +			eth1port: ethernet1-port at 0 {
> > >  				compatible = "marvell,kirkwood-eth-port";
> > >  				reg = <0>;
> > >  				interrupts = <15>;
> > > --
> > > 2.1.0
> > > 

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

* [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA.
  2014-09-09 17:17     ` Jason Cooper
@ 2014-09-10 14:08       ` Andrew Lunn
  2014-09-12 21:37         ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2014-09-10 14:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Sep 09, 2014 at 01:17:42PM -0400, Jason Cooper wrote:
> > I've tested v2 of the patch and it worked fine.

Hi Eugene, thanks for testing.
> 
> Ok, I'll consider that a Tested-by...
> 
> > Though, I had a couple of comments:
> > 
> > 1) I have concerns regarding naming of the boards.
> > Since distros use those names to identify boards, we should use
> > shorter and consistent naming.

I agree with Jason here. The filenames don't matter, its the
description in the compatible string which people should be looking
at. And it seems Marvell own naming of these boards is not
particularly good either.

> > other too).  With 3.17rc2 I am not able to get more then ~50Mbps while
> > same board with in same setup running v3.2 or v3.10 easily pass
> > 650Mbps mark.
> 
> Is this with/without this particular patch?  Or is this a separate
> issue?

I've not looked at this yet, but i guess it is related to TSO and the
stack trace we are seeing. It is independent of this patch. Without
this patch, networking is totally borked. With this patch, it somewhat
works, but i guess with packet loss, causing the low TCP bandwidth.

Once i'm back home i will take a look at this.

> Yes, which will be near the end of the window for getting this in.  I'd
> like to have everything hammered out _before_ he returns so he can Ack a
> (potentially) new version that I can apply.

If Eugene wants to produce a version with slightly modified model and
compatible strings, i can Ack it during the next couple of days. I
should have internet access. If not, please take the patch as is, with
the Tested-by added.

    Thanks
	Andrew

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

* [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA.
  2014-09-10 14:08       ` Andrew Lunn
@ 2014-09-12 21:37         ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2014-09-12 21:37 UTC (permalink / raw)
  To: linux-arm-kernel

> > Yes, which will be near the end of the window for getting this in.  I'd
> > like to have everything hammered out _before_ he returns so he can Ack a
> > (potentially) new version that I can apply.
> 
> If Eugene wants to produce a version with slightly modified model and
> compatible strings, i can Ack it during the next couple of days. I
> should have internet access. If not, please take the patch as is, with
> the Tested-by added.

Hi Jason

There has been nothing from Eugene. So please could you pick up the
patch.

     Thanks
 	Andrew

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

* [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA.
  2014-09-01 17:35 [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA Andrew Lunn
  2014-09-09 16:06 ` Jason Cooper
@ 2014-09-13 21:06 ` Jason Cooper
  1 sibling, 0 replies; 7+ messages in thread
From: Jason Cooper @ 2014-09-13 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

Andrew,

On Mon, Sep 01, 2014 at 07:35:41PM +0200, Andrew Lunn wrote:
> During the conversion of boards to use DT to instantiate Distributed
> Switch Architecture, nobody volunteered to test. As to be expected,
> the conversion was flawed. Testers and access to hardware has now
> become available, and this patch hopefully fixes the problems.
> 
> dsa,mii-bus must be a phandle to the top level mdio node, not the port
> specific subnode of the mdio device.
> 
> dsa,ethernet must be a phandle to the port subnode within the ethernet
> DT node, not the ethernet node.
> 
> Don't pinctrl hog the card detect gpio for mvsdio.
> 
> Rename the .dts files to make it clearer which file is for the Z0
> stepping and which for the A0 or later stepping.
> 
> Fixes: e2eaa339af441b3d51cdaa16870065c4154ce13c
> Fixes: e7c8f3808be854379c9784745663a55371cbf232
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> Cc: seugene at marvell.com
> ---
> v2:
>   Fix duplex typo
>   Feedback after testing
>   Fix mvsdio card detect gpio
> ---
>  arch/arm/boot/dts/Makefile                         |  4 +-
>  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts     | 16 +++-----
>  arch/arm/boot/dts/kirkwood-rd88f6281-a.dts         | 43 ++++++++++++++++++++++
>  arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts        | 26 -------------
>  ...-rd88f6281-a1.dts => kirkwood-rd88f6281-z0.dts} | 18 +++++----
>  arch/arm/boot/dts/kirkwood-rd88f6281.dtsi          | 27 +++-----------
>  arch/arm/boot/dts/kirkwood.dtsi                    |  4 +-
>  7 files changed, 69 insertions(+), 69 deletions(-)
>  create mode 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
>  delete mode 100644 arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
>  rename arch/arm/boot/dts/{kirkwood-rd88f6281-a1.dts => kirkwood-rd88f6281-z0.dts} (57%)

Applied to mvebu/fixes with Eugene's Tested-by and Cc'd to stable,
v3.15+.

thx,

Jason.

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

end of thread, other threads:[~2014-09-13 21:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01 17:35 [Patch v2 RfT] ARM: Kirkwood: Fix DT based DSA Andrew Lunn
2014-09-09 16:06 ` Jason Cooper
2014-09-09 16:44   ` Eugene Sanivsky
2014-09-09 17:17     ` Jason Cooper
2014-09-10 14:08       ` Andrew Lunn
2014-09-12 21:37         ` Andrew Lunn
2014-09-13 21:06 ` Jason Cooper

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.