mediatek: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / mediatek / dts / mt7622-ubnt-unifi-6-lr-ubootmod.dts
index b2f741ea3b71aa4f340e3eaf4feb0695b98cc5fa..e573d30912f4660b951d26663d6bc8f3d75c2f4c 100644 (file)
@@ -49,7 +49,8 @@
 
 &wmac {
        mediatek,mtd-eeprom = <&factory 0x0>;
-       mtd-mac-address = <&eeprom 0x0>;
+       nvmem-cells = <&macaddr_eeprom_0>;
+       nvmem-cell-names = "mac-address";
        status = "okay";
 };
 
        wifi@0,0 {
                reg = <0x0 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x20000>;
-               mtd-mac-address = <&eeprom 0x6>;
+               nvmem-cells = <&macaddr_eeprom_6>;
+               nvmem-cell-names = "mac-address";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
 
 &gmac0 {
-       mtd-mac-address = <&eeprom 0x0>;
+       nvmem-cells = <&macaddr_eeprom_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eeprom {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_eeprom_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_eeprom_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
 };