ramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format
authorShiji Yang <yangshiji66@qq.com>
Tue, 16 Jan 2024 13:24:41 +0000 (21:24 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 17 Jan 2024 00:14:50 +0000 (01:14 +0100)
-+------------------------------+-
 |    Model   |       NIC       |
-+------------------------------+-
 | chj series | MT7603 + MT7615 |
-+------------------------------+-
 | bzv series |    MT7615 *2    |
-+------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi

index f5cffb4a2a42b2494a5c3206de6f274bbc46d240..1ae7fd0f57215bf46088e7c78b1ce23aabe16191 100644 (file)
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
                                #address-cells = <1>;
                                #size-cells = <1>;
 
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x4da8>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        compatible = "mac-base";
                                        reg = <0x4 0x6>;
index fd73bfcb3edad23fb96e2ed1b17ef645b641e451..72ff75cefa9a969f566834663d97c780722a773c 100644 (file)
@@ -81,7 +81,8 @@
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
+               nvmem-cells = <&eeprom_factory_8000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
@@ -90,7 +91,8 @@
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
                                #address-cells = <1>;
                                #size-cells = <1>;
 
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x400>;
+                               };
+
+                               eeprom_factory_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
+
                                macaddr_factory_4: macaddr@4 {
                                        compatible = "mac-base";
                                        reg = <0x4 0x6>;