[openwrt/openwrt] ath79: tiny: tplink: add nvmem and fix
LEDE Commits
lede-commits at lists.infradead.org
Wed Sep 17 10:24:59 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d1fed22fafa7affa8c18fcbed2ee96affa830a1f
commit d1fed22fafa7affa8c18fcbed2ee96affa830a1f
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Thu Sep 11 17:31:07 2025 -0700
ath79: tiny: tplink: add nvmem and fix
Despite having the same tplink.dtsi file, there are differences in wifi
Move wifi nodes out of dtsi to make it clear what the chipset is and
what calibration size should be used.
While at it, change to use led-sources to simplify LED setup.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20024
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
target/linux/ath79/dts/ar7241_tplink.dtsi | 11 +-------
.../linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts | 29 ++++++++++++++++------
.../linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts | 29 ++++++++++++++++------
.../linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts | 29 ++++++++++++++++------
.../etc/hotplug.d/firmware/10-ath9k-eeprom | 3 ---
5 files changed, 67 insertions(+), 34 deletions(-)
diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi
index 01eee39f19..8a42358d9b 100644
--- a/target/linux/ath79/dts/ar7241_tplink.dtsi
+++ b/target/linux/ath79/dts/ar7241_tplink.dtsi
@@ -84,7 +84,7 @@
label = "firmware";
};
- partition at 3f0000 {
+ art_part: partition at 3f0000 {
reg = <0x3f0000 0x10000>;
label = "art";
read-only;
@@ -95,15 +95,6 @@
&pcie {
status = "okay";
-
- ath9k: wifi at 0,0 {
- reg = <0x0000 0 0 0 0>;
- #gpio-cells = <2>;
- gpio-controller;
- qca,no-eeprom;
- nvmem-cells = <&macaddr_uboot_1fc00 0>;
- nvmem-cell-names = "mac-address";
- };
};
ð0 { /* WAN interface, initialized last as eth1 */
diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts
index c9f696234b..b7ca045e86 100644
--- a/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts
+++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts
@@ -7,15 +7,30 @@
/ {
compatible = "tplink,tl-mr3220-v1", "qca,ar7241";
model = "TP-Link TL-MR3220 v1";
+};
+
+&art_part {
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: calibration at 1000 {
+ reg = <0x1000 0x200>;
+ };
+ };
+};
- ath9k-leds {
- compatible = "gpio-leds";
+&pcie {
+ ath9k: wifi at 0,0 {
+ compatible = "pci168c,002b";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_art_1000>, <&macaddr_uboot_1fc00 0>;
+ nvmem-cell-names = "calibration", "mac-address";
- wlan {
- function = LED_FUNCTION_WLAN;
- color = <LED_COLOR_ID_GREEN>;
- gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "phy0tpt";
+ led {
+ led-sources = <1>;
+ led-active-low;
};
};
};
diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts
index 539a5952b3..d357033041 100644
--- a/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts
+++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts
@@ -7,15 +7,30 @@
/ {
compatible = "tplink,tl-mr3420-v1", "qca,ar7241";
model = "TP-Link TL-MR3420 v1";
+};
+
+&art_part {
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: calibration at 1000 {
+ reg = <0x1000 0x3d8>;
+ };
+ };
+};
- ath9k-leds {
- compatible = "gpio-leds";
+&pcie {
+ ath9k: wifi at 0,0 {
+ compatible = "pci168c,002e";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_art_1000>, <&macaddr_uboot_1fc00 0>;
+ nvmem-cell-names = "calibration", "mac-address";
- wlan {
- function = LED_FUNCTION_WLAN;
- color = <LED_COLOR_ID_GREEN>;
- gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "phy0tpt";
+ led {
+ led-sources = <0>;
+ led-active-low;
};
};
};
diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts
index c9543afed3..bb52d3cd2e 100644
--- a/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts
+++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts
@@ -7,15 +7,30 @@
/ {
compatible = "tplink,tl-wr841-v7", "qca,ar7241";
model = "TP-Link TL-WR841N/ND v7";
+};
+
+&art_part {
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: calibration at 1000 {
+ reg = <0x1000 0x3d8>;
+ };
+ };
+};
- ath9k-leds {
- compatible = "gpio-leds";
+&pcie {
+ ath9k: wifi at 0,0 {
+ compatible = "pci168c,002e";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_art_1000>, <&macaddr_uboot_1fc00 0>;
+ nvmem-cell-names = "calibration", "mac-address";
- wlan {
- function = LED_FUNCTION_WLAN;
- color = <LED_COLOR_ID_GREEN>;
- gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "phy0tpt";
+ led {
+ led-sources = <0>;
+ led-active-low;
};
};
};
diff --git a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 0f96f04902..e7b9ed2563 100644
--- a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -20,9 +20,6 @@ case "$FIRMWARE" in
ath9k_patch_mac_crc $(mtd_get_mac_ascii "nvram" "lan_mac") 0x10c
;;
netgear,wnr2000-v3|\
- tplink,tl-mr3220-v1|\
- tplink,tl-mr3420-v1|\
- tplink,tl-wr841-v7|\
ubnt,airrouter|\
ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
More information about the lede-commits
mailing list