summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosen Penev2026-02-20 01:23:00 +0000
committerRobert Marko2026-02-23 09:54:08 +0000
commitaef4d9e67741545ccedbf3bb12453aac878137d2 (patch)
tree4eb0ef224fba057e650a5ef928b9e979aa8bb8ce
parenteb3b8b38627bfb3ffef69a397b9ced4d461c08e7 (diff)
downloadstintel-aef4d9e67741545ccedbf3bb12453aac878137d2.tar.gz
ipq806x: ac400i: use nvmem for MAC addresses
Userspace handling is deprecated. NVMEM allows flexibility in terms of exotic setups by avoiding random MAC addresses. u-boot env-size taken from the entry in uboot-envtools Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/22107 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata8
-rw-r--r--target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts37
2 files changed, 37 insertions, 8 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 add17e2082..88161e5fa6 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
@@ -47,10 +47,6 @@ case "$FIRMWARE" in
CI_UBIPART=art
caldata_extract_ubi "ART" 0x1000 0x2f20
;;
- nokia,ac400i)
- caldata_extract "0:art" 0x1000 0x2f20
- ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) +2)
- ;;
zyxel,nbg6817)
caldata_extract "0:art" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) 1)
@@ -78,10 +74,6 @@ case "$FIRMWARE" in
CI_UBIPART=art
caldata_extract_ubi "ART" 0x5000 0x2f20
;;
- nokia,ac400i)
- caldata_extract "0:art" 0x5000 0x2f20
- ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) +3)
- ;;
zyxel,nbg6817)
caldata_extract "0:art" 0x5000 0x2f20
ath10k_patch_mac $(mtd_get_mac_ascii 0:appsblenv ethaddr)
diff --git a/target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts b/target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts
index 5534231917..3e13e4e764 100644
--- a/target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts
+++ b/target/linux/ipq806x/dts/qcom-ipq8065-ac400i.dts
@@ -175,6 +175,39 @@
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>;
+ };
+ };
+ };
+
+ partition-0-appsblenv {
+ label = "0:appsblenv";
+ read-only;
+
+ nvmem-layout {
+ compatible = "u-boot,env";
+ env-size = <0x40000>;
+
+ macaddr_uboot_ethaddr: ethaddr {
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
};
};
};
@@ -201,6 +234,8 @@
compatible = "qcom,ath10k";
reg = <0x00010000 0 0 0 0>;
qcom,ath10k-calibration-variant = "Nokia-AC400i";
+ nvmem-cells = <&precal_art_1000>, <&macaddr_uboot_ethaddr 2>;
+ nvmem-cell-names = "pre-calibration", "mac-address";
};
};
@@ -217,6 +252,8 @@
compatible = "qcom,ath10k";
reg = <0x00010000 0 0 0 0>;
qcom,ath10k-calibration-variant = "Nokia-AC400i";
+ nvmem-cells = <&precal_art_5000>, <&macaddr_uboot_ethaddr 3>;
+ nvmem-cell-names = "pre-calibration", "mac-address";
};
};