This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Integrting WL1271 on Beageboard xM to enable WLAN and BT

Other Parts Discussed in Thread: WL1271

Hi All,

     I am trying to integrate WL1271 to android on beagleboard xM through sdio, and

i did the following addition to the board specific information in board-omap3beagle.c

+#include <linux/regulator/fixed.h>
#include <linux/wl12xx.h>

#define OMAP_BEAGLE_WLAN_EN_GPIO (139)
#define OMAP_BEAGLE_BT_EN_GPIO (138)
#define OMAP_BEAGLE_WLAN_IRQ_GPIO (137)
#define OMAP_BEAGLE_FM_EN_BT_WU (136)

struct wl12xx_platform_data omap_beagle_wlan_data __initdata = {
 .irq = OMAP_GPIO_IRQ(OMAP_BEAGLE_WLAN_IRQ_GPIO),
 .board_ref_clock = 2, /* 38.4 MHz */
};

static int gpios[] = {OMAP_BEAGLE_BT_EN_GPIO, OMAP_BEAGLE_FM_EN_BT_WU, -1};
static struct platform_device wl12xx_device = {
 .name = "kim",
 .id = -1,
 .dev.platform_data = &gpios,
};

static struct omap2_hsmmc_info mmcbbt[] = {
 {
 .mmc = 1,
 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
 .gpio_wp = 29,
 },
 {
 .name = "wl1271",
 .mmc = 2,
 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
 .gpio_wp = -EINVAL,
 .gpio_cd = -EINVAL,
 .ocr_mask = MMC_VDD_165_195,
 .nonremovable = true,
 },
 {} /* Terminator */
 };

static struct regulator_consumer_supply beagle_wifi_fixed_supply =
 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");

static struct regulator_init_data beagle_vmmc2 = {
 .num_consumer_supplies = 1,
 .consumer_supplies = &beagle_wifi_fixed_supply,
};

static struct fixed_voltage_config beagle_vwlan = {
 .supply_name = "vwl1271",
 .microvolts = 1800000, /* 1.8V */
 .gpio = OMAP_BEAGLE_WLAN_EN_GPIO,
 .startup_delay = 70000, /* 70ms */
 .enable_high = 1,
 .enabled_at_boot = 1,
 .init_data = &beagle_vmmc2,
};

static struct platform_device omap_vwlan_device = {
 .name = "reg-fixed-voltage",
 .id = 1,
 .dev = {
 .platform_data = &beagle_vwlan,
 },
};
#endif


 static struct mtd_partition omap3beagle_nand_partitions[] = {
  /* All the partition sizes are listed in terms of NAND block size */
  {
static struct omap2_hsmmc_info mmc[] = {
  .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
  .gpio_wp = 29,
  },
 {
 .mmc = 2,
 .caps = MMC_CAP_4_BIT_DATA,
 .transceiver = true,
 .ocr_mask = 0x00100000, /* 3.3V */
 },
  {} /* Terminator */
 };
 
static int beagle_twl_gpio_setup(struct device *dev,
 {
  if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM || omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC) {
  mmc[0].gpio_wp = -EINVAL;
 mmcbbt[0].gpio_wp = -EINVAL;
  } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
  (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
  omap_mux_init_gpio(23, OMAP_PIN_INPUT);
static int beagle_twl_gpio_setup(struct device *dev,
  }
  /* gpio + 0 is "mmc0_cd" (input/IRQ) */
  mmc[0].gpio_cd = gpio + 0;
 mmcbbt[0].gpio_cd = gpio + 0;
#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
 if(!strcmp(expansionboard_name, "bbtoys-wifi")) { 
 omap2_hsmmc_init(mmcbbt);
 /* link regulators to MMC adapters */
 beagle_vmmc1_supply.dev = mmcbbt[0].dev;
 beagle_vsim_supply.dev = mmcbbt[0].dev;
 } else {
 omap2_hsmmc_init(mmc);
 /* link regulators to MMC adapters */
 beagle_vmmc1_supply.dev = mmc[0].dev;
 beagle_vsim_supply.dev = mmc[0].dev;
 }
#else
  omap2_hsmmc_init(mmc);
 
  /* link regulators to MMC adapters */
  beagle_vmmc1_supply.dev = mmc[0].dev;
  beagle_vsim_supply.dev = mmc[0].dev;
#endif
 
  /* REVISIT: need ehci-omap hooks for external VBUS
  * power switch and overcurrent detect
static struct omap_musb_board_data musb_board_data = {
  .power = 100,
 };
 
static int __init expansionboard_setup(char *str)
{
 if (!str)
 return -EINVAL;
 strncpy(expansionboard_name, str, 16);
 printk(KERN_INFO "Beagle expansionboard: %s\n", expansionboard_name);
 return 0;
}


 static void __init omap3_beagle_init(void)
 {
  omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
static void __init omap3_beagle_init(void)
  /* REVISIT leave DVI powered down until it's needed ... */
  gpio_direction_output(170, true);
 
 if(!strcmp(expansionboard_name, "bbtoys-wifi"))
 {
 if (wl12xx_set_platform_data(&omap_beagle_wlan_data))
 pr_err("error setting wl12xx data\n");
 printk(KERN_INFO "Beagle expansionboard: registering wl12xx bt platform device\n");
 platform_device_register(&wl12xx_device);
 printk(KERN_INFO "Beagle expansionboard: registering wl12xx wifi platform device\n");
 platform_device_register(&omap_vwlan_device);
 }

  usb_musb_init(&musb_board_data);
  usb_ehci_init(&ehci_pdata);
  omap3beagle_flash_init();

static void __init omap3_beagle_init(void)
 #endif

 

 

And I m getting the following errors

I) defined voltage range is below the required voltage, these wiil be ingored

II) error no:110- time out

 

Any information regarding to this will be helpful.

 

Thanks in advance,

Rohit kumar. H.

  • Hi,

     

    Sorry that I can not help in that case since we don’t have experience with beagleboard, however as far as I know WLAN is supported on Beagleboard as far as open source driver, have you tried beagleboard.org?

    Regards,

    Eyal