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

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

index 9a601d6d18f2451d415a1acfb4c9910470601c49..b5493a137e52e978cebfdeaaf5588baf0a9ae2ad 100644 (file)
@@ -7,6 +7,11 @@
        model = "Wavlink WL-WN533A8";
 };
 
+/* override EEPROM size to 0x4da8 for MT7615 */
+&eeprom_factory_0 {
+       reg = <0x0 0x4da8>;
+};
+
 &wifi0{
        ieee80211-freq-limit = <2400000 5490000>;
 };
index e0db05724e7b90b78df20f6272348eb5f2eb3254..7df61c4eb30d2045b244f98e8686c98bb559d1c4 100644 (file)
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       eeprom_factory_0: eeprom@0 {
+                                               reg = <0x0 0x400>;
+                                       };
+
+                                       eeprom_factory_8000: eeprom@8000 {
+                                               reg = <0x8000 0x4da8>;
+                                       };
+
                                        macaddr_factory_e000: macaddr@e000 {
                                                reg = <0xe000 0x6>;
                                        };
        wifi0: mt76@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };
 
        wifi1: mt76@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";
        };
 };