aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2014-09-01 13:35:41 -0400
committerJason Cooper <jason@lakedaemon.net>2014-09-13 17:03:48 -0400
commit4f5e01e96d424b54f5f0e89ee1ba9ccca03a3941 (patch)
treecbd14ae3267554ddb788f4ba1d9ae8e0834c1040
parent500abb6ccb9e3f8d638a7f422443a8549245ef90 (diff)
ARM: Kirkwood: Fix DT based DSA.
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. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Cc: seugene@marvell.com Tested-by: Eugene Sanivsky <seugene@marvell.com> Fixes: e2eaa339af44: ("ARM: Kirkwood: convert rd88f6281-setup.c to DT.") Fixes: e7c8f3808be8: ("ARM: kirkwood: Convert mv88f6281gtw_ge switch setup to DT") Cc: <stable@vger.kernel.org> #v3.15+ Link: https://lkml.kernel.org/r/1409592941-22244-1-git-send-email-andrew@lunn.ch Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/boot/dts/Makefile4
-rw-r--r--arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts16
-rw-r--r--arch/arm/boot/dts/kirkwood-rd88f6281-a.dts43
-rw-r--r--arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts26
-rw-r--r--arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts (renamed from arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts)18
-rw-r--r--arch/arm/boot/dts/kirkwood-rd88f6281.dtsi27
-rw-r--r--arch/arm/boot/dts/kirkwood.dtsi4
7 files changed, 69 insertions, 69 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index b8c5cd3ddeb9..e6aa6e77a3ec 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -144,8 +144,8 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood-b3.dtb \
144 kirkwood-openrd-client.dtb \ 144 kirkwood-openrd-client.dtb \
145 kirkwood-openrd-ultimate.dtb \ 145 kirkwood-openrd-ultimate.dtb \
146 kirkwood-rd88f6192.dtb \ 146 kirkwood-rd88f6192.dtb \
147 kirkwood-rd88f6281-a0.dtb \ 147 kirkwood-rd88f6281-z0.dtb \
148 kirkwood-rd88f6281-a1.dtb \ 148 kirkwood-rd88f6281-a.dtb \
149 kirkwood-rs212.dtb \ 149 kirkwood-rs212.dtb \
150 kirkwood-rs409.dtb \ 150 kirkwood-rs409.dtb \
151 kirkwood-rs411.dtb \ 151 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 @@
123 123
124 dsa@0 { 124 dsa@0 {
125 compatible = "marvell,dsa"; 125 compatible = "marvell,dsa";
126 #address-cells = <2>; 126 #address-cells = <1>;
127 #size-cells = <0>; 127 #size-cells = <0>;
128 128
129 dsa,ethernet = <&eth0>; 129 dsa,ethernet = <&eth0port>;
130 dsa,mii-bus = <&ethphy0>; 130 dsa,mii-bus = <&mdio>;
131 131
132 switch@0 { 132 switch@0 {
133 #address-cells = <1>; 133 #address-cells = <1>;
@@ -169,17 +169,13 @@
169 169
170&mdio { 170&mdio {
171 status = "okay"; 171 status = "okay";
172
173 ethphy0: ethernet-phy@ff {
174 reg = <0xff>; /* No phy attached */
175 speed = <1000>;
176 duplex = <1>;
177 };
178}; 172};
179 173
180&eth0 { 174&eth0 {
181 status = "okay"; 175 status = "okay";
176
182 ethernet0-port@0 { 177 ethernet0-port@0 {
183 phy-handle = <&ethphy0>; 178 speed = <1000>;
179 duplex = <1>;
184 }; 180 };
185}; 181};
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 @@
1/*
2 * Marvell RD88F6181 A Board descrition
3 *
4 * Andrew Lunn <andrew@lunn.ch>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 *
10 * This file contains the definitions for the board with the A0 or
11 * higher stepping of the SoC. The ethernet switch does not have a
12 * "wan" port.
13 */
14
15/dts-v1/;
16#include "kirkwood-rd88f6281.dtsi"
17
18/ {
19 model = "Marvell RD88f6281 Reference design, with A0 or higher SoC";
20 compatible = "marvell,rd88f6281-a", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
21
22 dsa@0 {
23 switch@0 {
24 reg = <10 0>; /* MDIO address 10, switch 0 in tree */
25 };
26 };
27};
28
29&mdio {
30 status = "okay";
31
32 ethphy1: ethernet-phy@11 {
33 reg = <11>;
34 };
35};
36
37&eth1 {
38 status = "okay";
39
40 ethernet1-port@0 {
41 phy-handle = <&ethphy1>;
42 };
43};
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 @@
1/*
2 * Marvell RD88F6181 A0 Board descrition
3 *
4 * Andrew Lunn <andrew@lunn.ch>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 *
10 * This file contains the definitions for the board with the A0 variant of
11 * the SoC. The ethernet switch does not have a "wan" port.
12 */
13
14/dts-v1/;
15#include "kirkwood-rd88f6281.dtsi"
16
17/ {
18 model = "Marvell RD88f6281 Reference design, with A0 SoC";
19 compatible = "marvell,rd88f6281-a0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
20
21 dsa@0 {
22 switch@0 {
23 reg = <10 0>; /* MDIO address 10, switch 0 in tree */
24 };
25 };
26}; \ 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
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 @@
1/* 1/*
2 * Marvell RD88F6181 A1 Board descrition 2 * Marvell RD88F6181 Z0 stepping descrition
3 * 3 *
4 * Andrew Lunn <andrew@lunn.ch> 4 * Andrew Lunn <andrew@lunn.ch>
5 * 5 *
@@ -7,17 +7,17 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 * 9 *
10 * This file contains the definitions for the board with the A1 variant of 10 * This file contains the definitions for the board using the Z0
11 * the SoC. The ethernet switch has a "wan" port. 11 * stepping of the SoC. The ethernet switch has a "wan" port.
12 */ 12*/
13 13
14/dts-v1/; 14/dts-v1/;
15 15
16#include "kirkwood-rd88f6281.dtsi" 16#include "kirkwood-rd88f6281.dtsi"
17 17
18/ { 18/ {
19 model = "Marvell RD88f6281 Reference design, with A1 SoC"; 19 model = "Marvell RD88f6281 Reference design, with Z0 SoC";
20 compatible = "marvell,rd88f6281-a1", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood"; 20 compatible = "marvell,rd88f6281-z0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
21 21
22 dsa@0 { 22 dsa@0 {
23 switch@0 { 23 switch@0 {
@@ -28,4 +28,8 @@
28 }; 28 };
29 }; 29 };
30 }; 30 };
31}; \ No newline at end of file 31};
32
33&eth1 {
34 status = "disabled";
35};
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 @@
37 37
38 ocp@f1000000 { 38 ocp@f1000000 {
39 pinctrl: pin-controller@10000 { 39 pinctrl: pin-controller@10000 {
40 pinctrl-0 = <&pmx_sdio_cd>;
41 pinctrl-names = "default"; 40 pinctrl-names = "default";
42 41
43 pmx_sdio_cd: pmx-sdio-cd { 42 pmx_sdio_cd: pmx-sdio-cd {
@@ -69,8 +68,8 @@
69 #address-cells = <2>; 68 #address-cells = <2>;
70 #size-cells = <0>; 69 #size-cells = <0>;
71 70
72 dsa,ethernet = <&eth0>; 71 dsa,ethernet = <&eth0port>;
73 dsa,mii-bus = <&ethphy1>; 72 dsa,mii-bus = <&mdio>;
74 73
75 switch@0 { 74 switch@0 {
76 #address-cells = <1>; 75 #address-cells = <1>;
@@ -119,35 +118,19 @@
119 }; 118 };
120 119
121 partition@300000 { 120 partition@300000 {
122 label = "data"; 121 label = "rootfs";
123 reg = <0x0300000 0x500000>; 122 reg = <0x0300000 0x500000>;
124 }; 123 };
125}; 124};
126 125
127&mdio { 126&mdio {
128 status = "okay"; 127 status = "okay";
129
130 ethphy0: ethernet-phy@0 {
131 reg = <0>;
132 };
133
134 ethphy1: ethernet-phy@ff {
135 reg = <0xff>; /* No PHY attached */
136 speed = <1000>;
137 duple = <1>;
138 };
139}; 128};
140 129
141&eth0 { 130&eth0 {
142 status = "okay"; 131 status = "okay";
143 ethernet0-port@0 { 132 ethernet0-port@0 {
144 phy-handle = <&ethphy0>; 133 speed = <1000>;
145 }; 134 duplex = <1>;
146};
147
148&eth1 {
149 status = "okay";
150 ethernet1-port@0 {
151 phy-handle = <&ethphy1>;
152 }; 135 };
153}; 136};
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 @@
309 marvell,tx-checksum-limit = <1600>; 309 marvell,tx-checksum-limit = <1600>;
310 status = "disabled"; 310 status = "disabled";
311 311
312 ethernet0-port@0 { 312 eth0port: ethernet0-port@0 {
313 compatible = "marvell,kirkwood-eth-port"; 313 compatible = "marvell,kirkwood-eth-port";
314 reg = <0>; 314 reg = <0>;
315 interrupts = <11>; 315 interrupts = <11>;
@@ -342,7 +342,7 @@
342 pinctrl-names = "default"; 342 pinctrl-names = "default";
343 status = "disabled"; 343 status = "disabled";
344 344
345 ethernet1-port@0 { 345 eth1port: ethernet1-port@0 {
346 compatible = "marvell,kirkwood-eth-port"; 346 compatible = "marvell,kirkwood-eth-port";
347 reg = <0>; 347 reg = <0>;
348 interrupts = <15>; 348 interrupts = <15>;