diff mbox series

Meshed WiFi with QCA9377 (USB/SDIO)

Message ID alpine.LRH.2.23.451.2009141438290.19926@sara.hytechdrive.se (mailing list archive)
State New, archived
Headers show
Series Meshed WiFi with QCA9377 (USB/SDIO) | expand

Commit Message

Peter Åstrand Sept. 14, 2020, 1:47 p.m. UTC
Hi. We are designing an IOT system from scratch and want to select a WiFi 
module that works well with 80211s. ath9k is apparently tried and tested, 
but mostly covers older modules which are no longer available. We are 
evaluating ath10k and in particular QCA9377. Does that sound like a good 
choice, or do you have any other recommendations?


For the final board, we are planning to use QCA9377-3 (SDIO). As I 
understand it, this should work with Linux 5.7 and later? We will test 
using https://wireless.murata.com/type-1pj.html soon.


In the mean time, I tried to test QCA9377-7 (USB) using 
https://www.8devices.com/products/blue-bean unfortunately without success. 
I started out with Linux 5.7 and modified usb.c:

Unfortunately this did not work: ath10k_usb is loaded but, but no net 
device is created. No error messages; nothing. Firmware package is Debian 
10 firmware-atheros 20190114-2. I also noticed 
http://lists.infradead.org/pipermail/ath10k/2017-December/010672.html and 
as far as I can tell, this was never merged.


Br,
Peter Åstrand

Comments

Peter Åstrand Sept. 15, 2020, 8:35 a.m. UTC | #1
> Hi. We are designing an IOT system from scratch and want to select a WiFi 
> module that works well with 80211s. ath9k is apparently tried and tested, but 
> mostly covers older modules which are no longer available. We are evaluating 
> ath10k and in particular QCA9377. Does that sound like a good choice, or do 
> you have any other recommendations?
>
>
> For the final board, we are planning to use QCA9377-3 (SDIO). As I understand 
> it, this should work with Linux 5.7 and later? We will test using 
> https://wireless.murata.com/type-1pj.html soon.

I have tested with 1PJ now, even using kernel 5.8.9. "iw list" shows a lot 
of information, but "wlan0" is down and it is not possible to bring it up:

[   48.954598] mmc0: Internal clock never stabilised.
[   48.954604] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[   48.954618] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x0000c001
[   48.954631] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
[   48.954643] mmc0: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
[   48.954656] mmc0: sdhci: Present:   0x01f70000 | Host ctl: 0x00000000
[   48.954668] mmc0: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
[   48.954680] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00001003
[   48.954691] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
[   48.954704] mmc0: sdhci: Int enab:  0x00ff0083 | Sig enab: 0x00ff0083
[   48.954716] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[   48.954729] mmc0: sdhci: Caps:      0x21e608b2 | Caps_1:   0x00002077
[   48.954741] mmc0: sdhci: Cmd:       0x00000000 | Max curr: 0x00000064
[   48.954753] mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[   48.954764] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[   48.954771] mmc0: sdhci: Host ctl2: 0x00000000
[   48.954773] mmc0: sdhci: ============================================

Then:

[   49.054418] mmc0: queuing unknown CIS tuple 0x80 (1 bytes)
[   49.054553] mmc0: queuing unknown CIS tuple 0x81 (1 bytes)
[   49.054686] mmc0: queuing unknown CIS tuple 0x82 (1 bytes)
[   49.054731] mmc0: new high speed SDIO card at address 0001
[   49.126083] ath10k_sdio mmc0:0001:1: qca9377 hw1.1 sdio target 0x05020001 chip_id 0x00000000 sub 0000:0000
[   49.126087] ath10k_sdio mmc0:0001:1: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
[   49.127074] ath10k_sdio mmc0:0001:1: firmware ver WLAN.TF.1.1.1-00061-QCATFSWPZ-1 api 5 features ignore-otp crc32 7746e551
[   49.273737] ath10k_sdio mmc0:0001:1: failed to fetch board data for bus=sdio,vendor=0271,device=0701,subsystem-vendor=0000,subsystem-device=0000 from ath10k/QCA9377/hw1.0/board-2.bin
[   49.274018] ath10k_sdio mmc0:0001:1: board_file api 1 bmi_id N/A crc32 544289f7
[   50.385004] ath10k_sdio mmc0:0001:1: htt-ver 3.32 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[   51.393850] ath10k_sdio mmc0:0001:1: suspend timed out - target pause event never came
[   54.561851] ath10k_sdio mmc0:0001:1: sdio irq disable request timed out

And more errors:

[   60.450124] ath10k_sdio mmc0:0001:1: failed to write to address 0x12ff5: -110
[   60.450146] ath10k_sdio mmc0:0001:1: failed to write skb to 0x12ff5 asynchronously: -110
[   60.450440] ath10k_sdio mmc0:0001:1: failed to write to address 0x1c7e8: -110
[   60.450459] ath10k_sdio mmc0:0001:1: failed to write skb to 0x1c7e8 asynchronously: -110
[   60.451043] ath10k_sdio mmc0:0001:1: failed to write to address 0x828: -110
[   60.451058] ath10k_sdio mmc0:0001:1: failed to write skb to 0x828 asynchronously: -110
[   60.451205] ath10k_sdio mmc0:0001:1: failed to read from address 0x868: -110
[   60.451210] ath10k_sdio mmc0:0001:1: failed to read fifo/chip control register: -110
[   60.451388] ath10k_sdio mmc0:0001:1: failed to read from address 0x868: -110
[   60.451393] ath10k_sdio mmc0:0001:1: failed to read fifo/chip control register: -110

And:

[   60.584617] ath: EEPROM regdomain sanitized
[   60.584618] ath: EEPROM regdomain: 0x64
[   60.584619] ath: EEPROM indicates we should expect a direct regpair map
[   60.584622] ath: Country alpha2 being used: 00
[   60.584624] ath: Regpair used: 0x64
[   61.977071] ath10k_sdio mmc0:0001:1: settings HTC version failed
[   61.977080] ath10k_sdio mmc0:0001:1: Could not init core: -22

Any ideas?


I have used firmware from 
https://github.com/kvalo/ath10k-firmware/tree/master/QCA9377/hw1.0/untested

I have also been provided with these files (which I suppose are designed 
for qcacld):

1PJ-bdwlan30-20190527.bin
rampatch_tlv_tf_1.1.tlv
silicon_QDART-1PJ_20190527.bin

Does that help?

Best regards,
Peter Astrand
Peter Åstrand Sept. 18, 2020, 7:42 a.m. UTC | #2
> In the mean time, I tried to test QCA9377-7 (USB) using 
> https://www.8devices.com/products/blue-bean unfortunately without success. I 
> started out with Linux 5.7 and modified usb.c:
>
> --- usb.c.org	2020-09-14 11:58:10.905346540 +0200
> +++ usb.c	2020-09-14 15:39:51.555416792 +0200
> @@ -1083,6 +1083,7 @@
>  /* table of devices that work with this driver */
>  static struct usb_device_id ath10k_usb_ids[] = {
> 	{USB_DEVICE(0x13b1, 0x0042)}, /* Linksys WUSB6100M */
> +	{USB_DEVICE(0x0cf3, 0xe500)}, /* 8devices BLUE bean */
> 	 { /* Terminating entry */ },
>  };
>
> Unfortunately this did not work: ath10k_usb is loaded but, but no net device 
> is created. No error messages; nothing. Firmware package is Debian 10 
> firmware-atheros 20190114-2. I also noticed 
> http://lists.infradead.org/pipermail/ath10k/2017-December/010672.html and as 
> far as I can tell, this was never merged.

The patch above is bad; the correct product ID for BLUE bean is 0x9378. 
QCA9377_1_0_DEVICE_ID in hw.h also needs update. (Or perhaps add a 
QCA9377_1_1_DEVICE_ID)

I have now done many tests using both BLUE bean as well as the Linksys 
WUSB6100M, without success. I've created custom firmware and board files 
based on the instructions on 
https://github.com/erstrom/linux-ath/wiki/Firmware, so that shouldn't be 
the problem. Tested both the https://github.com/erstrom/linux-ath.git and 
https://github.com/kvalo/ath10k.git master branches. Regardless, I get the 
same kind of error:

[   35.350683] usb 1-1.2.1: Failed to submit usb control message: -110
[   35.350686] usb 1-1.2.1: unable to send the bmi data to the device: -110
[   35.350687] usb 1-1.2.1: unable to write to the device (-110)
[   35.350688] usb 1-1.2.1: settings HTC version failed
[   35.350691] usb 1-1.2.1: Could not init core: -22

I have seen https://github.com/erstrom/linux-ath/issues/6. This is the 
same type of problem I believe, except that I'm not trying AP mode.

My conclusion is that ath10k with QCA9377-7 (USB) devices are not working 
a this point. Just as 
https://wireless.wiki.kernel.org/en/users/drivers/ath10k says :-)


Will try SDIO based RED bean as soon as it arrives.


Best regards,
Peter
Peter Åstrand Sept. 21, 2020, 2:42 p.m. UTC | #3
On Fri, 18 Sep 2020, Peter Astrand wrote:

> Will try SDIO based RED bean as soon as it arrives.

With 5.9.0-rc5-wt-ath+ (master) and firmware and board file generated from 
https://github.com/8devices/qcacld-2.0/tree/CNSS.LEA.NRT_3.0/firmware_bin/sdio, 
the firmware crashes as below:


[ 2413.397804] sdio_read_cis: 1 callbacks suppressed
[ 2413.397807] mmc0: queuing unknown CIS tuple 0x01 (3 bytes)
[ 2413.400926] mmc0: queuing unknown CIS tuple 0x1a (5 bytes)
[ 2413.402180] mmc0: queuing unknown CIS tuple 0x1b (8 bytes)
[ 2413.402431] mmc0: queuing unknown CIS tuple 0x14 (0 bytes)
[ 2413.422846] mmc0: Internal clock never stabilised.
[ 2413.422850] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 2413.422859] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x0000c001
[ 2413.422870] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
[ 2413.422879] mmc0: sdhci: Argument:  0x80002603 | Trn mode: 0x00000000
[ 2413.422890] mmc0: sdhci: Present:   0x01ff0000 | Host ctl: 0x00000004
[ 2413.422901] mmc0: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
[ 2413.422912] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000003
[ 2413.422919] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
[ 2413.422929] mmc0: sdhci: Int enab:  0x00ff0083 | Sig enab: 0x00ff0083
[ 2413.422940] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 2413.422952] mmc0: sdhci: Caps:      0x21e608b2 | Caps_1:   0x00002077
[ 2413.422962] mmc0: sdhci: Cmd:       0x0000341a | Max curr: 0x00000064
[ 2413.422971] mmc0: sdhci: Resp[0]:   0x00001003 | Resp[1]:  0x00000000
[ 2413.422982] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[ 2413.422988] mmc0: sdhci: Host ctl2: 0x00000000
[ 2413.422989] mmc0: sdhci: ============================================
[ 2413.443025] mmc0: Internal clock never stabilised.
[ 2413.443029] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 2413.443042] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x0000c001
[ 2413.443053] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
[ 2413.443064] mmc0: sdhci: Argument:  0x80002603 | Trn mode: 0x00000000
[ 2413.443076] mmc0: sdhci: Present:   0x01ff0000 | Host ctl: 0x00000004
[ 2413.443087] mmc0: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
[ 2413.443098] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000003
[ 2413.443109] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
[ 2413.443120] mmc0: sdhci: Int enab:  0x00ff0083 | Sig enab: 0x00ff0083
[ 2413.443131] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 2413.443142] mmc0: sdhci: Caps:      0x21e608b2 | Caps_1:   0x00002077
[ 2413.443154] mmc0: sdhci: Cmd:       0x0000341a | Max curr: 0x00000064
[ 2413.443165] mmc0: sdhci: Resp[0]:   0x00001003 | Resp[1]:  0x00000000
[ 2413.443175] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[ 2413.443182] mmc0: sdhci: Host ctl2: 0x00000000
[ 2413.443182] mmc0: sdhci: ============================================
[ 2413.446176] mmc0: queuing unknown CIS tuple 0x80 (1 bytes)
[ 2413.446323] mmc0: queuing unknown CIS tuple 0x81 (1 bytes)
[ 2413.446458] mmc0: queuing unknown CIS tuple 0x82 (1 bytes)
[ 2413.446509] mmc0: new high speed SDIO card at address 0001
[ 2413.476637] ath10k_sdio mmc0:0001:1: qca9377 hw1.1 sdio target 0x05020001 chip_id 0x00000000 sub 0000:0000
[ 2413.476639] ath10k_sdio mmc0:0001:1: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[ 2413.477069] ath10k_sdio mmc0:0001:1: firmware ver  api 5 features ignore-otp crc32 21a4f95a
[ 2413.628310] ath10k_sdio mmc0:0001:1: board_file api 2 bmi_id N/A crc32 91463f7b
[ 2414.205864] ath10k_sdio mmc0:0001:1: firmware crashed! (guid 74234224-1314-444d-842d-2ebb7b0c9aee)
[ 2414.205870] ath10k_sdio mmc0:0001:1: qca9377 hw1.1 sdio target 0x05020001 chip_id 0x00000000 sub 0000:0000
[ 2414.205871] ath10k_sdio mmc0:0001:1: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[ 2414.206311] ath10k_sdio mmc0:0001:1: firmware ver 1.0.0.591 api 5 features ignore-otp crc32 21a4f95a
[ 2414.206318] ath10k_sdio mmc0:0001:1: board_file api 2 bmi_id N/A crc32 91463f7b
[ 2414.206320] ath10k_sdio mmc0:0001:1: htt-ver 0.0 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1

Any suggestions?

Br,
Peter
Peter Åstrand Sept. 27, 2020, 9:13 p.m. UTC | #4
More RED bean testing:


> With 5.9.0-rc5-wt-ath+ (master) and firmware and board file generated from 
> https://github.com/8devices/qcacld-2.0/tree/CNSS.LEA.NRT_3.0/firmware_bin/sdio, 
> the firmware crashes as below:

I have changed hardware now, from:

Dell E6430 (O2 Micro, Inc. OZ600FJ0/OZ900FJ0/OZ600FJS SD/MMC Card Reader Controller (rev 05))

to

Dell Latitude 7480 (Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01))

This solves the issue:

mmc0: Internal clock never stabilised.

But instead, with the latest "master", I get:

[ 1567.242177] mmc0: cannot verify signal voltage switch
[ 1567.355730] mmc0: queuing unknown CIS tuple 0x01 (3 bytes)
[ 1567.371590] mmc0: queuing unknown CIS tuple 0x1a (5 bytes)
[ 1567.378627] mmc0: queuing unknown CIS tuple 0x1b (8 bytes)
[ 1567.380043] mmc0: queuing unknown CIS tuple 0x14 (0 bytes)
[ 1567.387628] mmc0: queuing unknown CIS tuple 0x80 (1 bytes)
[ 1567.387693] mmc0: queuing unknown CIS tuple 0x81 (1 bytes)
[ 1567.387757] mmc0: queuing unknown CIS tuple 0x82 (1 bytes)
[ 1567.387781] mmc0: new ultra high speed SDR104 SDIO card at address 0001
[ 1570.470544] ath10k_sdio mmc0:0001:1: bmi communication timeout
[ 1570.470546] ath10k_sdio mmc0:0001:1: unable to read from device
[ 1570.470547] ath10k_sdio mmc0:0001:1: could not get target info (-110)


Wrt firmware, we actually have 4 different versions to choose between, any 
recommendation?

1)
Source: https://github.com/8devices/qcacld-2.0/tree/caf-wlan/LNX.LEH.4.2.2.2/firmware/sdio
Version: LNX.LEH.4.2.2.2
Date in binary: Dec  9 2015

2)
Source: https://github.com/kvalo/ath10k-firmware/tree/master/QCA9377/hw1.0/untested
Version: WLAN.TF.1.1.1-00061-QCATFSWPZ-1
Date in binary: Jan 11 2017

3)
Source: https://developer.qualcomm.com/hardware/qca9377-x/tools
Version: LEA.3.0_QDN_r3000017.1
Date in binary: Jul 18 2018

4)
Source: https://github.com/8devices/qcacld-2.0/tree/CNSS.LEA.NRT_3.0/firmware_bin/sdio
Version: CNSS.LEA.NRT_3.0
Date in binary: Nov  7 2018


The kvalo/ath10k one looks promising, but comes without board file. Are 
there dependencies between the firmware versions and the board files, or 
can we just grab a board file from github.com/8devices and use that one 
with the firmware from kvalo/ath10k-firmware?


Br,
Peter
diff mbox series

Patch

--- usb.c.org	2020-09-14 11:58:10.905346540 +0200
+++ usb.c	2020-09-14 15:39:51.555416792 +0200
@@ -1083,6 +1083,7 @@ 
  /* table of devices that work with this driver */
  static struct usb_device_id ath10k_usb_ids[] = {
  	{USB_DEVICE(0x13b1, 0x0042)}, /* Linksys WUSB6100M */
+	{USB_DEVICE(0x0cf3, 0xe500)}, /* 8devices BLUE bean */
  	{ /* Terminating entry */ },
  };