ath79: use nvmem for wrong 3e0 cal size
authorRosen Penev <rosenp@gmail.com>
Sun, 15 Dec 2024 01:07:36 +0000 (17:07 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 23 Dec 2024 22:46:41 +0000 (23:46 +0100)
These three devices use AR9287 chips, which have a calibration size of 3d8.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17278
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts
target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts
target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

index aa734966d5039411e0d8c202fadfcb1478186fe6..95766664862a7742e2b7ee28ee9162d031733cb9 100644 (file)
                        macaddr_art_6: macaddr@6 {
                                reg = <0x6 0x6>;
                        };
+
+                       cal_art_1000: calibration@1000 {
+                               reg = <0x1000 0x3d8>;
+                       };
                };
        };
 };
@@ -65,6 +69,6 @@
 };
 
 &ath9k {
-       nvmem-cells = <&macaddr_art_0 1>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_0 1>, <&cal_art_1000>;
+       nvmem-cell-names = "mac-address", "calibration";
 };
index 27c31c3c123599a84b10aed88cc58ae41def34f7..62ee49e9d0b4941fb3ff6aa79933d79c00359367 100644 (file)
                        macaddr_art_6: macaddr@6 {
                                reg = <0x6 0x6>;
                        };
+
+                       cal_art_1000: calibration@1000 {
+                               reg = <0x1000 0x3d8>;
+                       };
                };
        };
 };
@@ -65,6 +69,6 @@
 };
 
 &ath9k {
-       nvmem-cells = <&macaddr_art_0 1>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_0 1>, <&cal_art_1000>;
+       nvmem-cell-names = "mac-address", "calibration";
 };
index 2c1dd064fecf1d69742b1d1dfa354da16e615143..8dcb8f852c448075354eebffd59821f78a88f7cc 100644 (file)
        ath9k: wifi@0,0 {
                compatible = "pci168c,002e";
                reg = <0x0000 0 0 0 0>;
-               qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
 
index b0edbf4d06f319c580b91c98f7554f1e1f20b1f4..836901068875ecf52a49961b930b79ca692320db 100644 (file)
                                reg = <0x7f0000 0x10000>;
                                label = "art";
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x3d8>;
+                                       };
+                               };
                        };
                };
        };
                reg = <0x0000 0 0 0 0>;
                #gpio-cells = <2>;
                gpio-controller;
-               qca,no-eeprom;
-               nvmem-cells = <&macaddr_uboot_1fc00 0>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
+               nvmem-cell-names = "mac-address", "calibration";
        };
 };
 
index 675522823f61cab3f5988c5187afcb0dff1f9f7b..89cb3df6f2108215d989e6d57b38a1eb154661ea 100644 (file)
@@ -83,11 +83,6 @@ case "$FIRMWARE" in
        meraki,mr12)
                caldata_extract "art" 0x11000 0xeb8
                ;;
-       netgear,wnr2200-8m|\
-       netgear,wnr2200-16m|\
-       tplink,tl-wr842n-v1)
-               caldata_extract "art" 0x1000 0x3e0
-               ;;
        ubnt,powerbridge-m|\
        ubnt,rocket-m)
                caldata_extract "art" 0x1000 0x1000