ath79: convert Netgear R6100 radio calibration to nvmem-cells
authorShiji Yang <yangshiji66@qq.com>
Tue, 29 Nov 2022 10:13:19 +0000 (18:13 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 6 Dec 2022 22:11:23 +0000 (23:11 +0100)
use nvmem-cells implementation to avoid copying art calibration data
to rootfs.

Tested on Netgear R6100
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
target/linux/ath79/dts/ar9344_netgear_r6100.dts
target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata

index a73ea52de9875d03f09034647bd477bcfdbfcf16..76bd77d4c65ef3f63b464cf3f1d55d8508383a6b 100644 (file)
                compatible = "qcom,ath10k";
                reg = <0x0000 0 0 0 0>;
 
-               nvmem-cells = <&macaddr_caldata_c>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&cal_ath10k>, <&macaddr_caldata_c>;
+               nvmem-cell-names = "calibration", "mac-address";
        };
 };
 
 &wmac {
        status = "okay";
 
-       mtd-cal-data = <&caldata 0x1000>;
+       nvmem-cells = <&cal_ath9k>;
+       nvmem-cell-names = "calibration";
 };
 
 &caldata {
        #address-cells = <1>;
        #size-cells = <1>;
 
+       cal_ath9k: calibration@1000 {
+               reg = <0x1000 0x440>;
+       };
+
+       cal_ath10k: calibration@5000 {
+               reg = <0x5000 0x844>;
+       };
+
        macaddr_caldata_0: macaddr@0 {
                reg = <0x0 0x6>;
        };
index e5c26d6bb5dc8f329fca167080f0a44b802e89a0..d26625981ee3a823f524a8316eda9e783197ad0e 100644 (file)
@@ -18,9 +18,6 @@ case "$FIRMWARE" in
                caldata_extract "art" 0x5000 0x844
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 1)
                ;;
-       netgear,r6100)
-               caldata_extract "caldata" 0x5000 0x844
-               ;;
        zyxel,emg2926-q10a|\
        zyxel,nbg6716)
                caldata_extract "art" 0x5000 0x844