[openwrt/openwrt] ath79: use NVMEM for wlan caldata on ELECOM devices
LEDE Commits
lede-commits at lists.infradead.org
Wed Oct 19 14:25:06 PDT 2022
hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/961d4230f4a5ebf79ff350d4ee4593a21f8bb4ec
commit 961d4230f4a5ebf79ff350d4ee4593a21f8bb4ec
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Wed Oct 19 23:57:34 2022 +0900
ath79: use NVMEM for wlan caldata on ELECOM devices
Use NVMEM "calibration" implementation for ath9k/ath10k(-ct) on ELECOM
WRC-300GHBK2-I and WRC-1750GHBK2-I/C instead of mtd-cal-data property
or user-space script.
Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
.../ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts | 36 +++++++++++++++-------
.../ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts | 25 ++++++++-------
.../etc/hotplug.d/firmware/11-ath10k-caldata | 3 --
3 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts b/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts
index 510b577d19..f7358891b0 100644
--- a/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts
+++ b/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts
@@ -44,11 +44,34 @@
label = "art";
reg = <0xff0000 0x010000>;
read-only;
+
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: cal at 1000 {
+ reg = <0x1000 0x440>;
+ };
+
+ macaddr_art_1002: macaddr at 1002 {
+ reg = <0x1002 0x6>;
+ };
+
+ cal_art_5000: cal at 5000 {
+ reg = <0x5000 0x844>;
+ };
};
};
&pcie {
status = "okay";
+
+ wifi at 0,0 {
+ compatible = "qcom,ath10k";
+ reg = <0x0 0 0 0 0>;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
+ };
};
ð0 {
@@ -58,15 +81,6 @@
};
&wmac {
- mtd-cal-data = <&art 0x1000>;
-};
-
-&art {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_art_1002: macaddr at 1002 {
- reg = <0x1002 0x6>;
- };
+ nvmem-cells = <&cal_art_1000>;
+ nvmem-cell-names = "calibration";
};
diff --git a/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts b/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts
index 28ffce6434..5ffff57b48 100644
--- a/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts
+++ b/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts
@@ -38,6 +38,18 @@
label = "art";
reg = <0x7f0000 0x010000>;
read-only;
+
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: cal at 1000 {
+ reg = <0x1000 0x440>;
+ };
+
+ macaddr_art_1002: macaddr at 1002 {
+ reg = <0x1002 0x6>;
+ };
};
};
@@ -48,15 +60,6 @@
};
&wmac {
- mtd-cal-data = <&art 0x1000>;
-};
-
-&art {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_art_1002: macaddr at 1002 {
- reg = <0x1002 0x6>;
- };
+ nvmem-cells = <&cal_art_1000>;
+ nvmem-cell-names = "calibration";
};
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 57e59a89d6..8783b137ca 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -74,9 +74,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
;;
- elecom,wrc-1750ghbk2-i)
- caldata_extract "art" 0x5000 0x844
- ;;
engenius,ecb1200|\
engenius,ecb1750)
caldata_extract "art" 0x5000 0x844
More information about the lede-commits
mailing list