ipq40xx: revert Cell-C RTL30VW to legacy caldata extraction
authorPawel Dembicki <paweldembicki@gmail.com>
Wed, 11 May 2022 15:29:21 +0000 (17:29 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 15 May 2022 14:32:25 +0000 (16:32 +0200)
commitaf425e42212d476dd95ec31f18d85b19004c9268
treef9947c4623e23a57dac659fad81fb9763a47e8b5
parent57efdd6a2d815d2491c5b7f22ffaeb6a845bfd0a
ipq40xx: revert Cell-C RTL30VW to legacy caldata extraction

This partially reverts
commit cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data").

After switching to nvmem RTL30VW, wifi was broken:

[   19.118319] ath10k_ahb a000000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[   19.118377] ath10k_ahb a000000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   19.130285] ath10k_ahb a000000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b
[   19.159092] ath10k_ahb a000000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=cellc,rtl30vw from ath10k/QCA4019/hw1.0/board-2.bin
[   19.238764] ath10k_ahb a000000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[   19.238847] ath10k_ahb a000000.wifi: failed to fetch board file: -12
[   19.247362] ath10k_ahb a000000.wifi: could not probe fw (-12)
[   20.190797] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[   20.190853] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   20.202893] ath10k_ahb a800000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b
[   20.231357] ath10k_ahb a800000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=cellc,rtl30vw from ath10k/QCA4019/hw1.0/board-2.bin
[   20.317318] ath10k_ahb a800000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[   20.317399] ath10k_ahb a800000.wifi: failed to fetch board file: -12
[   20.326098] ath10k_ahb a800000.wifi: could not probe fw (-12)

Bootloader mangles in NAND partitions and removes precal@X nodes in
working system:

root@OpenWrt:~# echo $(cat /sys/firmware/devicetree/base/soc/spi@78b5000/flash@0/partitions/partition@170000/label)
0:ART
root@OpenWrt:~# ls /sys/firmware/devicetree/base/soc/spi@78b5000/flash@0/partitions/partition@170000/
label  name   reg

Revert to legacy method fixed the problem.

Fixes: cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts