]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: enterasys,ws-ap3805i: use nvmem 16286/head
authorRosen Penev <rosenp@gmail.com>
Wed, 1 Oct 2025 20:22:33 +0000 (13:22 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 22 Oct 2025 22:04:47 +0000 (00:04 +0200)
Userspace handling is deprecated.

Use ath9k LED instead of specifying a generic one.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16286
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh

index 9df72df66ec7d5634f7e162bbb2f6e8a797c0337..b2802bb855a37aaa3219ab8e18696ee71c75cb07 100644 (file)
                        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 {
 &wmac {
        status = "okay";
 
-       qca,no-eeprom;
+       nvmem-cells = <&cal_art_1000>;
+       nvmem-cell-names = "calibration";
+
+       led {
+               led-sources = <22>;
+               led-active-low;
+       };
 };
 
 &pcie0 {
 
        pll-data = <0x82000000 0x80000101 0x80001313>;
 
+       nvmem-cells = <&macaddr_uboot_ethaddr>;
+       nvmem-cell-names = "mac-address";
+
        gmac-config {
                device = <&gmac>;
                rgmii-enabled = <1>;
                        };
 
                        partition@100000 {
+                               compatible = "u-boot,env";
                                label = "cfg1";
                                reg = <0x100000 0x40000>;
                                read-only;
+
+                               macaddr_uboot_ethaddr: ethaddr {
+                               };
                        };
 
                        partition@140000 {
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       cal_art_1000: calibration@1000 {
+                                               reg = <0x1000 0x440>;
+                                       };
+
                                        cal_art_5000: calibration@5000 {
                                                reg = <0x5000 0x844>;
                                        };
index d6ae5b1aa193cf4b5904b1d9f711d8f2e47297ce..a6c1eff2b6aaca1a208a1fbb08afa2d649c59392 100644 (file)
@@ -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
index dcebc16679ad9cf0fd33431a97d825390c98a040..ed8cc44783167c03edb67c0943cc4b58908796cc 100644 (file)
@@ -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|\
index 2d68e02eafd0c0d0a32c13f0f3fc70f080197a84..4b6cb7b6ede0fddc7e0f7440f4beab9d0962d61d 100644 (file)
@@ -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)
                ;;