[openwrt/openwrt] ath79: enterasys,ws-ap3805i: use nvmem

LEDE Commits lede-commits at lists.infradead.org
Wed Oct 22 15:05:38 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3faa3a04bb44c3a265e95cb5f8ec31b37ba37520

commit 3faa3a04bb44c3a265e95cb5f8ec31b37ba37520
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed Oct 1 13:22:33 2025 -0700

    ath79: enterasys,ws-ap3805i: use nvmem
    
    Userspace handling is deprecated.
    
    Use ath9k LED instead of specifying a generic one.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/16286
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../dts/qca9557_extreme-networks_ws-ap3805i.dts    | 25 ++++++++++++++++------
 .../etc/hotplug.d/firmware/10-ath9k-eeprom         |  4 ----
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac        |  5 ++++-
 .../base-files/lib/preinit/10_fix_eth_mac.sh       |  1 -
 4 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts b/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts
index 9df72df66e..b2802bb855 100644
--- a/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts
+++ b/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts
@@ -38,12 +38,6 @@
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
-
-		wlan2 {
-			label = "green:wlan2";
-			gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
 	};
 
 	keys {
@@ -72,7 +66,13 @@
 &wmac {
 	status = "okay";
 
-	qca,no-eeprom;
+	nvmem-cells = <&cal_art_1000>;
+	nvmem-cell-names = "calibration";
+
+	led {
+		led-sources = <22>;
+		led-active-low;
+	};
 };
 
 &pcie0 {
@@ -102,6 +102,9 @@
 
 	pll-data = <0x82000000 0x80000101 0x80001313>;
 
+	nvmem-cells = <&macaddr_uboot_ethaddr>;
+	nvmem-cell-names = "mac-address";
+
 	gmac-config {
 		device = <&gmac>;
 		rgmii-enabled = <1>;
@@ -135,9 +138,13 @@
 			};
 
 			partition at 100000 {
+				compatible = "u-boot,env";
 				label = "cfg1";
 				reg = <0x100000 0x40000>;
 				read-only;
+
+				macaddr_uboot_ethaddr: ethaddr {
+				};
 			};
 
 			partition at 140000 {
@@ -204,6 +211,10 @@
 					#address-cells = <1>;
 					#size-cells = <1>;
 
+					cal_art_1000: calibration at 1000 {
+						reg = <0x1000 0x440>;
+					};
+
 					cal_art_5000: calibration at 5000 {
 						reg = <0x5000 0x844>;
 					};
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index d6ae5b1aa1..a6c1eff2b6 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -20,10 +20,6 @@ case "$FIRMWARE" in
 		caldata_extract "art" 0x1000 0x440
 		ath9k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env athaddr) 1)
 		;;
-	extreme-networks,ws-ap3805i)
-		caldata_extract "art" 0x1000 0x440
-		ath9k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR1)
-		;;
 	sitecom,wlr-7100|\
 	sitecom,wlr-8100)
 		caldata_extract "art" 0x1000 0x440
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index dcebc16679..ed8cc44783 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -70,7 +70,10 @@ case "$board" in
 		;;
 	extreme-networks,ws-ap3805i)
 		[ "$PHYNBR" -eq 0 ] && \
-		mtd_get_mac_ascii cfg1 RADIOADDR0 > /sys${DEVPATH}/macaddress
+			mtd_get_mac_ascii cfg1 RADIOADDR0 > /sys${DEVPATH}/macaddress
+		;;
+		[ "$PHYNBR" -eq 1 ] && \
+			mtd_get_mac_ascii cfg1 RADIOADDR1 > /sys${DEVPATH}/macaddress
 		;;
 	iodata,wn-ac1167dgr|\
 	iodata,wn-ac1600dgr|\
diff --git a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
index 2d68e02eaf..4b6cb7b6ed 100644
--- a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
+++ b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
@@ -18,7 +18,6 @@ preinit_set_mac_address() {
 	engenius,esr900)
 		ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env ethaddr)
 		;;
-	extreme-networks,ws-ap3805i|\
 	siemens,ws-ap3610)
 		ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
 		;;




More information about the lede-commits mailing list