ath79: add support for Qxwlan E600G v2 / E600GAC v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7241.dtsi
index f2efbe43581df1b3a8f9595c800176e2f8ec5b74..4044cdee0e761ee6be021609ccded2978e191be5 100644 (file)
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
 #include "ar724x.dtsi"
 
        };
 };
 
-&mdio0 {
-       regmap = <&eth1>;
-       builtin-switch;
-       resets = <&rst 22>;
-       reset-names = "mdio";
-};
-
 &eth0 {
        compatible = "qca,ar7241-eth", "syscon";
 
        pll-data = <0x00110000 0x00001099 0x00991099>;
 
-       resets = <&rst 8>, <&rst 9>;
-       reset-names = "mac", "phy";
+       resets = <&rst 9>;
+       reset-names = "mac";
+       phy-handle = <&swphy4>;
 };
 
 &mdio1 {
+       status = "okay";
+
        resets = <&rst 23>;
        reset-names = "mdio";
        builtin-switch;
+
+       builtin_switch: switch0@1f {
+               compatible = "qca,ar7240sw";
+
+               reg = <0x1f>;
+               resets = <&rst 8>;
+               reset-names = "switch";
+               qca,mib-poll-interval = <500>;
+
+               mdio-bus {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       swphy4: ethernet-phy@4 {
+                               reg = <4>;
+                               phy-mode = "mii";
+                       };
+               };
+       };
 };
 
 &eth1 {
+       status = "okay";
+
        compatible = "qca,ar7241-eth", "syscon";
 
        pll-data = <0x00110000 0x00001099 0x00991099>;
 
-       resets = <&rst 12>, <&rst 13>;
-       reset-names = "mac", "phy";
+       resets = <&rst 13>;
+       reset-names = "mac";
 
        phy-mode = "gmii";