lantiq: xrx200: use vlan for ethernet wan port
authorMathias Kresin <dev@kresin.me>
Sat, 10 Sep 2016 09:05:56 +0000 (11:05 +0200)
committerMathias Kresin <dev@kresin.me>
Sat, 11 Mar 2017 12:45:00 +0000 (13:45 +0100)
Using the lantiq,wan device tree property for one interface node and
the lantiq,switch device tree property for another interface node at
the same time was never intended/isn't supported at the moment.

The property is meant to be used in two phy operation mode where one
phy is assigned to an interface without lantiq,* device tree property
and the other phy is assigned to an interface with the lantiq,wan
device property to have two netdevs.

If both properties are used at the same time, the lantiq,wan interface
is shown as independent netdev but not able to operate independent. The
port needs to be managed via swconfig. These dependency is not obvious
and fooled already a lot of users.

Add a default WAN vlan for xrx200 devices having an ethernet WAN port
and remove the lantiq,wan device tree property. Leave it up to the user
to set the ethernet WAN port as default WAN interface or to use this
port as additional LAN port.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/lantiq/base-files/etc/board.d/02_network
target/linux/lantiq/dts/BTHOMEHUBV5A.dts
target/linux/lantiq/dts/VGV7510KW22.dtsi
target/linux/lantiq/dts/VGV7519.dtsi

index 3dd5cadc670f1a7960c0ce555c56bce531372023..e88fd728c5718686b077e2bcbb750363952c1287 100755 (executable)
@@ -85,7 +85,7 @@ BTHOMEHUBV5A)
        lan_mac=$(mtd_get_mac_binary_ubi caldata 4364)
        wan_mac=$(macaddr_add "$lan_mac" 1)
        ucidef_add_switch "switch0" \
-               "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
+               "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
        ;;
 
 DGN3500*)
@@ -144,13 +144,13 @@ VR200v)
 VGV7510KW22*)
        wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2)
        ucidef_add_switch "switch0" \
-               "2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "6t@eth0"
+               "2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "0:wan:5" "6t@eth0"
        ;;
 
 VGV7519*)
        wan_mac=$(mtd_get_mac_binary board_config 22)
        ucidef_add_switch "switch0" \
-               "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "6t@eth0"
+               "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
        ;;
 
 WBMR)
index 7f19e5291ff49c31da3703bd296dba0535997148..59b6cee9b80874a7656e1def1034d0a3f355cf39 100644 (file)
                        phy-mode = "gmii";
                        phy-handle = <&phy13>;
                };
-       };
-
-       wan: interface@1 {
-               compatible = "lantiq,xrx200-pdi";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               reg = <1>;
-               lantiq,wan;
-
                ethernet@5 {
                        compatible = "lantiq,xrx200-pdi-port";
                        reg = <5>;
index 4f76e7ddf34b23e63909cc8de100f8f63c314646..73240bf2bc3690d5dfe2984e082dd9889507a07a 100644 (file)
                mtd-mac-address = <&boardconfig 0x16>;
                lantiq,switch;
 
+               ethernet@0 {
+                       compatible = "lantiq,xrx200-pdi-port";
+                       reg = <0>;
+                       phy-mode = "mii";
+                       phy-handle = <&phy1>;
+               };
                ethernet@2 {
                        compatible = "lantiq,xrx200-pdi-port";
                        reg = <2>;
                };
        };
 
-       wan: interface@1 {
-               compatible = "lantiq,xrx200-pdi";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               reg = <1>;
-               mtd-mac-address = <&boardconfig 0x16>;
-               mtd-mac-address-increment = <3>;
-               lantiq,wan;
-
-               ethernet@0 {
-                       compatible = "lantiq,xrx200-pdi-port";
-                       reg = <0>;
-                       phy-mode = "mii";
-                       phy-handle = <&phy1>;
-               };
-       };
-
        mdio@0 {
                #address-cells = <1>;
                #size-cells = <0>;
index 9e0675f1955d01bfd4e59938545c0bdf18f8f008..0c2da5279a361b28f4ce9b2e79c650d8c72631d9 100644 (file)
                        phy-mode = "gmii";
                        phy-handle = <&phy13>;
                };
-       };
-
-       wan: interface@1 {
-               compatible = "lantiq,xrx200-pdi";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               reg = <1>;
-               mtd-mac-address = <&boardconfig 0x16>;
-               lantiq,wan;
-
                ethernet@5 {
                        compatible = "lantiq,xrx200-pdi-port";
                        reg = <5>;