ath79: D-Link DAP-2660 A1: convert ath10k caldata to nvmem
authorSander Vanheule <sander@svanheule.net>
Sat, 11 Jun 2022 10:42:14 +0000 (12:42 +0200)
committerSander Vanheule <sander@svanheule.net>
Sat, 18 Jun 2022 09:57:21 +0000 (11:57 +0200)
Add the PCIe node for the ath10k radio to the devicetree, and refer to
the art partition for the calibration data using nvmem-cells.

MAC address assignment is moved to '10_fix_wifi_mac', so the device can
then be removed from the caldata extraction script '11-ath10k-caldata'.

Cc: Sebastian Schaper <openwrt@sebastianschaper.net>
Tested-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

index 039007942631b1c127229d7dbb019c09602f23c7..93e2fc0d974dad256599bbb3a1cd9a5d866247d1 100644 (file)
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0 0 0 0 0>;
+
+               nvmem-cells = <&cal_ath10k>;
+               nvmem-cell-names = "calibration";
+       };
+};
+
+&art {
+       cal_ath10k: calibration@5000 {
+               reg = <0x5000 0x844>;
+       };
 };
index 1ce3f00c7e4f67141826f7f8bec02a26ddab4d7c..079b9ab150d40a34757ae3ce3b177bd1e6fd643b 100644 (file)
@@ -67,7 +67,6 @@ case "$FIRMWARE" in
                caldata_extract "art" 0x5000 0x844
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) -1)
                ;;
-       dlink,dap-2660-a1|\
        dlink,dap-2695-a1|\
        dlink,dap-3662-a1)
                caldata_extract "art" 0x5000 0x844
index d5a2471a99a95b9e047893e2bc68b6c8037e5226..fbd5344a1e8262117075006a389d6d926ee55365 100644 (file)
@@ -26,12 +26,12 @@ case "$board" in
        dlink,dap-3320-a1)
                mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
                ;;
-       dlink,dap-2660-a1|\
        dlink,dap-2695-a1|\
        dlink,dap-3662-a1)
                [ "$PHYNBR" -eq 1 ] && \
                        mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
                ;;
+       dlink,dap-2660-a1|\
        dlink,dap-2680-a1)
                [ "$PHYNBR" -eq 0 ] && \
                        mtd_get_mac_ascii bdcfg "wlanmac_a" > /sys${DEVPATH}/macaddress