ramips: convert most mtd-mac-address cases in DTSI to nvmem
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dir-853-a3.dts
index 738bcdc7d69228cdd7cb40ba08ede8cc7294341f..e866fb12427af33f394fbb6bf05c80dca2214f98 100644 (file)
                mediatek,mtd-eeprom = <&factory 0x0>;
                /* 5 GHz (phy1) does not take the address from calibration data,
                   but setting it manually here works */
-               mtd-mac-address = <&factory 0x4>;
+               nvmem-cells = <&macaddr_factory_4>;
+               nvmem-cell-names = "mac-address";
        };
 };
 
 &gmac0 {
-       mtd-mac-address = <&factory 0xe000>;
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
                port@4 {
                        status = "okay";
                        label = "wan";
-                       mtd-mac-address = <&factory 0xe006>;
+                       nvmem-cells = <&macaddr_factory_e006>;
+                       nvmem-cell-names = "mac-address";
                };
        };
 };
                function = "gpio";
        };
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_4: macaddr@4 {
+               reg = <0x4 0x6>;
+       };
+
+       macaddr_factory_e000: macaddr@e000 {
+               reg = <0xe000 0x6>;
+       };
+
+       macaddr_factory_e006: macaddr@e006 {
+               reg = <0xe006 0x6>;
+       };
+};