diff --git a/target/linux/ath79/dts/ar9344_moxa_awk-1137c.dts b/target/linux/ath79/dts/ar9344_moxa_awk-1137c.dts index d67e9f2a52..50d00dd088 100644 --- a/target/linux/ath79/dts/ar9344_moxa_awk-1137c.dts +++ b/target/linux/ath79/dts/ar9344_moxa_awk-1137c.dts @@ -157,6 +157,16 @@ label = "art"; reg = <0xfe0000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: calibration@1000 { + reg = <0x1000 0x440>; + }; + }; }; partition@ff0000 { @@ -174,5 +184,7 @@ &wmac { status = "okay"; - qca,no-eeprom; + + nvmem-cells = <&cal_art_1000>; + nvmem-cell-names = "calibration"; }; 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 fec73b3768..46a10d3600 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 @@ -27,10 +27,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x1000 0x440 ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr) ;; - moxa,awk-1137c) - caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env mac_addr) - ;; *) caldata_die "board $board is not supported yet" ;; 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 e0f8be4660..fc64b5235d 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 @@ -98,6 +98,10 @@ case "$board" in [ "$PHYNBR" -eq 1 ] && \ mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress ;; + moxa,awk-1137c) + [ "$PHYNBR" -eq 0 ] && \ + mtd_get_mac_ascii u-boot-env mac_addr > /sys${DEVPATH}/macaddress + ;; phicomm,k2t) [ "$PHYNBR" -eq 0 ] && \ k2t_get_mac "5g_mac" > /sys${DEVPATH}/macaddress