Convert the last remaining userspace eeprom for ath9k to nvmem. Well,
easily converted at least.
wifi MAC has to be handled in userspace as the kernel nvram driver works
on memory mapped addresses, not mtd ones.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14666
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
label = "art";
reg = <0x7f0000 0x10000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: calibration@1000 {
+ reg = <0x1000 0x440>;
+ };
+ };
};
};
};
ath9k: wifi@0,0 {
compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>;
- qca,no-eeprom;
- /* wifi MAC is stored in nvram */
+ nvmem-cells = <&cal_art_1000>;
+ nvmem-cell-names = "calibration";
};
};
avm,fritz300e)
caldata_extract_reverse "urloader" 0x1541 0x440
;;
- wd,mynet-wifi-rangeextender)
- caldata_extract "art" 0x1000 0x440
- ath9k_patch_mac $(nvram get wl0_hwaddr)
- ;;
*)
caldata_die "board $board is not supported yet"
;;
[ "$PHYNBR" -eq 1 ] && \
macaddr_add $base_mac 1 > /sys${DEVPATH}/macaddress
;;
+ wd,mynet-wifi-rangeextender)
+ echo $(nvram get wl0_hwaddr) > /sys${DEVPATH}/macaddress
+ ;;
wd,mynet-n600|\
wd,mynet-n750)
[ "$PHYNBR" -eq 0 ] && \