Commit 7f688ac44e947d8f3307dd12498ca867ca74aeee

Authored by Andrew Lunn
Committed by Greg Kroah-Hartman
1 parent 0aeee1b453

ARM: Kirkwood: Fix DT based DSA.

commit 4f5e01e96d424b54f5f0e89ee1ba9ccca03a3941 upstream.

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")
Link: https://lkml.kernel.org/r/1409592941-22244-1-git-send-email-andrew@lunn.ch
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 8 changed files with 93 additions and 93 deletions Side-by-side Diff

arch/arm/boot/dts/Makefile
... ... @@ -137,8 +137,8 @@
137 137 kirkwood-openrd-client.dtb \
138 138 kirkwood-openrd-ultimate.dtb \
139 139 kirkwood-rd88f6192.dtb \
140   - kirkwood-rd88f6281-a0.dtb \
141   - kirkwood-rd88f6281-a1.dtb \
  140 + kirkwood-rd88f6281-z0.dtb \
  141 + kirkwood-rd88f6281-a.dtb \
142 142 kirkwood-rs212.dtb \
143 143 kirkwood-rs409.dtb \
144 144 kirkwood-rs411.dtb \
arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
... ... @@ -123,11 +123,11 @@
123 123  
124 124 dsa@0 {
125 125 compatible = "marvell,dsa";
126   - #address-cells = <2>;
  126 + #address-cells = <1>;
127 127 #size-cells = <0>;
128 128  
129   - dsa,ethernet = <&eth0>;
130   - dsa,mii-bus = <&ethphy0>;
  129 + dsa,ethernet = <&eth0port>;
  130 + dsa,mii-bus = <&mdio>;
131 131  
132 132 switch@0 {
133 133 #address-cells = <1>;
134 134  
135 135  
... ... @@ -169,18 +169,14 @@
169 169  
170 170 &mdio {
171 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 174 &eth0 {
181 175 status = "okay";
  176 +
182 177 ethernet0-port@0 {
183   - phy-handle = <&ethphy0>;
  178 + speed = <1000>;
  179 + duplex = <1>;
184 180 };
185 181 };
arch/arm/boot/dts/kirkwood-rd88f6281-a.dts
  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 +};
arch/arm/boot/dts/kirkwood-rd88f6281-a0.dts
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   -};
arch/arm/boot/dts/kirkwood-rd88f6281-a1.dts
1   -/*
2   - * Marvell RD88F6181 A1 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 A1 variant of
11   - * the SoC. The ethernet switch has a "wan" port.
12   - */
13   -
14   -/dts-v1/;
15   -
16   -#include "kirkwood-rd88f6281.dtsi"
17   -
18   -/ {
19   - model = "Marvell RD88f6281 Reference design, with A1 SoC";
20   - compatible = "marvell,rd88f6281-a1", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
21   -
22   - dsa@0 {
23   - switch@0 {
24   - reg = <0 0>; /* MDIO address 0, switch 0 in tree */
25   - port@4 {
26   - reg = <4>;
27   - label = "wan";
28   - };
29   - };
30   - };
31   -};
arch/arm/boot/dts/kirkwood-rd88f6281-z0.dts
  1 +/*
  2 + * Marvell RD88F6181 Z0 stepping 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 using the Z0
  11 + * stepping of the SoC. The ethernet switch has a "wan" port.
  12 +*/
  13 +
  14 +/dts-v1/;
  15 +
  16 +#include "kirkwood-rd88f6281.dtsi"
  17 +
  18 +/ {
  19 + model = "Marvell RD88f6281 Reference design, with Z0 SoC";
  20 + compatible = "marvell,rd88f6281-z0", "marvell,rd88f6281","marvell,kirkwood-88f6281", "marvell,kirkwood";
  21 +
  22 + dsa@0 {
  23 + switch@0 {
  24 + reg = <0 0>; /* MDIO address 0, switch 0 in tree */
  25 + port@4 {
  26 + reg = <4>;
  27 + label = "wan";
  28 + };
  29 + };
  30 + };
  31 +};
  32 +
  33 +&eth1 {
  34 + status = "disabled";
  35 +};
arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
... ... @@ -37,7 +37,6 @@
37 37  
38 38 ocp@f1000000 {
39 39 pinctrl: pin-controller@10000 {
40   - pinctrl-0 = <&pmx_sdio_cd>;
41 40 pinctrl-names = "default";
42 41  
43 42 pmx_sdio_cd: pmx-sdio-cd {
... ... @@ -69,8 +68,8 @@
69 68 #address-cells = <2>;
70 69 #size-cells = <0>;
71 70  
72   - dsa,ethernet = <&eth0>;
73   - dsa,mii-bus = <&ethphy1>;
  71 + dsa,ethernet = <&eth0port>;
  72 + dsa,mii-bus = <&mdio>;
74 73  
75 74 switch@0 {
76 75 #address-cells = <1>;
77 76  
78 77  
... ... @@ -119,36 +118,20 @@
119 118 };
120 119  
121 120 partition@300000 {
122   - label = "data";
  121 + label = "rootfs";
123 122 reg = <0x0300000 0x500000>;
124 123 };
125 124 };
126 125  
127 126 &mdio {
128 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 130 &eth0 {
142 131 status = "okay";
143 132 ethernet0-port@0 {
144   - phy-handle = <&ethphy0>;
145   - };
146   -};
147   -
148   -&eth1 {
149   - status = "okay";
150   - ethernet1-port@0 {
151   - phy-handle = <&ethphy1>;
  133 + speed = <1000>;
  134 + duplex = <1>;
152 135 };
153 136 };
arch/arm/boot/dts/kirkwood.dtsi
... ... @@ -309,7 +309,7 @@
309 309 marvell,tx-checksum-limit = <1600>;
310 310 status = "disabled";
311 311  
312   - ethernet0-port@0 {
  312 + eth0port: ethernet0-port@0 {
313 313 compatible = "marvell,kirkwood-eth-port";
314 314 reg = <0>;
315 315 interrupts = <11>;
... ... @@ -342,7 +342,7 @@
342 342 pinctrl-names = "default";
343 343 status = "disabled";
344 344  
345   - ethernet1-port@0 {
  345 + eth1port: ethernet1-port@0 {
346 346 compatible = "marvell,kirkwood-eth-port";
347 347 reg = <0>;
348 348 interrupts = <15>;