[openwrt/openwrt] ath79: ecb1xxx: use nvmem
LEDE Commits
lede-commits at lists.infradead.org
Tue Dec 2 15:02:20 PST 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e5b86c2320f0fb7160b924191088d10c54abdd81
commit e5b86c2320f0fb7160b924191088d10c54abdd81
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Fri Jun 14 11:50:06 2024 -0700
ath79: ecb1xxx: use nvmem
Userspace handling is deprecated.
Also switch LED to led-sources for simplicity.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20529
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
.../linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi | 30 +++++++++++++++++-----
.../generic/base-files/etc/board.d/02_network | 4 +--
.../etc/hotplug.d/firmware/10-ath9k-eeprom | 5 ----
.../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 3 +--
4 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi b/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi
index 2a00985ba7..ef7bd19e00 100644
--- a/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi
+++ b/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi
@@ -8,6 +8,7 @@
/ {
aliases {
+ label-mac-device = ð0;
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
@@ -35,12 +36,6 @@
default-state = "on";
};
- wifi2g {
- label = "blue:wifi2g";
- gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "phy1tpt";
- };
-
wifi5g {
label = "blue:wifi5g";
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
@@ -71,6 +66,14 @@
partition at 40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
+
+ nvmem-layout {
+ compatible = "u-boot,env";
+
+ macaddr_uboot_ethaddr: ethaddr {
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition at 50000 {
@@ -95,6 +98,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>;
};
@@ -120,6 +127,9 @@
phy-handle = <&phy5>;
phy-mode = "rgmii-id";
+ nvmem-cells = <&macaddr_uboot_ethaddr 0>;
+ nvmem-cell-names = "mac-address";
+
pll-data = <0x82000000 0x80000101 0x80001313>;
gmac-config {
@@ -142,5 +152,11 @@
&wmac {
status = "okay";
- qca,no-eeprom;
+ nvmem-cells = <&cal_art_1000>;
+ nvmem-cell-names = "calibration";
+
+ led {
+ led-sources = <13>;
+ led-active-low;
+ };
};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index fa158b839c..fcb56bd777 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -722,9 +722,7 @@ ath79_setup_macs()
;;
elecom,wab-i1750-ps|\
elecom,wab-s1167-ps|\
- elecom,wab-s600-ps|\
- engenius,ecb1200|\
- engenius,ecb1750)
+ elecom,wab-s600-ps)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
label_mac=$lan_mac
;;
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 798f2da136..b3181372be 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
@@ -15,11 +15,6 @@ case "$FIRMWARE" in
avm,fritzdvbc)
caldata_extract_reverse "urlader" 0x1541 0x440
;;
- engenius,ecb1200|\
- engenius,ecb1750)
- caldata_extract "art" 0x1000 0x440
- ath9k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env athaddr) 1)
- ;;
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 6153599907..c71ba436b4 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
@@ -49,8 +49,7 @@ case "$board" in
;;
engenius,ecb1200|\
engenius,ecb1750)
- [ "$PHYNBR" -eq 0 ] && \
- mtd_get_mac_ascii u-boot-env athaddr > /sys${DEVPATH}/macaddress
+ macaddr_add "$(mtd_get_mac_ascii u-boot-env athaddr)" ${PHYNBR} > /sys${DEVPATH}/macaddress
;;
enterasys,ws-ap3705i)
[ "$PHYNBR" -eq 0 ] && \
More information about the lede-commits
mailing list