lantiq: Use device tree on BT Home HUB 5A
authorHauke Mehrtens <[email protected]>
Sun, 25 Mar 2018 22:27:25 +0000 (00:27 +0200)
committerHauke Mehrtens <[email protected]>
Tue, 1 May 2018 14:01:30 +0000 (16:01 +0200)
This updates the device tree and the board.d files to work with device
tree on the BTHH5A.

Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/lantiq/base-files/etc/board.d/02_network
target/linux/lantiq/files-4.14/arch/mips/boot/dts/BTHOMEHUBV5A.dts
target/linux/lantiq/files-4.14/arch/mips/boot/dts/vr9.dtsi

index ca974b071e9b36fcd13659411b230375fc981048..c25723e280b3d457991827479350f28bc3905398 100755 (executable)
@@ -106,8 +106,7 @@ bt,homehub-v3a)
 bt,homehub-v5a)
        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" "5:wan:5" "6t@eth0"
+       ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
        ;;
 
 netgear,dgn1000b)
index a3be0a5c9ca93c977a674c45ca4afd97abbb6dc9..acbed189899f6d764ce99dc48673e8056a4ab30a 100644 (file)
 };
 
 &eth0 {
-       lan: interface@0 {
-               compatible = "lantiq,xrx200-pdi";
+       fixed-link {
+               speed = <1000>;
+               full-duplex;
+       };
+};
+
+&gswip {
+       dsa,member = <0 0>;
+
+       ports {
                #address-cells = <1>;
                #size-cells = <0>;
-               reg = <0>;
-               lantiq,switch;
 
-               ethernet@0 {
-                       compatible = "lantiq,xrx200-pdi-port";
+               port@0 {
                        reg = <0>;
+                       label = "lan3";
                        phy-mode = "rgmii";
                        phy-handle = <&phy0>;
                };
-               ethernet@1 {
-                       compatible = "lantiq,xrx200-pdi-port";
+
+               port@1 {
                        reg = <1>;
+                       label = "lan4";
                        phy-mode = "rgmii";
                        phy-handle = <&phy1>;
                };
-               ethernet@2 {
-                       compatible = "lantiq,xrx200-pdi-port";
+
+               port@2 {
                        reg = <2>;
+                       label = "lan2";
                        phy-mode = "gmii";
                        phy-handle = <&phy11>;
                };
-               ethernet@4 {
-                       compatible = "lantiq,xrx200-pdi-port";
+
+               port@4 {
                        reg = <4>;
+                       label = "lan1";
                        phy-mode = "gmii";
                        phy-handle = <&phy13>;
                };
-               ethernet@5 {
-                       compatible = "lantiq,xrx200-pdi-port";
+
+               port@5 {
                        reg = <5>;
+                       label = "wan";
                        phy-mode = "rgmii";
                        phy-handle = <&phy5>;
                };
+
+               port@6 {
+                       reg = <0x6>;
+                       label = "cpu";
+                       ethernet = <&eth0>;
+               };
        };
 
        mdio@0 {
 
                phy0: ethernet-phy@0 {
                        reg = <0x0>;
-                       compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
                };
                phy1: ethernet-phy@1 {
                        reg = <0x1>;
-                       compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
                };
                phy5: ethernet-phy@5 {
                        reg = <0x5>;
-                       compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
                };
                phy11: ethernet-phy@11 {
                        reg = <0x11>;
-                       compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
                };
                phy13: ethernet-phy@13 {
                        reg = <0x13>;
-                       compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
                };
        };
 };
 
 &gphy0 {
        lantiq,gphy-mode = <GPHY_MODE_GE>;
+       compatible = "lantiq,xrx200a2x-gphy";
 };
 
 &gphy1 {
        lantiq,gphy-mode = <GPHY_MODE_GE>;
+       compatible = "lantiq,xrx200a2x-gphy";
 };
 
 &gpio {
index 1bc1d608b9c8128631b3d3f8104ecda0df55ffa8..0d17e096c133742f0b4f01d9fe90a7ead3314092 100644 (file)
                        phy-names = "usb2-phy";
                };
 
-               eth0: eth@e108000 {
+               eth0: eth@E10B308 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "lantiq,xrx200-net";
-                       reg = < 0xe108000 0x3000 /* switch */
-                               0xe10b100 0x70 /* mdio */
-                               0xe10b1d8 0x30 /* mii */
-                               0xe10b308 0x30 /* pmac */
+                       reg = < 0xE10B308 0x30 /* pmac */
                        >;
                        interrupt-parent = <&icu0>;
                        interrupts = <75 73 72>;
-                       resets = <&reset0 21 16>, <&reset0 8 8>;
-                       reset-names = "switch", "ppe";
+                       resets = <&reset0 21 16>, <&reset0 8 8>, <&reset0 3 3>;
+                       reset-names = "switch", "ppe", "ppe_dsp";
+                       lantiq,phys = <&gphy0>, <&gphy1>;
+               };
+
+               gswip: gswip@E108000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "lantiq,xrx200-gswip";
+                       reg = < 0xE108000 0x3000 /* switch */
+                               0xE10B100 0x70 /* mdio */
+                               0xE10B1D8 0x30 /* mii */
+                               >;
+                       resets = <&reset0 21 16>, <&reset0 8 8>, <&reset0 3 3>;
+                       reset-names = "switch", "ppe", "ppe_dsp";
                        lantiq,phys = <&gphy0>, <&gphy1>;
                };