AP7000 libertas_spi

Jonathan dumaresq jdumaresq at cimeq.qc.ca
Wed Aug 4 15:14:03 EDT 2010


Hi Thiago,

I got a zcomax module worked with an Blackfin DSP with success. So I can
give you the info that I have on my hand. 

Here what I have in my config file. 

Kernel config:
[*] Networking support --->
  Wireless  --->
    <*>   cfg80211 - wireless configuration API
    [*]   enable powersave by default 
    [*]   cfg80211 wireless extensions compatibility
    [*]   Wireless extensions sysfs files 
    {*}   Common routines for IEEE802.11 drivers
    <*>   Generic IEEE 802.11 Networking Stack (mac80211)
Device Drivers  --->
  [*] SPI support  --->
    <*>   SPI controller driver for ADI Blackfin5xx
Device Drivers  --->   
  [*] Network device support  ---> 
    [*]   Wireless LAN  --->  
      <M>     Marvell 8xxx Libertas WLAN driver support
      <M>     Marvell Libertas 8686 SPI 802.11b/g cards 
      [*]     Enable full debugging output in the Libertas module. 
      [*]     Enable mesh support  

Busybox config
BusyBox --->
  Network Applications  --->
    --- Wireless-tools
    [*] wireless_tools support
    [*]   iwconfig
    [*]   iwgetid
    [*]   iwlist
    [*]   iwpriv
    [*]   iwspy

My board setup file

#include <linux/spi/libertas_spi.h>

#if defined(CONFIG_LIBERTAS_SPI_MODULE)
static int spi0_libertas_setup(struct spi_device *spi)
{
    return 0;
}

static struct libertas_spi_platform_data libertas_spi_platform_data_info =
{
    .use_dummy_writes = 0,
    .setup = spi0_libertas_setup
};
#endif

#if defined(CONFIG_LIBERTAS_SPI_MODULE)
static struct bfin5xx_spi_chip spi_mw8686_chip_info = {
	.enable_dma = 0,
	.bits_per_word = 16,
};
#endif

static struct spi_board_info bfin_spi_board_info[] __initdata = {

#if defined(CONFIG_LIBERTAS_SPI_MODULE)
		{
		.modalias        = "libertas_spi",
		.max_speed_hz    = 33000000,
		.bus_num        = 0,
		.irq = IRQ_PF6,
		.chip_select    = GPIO_PF10 + MAX_CTRL_CS,
		.platform_data    = &libertas_spi_platform_data_info,
		.controller_data = &spi_mw8686_chip_info,
		.mode        = SPI_MODE_0,
		},

#endif

I have used that firmware 

http://cozybit.com/projects/gspi8686/

Whith that, I have been able to use it on the Blackfin DSP. I haven't use it
on NGW100, but I'm pretty shure that should work. 


Hope this help !!!

Jonathan


libertas-dev-bounces at lists.infradead.org wrote:
> Hi,
> 
> 
>      I'm trying to connect a Marvel 88w8686 based module from USI
> (MR-09-REF2) to the Atmel AVR32 AP7000 on SPI1, cs0 but so far
>      without success. I'm using the driver from the kernel 2.6.34. It
>      looks like the driver sends a message to the module, but doesn't
> get a reply back. We have measured it on the scope and the MISO line
> really stays still, while the clock, MOSI and CS all get some brief
> action.   
> 
>      Perhaps someone can with experience can give me a hint?
> 
>      My board init code follows:
> 
> #ifdef CONFIG_BOARD_EVA1_LIBERTAS
> static int eva1_libertas_setup(struct spi_device *spi);
> 
> static struct libertas_spi_platform_data
>         libertas_spi_platform_data_info = { .use_dummy_writes       =
>         1, .setup                  = eva1_libertas_setup,
> };
> 
> static struct spi_board_info __initdata spi1_board_info[] = {
>         {
>                 .modalias       = "libertas_spi",
>                 .max_speed_hz   = 13000000,
>                 .bus_num        = 1,
>                 .chip_select    = 0,
>                 .mode           = SPI_MODE_0,
>                 .platform_data  = &libertas_spi_platform_data_info
>         },
> };
> #endif
> 
> and I add this to my postcore_init call:
> 
> #ifdef CONFIG_BOARD_EVA1_LIBERTAS
>         at32_reserve_pin(GPIO_PIN_PB(3), 0); /* IRQ for Libertas */
>         spi1_board_info[0].irq = gpio_to_irq(GPIO_PIN_PB(3));
>         at32_add_device_spi(1, spi1_board_info,
> ARRAY_SIZE(spi1_board_info)); #endif 
> 
> 

> 
> 
> Kind Regards,
>     Thiago A. Correa
> 
> _______________________________________________
> 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