How to enable SDIO interface for Laird ST60-SIPT WiFi module in Kernel imx7

Hi Team,
We have connected Laird WiFi module https://www.lairdconnect.com/part/st60-sipt SDIO interface to iMX7.
Could you please help me to tell which kernel can I use to get wifi driver for Laird ST60-SIPT module?

At present i am using “repo init -u Index of /toradex-bsp-platform.git -b LinuxImageV2.8”,
Any help will be appreciated.

Thank you
Neeraj

Driver for Marvell 88W8997 chipset is included in Kernel tree used to build LinuxImageV2.8 image (Toradex git branch toradex_4.9-2.3.x-imx) but it’s not enabled by default. You need include MWIFIEX_SDIO at kernel configuration as a part of kernel or as kernel module. Then recompile a kernel or build a kernel module. Please check details about build here.

Hi @alex.tx
Thank you for you reply.
I see WiFi-Ex driver option in menuconfig when I pull kernel like below:

  1. git clone -b toradex_4.9-2.3.x-imx git://git.toradex.com/linux-toradex.git

but NOT the way what I was doing using bitbake:
2. repo init -u http://git.toradex.com/toradex-bsp-platform.git -b LinuxImageV2.8

The reason why I was using bitbake way to build kernel (2) because it gives me complete zipped image which I can unzip, copy into USB drive and load using EasyInstaller.

Could you please help me to point a way when I use “git clone -b toradex_4.9-2.3.x-imx git://git.toradex.com/linux-toradex.git”. how can I build for iMX7d-emmc and where can I get all files which I can copy in the USB drive to load into SOM?

Thank you
Neeraj

In boyh cases driver is present at Kernel sourcecode. And in both cases you need to add MWIFIEX_SDIO to kernel config.

Hi @alex.tx ,
Not sure what am I missing but I see differences in “make menuconfig settings” b/w two.

-b LinuxImageV2.8
.config - Linux/arm 4.9.220
→ Device Drivers
→ Network device support
→ Wireless LAN (WLAN)
→ [ ] Marvell devices (NEW)

-b toradex_4.9-2.3.x-imx
.config - Linux/arm 4.9.166
→ Device Drivers
→ Network device support
→ Wireless LAN (WLAN)
→ [ ] Marvell devices (NEW)
→ < > Marvell 8xxx Libertas WLAN driver support (NEW)
→ < > Marvell 8xxx Libertas WLAN driver support with thin firmware (NEW)
→ < > Marvell WiFi-Ex Driver (NEW)
→ < > Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8997
→ < > Marvell WiFi-Ex Driver for USB8766/8797/8997 (NEW)

Thank you
Neeraj

The “make menu config” method works if you whant to built a Linux kernel as I suggested at the beginning. In case of Yocto build kernel configuration is done by different way. Please check Yocto documentation.

Hi @alex.tx, Thank you for the information I was not aware.
Are you saying I can still use yocto bitbake build “repo init -u http://git.toradex.com/toradex-bsp-platform.git -b LinuxImageV2.8”

but modify .config file to enable MWIFIEX_SDIO ?

Thank you
Neeraj

You can’t just modify a .config file if you are using Yocto build. Please follow chapter 2.2.3. Changing the Configuration of Yocto document I’ve mentioned before.
However I’d recommend to build just a kernel first and test it. As soon as everything is OK only then add changes to a Yocto build. Compilation of kernel alone takes a few minutes. Youcto build takes 2-8 hours on a regular desktop

Hi @alex.tx ,
I built backport driver with V2.8 and below is the log:

modprobe cfg80211 modprobe mwifiex

root@colibri-imx7-emmc:~# lsmod Module Size Used by mwifiex 270988 0 cfg80211 254686 1 mwifiex usb_f_rndis 15714 2 u_ether 12580 1 usb_f_rndis bluetooth 339518 2 compat 91786 3 mwifiex,bluetooth,cfg80211 libcomposite 44419 10 usb_f_rndis configfs 31094 3 usb_f_rndis,libcomposite root@colibri-imx7-emmc:~#

root@colibri-imx7-emmc:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:14:2D:62:D2:3E
UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1%1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:8242 errors:0 dropped:0 overruns:0 frame:0 TX packets:8242 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:593740 (579.8 KiB) TX bytes:593740 (579.8 KiB)

usb0 Link encap:Ethernet HWaddr 00:14:2D:FF:FF:FF
UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@colibri-imx7-emmc:~#

I do not see wlan0 or something to config IP address? is there anything I am missing? how do I make sure sdio is up?
I also tried ‘modprobe mwifiex_sdio’ loaded properly.

Thank you
Neeraj

  • How exactly and to which SDIO interface you connected Laird WiFi module?
  • Could you post dmesg output after modprobe mwifiex ?

Hi @alex.tx ,
I did lot research and found you were right, I need to include mwifiex_sdio from .config. My problem is, I do not have SD card slot in board, have only USB to boot and I use Toradex EasyInstaller.

When I build kernel source and generate zImage, is there a way I can replace in eMMC or boot this using USB?

Thank you
Neeraj

Yes, you can boot kernel from USB or replace it at on eMMC. Partition with kernel image and device tree mounted as /media/mmcblk0p1/

Hi @alex.tx
Thank you so much, this will make my life easier!!
Let me work on this now and update you my findings.

Thank you
Neeraj

Hi @alex.tx
How can I select machine type “imx7d-emmc” like the way I used to do in local.conf ?

How do I enable if [M] Marvell devices (NEW) shows as module?

Thank you
Neeraj

  1. make colibri_imx7_emmc_config

  2. Enable what?

Hi @alex.tx ,
Thank you.
I am not able to select [y] because it has see below:
Device Drivers
-- Network device support —>
[
] Wireless LAN —>
[*] Marvell devices
[M] Marvell WiFi-Ex Driver
[M] Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8997

It gives below message:
This feature depends on another which has been configured as a module.
As a result, this feature will be built as a module.

these are default settings, how do I enable mwifiex_sdio ?
Can I use LinuxImageV3.0 if mwifiex_sdio is available there too?

So configure that “another which has been configured as a module” as [Y]

config MWIFIEX_SDIO
	tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8997"
	depends on MWIFIEX && MMC

config MWIFIEX
	tristate "Marvell WiFi-Ex Driver"
	depends on CFG80211

Yes Linux Image 3.0 also includes sources for Marwell

there was some firmware needed to initialize sdio device, got help from device vendor. issue is resolved. thank you.

Thank you for update. Glad your issue is resolved.