STM32mp1 connected with WM-BN-BM-26A (Cypress CYW43438)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lidiah
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi,

my stm32mp1 processor is connected with the USI module that has Cypress CYW43438 chipset via SDIO.

Neither the bluetooth, neither the wifi are working.

Here are the logs:

for the bluetooth:

 

 

journalctl -b | grep Bluetooth
Sep 20 10:44:04 stm32mp1 kernel: Bluetooth: Core ver 2.22
Sep 20 10:44:04 stm32mp1 kernel: Bluetooth: HCI device and connection manager initialized
Sep 20 10:44:04 stm32mp1 kernel: Bluetooth: HCI socket layer initialized
Sep 20 10:44:04 stm32mp1 kernel: Bluetooth: L2CAP socket layer initialized
Sep 20 10:44:04 stm32mp1 kernel: Bluetooth: SCO socket layer initialized
Sep 20 10:44:04 stm32mp1 kernel: Bluetooth: HCI UART driver ver 2.3
Sep 20 10:44:04 stm32mp1 kernel: Bluetooth: HCI UART protocol H4 registered
Sep 20 10:44:04 stm32mp1 kernel: Bluetooth: HCI UART protocol Broadcom registered
Sep 20 10:44:05 stm32mp1 kernel[393]: [   12.680440] Bluetooth: Core ver 2.22
Sep 20 10:44:05 stm32mp1 kernel[393]: [   12.727762] Bluetooth: HCI device and connection manager initialized
Sep 20 10:44:05 stm32mp1 kernel[393]: [   12.821621] Bluetooth: HCI socket layer initialized
Sep 20 10:44:05 stm32mp1 kernel[393]: [   12.825064] Bluetooth: L2CAP socket layer initialized
Sep 20 10:44:05 stm32mp1 kernel[393]: [   12.830150] Bluetooth: SCO socket layer initialized
Sep 20 10:44:05 stm32mp1 kernel[393]: [   12.920263] Bluetooth: HCI UART driver ver 2.3
Sep 20 10:44:05 stm32mp1 kernel[393]: [   12.931648] Bluetooth: HCI UART protocol H4 registered
Sep 20 10:44:05 stm32mp1 kernel[393]: [   12.956008] Bluetooth: HCI UART protocol Broadcom registered
Sep 20 10:44:06 stm32mp1 kernel: Bluetooth: hci0: command 0x0c03 tx timeout
Sep 20 10:44:06 stm32mp1 kernel[393]: [   15.351581] Bluetooth: hci0: command 0x0c03 tx timeout
Sep 20 10:44:09 stm32mp1 systemd[1]: Starting Bluetooth service...
Sep 20 10:44:09 stm32mp1 systemd[1]: Started Bluetooth service.
Sep 20 10:44:09 stm32mp1 systemd[1]: Reached target Bluetooth.
Sep 20 10:44:15 stm32mp1 kernel: Bluetooth: hci0: BCM: Reset failed (-110)
Sep 20 10:44:15 stm32mp1 kernel[393]: [   23.511560] Bluetooth: hci0: BCM: Reset failed (-110)

 

 

and for the wifi:

 

 

dmesg | grep -i brcm
[   13.370165] brcmfmac: brcmf_chip_cores_check: CPU core not detected
[   13.400278] brcmfmac: brcmf_sdio_probe_attach: brcmf_chip_attach failed!
[   13.444102] brcmfmac: brcmf_sdio_probe: brcmf_sdio_probe_attach failed
[   13.485596] brcmfmac: brcmf_ops_sdio_probe: F2 error, probe failed -19...

 

 

Here is my device tree:

 

 

/* Wifi */
&sdmmc3 {
	pinctrl-names = "default", "opendrain", "sleep";
	pinctrl-0 = <&sdmmc3_b4_pins_a>;
	pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
	pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
	broken-cd;
	non-removable;
	st,neg-edge;
	bus-width = <4>;
	vmmc-supply = <&v3v3>;
	//mmc-pwrseq = <&wifi_pwrseq>;
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	brcmf: bcrmf@1 {
		reg = <1>;
		compatible = "brcm,bcm4329-fmac";
	};
};

/* Bluetooth */
&uart7 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart7_pins_a>;
	uart-has-rtscts;
	status = "okay";

	bluetooth {
		//shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
		compatible = "brcm,bcm43438-bt";
		max-speed = <3000000>;
		vbat-supply = <&v3v3>;
		vddio-supply = <&v3v3>;
	};
};

 

 

SDIO seems correctly configured,

 

 

dmesg | grep -i mmc0
[    3.656378] mmci-pl18x 48004000.sdmmc: mmc0: PL180 manf 53 rev2 at 0x48004000 irq 47,0 (pio)
[    3.719853] mmc0: queuing unknown CIS tuple 0x80 (2 bytes)
[    3.725404] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[    3.730879] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[    3.747306] mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
[    3.755735] mmc0: queuing unknown CIS tuple 0x80 (13 bytes)
[    3.940032] mmc0: new high speed SDIO card at address 0001

 

 

Under /lib/firmware/brcm as default i have:

 

 

BCM43430A1.hcd
brcmfmac43430-sdio.AP6212.txt
brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt
brcmfmac43430-sdio.MUR1DX.txt
brcmfmac43430-sdio.bin
brcmfmac43430-sdio.clm_blob
brcmfmac43430-sdio.raspberrypi,3-model-b.txt
brcmfmac43430-sdio.sinovoip,bpi-m2-plus.txt
brcmfmac43430-sdio.sinovoip,bpi-m2-zero.txt
brcmfmac43430-sdio.st,stm32mp157c-dk2.txt
brcmfmac43430-sdio.st,stm32mp157f-dk2.txt
brcmfmac43430-sdio.txt

 

 

Do you have any idea what i'm missing?

 

Thanks

0 Likes
1 Solution
lidiah
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hello,

i followed this thread

that modifies driver according to patch 0002-non-upstream-add-sg-parameters-dts-parsing.patch of the zip file you linked me. After setting sd_sgentry_align to 512, i managed to achieve 1Mb/s throughput without errors.

Thank you for the help

View solution in original post

0 Likes
25 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

 what is your interrupt setting for the bringup ?   can you update your nvram here ?

0 Likes

Sorry, can you explain better what you mean with interrupt setting for the bringup?

Inside /lib/firmware/brcm there are several .txt files; i'm not sure how to tell the brcmfmac.ko module which one to use.
Anyway, this is the content of brcmfmac43430-sdio.txt

cat /lib/firmware/brcm/brcmfmac43430-sdio.txt
# 2.4 GHz, 20 MHz BW mode
manfid=0x2d0
prodid=0x0726
vendid=0x14e4
devid=0x43e2
boardtype=0x0726
boardrev=0x1202
boardnum=22
macaddr=00:90:4c:c5:12:38
sromrev=11
boardflags=0x00404201
boardflags3=0x08000000
xtalfreq=37400
nocrc=1
ag0=0
aa2g=1
ccode=ALL
#pa0itssit=0x20
extpagain2g=0
pa2ga0=-145,6667,-751
AvVmid_c0=0x0,0xc8
cckpwroffset0=2
maxp2ga0=74
#txpwrbckof=6
cckbw202gpo=0
legofdmbw202gpo=0x88888888
mcsbw202gpo=0xaaaaaaaa
propbw202gpo=0xdd
ofdmdigfilttype=18
ofdmdigfilttypebe=18
papdmode=1
papdvalidtest=1
pacalidx2g=48
papdepsoffset=-22
papdendidx=58
il0macaddr=00:90:4c:c5:12:38
wl0id=0x431b
# muxenab defined to enable OOB IRQ. Level sensitive interrupt via WL_HOST_WAKE                                              line.
muxenab=0x10
#BT COEX deferral limit setting
#btc_params 8 45000
#btc_params 10 20000
#spurconfig=0x3

 Thank you.

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

please remove this line for a try:

 

# muxenab defined to enable OOB IRQ. Level sensitive interrupt via WL_HOST_WAKE                                              line.
muxenab=0x10
0 Likes
lock attach
Attachments are accessible only for community members.

This seems to have no effects.

However,  in my schematics, pin BT_REG_ON and pin WL_REG_ON are controlled with a jumper, so if I close and reopen the jumper, and then do modprobe -r brcmfmac and modprobe brcmfmac, I see a different log message:

brcmfmac: probe of mmc0:0001:1 failed with error -110
brcmfmac: probe of mmc0:0001:2 failed with error -110

I attached part of the schematics.

 

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

BT_REG_ON and pin WL_REG_ON, functions of these pins are like power control, so if you remove the jumper, the mmc detection will fail.

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Would you please check WL_HOST_WAKE pin if it is connected to STM32mp1 ?   I see the nvram file is using a hw-oob interrupt ,  so need to check this one.   and please check 

xtalfreq=37400

 and the 32.768k LPO clock to see if they are working well.

 

if you can please enable more fmac logs  to have a check.  

0 Likes

WL_HOST_WAKE is output signal, right?  what is the oob interrupt?

We are not using the external 32k clock, so we put low signal LPO_IN.

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

if you are not using external LPO, try to use :

boardflags3=0x04000000

 

0 Likes

Even when i do

modprobe brcmfmac debug=0x20006

 I always see the same logs:

brcmfmac: brcmf_chip_cores_check: CPU core not detected
brcmfmac: brcmf_sdio_probe_attach: brcmf_chip_attach failed!
brcmfmac: brcmf_sdio_probe: brcmf_sdio_probe_attach failed
brcmfmac: brcmf_ops_sdio_probe: F2 error, probe failed -19...
0 Likes

We just discovered there was an hardware problem with two SDIO lines inverted.

Log now says:

brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
brcmfmac mmc0:0001:1: loading /lib/firmware/brcm/brcmfmac43430-sdio.st,stm32mp157c-ev1.txt failed with error -22
brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.st,stm32mp157c-ev1.txt failed with error -22
brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Feb 16 2020 22:39:24 version 7.45.98.97 (r724416 CY) FWID 01-bf41ed64

(I copied brcmfmac43430-sdio.txt into brcmfmac43430-sdio.st,stm32mp157c-ev1.txt with your modifications)

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

hello:

brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Feb 16 2020 22:39:24 version 7.45.98.97 (r724416 CY) FWID 01-bf41ed64

 from my test, if the firmware version can be printed out, it means the command "ver" can be executed well, which means the chip should work now. 

0 Likes

Hello,

I tried command ./wl ver and got the following error:

root@stm32mp1:~#./wl ver
./wl: wl driver adapter not found

 

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

   Would you please check wl is working well?  like:

wl --help

0 Likes

The help is printing lots of lines.

All commands return no driver adapter. (i tried ./wl up, ./wl status)

Where should the driver adapter appear? No wlan interface appears. Is this problem related to the driver maybe?

 

0 Likes
lidiah
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi, at times I see also these logs:

root@stm32mp1:~# dmesg | grep -i brc
[   14.013501] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   16.996155] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   17.187005] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Feb 16 2020 22:39:24 version 7.45.98.97 (r724416 CY) FWID 01-bf41ed64
[   19.875644] brcmfmac: brcmf_sdio_bus_sleep: error while changing bus sleep state -110
[   19.893871] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
[   19.925087] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
[   19.945062] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
[   19.974413] brcmfmac: brcmf_sdio_dpc: sdio ctrlframe tx failed err=-110
[   19.979694] brcmfmac: brcmf_sdio_dpc: failed backplane access over SDIO, halting operation
[   19.979733] ieee80211 phy0: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
[   20.033754] ieee80211 phy0: brcmf_cfg80211_get_channel: chanspec failed (-110)
[   20.066257] brcmfmac: brcmf_sdio_bus_sleep: error while changing bus sleep state -110
[   20.084915] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

hello:

  if this is your NVRAM, you need to check why the nvram loading is returning -22 . 

/lib/firmware/brcm/brcmfmac43430-sdio.st

 

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

another suggestion:

sdio.c 

/* set flag */
bus->sr_enabled = false;  // here to disable sr
brcmf_dbg(INFO, "SR enabled\n");

0 Likes

Hi,

I managed to bring up the interface and connect to my wifi network.

However, my console gets flooded by messages from the brcmfmac driver, expecially during file transfers.

Here's the log:

mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:ac0 length:1548
[ 1452.058940] brcmfmac: mmc_submit_one: CMD53 sg block read failed -22
[ 1452.070576] brcmfmac: brcmf_sdio_rxglom: glom read of 3584 bytes failed: -5
[ 1452.078441] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame
[ 1452.086127] brcmfmac: brcmf_sdio_hdparse: HW header length too long
[ 1452.090941] brcmfmac: brcmf_sdio_rxfail: terminate frame
[ 1452.152749] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:ce4 length:92
[ 1452.432574] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:b80 length:1548
[ 1452.752657] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:e4 length:92
[ 1453.072414] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:1c0 length:1548
[ 1453.162398] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:c40 length:1548
[ 1453.202597] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:ce4 length:92
[ 1453.482560] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:d00 length:1548
[ 1453.522426] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:6c0 length:1548
[ 1453.562613] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:e4 length:92
[ 1453.852724] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:240 length:1548
[ 1454.172665] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:ce4 length:92
[ 1454.492477] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:1c0 length:1548
[ 1454.582414] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:c40 length:1548
[ 1454.622613] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:e4 length:92
[ 1454.902635] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:7c0 length:1548
[ 1455.252701] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:e4 length:92
[ 1455.572704] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:ce4 length:92
[ 1455.912653] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:2c0 length:1548
[ 1456.232768] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:e4 length:92
[ 1456.552415] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:440 length:1548
[ 1456.652456] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:3c0 length:1548
[ 1456.692622] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:ce4 length:92
[ 1456.992642] mmci-pl18x 48004000.sdmmc: unaligned scatterlist: ofst:bc0 length:1548
[ 1456.998765] net_ratelimit: 80 callbacks suppressed
[ 1456.998777] brcmfmac: mmc_submit_one: CMD53 sg block read failed -22
[ 1457.010093] brcmfmac: brcmf_sdio_rxglom: glom read of 3584 bytes failed: -5
[ 1457.018224] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame
[ 1457.023840] brcmfmac: brcmf_sdio_hdparse: HW header length too long
[ 1457.029643] brcmfmac: brcmf_sdio_rxfail: terminate frame

 

Thanks a lot

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

   Do you have project information with the 43438 modules? I can raise internal requests to analyze this issue. 

I can only find other chips patches for this abnormal.

like:

This patch fixes 43455 CRC error while running throughput test with
suspend/resume stress test.

The continuous failure messages before system crash:
brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84
brcmfmac: brcmf_sdio_rxglom: glom read of 25600 bytes failed: -5
brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame
brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84
brcmfmac: brcmf_sdio_rxglom: glom read of 24576 bytes failed: -5
brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame

 

0 Likes
lidiah
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi,

at the moment,  we are using brcmfmac43430-sdio.bin even if module is CYW43438 

Can you please check if this is correct. We see lots of the above messages and throughput is very low (10kb/s).

Thank you

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

I didn't get fmac version from the comments, by the way, would you please try the below link driver, I didn't see a related issue on 43438. 

https://community.cypress.com/t5/Resource-Library/Cypress-Linux-WiFi-Driver-Release-FMAC-2020-09-25/...

0 Likes

Hi,

i'm using linux 5.10.10, the link you provided refers to 5.4.18. Is it the latest available version?

Another question, what is the difference between b43 and brcmfmac? where can i find a list of supported devices for each driver?

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

   we have a software guide in the fmac release, here is an extract from the pdf file:

Zhengbao_Zhang_0-1630986244067.png

 

0 Likes
lidiah
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hello,

i followed this thread

that modifies driver according to patch 0002-non-upstream-add-sg-parameters-dts-parsing.patch of the zip file you linked me. After setting sd_sgentry_align to 512, i managed to achieve 1Mb/s throughput without errors.

Thank you for the help

0 Likes

that is great, thanks a lot for your share.

0 Likes