PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2132
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 7:38 am

You can compile with:

Code: Select all

$ dtc [email protected] -I dts -O dtb -o sdio-overlay-final.dtbo sdio-overlay-final.dts
However, I would make the name something more meaningful like wilc_sdio.dtbo. Whatever name you choose, copy the .dtbo to /boot/overlays and add "dtoverlay=your_name.dtbo" to config.txt.

antoinebore
Posts: 33
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:05 am

PhilE wrote:
Fri May 17, 2019 7:38 am
You can compile with:

Code: Select all

$ dtc [email protected] -I dts -O dtb -o sdio-overlay-final.dtbo sdio-overlay-final.dts
However, I would make the name something more meaningful like wilc_sdio.dtbo. Whatever name you choose, copy the .dtbo to /boot/overlays and add "dtoverlay=your_name.dtbo" to config.txt.
Ok thank you.
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

wilc-sdio
Can wilc-sdio.ko be anywhere or does it have to be in /lib/modules/<kernel_version>/kernel/drivers/staging/ ?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2132
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:11 am

It needs to have been processed by the "depmod" utility (i.e. you will have to run depmod) along with all of the other modules - I don't think you can add modules one at a time - so it should be somewhere under /lib/modules/<kernel_version>, but I don't think it matters precisely where.

kaushalyas
Posts: 14
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:30 am

Hi,

This is my final setup.

Image

I used the version in wilc git repo.

I have this in my /boot/config.txt

Code: Select all

dtoverlay=sdio,poll_once=off,bus_width=4
Cheers,
Attachments
final setup.png
final setup.png (188.12 KiB) Viewed 91 times
Last edited by kaushalyas on Fri May 17, 2019 8:40 am, edited 1 time in total.

antoinebore
Posts: 33
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:33 am

Thank you. I don't have the same version as of ATWILC1000-SD as you. I guess that the pin above the 9 SDIO pins are chip_en, irq and reset, right ?

antoinebore
Posts: 33
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:37 am

Good news... and bad news. It works once for me !

After that, I disconnected the wire and the kernel crashed. Now that I have rebooted the raspi, the mmc1 isn't working anymore... any idea ?

Code: Select all

[email protected]:~$ sudo cat /sys/kernel/debug/mmc1/ios
clock:          0Hz
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: 0 (3.30 V)
driver type:    0 (driver type B)

kaushalyas
Posts: 14
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 12:21 pm

Hi, Yeah the above row of pins of the ATWILC include en, reset nd irq. I havent wired any of them. The driver apparently doesnt support out-bound interrupt (It uses DAT1 as the in-bound irq) So you should disable it in kernel config. However you need to assign a GPIO to it, otherwise driver probe fails.

One thing I noted in the driver is that the en and reset GPIOs gets configured as inputs when driver loads. I coudn't dig deep into whats happening there. Will check it. But as we use the dev kit, we should be ok.

You mean when you load the driver, you loose the sdio? I didn't experience anything like that.

How I tried debugging might help you as well. Since after the kernel oops I cant get any dmesgs, I wired up a USB to ethernet interface to CMIO. Then I get ssh to eth0, and run "dmesg -w" to continuously receive the dmesgs on the ssh terminal. Then I load the driver in my serial terminal. That way I could see what's happening almost real time. May be you can do something similar to observe whats happening when you load the driver.

Also kill the dhcpcd daemon by "sudo dhcpcd -k" before loading the driver. Otherwise as soon as wlan0 interface is up, the dhcpcd starts the DHCP session and causes the kernel oops.

Good luck and let me know if I can be of any help.

Cheers,

antoinebore
Posts: 33
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Tue May 21, 2019 1:57 am

Hi,

I found the problem. I was just trying to disconnect and reconnect the dev board like I use to do when I was using poll_once=false...

Now, it works. I'm able to use it as a STA or a softAP. Thank you for your help !

Now I will try to run some test to see if the kernel oops are frequent. For the moment, my wiring is not really nice and I got a kernel oops if I move the board or when there is some vibration. I hope this will be fixed once I use it on a pcb. Although, it would have been nice if this wifi module didn't cause a kernel oops every time there is a problem.

Cheers,
Antoine

kaushalyas
Posts: 14
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Tue May 21, 2019 2:45 am

Hey Antoine,

Thats good news. Congrats.

I think the wiring is a big contributor to the oops, but also I think there is a bug in the driver that does not gracefully handle a CMD52 read operation failure. I will try to contact the maintainers to get it sorted.

I am trying to get the SoftAP working. I am refering to "http://ww1.microchip.com/downloads/en/D ... rGuide.pdf" but not clear about S80dhcp-server stuff. Could you please shed some light?

Cheers,
kaushalyas

antoinebore
Posts: 33
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Tue May 21, 2019 3:08 am

kaushalyas wrote:
Tue May 21, 2019 2:45 am
Hey Antoine,

Thats good news. Congrats.

I think the wiring is a big contributor to the oops, but also I think there is a bug in the driver that does not gracefully handle a CMD52 read operation failure. I will try to contact the maintainers to get it sorted.

I am trying to get the SoftAP working. I am refering to "http://ww1.microchip.com/downloads/en/D ... rGuide.pdf" but not clear about S80dhcp-server stuff. Could you please shed some light?

Cheers,
kaushalyas
I have followed this tutorial : https://www.raspberrypi.org/documentati ... s-point.md

I think it's easier and it works for me. (No need the rooting part if you don't need internet access.)

antoinebore
Posts: 33
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Tue May 21, 2019 9:44 am

kaushalyas wrote:
Tue May 21, 2019 2:45 am
Hey Antoine,

Thats good news. Congrats.

I think the wiring is a big contributor to the oops, but also I think there is a bug in the driver that does not gracefully handle a CMD52 read operation failure. I will try to contact the maintainers to get it sorted.

I am trying to get the SoftAP working. I am refering to "http://ww1.microchip.com/downloads/en/D ... rGuide.pdf" but not clear about S80dhcp-server stuff. Could you please shed some light?

Cheers,
kaushalyas
Does the cmd52 & cmd53 prevent you from running the module? I often have the "Failed cmd53, read reg.." error that prevent me to set up the wlan..

It's even more frustrating to be stuck here now that I've managed to use the module as a softAP several times.

Return to “Compute Module”