ath79: ar933x: Update dts for current ag71xx driver
authorChuanhong Guo <gch981213@gmail.com>
Tue, 17 Jul 2018 09:09:14 +0000 (17:09 +0800)
committerJohn Crispin <john@phrozen.org>
Mon, 30 Jul 2018 08:43:33 +0000 (10:43 +0200)
gmac0 is always connected to switch phy4 and mdio1 is always needed.
So add phy handle for eth0 and enable mdio1 by default.
Move fixed-link for gmac1 from device dts to ar9331.dtsi because gmac1 is always connected to builtin switch.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ath79/dts/ar9330.dtsi
target/linux/ath79/dts/ar9330_glinet_ar150.dts
target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
target/linux/ath79/dts/ar9331_etactica-eg200.dts
target/linux/ath79/dts/ar9331_tl-mr3020-v1.dts
target/linux/ath79/dts/ar9331_tl-wr703n_tl-mr10u.dtsi
target/linux/ath79/dts/ar9331_tl-wr741nd-v4.dtsi

index 65445de1f1618e8f97f9854ec18e5be40bd40a51..4649262b289196c93c77f956647f7308a7acb1c9 100644 (file)
 
        resets = <&rst 9>;
        reset-names = "mac";
-};
-
-&mdio0 {
-       regmap = <&eth1>;
-       builtin-switch;
-       resets = <&rst 23>;
-       reset-names = "mdio";
+       phy-mode = "mii";
+       phy-handle = <&swphy4>;
 };
 
 &mdio1 {
+       status = "okay";
+
        resets = <&rst 23>;
        reset-names = "mdio";
-
        builtin-switch;
+
+       builtin_switch: switch0@1f {
+               compatible = "qca,ar8216-builtin";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg = <0x1f>;
+
+               mdio-bus {
+                       swphy4: ethernet-phy@4 {
+                               reg = <4>;
+                               phy-mode = "mii";
+                       };
+               };
+       };
 };
 
 &eth1 {
-       compatible = "qca,ar9330-eth", "syscon";
+       compatible = "qca,ar9330-eth", "syscon", "simple-mfd";
 
        pll-data = <0x00110000 0x00001099 0x00991099>;
        phy-mode = "gmii";
 
        resets = <&rst 13>;
        reset-names = "mac";
+
+       fixed-link {
+               speed = <1000>;
+               full-duplex;
+       };
 };
index 2b2524fc516f3e183dfd6e77868c522dc8b29822..5e3552a30baed49bd254bf9ca3a0e81de8331bd4 100644 (file)
        };
 };
 
-&mdio0 {
-       status = "okay";
-
-       phy4: ethernet-phy@4 {
-               reg = <4>;
-               phy-mode = "mii";
-       };
-};
-
 &eth0 {
        status = "okay";
 
        mtd-mac-address = <&art 0x0>;
-
-       phy-handle = <&phy4>;
 };
 
 &eth1 {
 
        mtd-mac-address = <&art 0x0>;
 
-       fixed-link {
-               speed = <1000>;
-               full-duplex;
-       };
-
        gmac-config {
                device = <&gmac>;
 
index db4cd76bec10a1a4196f118622cebe85189b4fcf..1ce8851a11d745c0e2bbd06de94592df0c1b6e67 100644 (file)
 
        mtd-mac-address = <&art 0x1002>;
        mtd-mac-address-increment = <0x40>;
-
-       fixed-link {
-               speed = <1000>;
-               full-duplex;
-       };
-
 };
 
 &mdio1 {
index 325576e7f3e2951f1c3404797d6f6152ed7318e3..5d6b72cd809dc5c6d7beef71fb9b36911a0ae84f 100644 (file)
        status = "okay";
 };
 
-&mdio0 {
-       status = "okay";
-       phy4: ethernet-phy@4 {
-               reg = <4>;
-               phy-mode = "mii";
-       };
-};
-
 &eth0 {
        status = "okay";
        mtd-mac-address = <&art 0x0>;
-       phy-handle = <&phy4>;
 
        gmac-config {
                device = <&gmac>;
        };
 };
 
+&eth1 {
+       status = "okay";
+       compatible = "syscon", "simple-mfd";
+};
+
 &spi {
        num-chipselects = <1>;
        status = "okay";
index 531a637687aa8a3c73e90a7dd98c3eab2bc3ab76..74db416ba6ce1e746480dfd898928e9dba288389 100644 (file)
        };
 };
 
-&mdio1 {
-       status = "okay";
-       phy4: ethernet-phy@4 {
-               reg = <4>;
-       };
-};
 
-&eth1 {
+&eth0 {
        status = "okay";
-       phy-handle = <&phy4>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       fixed-link {
-               speed = <1000>;
-               full-duplex;
-       };
-
        gmac-config {
-               device = <&gmac>;
+               device = <&gmac>;
 
-               switch-phy-addr-swap = <1>;
-               switch-phy-swap = <1>;
+               switch-phy-addr-swap = <0>;
+               switch-phy-swap = <0>;
        };
 };
 
+&eth1 {
+       status = "okay";
+       compatible = "syscon", "simple-mfd";
+};
+
 &wmac {
        status = "okay";
        mtd-cal-data = <&art 0x1000>;
index f45572a7f7ab0a30a90b3c00ce300919dbc59d71..d23dea7d92588d2e8cbe24354204ce1aeac48d8d 100644 (file)
@@ -84,8 +84,6 @@
 &eth0 {
        status = "okay";
 
-       phy-handle = <&phy4>;
-
        mtd-mac-address = <&uboot 0x1fc00>;
 
        gmac-config {
        };
 };
 
-&gpio {
+&eth1 {
        status = "okay";
+       compatible = "syscon", "simple-mfd";
 };
 
-&mdio0 {
+&gpio {
        status = "okay";
-
-       phy4: ethernet-phy@4 {
-               reg = <4>;
-               phy-mode = "mii";
-       };
 };
 
 &uart {
index 615d317e41d05e48199ac769130404135991c42f..9d8c1a022e82c23019b715da0faa4993f9e5e223 100644 (file)
        };
 };
 
-&mdio0 {
-       status = "okay";
-
-       phy4: ethernet-phy@4 {
-               reg = <4>;
-               phy-mode = "mii";
-       };
-};
-
 &eth0 {
        status = "okay";
 
-       phy-handle = <&phy4>;
-
        mtd-mac-address = <&uboot 0x1fc00>;
        mtd-mac-address-increment = <1>;
 
 
        mtd-mac-address = <&uboot 0x1fc00>;
        mtd-mac-address-increment = <(-1)>;
-
-       fixed-link {
-               speed = <1000>;
-               full-duplex;
-       };
 };
 
 &gpio {