ramips: convert MT7603 EEPROM to NVMEM format
[openwrt/staging/dangole.git] / target / linux / ramips / dts / mt7621_cudy_wr1300-v1.dts
index cc1afdc95bd6a5899d3cb5e09c3624fe93819c77..108dbc17a5f3e4577ac0ba72170d536f49cedbf4 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x400>;
+                               };
                        };
 
                        partition@50000 {
                        };
 
                        bdinfo: partition@ff0000 {
+                               compatible = "nvmem-cells";
                                label = "bdinfo";
                                reg = <0xff0000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_bdinfo_de00: macaddr@de00 {
+                                       reg = <0xde00 0x6>;
+                               };
                        };
                };
        };
        wifi@0,0 {
                compatible = "pci14c3,7603";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
-               nvmem-cells = <&macaddr_bdinfo_de00>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&eeprom_factory_0>, <&macaddr_bdinfo_de00>;
+               nvmem-cell-names = "eeprom", "mac-address";
                ieee80211-freq-limit = <2400000 2500000>;
 
                led {
                function = "gpio";
        };
 };
-
-&bdinfo {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_bdinfo_de00: macaddr@de00 {
-               reg = <0xde00 0x6>;
-       };
-};