This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL1831MOD: Using stock drivers with ACPI (no DTS)

Part Number: WL1831MOD
Other Parts Discussed in Thread: WL1271

Kernel: 5.14.2 from RT tree

Platform: Elkhart Lake

kernel parameters: root=/dev/ram0/ rw idle=poll cma=160M@0-2G pci=pcie_bus_perf sdhci_pci.max_freq=50 console=ttyS6,115200 console=tty0 dyndebug debug

I'm tasked with bringing up an WL1831MOD on our board. It's connected over SDIO for WiFI with a GPIO INT line. The BT_EN and WIFI_INT lines are connected to GPIOs via the BIOS. I don't know how SDIO does identification, though the MMC message (see below) seems to suggest it's mmc1.

Most of the information I've found online is based on ARM devices and uses DTS to configure the Linux driver. It is also mostly for older kernels, such as 4.14 (I think). The wl18xx driver in the 5.14.2 kernel seems to want CONFIG_OF enabled. I thought that was for DTS only, but even with it enabled nothing is happening when I load the drivers. I'm using stock drivers from the specified kernel.

I load the drivers manually in this order (eventually these may need to be statically linked, but they are loadable modules for testing at this point):

cfg80211.ko
mac80211.ko
wlcore.ko
wl18xx.ko
wlcore_sdio.ko

I'm not clear what compat.ko is for or if it's still needed in this kernel but there is a CONFIG_COMPAT=y in our kernel config. There are few log messages, even with dynamic_debug enabled. I enabled CONFIG_MMC_DEBUG too but got no additional information.

$ dmesg | grep mmc
[ 5.052218] mmc0: CQHCI version 5.10
[ 5.052347] mmc0: SDHCI controller on PCI [0000:00:1a.0] using ADMA 64-bit
[ 5.054059] mmc1: SDHCI controller on PCI [0000:00:1a.1] using ADMA 64-bit
[ 5.228212] mmc1: new high speed SDIO card at address 0001
[ 195.716791] wl1271_sdio: probe of mmc1:0001:2 failed with error -61

The only other related messages com from config80211:

[ 150.821627] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 150.822251] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'

I suspect the wl1271_sdio message is because I have the platform driver enabled, which doesn't seem to support wl18xx if I'm reading it correctly. Disabling the platform driver doesn't seem to matter, however.

I have the following firmware installed:

$ ls -l /lib/firmware/ti-connectivity/
total 746
-rw-r--r-- 1 root root 18343 Feb 2 2022 TIInit_12.10.28.bts
-rw-r--r-- 1 root root 745180 Feb 2 2022 wl18xx-fw-4.bin

I have not run wlconf yet. It's on my todo list to try.

We have a SoM vendor who is handling ACPI (BIOS) updates for us but I don't know what to ask for. It's possible the WL1831MOD is not being seen properly on the MMC bus but I'm not clear on how to verify that yet.

At this point I'm starting to add debug to the probe functions to see if they're getting called, but I suspect they don't because there is no device (via DTS or ACPI) requesting them. I'm also considering writing a platform driver for the wl18xx to configure the device driver but it seems the correct way to do this is via ACPI. I'm just not clear that the drivers actually support ACPI.

Any tips or pointers on how to start debugging this would be appreciated.

  • Hi Michael,

    You did mention BT_EN pin, so I hope the WL_EN pin is also configured and set properly. 

    You also refer to BIOS multiple times, so I believe you are not using an embedded ARM processor. If true, then I'm not sure if we can help you much, as the driver depends on a DTS. 

    I can ask around internally if anyone has such experience, but this will take some time. 

  • Hi Sabeeh.  Thanks for the quick reply.  

    It is not an embedded ARM processor.  It's an X86_64 SoM, though we're treating it like an embedded processor.  So DTS is not an option, unfortunately.  I've already run into this on our dev board trying to load an SGTL5000, which does support both ACPI and DTS but required me to write the platform driver while we awaited a BIOS update with ACPI support for the device.

    I'll check with the HW guys about the WL_EN pin.  I didn't see it in the block diagram.  I'll get a schematic from them later today.  

    Thanks for asking around for me.  Any additional pointers/tips would be greatly appreciated.

  • Hi Michael,

    I do not have a solution for you regarding ACPI.