diff --git a/target/linux/ath79/dts/ar9330_dlink_dir-505.dts b/target/linux/ath79/dts/ar9330_dlink_dir-505.dts index c6fc0d97aa..1362ffea67 100644 --- a/target/linux/ath79/dts/ar9330_dlink_dir-505.dts +++ b/target/linux/ath79/dts/ar9330_dlink_dir-505.dts @@ -73,6 +73,9 @@ ð0 { status = "okay"; + nvmem-cells = <&macaddr_mac_4 0>; + nvmem-cell-names = "mac-address"; + gmac-config { device = <&gmac>; switch-phy-addr-swap = <0>; @@ -108,12 +111,34 @@ label = "art"; reg = <0x10000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: calibration@1000 { + reg = <0x1000 0x440>; + }; + }; }; - mac: partition@20000 { + partition@20000 { label = "mac"; reg = <0x20000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_mac_4: macaddr@4 { + compatible = "mac-base"; + reg = <0x4 0x11>; + #nvmem-cell-cells = <1>; + }; + }; }; partition@30000 { @@ -139,5 +164,7 @@ &wmac { status = "okay"; - qca,no-eeprom; + + nvmem-cells = <&cal_art_1000>, <&macaddr_mac_4 0>; + nvmem-cell-names = "calibration", "mac-address"; }; 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 020fc98b0f..7f591c2f2c 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 @@ -696,9 +696,6 @@ ath79_setup_macs() dlink,dir-629-a1) wan_mac=$(mtd_get_mac_text "mfcdata" 0x6a) ;; - dlink,dir-505) - lan_mac=$(mtd_get_mac_text "mac" 0x4) - ;; dlink,dir-825-c1|\ dlink,dir-835-a1) wan_mac=$(mtd_get_mac_text "mac" 0x18) 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 9dad263c39..8e6494548b 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 avm,fritzdvbc) caldata_extract_reverse "urlader" 0x1541 0x440 ;; - dlink,dir-505) - caldata_extract "art" 0x1000 0x440 - ath9k_patch_mac $(mtd_get_mac_text "mac" 0x4) - ;; iodata,wn-ac1167dgr|\ iodata,wn-ac1600dgr|\ iodata,wn-ac1600dgr2|\