ramips: use NVMEM cells with mt76 EEPROM for Netgear R6220 & WNDR3700 v5
authorRafał Miłecki <rafal@milecki.pl>
Fri, 28 Jul 2023 16:53:20 +0000 (18:53 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Fri, 28 Jul 2023 17:42:46 +0000 (19:42 +0200)
This uses new upstream DT binding. It's more generic (NVMEM) compared to
the old one (MTD).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/ramips/dts/mt7621_netgear_r6220.dts
target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
target/linux/ramips/dts/mt7621_netgear_wndr3700-v5.dts

index 146b7ee752ac9dd763f55a5f67ba512412ee8651..f960d8f66fee98bb4f2d1615a9ada98044bce2d5 100644 (file)
                                #address-cells = <1>;
                                #size-cells = <1>;
 
+                               eeprom0: eeprom@0 {
+                                       reg = <0x0 0x400>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        compatible = "mac-base";
                                        reg = <0x4 0x6>;
                                        #nvmem-cell-cells = <1>;
                                };
+
+                               eeprom1: eeprom@8000 {
+                                       reg = <0x8000 0x200>;
+                               };
                        };
                };
 
index 691aba106341f54111bc4c66e96d40c3d49c4fc7..052b2a4babe60b097b3793f733d74b32d2daddb0 100644 (file)
@@ -91,8 +91,9 @@
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
+               nvmem-cells = <&eeprom1>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
                ieee80211-freq-limit = <2400000 2500000>;
+               nvmem-cells = <&eeprom0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
index dc40d71afc42aa19d848f6df3261eef7eac7931a..8252d2b9ff7d8d81aa41c42a8d789cd272235808 100644 (file)
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       eeprom0: eeprom@0 {
+                                               reg = <0x0 0x400>;
+                                       };
+
                                        macaddr_factory_4: macaddr@4 {
                                                compatible = "mac-base";
                                                reg = <0x4 0x6>;
                                                #nvmem-cell-cells = <1>;
                                        };
+
+                                       eeprom1: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
                                };
                        };