Configuring Device Tree SDIO for the ATWILC3000 WiFi Module

This is based on the TX2 NX. I have removed the brcm node in the file called tegra186-p3636-0001-a00-comms.dtsi. I also set the brcm to a module instead of a built-in driver, so the kernel config looks like this:

CONFIG_BCMDHD=m
CONFIG_BCMDHD_SDIO=y
CONFIG_BCMDHD_PCIE=y
# CONFIG_BCMDYNAMIC is not set
# CONFIG_BCM43241 is not set
CONFIG_BCM4354=y
CONFIG_BCMDHD_FW_PATH="/lib/firmware/brcm/fw_bcmdhd.bin"
CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/brcm/nvram.txt"
CONFIG_BCMDHD_HW_OOB=y

I assumed that the SDIO driver wouldn’t be loaded if the underlying BCMDHD is not present, so I will try removing the lines CONFIG_BCMDHD_SDIO=y as well as CONFIG_BCMDHD_PCIE=y and check whether that changes anything.

For future references / people ending up on this thread: I found the following threads also quite useful, even though the didn’t quiet get me there.

I have tried the steps discussed in the above thread (e.g. setting a dummy regulator and applying nvidia,vmmc-always-on and nvidia,vqmmc-always-on). I have also tried to
updating the drivers in the Linux Kernel to more recent ones, but to not avail.

I also added MMC_DEBUG to the kernel configuration. This helped in noticing that when loading the bus, it tries to scan at different frequencies. However, none match the configuration that are specified in the device tree.

One other thing that I found interesting is the output of mmc1/ios

root@poc01:/home/dev# sudo cat /sys/kernel/debug/mmc1/ios
clock:          0 Hz
actual clock:   99221 Hz
vdd:            0 (invalid)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     0 (off)
bus width:      0 (1 bits)
timing spec:    0 (legacy)
signal voltage: 1 (1.80 V)
driver type:    0 (driver type B)