[openwrt/openwrt] lantiq: use nvmem for tplink tdw89x0
LEDE Commits
lede-commits at lists.infradead.org
Fri Dec 27 02:20:23 PST 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4348ed93c6eba8097da21ffcff682c8bf1eab6ea
commit 4348ed93c6eba8097da21ffcff682c8bf1eab6ea
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Mon Dec 16 15:19:35 2024 -0800
lantiq: use nvmem for tplink tdw89x0
These two devices use different wifi chips and as a result, different
calibration sizes. Move the differences out of dtsi.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16555
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
.../mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts | 12 +++++++++++
.../mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts | 12 +++++++++++
.../mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi | 10 +++-------
.../etc/hotplug.d/firmware/12-ath9k-eeprom | 23 ----------------------
4 files changed, 27 insertions(+), 30 deletions(-)
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts
index 1ac6440744..4bd70b528c 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts
@@ -4,3 +4,15 @@
compatible = "tplink,tdw8970", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9";
model = "TP-LINK TD-W8970";
};
+
+&boardconfig {
+ cal_boardconfig_21000: calibration at 21000 {
+ reg = <0x21000 0x440>;
+ };
+};
+
+&ath9k {
+ compatible = "pci168c,0030";
+ nvmem-cells = <&macaddr_ath9k_cal_f100 2>, <&cal_boardconfig_21000>;
+ nvmem-cell-names = "mac-address", "calibration";
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts
index 8221e0d5c5..a3fd642336 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts
@@ -27,3 +27,15 @@
reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
};
+
+&boardconfig {
+ cal_boardconfig_21000: calibration at 21000 {
+ reg = <0x21000 0x3d8>;
+ };
+};
+
+&ath9k {
+ compatible = "pci168c,002e";
+ nvmem-cells = <&macaddr_ath9k_cal_f100 2>, <&cal_boardconfig_21000>;
+ nvmem-cell-names = "mac-address", "calibration";
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
index c3e69f18fa..be9c8063b4 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
@@ -200,15 +200,11 @@
#address-cells = <3>;
device_type = "pci";
- ath9k: wifi at 168c,002e {
- compatible = "pci168c,002e";
+ ath9k: wifi at 0,0 {
reg = <0 0 0 0 0>;
#gpio-cells = <2>;
gpio-controller;
- qca,no-eeprom;
ieee80211-freq-limit = <2402000 2482000>;
- nvmem-cells = <&macaddr_ath9k_cal_f100 2>;
- nvmem-cell-names = "mac-address";
};
};
};
@@ -244,12 +240,12 @@
read-only;
};
- ath9k_cal: partition at 7d0000 {
+ partition at 7d0000 {
reg = <0x7d0000 0x30000>;
label = "boardconfig";
read-only;
- nvmem-layout {
+ boardconfig: nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
deleted file mode 100644
index c10065d5d5..0000000000
--- a/target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-[ -e /lib/firmware/$FIRMWARE ] && exit 0
-
-. /lib/functions/caldata.sh
-
-case "$FIRMWARE" in
- "ath9k-eeprom-pci-0000:00:0e.0.bin" | \
- "ath9k-eeprom-pci-0000:01:00.0.bin" | \
- "ath9k-eeprom-pci-0000:02:00.0.bin")
- board=$(board_name)
-
- case "$board" in
- tplink,tdw8970|\
- tplink,tdw8980)
- caldata_extract "boardconfig" 0x21000 0x1000
- ;;
- *)
- caldata_die "board $board is not supported yet"
- ;;
- esac
- ;;
-esac
More information about the lede-commits
mailing list