ath79: convert mtd-mac-address to nvmem implementation
[openwrt/staging/stintel.git] / target / linux / ath79 / dts / qca9563_netgear_wndr.dtsi
index 8c6a37413182813b39433b6358904e051f16ed09..6090fdf5277ebf71610cfb0ee1fc7a05f86f5194 100644 (file)
 
        pll-data = <0x03000101 0x00000101 0x00001919>;
 
-       mtd-mac-address = <&caldata 0x0>;
+       nvmem-cells = <&macaddr_caldata_0>;
+       nvmem-cell-names = "mac-address";
 
        phy-mode = "sgmii";
        phy-handle = <&phy0>;
 &wmac {
        status = "okay";
 
-       mtd-mac-address = <&caldata 0x0>;
+       nvmem-cells = <&macaddr_caldata_0>;
+       nvmem-cell-names = "mac-address";
        qca,no-eeprom;
 };
 
                /* chip is AR9580, override bogus PCI ID 168c:abcd */
                compatible = "pci168c,0033";
                reg = <0x0000 0 0 0 0>;
-               mtd-mac-address = <&caldata 0xc>;
+               nvmem-cells = <&macaddr_caldata_c>;
+               nvmem-cell-names = "mac-address";
                qca,no-eeprom;
                qca,gpio-mask=<0xf6ff>; /* unmask pin 9 for RFKILL button */
                #gpio-cells = <2>;
                #trigger-source-cells = <0>;
        };
 };
+
+&caldata {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_caldata_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_caldata_c: macaddr@c {
+               reg = <0xc 0x6>;
+       };
+};