wilc1000 devices and kernel (using two SPI ports)

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

zdhovey2000
Posts: 17
Joined: Fri Oct 13, 2017 9:52 pm

wilc1000 devices and kernel (using two SPI ports)

Wed Mar 14, 2018 6:28 pm

I'm able to generate binaries for everything and getting to the details now. I'm trying to set up dual (yes 2!) wilc1000 devices, one on SPI1 and the second on SPI2 (can also use SPI0 if need be). I know the default for the wilc1000 driver is SDIO, but menuconfig doesn't seem to exist for wilc1000 driver for the Linux version I'm trying to use. IOW, I think I'm looking in the wrong place to properly configure them. Is there a better way to configure the two SPI ports?

Also, is there anything else I need to update for the kernel build and is there any reason why I should change anything in u-boot?
blue_z
Location: USA
Posts: 1692
Joined: Thu Apr 19, 2007 10:15 pm

Re: wilc1000 devices and kernel (using two SPI ports)

Wed Mar 14, 2018 10:43 pm

zdhovey2000 wrote:... menuconfig doesn't seem to exist for wilc1000 driver for the Linux version I'm trying to use.
As usual your post is lacking in salient details. Is it that difficult to mention which Linux version that you're using?
FWIW a wilc1000 kernel driver has been available since Linux4SAM demo 4.7, and in the mainline Linux kernel since version 4.2.

zdhovey2000 wrote: Is there a better way to configure the two SPI ports?
There could be.

zdhovey2000 wrote:Also, is there anything else I need to update for the kernel build and is there any reason why I should change anything in u-boot?
Maybe.

Regards
zdhovey2000
Posts: 17
Joined: Fri Oct 13, 2017 9:52 pm

Running 2 wilc1000 wifi devices using SPI

Fri Apr 13, 2018 2:52 am

Running Linux 4.9/ with rootfs out of buildroot4wilc and verified that wilc1000 works (sama5d4-xplained) using the ap mode with SPI1 and IRQ on GPIO A.2.

But, I want to use two wilc1000 devices, one to occupy wlan0 (SPI1) running the AP firmware and the second, to operate independently on wlan1 (SPI2) as an Ad-Hoc network. However, the WILC1000 driver seems to require the GPIO IRQ pin to be hard-coded in the header of the file "wilc_wlan.h" which I modified as:

Code: Select all

#define GPIO_NUM 0x02 /* SPI1: IRQ on gpio A.2 */ 
The second module is attached to SPI2 with IRQ attached to pin gpio pin A.4. But with the driver hard-coding the IRQ, is it even possible to create a second and independent network (ad-hoc) on wlan1 without duplicating the entire wilc1000 driver?
blue_z
Location: USA
Posts: 1692
Joined: Thu Apr 19, 2007 10:15 pm

Re: wilc1000 devices and kernel (using two SPI ports)

Wed Jun 27, 2018 2:16 am

zdhovey2000 wrote:But with the driver hard-coding the IRQ, is it even possible to create a second and independent network (ad-hoc) on wlan1 without duplicating the entire wilc1000 driver?
Use a better version of the driver, e.g. https://github.com/linux4wilc/driver, that specifies the GPIO parameters using Device Tree rather than hardcoded magic numbers.

Regards

Return to “LINUX”

Who is online

Users browsing this forum: Baidu [Spider] and 5 guests