From 9ad31bb48f6fb50e5deb4d0f934e5ee8f9ce2c7c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 25 Feb 2026 19:42:17 -0800 Subject: [PATCH] ipq806x: use nvmem for calibration Userspace handling is deprecated. These are identical to NBG6617, which was tested as working. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/22263 Signed-off-by: Christian Marangi --- .../etc/hotplug.d/firmware/11-ath10k-caldata | 24 ------------------- target/linux/ipq806x/dts/qcom-ipq8064-g10.dts | 23 ++++++++++++++++++ .../ipq806x/dts/qcom-ipq8068-ecw5410.dts | 23 ++++++++++++++++++ 3 files changed, 46 insertions(+), 24 deletions(-) diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 256f3d129c0..c626afe7a37 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -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 ;; diff --git a/target/linux/ipq806x/dts/qcom-ipq8064-g10.dts b/target/linux/ipq806x/dts/qcom-ipq8064-g10.dts index 2e901d5a204..e8a4a04776e 100644 --- a/target/linux/ipq806x/dts/qcom-ipq8064-g10.dts +++ b/target/linux/ipq806x/dts/qcom-ipq8064-g10.dts @@ -279,6 +279,25 @@ 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>; + }; + }; + }; }; }; }; @@ -292,6 +311,8 @@ 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"; }; }; @@ -304,6 +325,8 @@ 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"; }; }; diff --git a/target/linux/ipq806x/dts/qcom-ipq8068-ecw5410.dts b/target/linux/ipq806x/dts/qcom-ipq8068-ecw5410.dts index 762574f07c7..49abe2088d9 100644 --- a/target/linux/ipq806x/dts/qcom-ipq8068-ecw5410.dts +++ b/target/linux/ipq806x/dts/qcom-ipq8068-ecw5410.dts @@ -192,6 +192,25 @@ 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>; + }; + }; + }; }; }; }; @@ -234,6 +253,8 @@ 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"; }; }; @@ -250,6 +271,8 @@ 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"; }; };