lantiq: fix switch configuration for EASY80920
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 27 Jul 2016 19:27:54 +0000 (21:27 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 28 Jul 2016 20:42:16 +0000 (22:42 +0200)
The device tree description misses some Ethernet ports and there was no
model specified for this board. In addition there was no switch
specific default configuration created.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/lantiq/base-files/etc/board.d/02_network
target/linux/lantiq/dts/EASY80920.dtsi
target/linux/lantiq/dts/EASY80920NAND.dts
target/linux/lantiq/dts/EASY80920NOR.dts

index d6f66016f64f7295ac90280758d5823b1275092b..989dbf32a61c220fc6d2360f8c1317cdbe9f7b33 100755 (executable)
@@ -157,6 +157,13 @@ WBMR300)
                "2:lan:2" "3:lan:3" "5:lan:4" "4:wan:1" "6t@eth0"
        ;;
 
+EASY80920NAND|EASY80920NOR)
+       lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
+       wan_mac=$(macaddr_add "$lan_mac" 1)
+       ucidef_add_switch "switch0" \
+               "4:lan:1" "2:lan:2" "1:lan:3" "0:lan:3" "5:wan:1" "6t@eth0"
+       ;;
+
 *)
        ucidef_set_interface_lan 'eth0'
        ;;
index 4e649976a250e63b58d6087aab166e7bb0a47cc0..47b7a07f2cd1dad3a1246847a9cd5964bd3081f6 100644 (file)
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0>;
-               mac-address = [ 00 11 22 33 44 55 ];
+               lantiq,switch;
 
-               ethernet@0 {
+               ethernet@4 {
                        compatible = "lantiq,xrx200-pdi-port";
-                       reg = <0>;
-                       phy-mode = "rgmii";
-                       phy-handle = <&phy0>;
+                       reg = <4>;
+                       phynmode0 = "gmii";
+                       phy-handle = <&phy13>;
+               };
+               ethernet@2 {
+                       compatible = "lantiq,xrx200-pdi-port";
+                       reg = <2>;
+                       phy-mode = "gmii";
+                       phy-handle = <&phy11>;
                };
                ethernet@1 {
                        compatible = "lantiq,xrx200-pdi-port";
                        phy-mode = "rgmii";
                        phy-handle = <&phy1>;
                };
-               ethernet@2 {
+               ethernet@0 {
                        compatible = "lantiq,xrx200-pdi-port";
-                       reg = <2>;
-                       phy-mode = "gmii";
-                       phy-handle = <&phy11>;
+                       reg = <0>;
+                       phy-mode = "rgmii";
+                       phy-handle = <&phy0>;
                };
        };
 
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <1>;
-               mac-address = [ 00 11 22 33 44 56 ];
                lantiq,wan;
+
                ethernet@5 {
                        compatible = "lantiq,xrx200-pdi-port";
                        reg = <5>;
                };
        };
 
-       test: interface@2 {
-               compatible = "lantiq,xrx200-pdi";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               reg = <2>;
-               mac-address = [ 00 11 22 33 44 57 ];
-               ethernet@4 {
-                       compatible = "lantiq,xrx200-pdi-port";
-                       reg = <4>;
-                       phynmode0 = "gmii";
-                       phy-handle = <&phy13>;
-               };
-       };
-
        mdio@0 {
                #address-cells = <1>;
                #size-cells = <0>;
index 7e1811edc1f8e3e2b20bb6eb041c1e598940e384..96d5f64de09de9b0fc85836e05c375e4d5f4ec82 100644 (file)
@@ -4,6 +4,8 @@
 /include/ "EASY80920.dtsi"
 
 / {
+       model = "EASY80920NAND - Intel EASY80920 Nand";
+
        chosen {
                bootargs = "ubi.mtd=ubi ubi.block=0,rootfsA root=/dev/ubiblock0_1";
        };
index 54d2fa961743820b78b9320a6ed99f53e955b61f..39367f7bb2163bbedfac9a27d32be5b5f4cd1653 100644 (file)
@@ -4,6 +4,8 @@
 /include/ "EASY80920.dtsi"
 
 / {
+       model = "EASY80920NOR - Intel EASY80920 Nor";
+
        fpi@10000000 {
                localbus@0 {
                        ranges = <0 0 0x0 0x3ffffff>;