Skip to content

Commit 9869d6e

Browse files
authored
WCN3990 wifi: device-matched wlanmdsp and SOM-tuned board data (#126)
* ath10k/WCN3990: use device-matched wlanmdsp.mbn to fix 5 GHz DFS crash The generic linux-firmware wlanmdsp.mbn (WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1, 2018-07-19) crashes the WLAN Q6/DSP on 5 GHz DFS channels with 'halphy_caldb.c:3021: Assertion 0 failed', producing the ath10k 'failed to synchronize setup for vdev 0 restart 0: -110' / vdev-start failure loop. 2.4 GHz is unaffected. wlanmdsp.mbn is the vendor-signed WLAN firmware image sideloaded to the modem DSP via tqftpserv; per the ath10k list it is signed for a specific SoC/device and the generic linux-firmware copy is not calibration-matched to this board's RF, so its 5 GHz PHY cal DB asserts. Board data is not the cause: the board-2.bin entry ath10k selects (bus=snoc,qmi-board-id=ff,qmi-chip-id=30214) is already byte-identical to the device's /firmware/image/bdwlan.bin. Replace the embedded wlanmdsp.mbn with the device's own downstream image (WLAN.HL.2.0.c10-00459-QCAHLSWMTPLZ-1, from /firmware/image/wlanmdsp.mbn). firmware-5.bin and board-2.bin are unchanged (same WLAN.HL.2.0 interface descriptor). No config change: the EXTRA_FIRMWARE path is identical, only the blob contents differ. This blob also feeds the rootfs /lib/firmware copy via the Dockerfile, so both the built-in and userspace copies match. * ath10k/WCN3990: use comma's SOM-tuned board data via calibration-variant 5 GHz DFS vdev start still crashed the WLAN DSP (halphy_caldb.c:3026 assert) after the wlanmdsp swap. Root cause: wrong board/cal data. Mainline was serving the generic default board-2.bin entry (bus=snoc,qmi-board-id=ff,qmi-chip-id=30214 == generic bdwlan.bin), but AGNOS does NOT use bdwlan.bin: comma ships RF-tuned board files in /usr/comma/wlan/ (bdwlan.b00, bdwlan.b01, agnos-builder PRs #199 'Custom bdwlan per SOM type' and #377 'B01 wlan config') and patches cnss_daemon to select /usr/comma/wlan/bdwlan.b%02x by the SOM id read from /sys/.../vendor:gpio-som-id/som_id (4 GPIO straps, tlmm 105-108, bit0 first; driver: agnos-kernel-sdm845 gpio_som_id.c). The legacy mici DT has no wlan board-id; QMI board_id is 0xff on both stacks. mici SOM id determined as 1 -> bdwlan.b01: tlmm gpio105 (bit0) reads 1 against a pull-down (hard-strapped high) while gpio106-108 read 0; only b00/b01 exist, so id=1 is the only consistent hit. bdwlan.b01 differs from generic bdwlan.bin in 298 bytes (RF/cal tuning). Implementation: - append two variant-keyed entries to board-2.bin (upstream entries untouched): bus=snoc,...,qmi-chip-id=30214,variant=comma-mici -> bdwlan.b01 bus=snoc,...,qmi-chip-id=30214,variant=comma-tizi -> bdwlan.b00 - set qcom,calibration-variant in each board's &wifi DT node; 6.18 ath10k_core_check_dt picks it up and tries the variant name first. tizi->b00 mapping is inferred from PR ordering (b00 predates b01); tizi was unreachable to verify its SOM id. mici is verified as above. Watch on flash-test dmesg: 'board_file api 2' with non-zero crc32, no halphy_caldb assert, vdev 0 starts on freq 5500.
1 parent 9bd8869 commit 9869d6e

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

kernel/dts/sdm845-comma-mici.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@
5959
&uart3 {
6060
status = "okay";
6161
};
62+
63+
&wifi {
64+
qcom,calibration-variant = "comma-mici";
65+
};

kernel/dts/sdm845-comma-tizi.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,7 @@
6363
remote-endpoint = <&panel_in>;
6464
data-lanes = <0 1 2 3>;
6565
};
66+
67+
&wifi {
68+
qcom,calibration-variant = "comma-tizi";
69+
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:867e1010787764020653812167d93f5952cbbea05f576209d953d8c9322f18aa
3-
size 867116
2+
oid sha256:a6f2b5ba06d33bae9d0ec525b84b267ff0a26f4fde4e96a5b586e73096cfd769
3+
size 905596
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:92e1501254e6de78c0f2e2cf091507d488b608d07e53acd14813a82744823ec2
3-
size 3725044
2+
oid sha256:aa7a7b3ef5e4c43a242e7bca199b1bb358c1111ddfc39dcdecd9eba7473feb31
3+
size 3379868

0 commit comments

Comments
 (0)