ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wn-gx300gr.dts
index 06d024e9a7c75a6e59bcce4b7206d4c495fb319c..8a09675bffbe7a8044d5a42f86c207fc9f39429f 100644 (file)
 };
 
 &gmac0 {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
 };
 
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       mtd-mac-address = <&factory 0x4>;
-                       mtd-mac-address-increment = <1>;
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
 &xhci {
        status = "disabled";
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_4: macaddr@4 {
+               reg = <0x4 0x6>;
+       };
+};