]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ipq806x: use nvmem for calibration
authorRosen Penev <rosenp@gmail.com>
Thu, 26 Feb 2026 03:42:17 +0000 (19:42 -0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 10 Mar 2026 12:38:33 +0000 (13:38 +0100)
Userspace handling is deprecated.

These are identical to NBG6617, which was tested as working.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22263
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq806x/dts/qcom-ipq8064-g10.dts
target/linux/ipq806x/dts/qcom-ipq8068-ecw5410.dts

index 256f3d129c0a4630c9c2ebd5c03b9b9c949a7691..c626afe7a3721fcf039715eaf32441d85596e1ce 100644 (file)
@@ -34,13 +34,6 @@ case "$FIRMWARE" in
                ;;
        esac
        ;;
-"ath10k/pre-cal-pci-0000:01:00.0.bin")
-       case $board in
-       asrock,g10)
-               caldata_extract "0:art" 0x1000 0x2f20
-               ;;
-       esac
-       ;;
 "ath10k/cal-pci-0001:01:00.0.bin")
        case "$board" in
        asus,onhub|\
@@ -49,16 +42,6 @@ case "$FIRMWARE" in
                ;;
        esac
        ;;
-"ath10k/pre-cal-pci-0001:01:00.0.bin")
-       case $board in
-       asrock,g10)
-               caldata_extract "0:art" 0x5000 0x2f20
-               ;;
-       edgecore,ecw5410)
-               caldata_extract "0:art" 0x1000 0x2f20
-               ;;
-       esac
-       ;;
 "ath10k/cal-pci-0002:01:00.0.bin")
        case "$board" in
        asus,onhub|\
@@ -67,13 +50,6 @@ case "$FIRMWARE" in
                ;;
        esac
        ;;
-"ath10k/pre-cal-pci-0002:01:00.0.bin")
-       case $board in
-       edgecore,ecw5410)
-               caldata_extract "0:art" 0x5000 0x2f20
-               ;;
-       esac
-       ;;
 *)
        exit 1
        ;;
index 2e901d5a204c0d492729357933b448fd5d698c8f..e8a4a04776eb90fa140e811571290a19197c83be 100644 (file)
 
                partitions {
                        compatible = "qcom,smem-part";
+
+                       partition-0-art {
+                               label = "0:art";
+                               read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       precal_art_1000: pre-calibration@1000 {
+                                               reg = <0x1000 0x2f20>;
+                                       };
+
+                                       precal_art_5000: pre-calibration@5000 {
+                                               reg = <0x5000 0x2f20>;
+                                       };
+                               };
+                       };
                };
        };
 };
                compatible = "qcom,ath10k";
                reg = <0x00010000 0 0 0 0>;
                qcom,ath10k-calibration-variant = "ASRock-G10";
+               nvmem-cells = <&precal_art_1000>;
+               nvmem-cell-names = "pre-calibration";
        };
 };
 
                compatible = "qcom,ath10k";
                reg = <0x00010000 0 0 0 0>;
                qcom,ath10k-calibration-variant = "ASRock-G10";
+               nvmem-cells = <&precal_art_5000>;
+               nvmem-cell-names = "pre-calibration";
        };
 };
 
index 762574f07c74a41621a0f25f596bc982c86e50d7..49abe2088d935972edbdd90026e66cccde8609f7 100644 (file)
 
                        partitions {
                                compatible = "qcom,smem-part";
+
+                               partition-0-art {
+                                       label = "0:art";
+                                       read-only;
+
+                                       nvmem-layout {
+                                               compatible = "fixed-layout";
+                                               #address-cells = <1>;
+                                               #size-cells = <1>;
+
+                                               precal_art_1000: pre-calibration@1000 {
+                                                       reg = <0x1000 0x2f20>;
+                                               };
+
+                                               precal_art_5000: pre-calibration@5000 {
+                                                       reg = <0x5000 0x2f20>;
+                                               };
+                                       };
+                               };
                        };
                };
        };
                compatible = "qcom,ath10k";
                reg = <0x00010000 0 0 0 0>;
                qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
+               nvmem-cells = <&precal_art_1000>;
+               nvmem-cell-names = "pre-calibration";
        };
 };
 
                compatible = "qcom,ath10k";
                reg = <0x00010000 0 0 0 0>;
                qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
+               nvmem-cells = <&precal_art_5000>;
+               nvmem-cell-names = "pre-calibration";
        };
 };