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

UBI nvmwem has been supported for quite a while now.

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-ipq8068-cryptid-common.dtsi
target/linux/ipq806x/dts/qcom-ipq8068-mr42.dts
target/linux/ipq806x/dts/qcom-ipq8068-mr52.dts

index e8934b8306cd9355dbf8352a238703a09c9bbd18..256f3d129c0a4630c9c2ebd5c03b9b9c949a7691 100644 (file)
@@ -32,10 +32,6 @@ case "$FIRMWARE" in
        tplink,onhub)
                base64_extract /sys/firmware/vpd/ro/wifi_base64_calibration0
                ;;
-       meraki,mr52)
-               CI_UBIPART=art
-               caldata_extract_ubi "ART" 0x1000 0x844
-               ;;
        esac
        ;;
 "ath10k/pre-cal-pci-0000:01:00.0.bin")
@@ -43,10 +39,6 @@ case "$FIRMWARE" in
        asrock,g10)
                caldata_extract "0:art" 0x1000 0x2f20
                ;;
-       meraki,mr42)
-               CI_UBIPART=art
-               caldata_extract_ubi "ART" 0x1000 0x2f20
-               ;;
        esac
        ;;
 "ath10k/cal-pci-0001:01:00.0.bin")
@@ -65,11 +57,6 @@ case "$FIRMWARE" in
        edgecore,ecw5410)
                caldata_extract "0:art" 0x1000 0x2f20
                ;;
-       meraki,mr42|\
-       meraki,mr52)
-               CI_UBIPART=art
-               caldata_extract_ubi "ART" 0x5000 0x2f20
-               ;;
        esac
        ;;
 "ath10k/cal-pci-0002:01:00.0.bin")
@@ -78,10 +65,6 @@ case "$FIRMWARE" in
        tplink,onhub)
                base64_extract /sys/firmware/vpd/ro/wifi_base64_calibration2
                ;;
-       meraki,mr42)
-               CI_UBIPART=art
-               caldata_extract_ubi "ART" 0x9000 0x844
-               ;;
        esac
        ;;
 "ath10k/pre-cal-pci-0002:01:00.0.bin")
@@ -89,10 +72,6 @@ case "$FIRMWARE" in
        edgecore,ecw5410)
                caldata_extract "0:art" 0x5000 0x2f20
                ;;
-       meraki,mr52)
-               CI_UBIPART=art
-               caldata_extract_ubi "ART" 0x9000 0x2f20
-               ;;
        esac
        ;;
 *)
index c38ded86ee48a5e9400eb9c73d099ad7f246fc3e..69b39a3afe2d8cfcd296ccb2e6165bebd0b31696 100644 (file)
                        partition@36c0000 {
                                label = "ubi";
                                reg = <0x36c0000 0x46c0000>;
+
+                               volumes {
+                                       ubi-volume-art {
+                                               volname = "ART";
+
+                                               art_nvmem: nvmem-layout {
+                                                       compatible = "fixed-layout";
+                                                       #address-cells = <1>;
+                                                       #size-cells = <1>;
+
+                                                       precal_art_5000: pre-calibration@5000 {
+                                                               reg = <0x5000 0x2f20>;
+                                                       };
+                                               };
+                                       };
+                               };
                        };
 
                        partition@7d80000 {
index 7ec11de56b637c21ada0794e361790c130eccff2..82ccfd2b7458bdab5f8e0837875c8bb0bb62cee5 100644 (file)
        };
 };
 
+&art_nvmem {
+       precal_art_1000: pre-calibration@1000 {
+               reg = <0x1000 0x2f20>;
+       };
+
+       cal_art_9000: calibration@9000 {
+               reg = <0x9000 0x844>;
+       };
+};
+
 &wifi0 {
-       nvmem-cells = <&mac_address 1>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&precal_art_1000>, <&mac_address 1>;
+       nvmem-cell-names = "pre-calibration", "mac-address";
 };
 
 &wifi1 {
-       nvmem-cells = <&mac_address 2>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&precal_art_5000>, <&mac_address 2>;
+       nvmem-cell-names = "pre-calibration", "mac-address";
 };
 
 &wifi2 {
-       nvmem-cells = <&mac_address 3>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&cal_art_9000>, <&mac_address 3>;
+       nvmem-cell-names = "calibration", "mac-address";
 };
 
 &hs_phy_0 {
index 97b280e2015e81a05703d3ecbfe0c60b84095fff..479f66686e39ba78bcb80bfeb8b5df90ebcf54a3 100644 (file)
        };
 };
 
+&art_nvmem {
+       cal_art_1000: calibration@1000 {
+               reg = <0x1000 0x844>;
+       };
+
+       precal_art_9000: pre-calibration@9000 {
+               reg = <0x9000 0x2f20>;
+       };
+};
+
 &wifi0 {
-       nvmem-cells = <&mac_address 4>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&cal_art_1000>, <&mac_address 4>;
+       nvmem-cell-names = "calibration", "mac-address";
 };
 
 &wifi1 {
-       nvmem-cells = <&mac_address 3>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&precal_art_5000>, <&mac_address 3>;
+       nvmem-cell-names = "pre-calibration", "mac-address";
 };
 
 &wifi2 {
-       nvmem-cells = <&mac_address 2>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&precal_art_9000>, <&mac_address 2>;
+       nvmem-cell-names = "pre-calibration", "mac-address";
 };
 
 &hs_phy_0 {