ramips: convert MT7603 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wn-ax1167gr.dts
index 69c79d7dc768db13ba65196eb64a69868409251b..b6bafe8c89abbb0aa477686ac3462e92927266d9 100644 (file)
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        iNIC_rf: partition@50000 {
+                               compatible = "nvmem-cells";
                                label = "iNIC_rf";
                                reg = <0x50000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_iNIC_rf_0: eeprom@0 {
+                                       reg = <0x0 0x400>;
+                               };
+
+                               macaddr_iNIC_rf_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@60000 {
 &pcie0 {
        mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
+               nvmem-cells = <&eeprom_iNIC_rf_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
 &xhci {
        status = "disabled";
 };
-
-&iNIC_rf {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_iNIC_rf_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};
-
-&factory {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_factory_4: macaddr@4 {
-               reg = <0x4 0x6>;
-       };
-};