]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mvebu: 370 RD: Add support for the switch
authorAndrew Lunn <andrew@lunn.ch>
Wed, 5 Nov 2014 19:02:00 +0000 (20:02 +0100)
committerJason Cooper <jason@lakedaemon.net>
Fri, 7 Nov 2014 03:29:25 +0000 (03:29 +0000)
The 370 rd has a 7 port, mv88E6182 switch, connected to eth1.  Add a
fixed-link subnode to the ethernet device tree node, to force
gigabit/full duplex.  Add a dsa node, with describing the four used
ports. This requires adding an alias to the mdio node, so it can be
referenced as a phandle.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lkml.kernel.org/r/1415214121-29286-3-git-send-email-andrew@lunn.ch
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/armada-370-rd.dts
arch/arm/boot/dts/armada-370-xp.dtsi

index f57a8f841498415fa33c7075df0ab0df3f087c8d..2bb671a778db3d055711f5d337c8b8e14ab8e263 100644 (file)
                                phy0: ethernet-phy@0 {
                                        reg = <0>;
                                };
-
-                               phy1: ethernet-phy@1 {
-                                       reg = <1>;
-                               };
                        };
 
                        ethernet@70000 {
                                pinctrl-0 = <&ge1_rgmii_pins>;
                                pinctrl-names = "default";
                                status = "okay";
-                               phy = <&phy1>;
                                phy-mode = "rgmii-id";
+                               fixed-link {
+                                          speed = <1000>;
+                                          full-duplex;
+                               };
                        };
 
                        mvsdio@d4000 {
                        };
                };
        };
+
+       dsa@0 {
+               compatible = "marvell,dsa";
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               dsa,ethernet = <&eth1>;
+               dsa,mii-bus = <&mdio>;
+
+               switch@0 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0x10 0>; /* MDIO address 16, switch 0 in tree */
+
+                       port@0 {
+                               reg = <0>;
+                               label = "lan0";
+                       };
+
+                       port@1 {
+                              reg = <1>;
+                              label = "lan1";
+                       };
+
+                       port@2 {
+                              reg = <2>;
+                              label = "lan2";
+                       };
+
+                       port@3 {
+                              reg = <3>;
+                              label = "lan3";
+                       };
+
+                       port@5 {
+                             reg = <5>;
+                             label = "cpu";
+                       };
+               };
+        };
  };
index 83286ec9702cf695e8470fe7ff82ef845210f781..4d84ca981fe007cd0dc4b76ee36b3bffe2933700 100644 (file)
                                status = "disabled";
                        };
 
-                       mdio {
+                       mdio: mdio {
                                #address-cells = <1>;
                                #size-cells = <0>;
                                compatible = "marvell,orion-mdio";