ipq806x: mr42/mr52: use nvmem for caldata

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>
This commit is contained in:
Rosen Penev 2026-02-25 19:35:44 -08:00 committed by Christian Marangi
parent 82b8feabc0
commit 6cc149f167
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7
4 changed files with 48 additions and 33 deletions

View 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
;;
*)

View file

@ -194,6 +194,22 @@
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 {

View file

@ -193,19 +193,29 @@
};
};
&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 {

View file

@ -218,19 +218,29 @@
};
};
&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 {