[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] Bluetooth: hci_qca: Add support for Qualcomm Bluetooth SoC QCA2066
Hi Tim,

On Mon, Feb 20, 2023 at 1:04 AM Tim Jiang (QUIC)
<> wrote:
> Steve, sorry I does not know why I can not send out the email as have some warning , so I removed the code part, you can refer to my inline comments.

No worries, I understand!

> Regards.
> Tim
> >This patch adds support for QCA2066 firmware patch and nvm downloading.
> Is this actually correct? I ask because here I have the WCN6855 in the Lenovo Thinkpad X13s, and when attempting to use this driver, I end up with a board id of 08c, and according to the firmware, we should have a board id of b8c.
> [Tim] correct, I does not know where you get the WCN6855 firmware, for our side, we will use different name rule for android and linux , for android , we will add "b" in the front of board id, for linux we will not add this bit.

So, the Thinkpad X13s is... well, it's a Thinkpad, and it comes with
Windows. So the firmware that we have, comes from.... them? qualcomm?
I honestly don't know the provenance of it, just that I grabbed the
files from the Windows partition:

bsrc_bt.bin hpnv10.b03 hpnv20.b80 hpnv20.b8f hpnv21.ba2 hpnv21g.b9f
hpnv21g.bb8 hpbtfw10.tlv hpnv10.b04 hpnv20.b82 hpnv20.bin hpnv21.ba3
hpnv21g.ba0 hpnv21g.bin hpbtfw10.ver hpnv10.b06 hpnv20.b84 hpnv21.b8c
hpnv21.ba4 hpnv21g.ba1 hpbtfw20.tlv hpnv10.b07
hpnv20.b85 hpnv21.b9f hpnv21.bb8 hpnv21g.ba2 qcbtfmuart_hsp8280.inf
hpbtfw20.ver hpnv10.b08 hpnv20.b8c hpnv21.ba0 hpnv21.bin hpnv21g.ba3
qcbtfmuart_hsp8280.PNF hpbtfw21.tlv hpnv10.bin hpnv20.b8e hpnv21.ba1
hpnv21g.b8c hpnv21g.ba4 qcbtfmuart_hsp8280.sys

So, all of the nvm patches that are provided by them with the windows
driver, all start with 'b'.

> I'm not sure how to phrase this, and just thinking out loud - if the qca2066 is the same as the wcn6855, just with an additional antenna, perhaps there should be some way to indicate it? In my patchset, I had a print of the name "Setting up wcn6855" and locally, I combined your patch with mine, although dropping the above qca2066 hunks in favor of my already written wcn6855 hunks, and then combined the two in the print so it says "Setting up qca2066/wcn6855" - is there any way to differentiate between what qti considers a qca2066 and what is considered the wcn6855?
> [Tim] steve ,as I mentioned previously, we have different board id for qca2066 and wcn6855 , and then which will use different nvm config files based on board id.
I get that; I'm thinking of end users, who may know that they have a
wcn6855, but if the messages are qca2066, they may not understand that
it's the same chip.

> Below is dmesg output, and so if we go by the wifi device check, we end up seeing that we get
> chip_id 0x2
> chip_family 0xb
> board_id 0x8c
> soc_id 0x400c0210
> [ 9.724834] ath11k_pci 0006:01:00.0: chip_id 0x2 chip_family 0xb board_id 0x8c soc_id 0x400c0210
> [ 9.724850] ath11k_pci 0006:01:00.0: fw_version 0x110b196e fw_build_timestamp 2022-12-22 12:54 fw_build_id WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
> [ 9.742346] ath11k_pci 0006:01:00.0: failed to fetch board data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=140 from ath11k/WCN6855/hw2.1/board-2.bin
> [ 9.742358] ath11k_pci 0006:01:00.0: failed to fetch board.bin from WCN6855/hw2.1
> [ 9.742361] ath11k_pci 0006:01:00.0: qmi failed to fetch board file: -2
> [ 9.742363] ath11k_pci 0006:01:00.0: failed to load board data file: -2
> But with your driver (mine too for that matter, but then it's just doing the same bid bits)...
> [ 9.081003] Bluetooth: hci0: Frame reassembly failed (-84)
> [ 9.141992] Bluetooth: hci0: QCA Product ID :0x00000013
> [ 9.141999] Bluetooth: hci0: QCA SOC Version :0x400c0210
> [ 9.142003] Bluetooth: hci0: QCA ROM Version :0x00000201
> [ 9.142007] Bluetooth: hci0: QCA Patch Version:0x000038e6
> [ 9.170612] Bluetooth: hci0: QCA controller version 0x02100201
> [ 9.170620] Bluetooth: hci0: QCA Downloading qca/hpbtfw21.tlv
> [ 9.760537] Bluetooth: hci0: QCA board ID len 2,id = 0 8c
> [ 9.760547] Bluetooth: hci0: QCA Downloading qca/hpnv21.08c
> [ 9.760638] bluetooth hci0: Direct firmware load for qca/hpnv21.08c failed with error -2
> [ 9.760640] Bluetooth: hci0: QCA Failed to request file: qca/hpnv21.08c (-2)
> [ 9.760643] Bluetooth: hci0: QCA Failed to download NVM (-2)
> Is there another way to check the board id or board family? Because it's not coming up with the correct one here.
> [Tim] as my comments above, the read board id way is correct, only we have different name rule for android and linux .

Right, I get that reading the board id is the right way - and if you
see in my Windows firmware above (the firmware submitted to
linux-firmware by you only seems to have nvm patches that start with
'3', and no others..) I'm saying, should we also read the chip_family
somehow, since the WiFi firmware seems to properly notice that we are
chip_family 0xb, however, the bluetooth driver just returns '0'. And
neither the submitted firmware, nor the firmware that Lenovo/Qualcomm
ship to Windows users, have nvm patches that start with 0.

An additional note, neither my driver, nor yours, seems to work with
BLE. I cannot connect a pair of AirPods to my Thinkpad in Linux, but
I am able to do just fine in the Windows installation. I'm not sure
if this is a known limitation already in linux or not.

> --steev

 \ /
  Last update: 2023-03-27 00:29    [W:0.045 / U:3.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site