ARM, SDIO over SPI & 88W8686 firmware loading issue
Dan Williams
dcbw at redhat.com
Wed Mar 19 10:09:28 EDT 2008
On Wed, 2008-03-19 at 09:05 +0100, Arthur Mielimonka wrote:
> Hi,
>
> thank you for your answer. I tried another way (adapting the interface of the libertas driver to work on spi instead of sdio.
> Actually the wlan adapter I use provides both a sdio and a spi interface (Embedded Works WM-G-MR-05).
> But I also have the problem that I do not have the SPI firmware & specification from Marvell.
Yeah, you'd need to get G-SPI firmware from Marvell first, and then the
process is different depending on whether you have single stage or
two-stage firmware. Take a look at section 2.2.1.3 of the available 5.1
firmware spec for some details, though Holger quickly found out with CF
that the spec isn't quite detailed enough. The same procedure in
section 2.2.1.3 of the 5.1 spec should work for the 8686/8688 in G-SPI
mode as well.
I don't think anyone would say no to a G-SPI driver patch.
Dan
> > Hi Arthur,
> >
> > Mielimonka Arthur a écrit :
> > > I just wanted to do some similar work (I wanted to connect an ARM7TDMI
> > > LPC2468 board with the Marvell 8686) when I read your post at this
> > > mailing list.
> > >
> > I hope you will have more success than me...
> > Do you already have Linux working for your platform ?
>
> Yes I am working with an adapted version of uClinux 2.6.24.
>
> > > Would you explain how you accessed the WLAN adapter? I assume you
> > > exchanged the if_sdio interface by an if_spi interface and replaced the
> > > sdio_readb and sido_writesb functions by similar spi_read & _write
> > > functions?
> > >
> > >
> > In fact I'm using the Linux SDIO over SPI & Libertas drivers that were
> > recently included in 2.6.24 series.
> > I didn't write any specific code.
> > > Did you also plan to integrate an interrupt service? If yes, how?
> > >
> > I might be wrong but in Linux SDIO stack they use a poller thread to
> > handle "interrupt" requests from SDIO devices.
> > I didn't plan anything because I still didn't manage to successfully
> > download chip's firmware in SPI mode.
>
> I also try to get this firmware.
>
> > > If you don't mind it would be nice if you would send me your code?
> > >
> > It's Linux code so...
> > http://lxr.linux.no/linux+v2.6.24.1/drivers/net/wireless/libertas/
> > for libertas part
> > and
> > http://lxr.linux.no/linux+v2.6.24.1/drivers/mmc/host/mmc_spi.c for
> > MMC/SDIO over SPI part
> > Of course it assumes that you have a SPI generic driver for your platform:
> > http://lxr.linux.no/linux+v2.6.24.1/drivers/spi/ (mine is imx one)
> >
> > Then in you platform specific initialisation file (in
> > arch/arm/mach-xxx/board.c for ex) you have to declare something like
> > that (I only put "big steps" here):
> >
> > static struct spi_imx_chip libertas_hw = {
> > .cs_control = libertas_cs,
> > };
> > ...
> > static struct mmc_spi_platform_data libertas_mmc_pdata = {
> > .init = mmc_slot_init,
> > .exit = mmc_slot_exit,
> > .detect_delay = 700, /* msecs */
> > .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
> > };
> > ...
> > static struct spi_board_info spi_board_info[] __initdata = {
> > ...
> > {
> > .modalias = "mmc_spi",
> > .bus_num = 1,
> > .controller_data = &libertas_hw,
> > .chip_select = 0,
> > .mode = 0,
> > .max_speed_hz = 1000000,
> > .platform_data = &libertas_mmc_pdata,
> > }
> > };
> > ...
> > and register all the stuff to the Linux SPI API:
> >
> > spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
> >
> > and as soon as you plug your SDCard the chip is detected and Linux SDIO
> > layers are started, libertas stack is called, etc...
> >
> > Let me know if you manage to go further than loading the first stage
> > firmware (helper) !!
>
> I will
>
> >
> > Regards,
> > Julien
> > http://www.armadeus.org
> >
> >
>
>
> Regards,
> Arthur
>
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev
More information about the libertas-dev
mailing list