2022-02-15 12:20:37

by Marcel Ziswiler

[permalink] [raw]
Subject: mwifiex_sdio_sd8997 and sdiouart8997 firmware

Hi there

I have a question concerning firmware loading for mwifiex_sdio_sd8997. So far the driver hard-codes loading
mrvl/sdsd8997_combo_v4.bin. However, our latest hardware has the SD8997 strapped for sdiouart aka Wi-Fi using
SDIO and Bluetooth using serial UART. Therefore, it also requires a different firmware
sdiouart8997_combo_v4.bin [1] instead. While I successfully tested everything on top of latest -next by
manually re-naming that firmware file I was wondering how exactly this is supposed to work with mwifiex. 

Wouldn't it be possible to detect the strapping and automatically load the correct firmware?

Or how exactly could this be made to work?

Any suggestions are greatly appreciated. Thanks!

[1] https://github.com/NXP/imx-firmware/blob/lf-5.10.52_2.1.0/nxp/FwImage_8997_SD/sdiouart8997_combo_v4.bin

Cheers

Marcel


2022-02-22 00:23:13

by Alvin Šipraga

[permalink] [raw]
Subject: Re: mwifiex_sdio_sd8997 and sdiouart8997 firmware

Hi Marcel,

Marcel Ziswiler <[email protected]> writes:

> Hi there
>
> I have a question concerning firmware loading for mwifiex_sdio_sd8997. So far the driver hard-codes loading
> mrvl/sdsd8997_combo_v4.bin. However, our latest hardware has the SD8997 strapped for sdiouart aka Wi-Fi using
> SDIO and Bluetooth using serial UART. Therefore, it also requires a different firmware
> sdiouart8997_combo_v4.bin [1] instead. While I successfully tested everything on top of latest -next by
> manually re-naming that firmware file I was wondering how exactly this is supposed to work with mwifiex. 
>
> Wouldn't it be possible to detect the strapping and automatically load the correct firmware?

Some NXP kernels on codeaurora have a modified version of the old
proprietary Marvell driver lurking within, and that driver knows how to
query the chip to determine the strapping config. I have not tested this
myself but I hope it can give you some idea of how to update mwifiex to
do the same.

Take a look at woal_sdiommc_get_fw_name (and use protective eyewear):

https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_sdio_mmc.c?h=rel_imx_5.4.70_2.3.2&id=688b67b2c7220b01521ffe560da7eee33042c7bd#n1274

Hope that helps!

Kind regards,
Alvin

>
> Or how exactly could this be made to work?
>
> Any suggestions are greatly appreciated. Thanks!
>
> [1] https://github.com/NXP/imx-firmware/blob/lf-5.10.52_2.1.0/nxp/FwImage_8997_SD/sdiouart8997_combo_v4.bin
>
> Cheers
>
> Marcel