wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
};
};
label = "art";
reg = <0x7f0000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
};
};
label = "radiocfg";
reg = <0xff0000 0x10000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_radiocfg_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
};
};
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0 0 0 0 0>;
+ nvmem-cells = <&cal_radiocfg_5000>;
+ nvmem-cell-names = "calibration";
};
};
&pcie0 {
status = "okay";
+
+ wifi@0,0 {
+ compatible = "qcom,ath10k";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
+ };
};
&spi {
label = "art";
reg = <0x050000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
partition@60000 {
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0 0 0 0 0>;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
};
};
label = "art";
reg = <0x3fc0000 0x40000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
};
};
label = "art";
reg = <0xff0000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
};
};
wifi@0,0 {
compatible = "pci168c,003c";
reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
};
};
debounce-interval = <60>;
};
};
+
+&pcie1 {
+ wifi@0,0 {
+ /delete-property/ nvmem-cells;
+ /delete-property/ nvmem-cell-names;
+ };
+};
label = "art";
reg = <0x040000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
partition@50000 {
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0 0 0 0 0>;
- qca,no-eeprom;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
};
};
label = "art";
reg = <0xff0000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
};
};
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0 0 0 0 0>;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
};
};
label = "art";
reg = <0x050000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
partition@60000 {
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0 0 0 0 0>;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
qcom,ath10k-calibration-variant = "ZyXEL-NBG6716";
};
};
label = "art";
reg = <0xff0000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
};
};
wifi@0,0 {
compatible = "qcom,ath10k";
reg = <0x0 0 0 0 0>;
- qca,no-eeprom;
+ nvmem-cells = <&cal_art_5000>;
+ nvmem-cell-names = "calibration";
};
};
label = "board_data";
reg = <0x7e0000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_board_data_880: macaddr@880 {
+ compatible = "mac-base";
+ reg = <0x880 0x11>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
art: partition@7f0000 {
label = "art";
reg = <0x7f0000 0x010000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_5000: calibration@5000 {
+ reg = <0x5000 0x844>;
+ };
+ };
};
};
};
&pcie {
status = "okay";
+
+ wifi@0,0 {
+ compatible = "qcom,ath10k";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_art_5000>, <&macaddr_board_data_880 0>;
+ nvmem-cell-names = "calibration", "mac-address";
+ };
};
&wmac {
board=$(board_name)
case "$FIRMWARE" in
-"ath10k/cal-pci-0000:00:00.0.bin")
- case $board in
- engenius,ecb1200|\
- engenius,ecb1750)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(mtd_get_mac_ascii u-boot-env athaddr)
- ;;
- engenius,ews511ap)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) 1)
- ;;
- extreme-networks,ws-ap3805i)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR0)
- ;;
- iodata,wn-ac1167dgr|\
- iodata,wn-ac1600dgr2|\
- sitecom,wlr-7100|\
- zyxel,nbg6616)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
- ;;
- nec,wg800hp)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(mtd_get_mac_text board_data 0x880)
- ;;
- qihoo,c301)
- caldata_extract "radiocfg" 0x5000 0x844
- ath10k_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
- ;;
- esac
- ;;
-"ath10k/cal-pci-0000:01:00.0.bin")
- case $board in
- sitecom,wlr-8100)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
- ;;
- esac
- ;;
"ath10k/pre-cal-pci-0000:00:00.0.bin")
case $board in
dlink,dir-842-c1|\
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
;;
+ engenius,ecb1200|\
+ engenius,ecb1750)
+ [ "$PHYNBR" -eq 0 ] && \
+ mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
+ ;;
engenius,epg5000|\
engenius,esr1200|\
engenius,esr1750|\
engenius,esr900)
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" "$PHYNBR" > /sys${DEVPATH}/macaddress
;;
- iodata,wn-ac1600dgr)
+ engenius,ews511ap)
+ [ "$PHYNBR" -eq 0 ] && \
+ macaddr_add $(cat /sys/class/net/eth0/address) 1 > /sys${DEVPATH}/macaddress
+ ;;
+ extreme-networks,ws-ap3805i)
+ [ "$PHYNBR" -eq 0 ] && \
+ mtd_get_mac_ascii cfg1 RADIOADDR0 > /sys${DEVPATH}/macaddress
+ ;;
+ iodata,wn-ac1167dgr|\
+ iodata,wn-ac1600dgr|\
+ iodata,wn-ac1600dgr2|\
+ sitecom,wlr-7100|\
+ sitecom,wlr-8100|\
+ zyxel,nbg6616)
# There is no eeprom data for 5 GHz wlan in "art" partition
# which would allow to patch the macaddress
[ "$PHYNBR" -eq 0 ] && \
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
;;
nec,wf1200cr|\
- nec,wg1200cr)
+ nec,wg1200cr|\
+ qihoo,c301)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
;;
+++ /dev/null
-#!/bin/sh
-
-[ -e /lib/firmware/$FIRMWARE ] && exit 0
-
-. /lib/functions/caldata.sh
-
-board=$(board_name)
-
-case "$FIRMWARE" in
-"ath10k/cal-pci-0000:00:00.0.bin")
- case $board in
- zyxel,emg2926-q10a|\
- zyxel,nbg6716)
- caldata_extract "art" 0x5000 0x844
- ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
- ;;
- esac
- ;;
-*)
- exit 1
- ;;
-esac
;;
zyxel,emg2926-q10a|\
zyxel,nbg6716)
- # Set mac address for 2.4g device
+ ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
+ [ "$PHYNBR" -eq 0 ] && \
+ macaddr_add $ethaddr 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" -eq 1 ] && \
- mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
+ echo -n $ethaddr > /sys${DEVPATH}/macaddress
;;
esac