ramips: convert MT7613 and MT7615 EEPROM to NVMEM format for MT7621
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_dlink_dir-xx60-a1.dtsi
index 07f84592e4b02f09dfea62cd7e1b78130d56b932..fee88647775d26cec77465ccc4486b38a7e2f143 100644 (file)
                };
 
                factory: partition@100000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x100000 0x40000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
                        read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0x4da8>;
+                       };
+
+                       eeprom_factory_8000: eeprom@8000 {
+                               reg = <0x8000 0x4da8>;
+                       };
+
+                       macaddr_factory_e000: macaddr@e000 {
+                               reg = <0xe000 0x6>;
+                       };
+
+                       macaddr_factory_e006: macaddr@e006 {
+                               reg = <0xe006 0x6>;
+                       };
                };
 
                partition@140000 {
        wifi0: wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0000>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
 
                led {
        wifi1: wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
 
                led {
                function = "gpio";
        };
 };
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_e000: macaddr@e000 {
-               reg = <0xe000 0x6>;
-       };
-
-       macaddr_factory_e006: macaddr@e006 {
-               reg = <0xe006 0x6>;
-       };
-};