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.

Problem with WL1835MOD in a customized BeagleBoneBlack with SDK 06.00.00

Other Parts Discussed in Thread: WL1835MOD, AM3358, TPS65217, TPS65910, WL1271, WL1835, WL1835MODCOM8B, AM1808

Hi,

I am working in a customized design based in BBB using SDK 06.00.00 with WL1835MOD. I have connected SDIO interface mmc2, uart1 and the GPIOs using some transceivers to convert the 3.3V to 1.8V to connect the AM3358 to the WL1835MOD. The system runs from an 8GB emmc nandflash.

I have used the following signals:

uart1_ctsn.uart1_ctsn (D18) -> BT_HCI_RTS
uart1_rtsn.uart1_rtsn (D17) -> BT_HCI_CTS
uart1_rxd.uart1_rxd (D16) -> BT_HCI_TX
uart1_txd.uart1_txd (D15) -> BT_HCI_RX
gpio0_7 (C18) -> BT_EN
gpmc_a1.mmc2_dat0 (V14) -> WL_SDIO_D0
gpmc_a2.mmc2_dat1 (U14) -> WL_SDIO_D1
gpmc_a3.mmc2_dat2 (T14) -> WL_SDIO_D2
gpmc_ben1.mmc2_dat3 (U18) -> WL_SDIO_D3
gpmc_csn3.mmc2_cmd (T13) -> WL_SDIO_CMD
gpmc_clk.mmc2_clk (V12) -> WL_SDIO_CLK
gpio3_19 (C13) -> WLAN_IRQ
gpio3_21 (A14) -> WLAN_EN

I have recompiled the kernel with some modifications on board-am335xevm.c, and also I have seen a possible mistake on the pin_mux definition of uart1_ctsn and uart_rtsn. RTS is defined as an input but I think it is an output and CTS is defined as an output and it should be an input (I have tried in the two ways).


#define AM335XEVM_WLAN_PMENA_GPIO GPIO_TO_PIN(1, 30)
#define AM335XEVM_WLAN_IRQ_GPIO GPIO_TO_PIN(3, 17)
#define AM335XEVM_SK_WLAN_IRQ_GPIO GPIO_TO_PIN(0, 31)

struct wl12xx_platform_data am335xevm_wlan_data = {
.irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO),
.board_ref_clock = WL12XX_REFCLOCK_38_XTAL, /* 38.4Mhz */
.bt_enable_gpio = GPIO_TO_PIN(0, 7),
.wlan_enable_gpio = GPIO_TO_PIN(3, 21),
};

/* Module pin mux for wlan and bluetooth */
static struct pinmux_config mmc2_wl12xx_pin_mux[] = {
{"gpmc_a1.mmc2_dat0", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_a2.mmc2_dat1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_a3.mmc2_dat2", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ben1.mmc2_dat3", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_csn3.mmc2_cmd", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_clk.mmc2_clk", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{NULL, 0},
};

static struct pinmux_config uart1_wl12xx_pin_mux[] = {
{"uart1_ctsn.uart1_ctsn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT},
{"uart1_rtsn.uart1_rtsn", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
{"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL},
{NULL, 0},
};

static struct pinmux_config uart2_wl12xx_pin_mux[] = {
{"lcd_data8.uart2_ctsn", OMAP_MUX_MODE6 | AM33XX_PIN_INPUT},
{"lcd_data9.uart2_rtsn", OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT},
{"spi0_sclk.uart2_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"spi0_d0.uart2_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL},
{NULL, 0},
};

/* Beaglebone Black */
static struct evm_dev_cfg beagleboneblack_dev_cfg[] = {
{am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{clkout2_enable, DEV_ON_BASEBOARD, PROFILE_NONE},
{tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{mmc1_emmc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{mmc2_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{uart1_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
// {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
// {sgx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
{NULL, 0, 0},
};

The eeprom is programmed as a BBB board. I installed AM335xBluetopiaLinuxProduction_4013_linux_installer.run

After recompiling the kernel and copy uImage file to first partition of the emmc I reboot and this is the log:


U-Boot SPL 2013.01.01 (Mar 08 2014 - 13:37:06)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading u-boot.img
reading u-boot.img


U-Boot 2013.01.01 (Mar 08 2014 - 13:37:06)

I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
mmc_send_cmd : timeout: No status update
mmc1(part 0) is current device
mmc_send_cmd : timeout: No status update
SD/MMC found on device 1
reading uEnv.txt
** Unable to read file uEnv.txt **
reading uImage
3227552 bytes read in 304 ms (10.1 MiB/s)
Booting from mmc ...
## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: Linux-3.2.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3227488 Bytes = 3.1 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 3.2.0 (nacho@nacho-desktop) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #18 Mon Mar 10 19:10:12 CET 2014
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: am335xevm
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] AM335X ES1.0 (sgx neon )
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext3 rootwait ip=none
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 512MB = 512MB total
[ 0.000000] Memory: 513108k/513108k available, 11180k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc05a6000 (5752 kB)
[ 0.000000] .init : 0xc05a6000 - 0xc05e2000 ( 240 kB)
[ 0.000000] .data : 0xc05e2000 - 0xc064d258 ( 429 kB)
[ 0.000000] .bss : 0xc064d27c - 0xc067c264 ( 188 kB)
[ 0.000000] NR_IRQS:396
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] Total of 128 interrupts on 1 active controller
[ 0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[ 0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
[ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000061] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[ 0.089233] pid_max: default: 32768 minimum: 301
[ 0.089324] Security Framework initialized
[ 0.089416] Mount-cache hash table entries: 512
[ 0.089721] CPU: Testing write buffer coherency: ok
[ 0.108978] omap_hwmod: pruss: failed to hardreset
[ 0.109893] print_constraints: dummy:
[ 0.110168] NET: Registered protocol family 16
[ 0.111785] OMAP GPIO hardware version 0.1
[ 0.113708] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.115142] omap_i2c.1: alias fck already exists
[ 0.115814] omap2_mcspi.1: alias fck already exists
[ 0.115966] omap2_mcspi.2: alias fck already exists
[ 0.116668] edma.0: alias fck already exists
[ 0.116668] edma.0: alias fck already exists
[ 0.116668] edma.0: alias fck already exists
[ 0.136993] bio: create slab <bio-0> at 0
[ 0.138702] SCSI subsystem initialized
[ 0.139953] usbcore: registered new interface driver usbfs
[ 0.140197] usbcore: registered new interface driver hub
[ 0.140319] usbcore: registered new device driver usb
[ 0.140563] registerd cppi-dma Intr @ IRQ 17
[ 0.140563] Cppi41 Init Done Qmgr-base(e087a000) dma-base(e0878000)
[ 0.140594] Cppi41 Init Done
[ 0.140594] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[ 0.140838] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[ 0.141693] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[ 0.142761] tps65910 1-002d: could not be detected
[ 0.143737] Advanced Linux Sound Architecture Driver Version 1.0.24.
[ 0.144561] Switching to clocksource gp timer
[ 0.155944] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.156097] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
[ 0.156341] MUSB0 controller's USBSS revision = 4ea20800
[ 0.157073] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using DMA, IRQ 18
[ 0.157196] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
[ 0.157440] MUSB1 controller's USBSS revision = 4ea20800
[ 0.157775] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 0.157867] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[ 0.157958] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.157989] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.157989] usb usb1: Product: MUSB HDRC host driver
[ 0.157989] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
[ 0.158020] usb usb1: SerialNumber: musb-hdrc.1
[ 0.158660] hub 1-0:1.0: USB hub found
[ 0.158691] hub 1-0:1.0: 1 port detected
[ 0.159118] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using DMA, IRQ 19
[ 0.159454] NET: Registered protocol family 2
[ 0.159606] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.159851] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.160064] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.160186] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.160186] TCP reno registered
[ 0.160186] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.160217] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.160369] NET: Registered protocol family 1
[ 0.160583] RPC: Registered named UNIX socket transport module.
[ 0.160583] RPC: Registered udp transport module.
[ 0.160583] RPC: Registered tcp transport module.
[ 0.160614] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.160797] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.177612] VFS: Disk quotas dquot_6.5.2
[ 0.177642] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.178070] msgmni has been set to 1002
[ 0.180480] alg: No test for stdrng (krng)
[ 0.181030] io scheduler noop registered
[ 0.181030] io scheduler deadline registered
[ 0.181091] io scheduler cfq registered (default)
[ 0.182037] Could not set LED4 to fully on
[ 0.215454] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[ 0.787475] console [ttyO0] enabled
[ 0.791595] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[ 0.799285] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[ 0.807006] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[ 0.814666] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[ 0.822326] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[ 0.830383] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
[ 0.844207] brd: module loaded
[ 0.851196] loop: module loaded
[ 0.854614] i2c-core: driver [tsl2550] using legacy suspend method
[ 0.861114] i2c-core: driver [tsl2550] using legacy resume method
[ 0.867553] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.945159] No daughter card found
[ 0.948760] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.963928] Board name: A335BNLT
[ 0.967315] Board version: ����
[ 0.970581] The board is a AM335x Beaglebone Black.
[ 0.977691] tps65217 1-0024: TPS65217 ID 0xe version 1.2
[ 0.985168] print_constraints: DCDC1: 900 <--> 1800 mV at 1500 mV
[ 0.993591] print_constraints: DCDC2: 900 <--> 3300 mV at 1325 mV
[ 1.001953] print_constraints: DCDC3: 900 <--> 1500 mV at 1125 mV
[ 1.008605] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[ 1.017395] print_constraints: LDO1: 1000 <--> 3300 mV at 1800 mV
[ 1.025756] print_constraints: LDO2: 900 <--> 3300 mV at 3300 mV
[ 1.034027] print_constraints: LDO3: 1800 <--> 3300 mV at 1800 mV
[ 1.042419] print_constraints: LDO4: 1800 <--> 3300 mV at 3300 mV
[ 1.049713] omap_hsmmc.0: alias fck already exists
[ 1.055145] omap_hsmmc.1: alias fck already exists
[ 1.060577] Configure Bluetooth Enable pin...
[ 1.066436] registered am33xx_sr device
[ 1.071868] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.079010] omap2-nand driver initializing
[ 1.083404] OneNAND driver initializing
[ 1.088378] CAN device driver interface
[ 1.092376] CAN bus driver for Bosch D_CAN controller 1.0
[ 1.145172] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 1.151641] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[ 1.158843] davinci_mdio.0: probed
[ 1.162414] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720
[ 1.171295] usbcore: registered new interface driver zd1201
[ 1.177337] usbcore: registered new interface driver cdc_ether
[ 1.183563] usbcore: registered new interface driver cdc_eem
[ 1.189636] usbcore: registered new interface driver dm9601
[ 1.195495] cdc_ncm: 04-Aug-2011
[ 1.199096] usbcore: registered new interface driver cdc_ncm
[ 1.205230] usbcore: registered new interface driver cdc_acm
[ 1.211151] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.219512] Initializing USB Mass Storage driver...
[ 1.224822] usbcore: registered new interface driver usb-storage
[ 1.231109] USB Mass Storage support registered.
[ 1.236358] gadget: Mass Storage Function, version: 2009/09/11
[ 1.242553] gadget: Number of LUNs=1
[ 1.246398] lun0: LUN: removable file: (no medium)
[ 1.251525] gadget: Composite Gadget (ACM + MS), version: 2011/10/10
[ 1.258300] gadget: g_acm_ms ready
[ 1.261962] usb 1-1: New USB device found, idVendor=1bc7, idProduct=0021
[ 1.268981] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1.276458] usb 1-1: Product: Telit Wireless Module
[ 1.281555] usb 1-1: Manufacturer: Telit wireless solutions
[ 1.287384] usb 1-1: SerialNumber: 352681050049452
[ 1.292724] g_acm_ms musb-hdrc.0: failed to start g_acm_ms: -22
[ 1.299346] mousedev: PS/2 mouse device common for all mice
[ 1.306091] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
[ 1.313323] i2c /dev entries driver
[ 1.317321] Linux video capture interface: v2.00
[ 1.322387] usbcore: registered new interface driver uvcvideo
[ 1.328430] USB Video Class driver (1.1.1)
[ 1.333526] cdc_acm 1-1:1.0: This device cannot do calls on its own. It is not a modem.
[ 1.342376] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 1.350280] cdc_acm 1-1:1.2: This device cannot do calls on its own. It is not a modem.
[ 1.359130] cdc_acm 1-1:1.2: ttyACM1: USB ACM device
[ 1.366729] cdc_acm 1-1:1.4: This device cannot do calls on its own. It is not a modem.
[ 1.375671] cdc_acm 1-1:1.4: ttyACM2: USB ACM device
[ 1.382995] cdc_acm 1-1:1.6: This device cannot do calls on its own. It is not a modem.
[ 1.391967] cdc_acm 1-1:1.6: ttyACM3: USB ACM device
[ 1.398223] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 1.406829] cdc_acm 1-1:1.8: This device cannot do calls on its own. It is not a modem.
[ 1.416015] cdc_acm 1-1:1.8: ttyACM4: USB ACM device
[ 1.424011] cdc_acm 1-1:1.10: This device cannot do calls on its own. It is not a modem.
[ 1.433349] cdc_acm 1-1:1.10: ttyACM5: USB ACM device
[ 1.510864] cpuidle: using governor ladder
[ 1.515594] cdc_acm 1-1:1.12: This device cannot do calls on its own. It is not a modem.
[ 1.524963] cdc_acm 1-1:1.12: ttyACM6: USB ACM device
[ 1.530792] cpuidle: using governor menu
[ 1.608642] omap4_aes_mod_init: loading AM33X AES driver
[ 1.614318] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
[ 1.621459] omap4_aes_probe: probe() done
[ 1.626068] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
[ 1.632171] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
[ 1.644592] omap4_sham_probe: probe() done
[ 1.651397] usbcore: registered new interface driver usbhid
[ 1.657287] usbhid: USB HID core driver
[ 1.663421] usbcore: registered new interface driver snd-usb-audio
[ 1.673675] ALSA device list:
[ 1.676818] No soundcards found.
[ 1.680358] oprofile: hardware counters not available
[ 1.685638] oprofile: using timer interrupt.
[ 1.690093] nf_conntrack version 0.5.0 (8017 buckets, 32068 max)
[ 1.696899] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.702575] TCP cubic registered
[ 1.705963] NET: Registered protocol family 17
[ 1.710601] can: controller area network core (rev 20090105 abi 8)
[ 1.717132] NET: Registered protocol family 29
[ 1.721771] can: raw protocol (rev 20090105)
[ 1.726226] can: broadcast manager protocol (rev 20090105 t)
[ 1.732177] Registering the dns_resolver key type
[ 1.737182] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 1.745178] ThumbEE CPU extension supported.
[ 1.749694] mux: Failed to setup hwmod io irq -22
[ 1.755279] Power Management for AM33XX family
[ 1.760101] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[ 1.766784] Copied the M3 firmware to UMEM
[ 1.771148] Cortex M3 Firmware Version = 0x181
[ 1.776672] create_regulator: DCDC2: Failed to create debugfs directory
[ 1.784271] smartreflex smartreflex: am33xx_sr_probe: Driver initialized
[ 1.798736] clock: disabling unused clocks to save power
[ 1.816772] Detected MACID=bc:6a:29:9e:d8:f9
[ 1.822326] cpsw: Detected MACID = bc:6a:29:9e:d8:fa
[ 1.828643] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
[ 1.837982] Waiting for root device /dev/mmcblk0p2...
[ 1.847869] mmc1: new high speed MMC card at address 0001
[ 1.854125] mmcblk0: mmc1:0001 MMC08G 7.31 GiB
[ 1.859008] mmcblk0boot0: mmc1:0001 MMC08G partition 1 2.00 MiB
[ 1.865295] mmcblk0boot1: mmc1:0001 MMC08G partition 2 2.00 MiB
[ 1.873870] mmcblk0: p1 p2
[ 1.879028] mmcblk0boot1: unknown partition table
[ 1.885742] mmcblk0boot0: unknown partition table
[ 1.952758] kjournald starting. Commit interval 5 seconds
[ 1.958557] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[ 1.965789] VFS: Mounted root (ext3 filesystem) readonly on device 179:2.
[ 1.973266] Freeing init memory: 240K
INIT: version 2.88 booting
Starting udev
Error opening /dev/fb0: No such device
Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or directory
bootlogd.
[ 5.590637] EXT3-fs (mmcblk0p2): using internal journal
ALSA: Restoring mixer settings...
/usr/sbin/alsactl: load_state:1686: No soundcards found...
Configuring network interfaces... [ 6.188995] net eth0: CPSW phy found : id is : 0x7c0f1
done.
Wed Jun 26 11:33:00 UTC 2013
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting Dropbear SSH server: dropbear.
Starting telnet daemon.
Performing wifi calibration...
rm: can't remove '/lib/firmware/ti-connectivity/wl1271-nvs.bin': No such file or directory
Error: Module wl12xx_sdio is not currently loaded
nl80211 not found.
[ 6.712402] Disabling lock debugging due to kernel taint
Starting network benchmark server: netserver.
Starting syslogd/klogd: done
Starting thttpd.
Starting Lighttpd Web Server: lighttpd.
2013-06-26 11:33:01: (log.c.166) server started
/
Starting Matrix GUI application.
[ 8.769042] gadget: Mass Storage Function, version: 2009/09/11
[ 8.775268] gadget: Number of LUNs=1
[ 8.779144] lun0: LUN: removable file: /dev/mmcblk0p1
[ 8.784545] gadget: Mass Storage Gadget, version: 2009/09/11
[ 8.790557] gadget: userspace failed to provide iSerialNumber
[ 8.796661] gadget: g_mass_storage ready
[ 8.800872] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[ 8.806457] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2
[ 8.814300] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 8.821411] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 8.828948] usb usb2: Product: MUSB HDRC host driver
[ 8.834136] usb usb2: Manufacturer: Linux 3.2.0 musb-hcd
[ 8.839660] usb usb2: SerialNumber: musb-hdrc.0
[ 8.845001] hub 2-0:1.0: USB hub found
[ 8.848937] hub 2-0:1.0: 1 port detected
[ 9.187286] PHY: 0:00 - Link is Up - 100/Full
***************************************************************
***************************************************************
NOTICE: This file system contains the followin GPLv3 packages:
binutils-symlinks
binutils
gdbserver

If you do not wish to distribute GPLv3 components please remove
the above packages prior to distribution. This can be done using
the opkg remove command. i.e.:
opkg remove <package>
Where <package> is the name printed in the list above

NOTE: If the package is a dependency of another package you
will be notified of the dependent packages. You should
use the --force-removal-of-dependent-packages option to
also remove the dependent packages as well
***************************************************************
***************************************************************
Stopping Bootlog daemon: bootlogd.

_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|

Arago Project http://arago-project.org am335x-evm ttyO0

Arago 2013.05 am335x-evm ttyO0

am335x-evm login: root

Then I try to start the Bluetooth:


root@am335x-evm:~# cd /opt/ss1
root@am335x-evm:/opt/ss1# ls
BluetopiaPM PICSSupportedFeatures.pdf SS1BTPM
Documentation README.pdf
LinuxSPPM ReleaseNotes.pdf
root@am335x-evm:/opt/ss1# cd BluetopiaPM
root@am335x-evm:/opt/ss1/BluetopiaPM# ls
Bluetopia btpmerr gstreamer lib sample
bin btpmmodc include modules ss1btpm
root@am335x-evm:/opt/ss1/BluetopiaPM# cd ..
root@am335x-evm:/opt/ss1# ls
BluetopiaPM PICSSupportedFeatures.pdf SS1BTPM
Documentation README.pdf
LinuxSPPM ReleaseNotes.pdf
root@am335x-evm:/opt/ss1# ./SS1BTPM &
[1] 1542
root@am335x-evm:/opt/ss1# ./LinuxSPPM

******************************************************************
* Command Options: 1) Initialize *
* 2) Cleanup *
* 3) QueryDebugZoneMask *
* 4) SetDebugZoneMask *
* 5) ShutdownService *
* 6) RegisterEventCallback, *
* 7) UnRegisterEventCallback, *
* 8) QueryDevicePower *
* 9) SetDevicePower *
* 10)QueryLocalDeviceProperties *
* 11)SetLocalDeviceName *
* 12)SetLocalClassOfDevice *
* 13)SetDiscoverable *
* 14)SetConnectable *
* 15)SetPairable *
* 16)StartDeviceDiscovery *
* 17)StopDeviceDiscovery *
* 18)QueryRemoteDeviceList *
* 19)QueryRemoteDeviceProperties *
* 20)AddRemoteDevice *
* 21)DeleteRemoteDevice *
* 22)PairWithRemoteDevice *
* 23)CancelPairWithRemoteDevice *
* 24)UnPairRemoteDevice *
* 25)QueryRemoteDeviceServices *
* 26)RegisterAuthentication *
* 27)UnRegisterAuthentication *
* 28)PINCodeResponse *
* 29)PassKeyResponse *
* 30)UserConfirmationResponse *
* 31)ChangeSimplePairingParameters *
* 32)RegisterServerPort *
* 33)OpenServerPortRequestResponse *
* 34)UnRegisterServerPort *
* 35)OpenRemotePort *
* 36)ClosePort *
* 37)ReadData *
* 38)WriteData *
* 39)SendLineStatus *
* 40)SendPortStatus *
* 41)QueryServerPresent *
* 42)FindFreeServerPort *
* 43)ChangeBufferSize *
* 44)LoopbackMode *
* 45)AutomaticReadMode *
* 46)DisplayRawDataMode *
* Help, Quit. *
******************************************************************
SPPM>Initialize 1

BTPM_Initialize() Success: 0.
DEVM_RegisterEventCallback() Success: 5.
SPPM>SetDevicePower 1

[ 135.535522] Gpio value is :7
[ 135.556701] WL1271: BT Enable
DEVM_PowerOnDevice() Failure: -4, Unknown Error.
Function Error.

As you can see it doesn't work. What I am doing wrong?

Best regards,

Ignacio Redondo

  • Hi,

    As you mentioned CTS should be input and RTS should be output.

    static struct pinmux_config uart1_wl12xx_pin_mux[] = {

            {"uart1_ctsn.uart1_ctsn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT},

            {"uart1_rtsn.uart1_rtsn", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},

     

    The Unknown Error can be of many reasons.

    First you can check if the Initscript is available at: “/lib/firmware/’”?

    The initscript file name should be something like: TIInit_11.8.32.bts”. you can get it from https://github.com/TI-ECS/bt-firmware/blob/master/Bluetopia_InitScript_for_TI_WL8.zip

     

    Make sure that your GPIO is correct.

    Are you using TI COM8 module?

    Later you can also try with the LINUXEZSDK-WILINK8-BT-BB SDK from http://www.ti.com/tool/linuxezsdk-am335x-wilink8 , if I understand correctly you are using LINUXEZSDK-WILINK8-BT SDK.

  • Hi,

    I have checked that the Initscript is available:

    root@am335x-evm:/opt/ss1# ls /lib/firmware
    LICENCE TIInit_11.8.32.bts TIInit_7.2.31.bts ti-connectivity
    TIInit_10.6.15.bts TIInit_12.8.32.bts TIInit_7.6.15.bts
    root@am335x-evm:/opt/ss1#

    And I have meassured the gpio signal before and after executing the SetDevicePower. What I have seen is that gpio is at low level at first and it raises to high level when I execute SetDevicePower 1. But if I execute SetDevicePower 0 it does not change to 0 again, it stays at 1.

    SPPM>Initialize 1

    BTPM_Initialize() Success: 0.
    DEVM_RegisterEventCallback() Success: 5.
    SPPM>SetDevicePower 1

    [ 848.172088] WL1271: BT Disable
    [ 848.265502] Gpio value is :7
    [ 848.286743] WL1271: BT Enable
    DEVM_PowerOnDevice() Failure: -4, Unknown Error.
    Function Error.
    SPPM>SetDevicePower 0


    Device Powered Off.
    SPPM>DEVM_PowerOffDevice() Success: 0.
    SPPM>

    I am not working with COM8 but my hardware is based on it, and I have some transceivers between AM3358 and WL1835.

    I have also meassured the uart signals. When I execute SetDevicePower 1 some data is send to the module, but the module doens't send anything from its tx signal. What I have seen is that RTS signal from the module side has always a high level and I think it should be at low level to be able to receive data from the AM335x. However the AM335x puts its RTS signal to low level after sending the data, which is normal to be ready to receive data.

    I didn't tried with LINUXEZSDK-WILINK8-BT-BB SDK because I thought it was prepared for BeagleBone White and the pin_mux configuration is different, or this packet is independent? Can I use it? I am going to try.

     

    Best regards,

    Ignacio

  • Hi,

    I have tried with LINUXEZSDK-WILINK8-BT-BB SDK but I have the same problem as before, I can not start the Bluetooth module. 

     

    Best regards,

    Ignacio

  • Hi Ignacio,

    The package you are using is meant for Sitara and not for BeagleBone. yes you are write the  LINUXEZSDK-WILINK8-BT-BB SDK BeagleBone white. 

    I don't remember bringing up BT on BeagleBone Black. Anyway I am checking it internally if some has done it. I will get back to you on this.

    In mean while please download the initscript  from the location I have provided in the previous post, and replace the existing one with the the new downloaded one and try. 

  • Hi Sundeep,

    I have tried redownloading the initscript but the problem is still there.

    Thanks,

    Ignacio

  • Hi Ignacio,

    Thanks for confirming the results.

    As I mentioned in my earlier post, Let me check if someone has done it and get back to you on this.

  • Ignacio,

    Just to be sure on the HW side:

    The WL1835MOD requires a 1.8V supply for the IO. What supply from BBB P9 connector do you use to create the VIO 1.8v for the COM8 module (for pin 8)?
    The DC_3.3V or the VDD_5V?

    A.

  • Sandeep,

    Is there a test point on the MOD that can be checked just to be sure the WL1835 device is powered and alive?
    What would be the best way to check this without having any SW run on the Sitara side?

    Thanks,

    A.

  • Hi,

    Before that i would like to mention that we don’t have a working solution on BB Black yet. Once will have, I will let you know. 

    We are working with SSO on getting a new Bluetopia stack that works on BB as well.

  • Sundeep,

    What about WLAN on BBB?

    It would still be usefull to have some tips for HW debug when you try to hook up the WL1835MOD to a BB/BBB with some HW logic in between.
    What could you check on the MOB side to see if it is alive?

    Ignacio,

    Also it seems that you can not have the BBB P9 5V supply to be used as VBAT as it should be between 2.9 and 4.8V:
    http://processors.wiki.ti.com/index.php/WL18xx_Schematic_Checklist

    A.

  • Hi Sundeep,

    I generate the 1.8V from another power supply of 4V which is the same power supply I use to power the module. I think it would be better if you could see the schematic. May get your email to sent it to you?

    Ignacio

  • I have checked that it is power and I can access to the UART and Bluetooth enable signals. I can unmount some resistors to disconnect these signals from the sitara.

  • Hi,

    WLAN is functional see http://e2e.ti.com/support/low_power_rf/f/307/t/321572.aspx

    I am sure there will be test points for the UART on the BBB WL18xx caps, You can attach the schematic in the thread. 

    But if you can not share it on external site then you can send it to sundeep@ti.com

  • Hi,

    My design is based on BBB but I am not using BBB nor cape. I have sent you the schematic.

    Regarding this link:

    http://processors.wiki.ti.com/index.php/WL18xx_Schematic_Checklist

    I have a doubt about the fast clock. I don't see any signals on WL1835 to connect a fast clock, I only have the slow clock connected, as I didn't see it on the WL1835MODCOM8B  board.

    Ignacio 

  • Hi,

    From the logs you have provided the GPIO you are currently using is 7, as per the page 12 in SENSOR_TRAFICO_V2.pdf

    But from the schematic you have provided later(BeagleBone+TiWi+BLE+With+Chip+Antenna-schematic.pdf) it look like it is GPIO1_13 which should be 45 is connected.

    Please make sure which is in use. And also Please check the data sheet for the Bluetooth-BLE Power-Up Sequence and also check if your Slow Clock frequency is correct as per the data sheet.

    also see first three steps: http://processors.wiki.ti.com/index.php/CC256x_Testing_Guide which should be same for WL18xx

    Keep in mind that we don’t have a working Bluetooth solution(Bluetopia) on BB Black yet. Once will have, I will let you know. 

  • Hi,

    Yes, I know that I am not using the same gpio as in BeagleBone cape, but I think I have recompiled the kernel with the right configuration for this line.

    Regarding the power-up sequence and the slow clock I have check it and it is okay. In fact I wanted to tell you that this morning I made work the bluetooth with Blutopia stack. But it only worked when I was meassuring BT_HCI_RTS signal with the scope. Then I put a pull down resistor on this signal and now it works!

    Now, I am working with wifi. I am following the recipe to compile the kernel and the modules and install the drivers from this link:

    http://processors.wiki.ti.com/index.php/WL18xx_WiFi_Build_Process

     I followed the steps and I could compile all the modules of the wifi part with the script ./wl18xx_build.sh, but I have some problems compiling some modules with the bluetooth script wl18xx_build_bt.sh:

     There is another link related with this:

    http://processors.wiki.ti.com/index.php/Open_Source_Wireless_Connectivity_WiLink8_Build_scripts

    When I try to do this for example:

    nacho@nacho-desktop:~/utility/build-utilites$ sudo ./wl18xx_build_bt.sh glib build

    it finishes like that:

    checking whether compiler understands -Wno-pointer-sign... yes
    checking for EILSEQ... yes
    checking for glib-genmarshal... /usr/bin/glib-genmarshal
    checking for glib-compile-schemas... no
    configure: error: Could not find a glib-compile-schemas in your PATH
    nacho@nacho-desktop:~/utility/build-utilites$

    So I think there is something missing on my toolchain. Here is my env-setup file:

    # \\\//
    # -(o o)-
    #========================oOO==(_)==OOo=======================
    #
    # This file contains the exports needed for automating the
    # build process of WLAN/Bluetooth components.
    # Place this file in the same directory with wl12xx_build.sh/wl12xx_build_bt.sh
    # build scripts. No need to run 'source setup-env', the build
    # scripts will perfom it internaly.
    #
    #===========================================================
    # User specific environment settings
    export CROSS_COMPILE="arm-linux-gnueabihf-"
    export PATH="$PATH:/home/nacho/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/"
    export ROOTFS=/home/nacho/AM335x/rootFS
    export WORK_SPACE=/home/nacho/AM335x/work_space_R8_A4_05
    export KLIB_BUILD=/home/nacho/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11
    export BUILD_VERSION="r8"
    # MACHINE_TYPE - The target machine type. Can have one of the following values: "am1808" , "omap3evm" , "am335x"
    # This is needed to build bluetooth components.
    # This parameter is not relevant for ti814x board.
    export MACHINE_TYPE="am335x"

    #===========================================================
    export ARCH="arm"
    export MY_PREFIX="/usr"
    export MY_SYSCONFDIR="/etc"
    export MY_LOCALSTATEDIR="/var"
    export CC="${CROSS_COMPILE}gcc"
    export CXX="${CROSS_COMPILE}g++"
    export AR="${CROSS_COMPILE}ar"
    export RANLIB="${CROSS_COMPILE}ranlib"
    export CFLAGS="${CFLAGS} -I${ROOTFS}${MY_PREFIX}/include"
    export CPPFLAGS="${CFLAGS}"
    export LDFLAGS="${LDFLAGS} -L${ROOTFS}${MY_PREFIX}/lib"
    export PKG_CONFIG_SYSROOT_DIR=${ROOTFS}
    export PKG_CONFIG_PATH="${ROOTFS}${MY_PREFIX}/lib/pkgconfig:${ROOTFS}/lib/pkgconfig"
    export PKG_CONFIG_LIBDIR=""
    export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=""
    export PKG_CONFIG_ALLOW_SYSTEM_LIBS=""
    LS=/bin/ls

    As you can see I am working with ti-sdk-am335x-evm-06.00.00.00

    Thanks!

    Ignacio

  • Hi Ignacio,

    That is good that BT is working on BBB. IF it is ok with you you can share the changes that are required on the software side to make it work.

    Note that SDK 06.00 is based on Linaro toolchain and the toolchain is available within the SDK in the linux-devkit directory.  See the Software Developers Guide which will help you understand better here http://downloads.ti.com/sitara_linux/esd/AM335xSDK/latest/index_FDS.html

    Where as the link http://processors.wiki.ti.com/index.php/Open_Source_Wireless_Connectivity_WiLink8_Build_scripts you are  referring to uses Arago tool-chain. Other than that this page is still relevant.

    One more thing is that the few links in the script are outdated "wl18xx_build_bt.sh" , you will have to change them to the existing link, If you come accross any error while building

    I am attaching the build-utilites folder which might give you an idea 4762.7041.build-utilites.7z 

  • Hi Sundeep,

    I will happily explain the changes I made to make my design work, but first I would like to make the wifi part work.

    I have some doubts about the explanation on http://processors.wiki.ti.com/index.php/WL18xx_WiFi_Build_Process

    First of all, before compiling the kernel, should I use 

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_evm_defconfig

    or 

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig

    ?

    when I modify the .config file there are some switches that I don't have in my .config file and when I compile there are a lot of questions to answer and I presh enter on every one as the web page says. But there is a note that says:

    Note: in case there are missing kernel switches like CONFIG_WL12XX_PLATFORM_DATA, then probably there is a missing part in the kernel that relates to the WL127x chipset, and patches should be applied. 

    I have seen that inside the build-utilites folder there is a folder called patches. Do I have to apply all the patches? How can I do it?

    And the last question is about the error when I try to compile with wl18xx_build_bt.sh:

    configure: error: Could not find a glib-compile-schemas in your PATH

    I think the error could be related with  libglib2.0-dev. I am using ubuntu 10.04 LTS, and I have execute apt-get upgrade, apt-get update and I have installed all the tools that the web page indicates.

    I guess after compiling all the modules and copy the rootfs and uImage to the system I will be able to execute ifconfig wlan0 up, is that right or there is anything more to install?

    Best regards,

    Ignacio

  • Hi Sundeep,

    As I told you about the error when I executed wl18xx_build_bt.sh script:

    configure: error: Could not find a glib-compile-schemas in your PATH

    I try to do it with Ubuntu 12.04.4 LTS and it was done successfully.

    So I followed all the steps on the link http://processors.wiki.ti.com/index.php/WL18xx_WiFi_Build_Process

    First I recompiled the kernel changing the source file board-am335xevm.c as it is described on the link http://processors.wiki.ti.com/index.php/WL18xx_Platform_Integration_Guide

    Here is my board-am335xevm.c file

    7041.2043.board-am335xevm.c:

    Here are the steps to compile the kernel:

    nacho@nacho-desktop:~/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11$ make ARCH=arm CROSS_COMPILE=/home/nacho/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf- am335x_evm_defconfig
    #
    # configuration written to .config
    #
    nacho@nacho-desktop:~/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11$ ./wlan_enable_config.sh .config
    Option CONFIG_WLAN=y: is already set, do nothing
    Option CONFIG_WIRELESS=y: is already set, do nothing
    Option CONFIG_WIRELESS_EXT=y: is already set, do nothing
    Option CONFIG_WL12XX_PLATFORM_DATA=y: is already set, do nothing
    Option CONFIG_KEYS=y: is already set, do nothing
    Option CONFIG_SECURITY=y: is already set, do nothing
    Option CONFIG_CRYPTO=y: is already set, do nothing
    Option CONFIG_WIRELESS_EXT=y: is already set, do nothing
    Option CONFIG_CRYPTO_ARC4=y: is already set, do nothing
    Option CONFIG_CRYPTO_ECB=y: is already set, do nothing
    Option CONFIG_CRYPTO_AES=y: is already set, do nothing
    Option CONFIG_CRYPTO_MICHAEL_MIC=y: is already set, do nothing
    Option CONFIG_RFKILL=y: is already set, do nothing
    Option CONFIG_REGULATOR_FIXED_VOLTAGE=y: is already set, do nothing
    Option CONFIG_CRC7=y: is already set, do nothing
    Option CONFIG_NETFILTER=y: is already set, do nothing
    Option CONFIG_NETFILTER_ADVANCED=y: is already set, do nothing
    Option CONFIG_NF_CONNTRACK=y: is already set, do nothing
    Option CONFIG_NETFILTER_XTABLES=y: is already set, do nothing
    Option CONFIG_NF_DEFRAG_IPV4=y: is already set, do nothing
    Option CONFIG_NF_CONNTRACK_IPV4=y: is already set, do nothing
    Option CONFIG_NF_CONNTRACK_PROC_COMPAT=y: is already set, do nothing
    Option CONFIG_IP_NF_IPTABLES=y: is already set, do nothing
    Option CONFIG_IP_NF_FILTER=y: is already set, do nothing
    Option CONFIG_IP_NF_TARGET_LOG=y: is already set, do nothing
    Option CONFIG_NF_NAT=y: is already set, do nothing
    Option CONFIG_NF_NAT_NEEDED=y: is already set, do nothing
    Option CONFIG_IP_NF_TARGET_MASQUERADE=y: is already set, do nothing
    Option CONFIG_INPUT_UINPUT=y: is not found, update config
    Option CONFIG_NET_SCHED=y: is not found, update config
    Option CONFIG_NET_SCH_FIFO=y: is not found, update config
    Option CONFIG_TI_ST=y: is not found, update config
    Option CONFIG_BRIDGE_NETFILTER=y: is not found, update config
    Option CONFIG_STP=y: is not found, update config
    Option CONFIG_BRIDGE=y: is not found, update config
    Option CONFIG_BRIDGE_IGMP_SNOOPING=y: is not found, update config
    Option CONFIG_LLC=y: is not found, update config
    Option CONFIG_HAS_IOMEM=y: is already set, do nothing
    Option CONFIG_HAS_IOPORT=y: is already set, do nothing
    Option CONFIG_HAS_DMA=y: is already set, do nothing
    Option CONFIG_NLATTR=y: is already set, do nothing
    Option CONFIG_AVERAGE=y: is already set, do nothing
    Option CONTIG_TI_ST=y: is not found, update config
    nacho@nacho-desktop:~/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11$ make ARCH=arm CROSS_COMPILE=/home/nacho/ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf- uImage
    scripts/kconfig/conf --silentoldconfig Kconfig
    .config:2816:warning: override: reassigning to symbol INPUT_UINPUT
    .config:2817:warning: override: reassigning to symbol NET_SCHED
    .config:2819:warning: override: reassigning to symbol TI_ST
    .config:2822:warning: override: reassigning to symbol BRIDGE
    .config:2825:warning: unexpected data
    *
    * Restart config...
    *
    *
    * Core Netfilter Configuration
    *
    Netfilter NFQUEUE over NFNETLINK interface (NETFILTER_NETLINK_QUEUE) [N/m/y/?] n
    Netfilter LOG over NFNETLINK interface (NETFILTER_NETLINK_LOG) [N/m/y/?] n
    Netfilter connection tracking support (NF_CONNTRACK) [Y/n/m/?] y
      Connection mark tracking support (NF_CONNTRACK_MARK) [N/y/?] n
      Connection tracking events (NF_CONNTRACK_EVENTS) [N/y/?] n
      Connection tracking timestamping (NF_CONNTRACK_TIMESTAMP) [N/y/?] n
      DCCP protocol connection tracking support (EXPERIMENTAL) (NF_CT_PROTO_DCCP) [N/m/y/?] n
      SCTP protocol connection tracking support (EXPERIMENTAL) (NF_CT_PROTO_SCTP) [N/m/y/?] n
      UDP-Lite protocol connection tracking support (NF_CT_PROTO_UDPLITE) [N/m/y/?] n
      Amanda backup protocol support (NF_CONNTRACK_AMANDA) [N/m/y/?] n
      FTP protocol support (NF_CONNTRACK_FTP) [N/m/y/?] n
      H.323 protocol support (NF_CONNTRACK_H323) [N/m/y/?] n
      IRC protocol support (NF_CONNTRACK_IRC) [N/m/y/?] n
      NetBIOS name service protocol support (NF_CONNTRACK_NETBIOS_NS) [N/m/y/?] n
      SNMP service protocol support (NF_CONNTRACK_SNMP) [N/m/y/?] n
      PPtP protocol support (NF_CONNTRACK_PPTP) [N/m/y/?] n
      SANE protocol support (EXPERIMENTAL) (NF_CONNTRACK_SANE) [N/m/y/?] n
      SIP protocol support (NF_CONNTRACK_SIP) [N/m/y/?] n
      TFTP protocol support (NF_CONNTRACK_TFTP) [N/m/y/?] n
      Connection tracking netlink interface (NF_CT_NETLINK) [N/m/y/?] n
    Netfilter Xtables support (required for ip_tables) (NETFILTER_XTABLES) [Y/?] y
      *
      * Xtables combined modules
      *
      nfmark target and match support (NETFILTER_XT_MARK) [N/m/y/?] n
      ctmark target and match support (NETFILTER_XT_CONNMARK) [N/m/y/?] n
      *
      * Xtables targets
      *
      "CLASSIFY" target support (NETFILTER_XT_TARGET_CLASSIFY) [N/m/y/?] n
      "CONNMARK" target support (NETFILTER_XT_TARGET_CONNMARK) [N/m/y/?] n
      IDLETIMER target support (NETFILTER_XT_TARGET_IDLETIMER) [N/m/y/?] n
      "LED" target support (NETFILTER_XT_TARGET_LED) [N/m/y/?] n
      "MARK" target support (NETFILTER_XT_TARGET_MARK) [N/m/y/?] n
      "NFLOG" target support (NETFILTER_XT_TARGET_NFLOG) [N/m/y/?] n
      "NFQUEUE" target Support (NETFILTER_XT_TARGET_NFQUEUE) [N/m/y/?] n
      "RATEEST" target support (NETFILTER_XT_TARGET_RATEEST) [N/m/y/?] n
      "TEE" - packet cloning to alternate destination (NETFILTER_XT_TARGET_TEE) [N/m/y/?] n
      "TCPMSS" target support (NETFILTER_XT_TARGET_TCPMSS) [N/m/y/?] n
      *
      * Xtables matches
      *
      "addrtype" address type match support (NETFILTER_XT_MATCH_ADDRTYPE) [N/m/y/?] n
      "cluster" match support (NETFILTER_XT_MATCH_CLUSTER) [N/m/y/?] n
      "comment" match support (NETFILTER_XT_MATCH_COMMENT) [N/m/y/?] n
      "connbytes" per-connection counter match support (NETFILTER_XT_MATCH_CONNBYTES) [N/m/y/?] n
      "connlimit" match support" (NETFILTER_XT_MATCH_CONNLIMIT) [N/m/y/?] n
      "connmark" connection mark match support (NETFILTER_XT_MATCH_CONNMARK) [N/m/y/?] n
      "conntrack" connection tracking match support (NETFILTER_XT_MATCH_CONNTRACK) [N/m/y/?] n
      "cpu" match support (NETFILTER_XT_MATCH_CPU) [N/m/y/?] n
      "dccp" protocol match support (NETFILTER_XT_MATCH_DCCP) [N/m/y/?] n
      "devgroup" match support (NETFILTER_XT_MATCH_DEVGROUP) [N/m/y/?] n
      "dscp" and "tos" match support (NETFILTER_XT_MATCH_DSCP) [N/m/y/?] n
      "esp" match support (NETFILTER_XT_MATCH_ESP) [N/m/y/?] n
      "hashlimit" match support (NETFILTER_XT_MATCH_HASHLIMIT) [N/m/y/?] n
      "helper" match support (NETFILTER_XT_MATCH_HELPER) [N/m/y/?] n
      "hl" hoplimit/TTL match support (NETFILTER_XT_MATCH_HL) [N/m/y/?] n
      "iprange" address range match support (NETFILTER_XT_MATCH_IPRANGE) [N/m/y/?] n
      "length" match support (NETFILTER_XT_MATCH_LENGTH) [N/m/y/?] n
      "limit" match support (NETFILTER_XT_MATCH_LIMIT) [N/m/y/?] n
      "mac" address match support (NETFILTER_XT_MATCH_MAC) [N/m/y/?] n
      "mark" match support (NETFILTER_XT_MATCH_MARK) [N/m/y/?] n
      "multiport" Multiple port match support (NETFILTER_XT_MATCH_MULTIPORT) [N/m/y/?] n
      "owner" match support (NETFILTER_XT_MATCH_OWNER) [N/m/y/?] n
      "physdev" match support (NETFILTER_XT_MATCH_PHYSDEV) [N/m/y/?] (NEW) 
      "pkttype" packet type match support (NETFILTER_XT_MATCH_PKTTYPE) [N/m/y/?] n
      "quota" match support (NETFILTER_XT_MATCH_QUOTA) [N/m/y/?] n
      "rateest" match support (NETFILTER_XT_MATCH_RATEEST) [N/m/y/?] n
      "realm" match support (NETFILTER_XT_MATCH_REALM) [N/m/y/?] n
      "recent" match support (NETFILTER_XT_MATCH_RECENT) [N/m/y/?] n
      "sctp" protocol match support (EXPERIMENTAL) (NETFILTER_XT_MATCH_SCTP) [N/m/y/?] n
      "state" match support (NETFILTER_XT_MATCH_STATE) [N/m/y/?] n
      "statistic" match support (NETFILTER_XT_MATCH_STATISTIC) [N/m/y/?] n
      "string" match support (NETFILTER_XT_MATCH_STRING) [N/m/y/?] n
      "tcpmss" match support (NETFILTER_XT_MATCH_TCPMSS) [N/m/y/?] n
      "time" match support (NETFILTER_XT_MATCH_TIME) [N/m/y/?] n
      "u32" match support (NETFILTER_XT_MATCH_U32) [N/m/y/?] n
    *
    * Ethernet Bridge tables (ebtables) support
    *
    Ethernet Bridge tables (ebtables) support (BRIDGE_NF_EBTABLES) [N/m/y/?] (NEW) 
    *
    * QoS and/or fair queueing
    *
    QoS and/or fair queueing (NET_SCHED) [Y/n/?] y
      *
      * Queueing/Scheduling
      *
      Class Based Queueing (CBQ) (NET_SCH_CBQ) [N/m/y/?] (NEW) 
      Hierarchical Token Bucket (HTB) (NET_SCH_HTB) [N/m/y/?] (NEW) 
      Hierarchical Fair Service Curve (HFSC) (NET_SCH_HFSC) [N/m/y/?] (NEW) 
      Multi Band Priority Queueing (PRIO) (NET_SCH_PRIO) [N/m/y/?] (NEW) 
      Hardware Multiqueue-aware Multi Band Queuing (MULTIQ) (NET_SCH_MULTIQ) [N/m/y/?] (NEW) 
      Random Early Detection (RED) (NET_SCH_RED) [N/m/y/?] (NEW) 
      Stochastic Fair Blue (SFB) (NET_SCH_SFB) [N/m/y/?] (NEW) 
      Stochastic Fairness Queueing (SFQ) (NET_SCH_SFQ) [N/m/y/?] (NEW) 
      True Link Equalizer (TEQL) (NET_SCH_TEQL) [N/m/y/?] (NEW) 
      Token Bucket Filter (TBF) (NET_SCH_TBF) [N/m/y/?] (NEW) 
      Generic Random Early Detection (GRED) (NET_SCH_GRED) [N/m/y/?] (NEW) 
      Differentiated Services marker (DSMARK) (NET_SCH_DSMARK) [N/m/y/?] (NEW) 
      Network emulator (NETEM) (NET_SCH_NETEM) [N/m/y/?] (NEW) 
      Deficit Round Robin scheduler (DRR) (NET_SCH_DRR) [N/m/y/?] (NEW) 
      Multi-queue priority scheduler (MQPRIO) (NET_SCH_MQPRIO) [N/m/y/?] (NEW) 
      CHOose and Keep responsive flow scheduler (CHOKE) (NET_SCH_CHOKE) [N/m/y/?] (NEW) 
      Quick Fair Queueing scheduler (QFQ) (NET_SCH_QFQ) [N/m/y/?] (NEW) 
      *
      * Classification
      *
      Elementary classification (BASIC) (NET_CLS_BASIC) [N/m/y/?] (NEW) 
      Traffic-Control Index (TCINDEX) (NET_CLS_TCINDEX) [N/m/y/?] (NEW) 
      Routing decision (ROUTE) (NET_CLS_ROUTE4) [N/m/y/?] (NEW) 
      Netfilter mark (FW) (NET_CLS_FW) [N/m/y/?] (NEW) 
      Universal 32bit comparisons w/ hashing (U32) (NET_CLS_U32) [N/m/y/?] (NEW) 
      IPv4 Resource Reservation Protocol (RSVP) (NET_CLS_RSVP) [N/m/y/?] (NEW) 
      IPv6 Resource Reservation Protocol (RSVP6) (NET_CLS_RSVP6) [N/m/y/?] (NEW) 
      Flow classifier (NET_CLS_FLOW) [N/m/y/?] (NEW) 
      Extended Matches (NET_EMATCH) [N/y/?] (NEW) 
      Actions (NET_CLS_ACT) [N/y/?] (NEW) 
    #
    # configuration written to .config
    #
      CHK     include/linux/version.h
      CHK     include/generated/utsrelease.h
    make[1]: «include/generated/mach-types.h» está actualizado.
      CALL    scripts/checksyscalls.sh
      CHK     include/generated/compile.h
      GZIP    kernel/config_data.gz
      CHK     kernel/config_data.h
      UPD     kernel/config_data.h
      CC      kernel/configs.o
      LD      kernel/built-in.o
      CC      net/wireless/wext-core.o
      CC      net/wireless/wext-proc.o
      LD      net/wireless/built-in.o
      LD      net/built-in.o
      LD      vmlinux.o
      MODPOST vmlinux.o
    WARNING: modpost: Found 3 section mismatch(es).
    To see full details build your kernel with:
    'make CONFIG_DEBUG_SECTION_MISMATCH=y'
      GEN     .version
      CHK     include/generated/compile.h
      UPD     include/generated/compile.h
      CC      init/version.o
      LD      init/built-in.o
      LD      .tmp_vmlinux1
      KSYM    .tmp_kallsyms1.S
      AS      .tmp_kallsyms1.o
      LD      .tmp_vmlinux2
      KSYM    .tmp_kallsyms2.S
      AS      .tmp_kallsyms2.o
      LD      vmlinux
      SYSMAP  System.map
      SYSMAP  .tmp_System.map
      OBJCOPY arch/arm/boot/Image
      Kernel: arch/arm/boot/Image is ready
      GZIP    arch/arm/boot/compressed/piggy.gzip
      AS      arch/arm/boot/compressed/piggy.gzip.o
      LD      arch/arm/boot/compressed/vmlinux
      OBJCOPY arch/arm/boot/zImage
      Kernel: arch/arm/boot/zImage is ready
      UIMAGE  arch/arm/boot/uImage
    Image Name:   Linux-3.2.0
    Created:      Mon Mar 17 13:04:02 2014
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    3242272 Bytes = 3166.28 kB = 3.09 MB
    Load Address: 0x80008000
    Entry Point:  0x80008000
      Image arch/arm/boot/uImage is ready

    Then I compiled the drivers with wl18xx_build.sh and wl18xx_build_bt.sh successfully.

    I copied the rootfilesystem and uImage to my target and reboot.

    And this is the boot log:

    U-Boot SPL 2013.01.01 (Mar 08 2014 - 13:37:06)
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    OMAP SD/MMC: 0
    mmc_send_cmd : timeout: No status update
    reading u-boot.img
    reading u-boot.img


    U-Boot 2013.01.01 (Mar 08 2014 - 13:37:06)

    I2C:   ready
    DRAM:  512 MiB
    WARNING: Caches not enabled
    NAND:  No NAND device found!!!
    0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - readenv() failed, using default environment

    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0 
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  0 
    mmc_send_cmd : timeout: No status update
    mmc1(part 0) is current device
    mmc_send_cmd : timeout: No status update
    SD/MMC found on device 1
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    reading uImage
    3242336 bytes read in 325 ms (9.5 MiB/s)
    Booting from mmc ...
    ## Booting kernel from Legacy Image at 80007fc0 ...
       Image Name:   Linux-3.2.0
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3242272 Bytes = 3.1 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       XIP Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    [    0.000000] Linux version 3.2.0 (root@nacho-VirtualBox) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Li4
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine: am335xevm
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] AM335X ES1.0 (sgx neon )
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext3 rootwait ip=none
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 512MB = 512MB total
    [    0.000000] Memory: 513076k/513076k available, 11212k reserved, 0K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc05af000   (5788 kB)
    [    0.000000]       .init : 0xc05af000 - 0xc05ea000   ( 236 kB)
    [    0.000000]       .data : 0xc05ea000 - 0xc06553a0   ( 429 kB)
    [    0.000000]        .bss : 0xc06553c4 - 0xc0684210   ( 188 kB)
    [    0.000000] NR_IRQS:396
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] Total of 128 interrupts on 1 active controller
    [    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
    [    0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
    [    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
    [    0.000000] Console: colour dummy device 80x30
    [    0.000091] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
    [    0.089263] pid_max: default: 32768 minimum: 301
    [    0.089355] Security Framework initialized
    [    0.089416] Mount-cache hash table entries: 512
    [    0.089721] CPU: Testing write buffer coherency: ok
    [    0.108978] omap_hwmod: pruss: failed to hardreset
    [    0.109893] print_constraints: dummy: 
    [    0.110198] NET: Registered protocol family 16
    [    0.111816] OMAP GPIO hardware version 0.1
    [    0.113769] omap_mux_init: Add partition: #1: core, flags: 0
    [    0.115264]  omap_i2c.1: alias fck already exists
    [    0.115936]  omap2_mcspi.1: alias fck already exists
    [    0.116119]  omap2_mcspi.2: alias fck already exists
    [    0.116821]  edma.0: alias fck already exists
    [    0.116821]  edma.0: alias fck already exists
    [    0.116851]  edma.0: alias fck already exists
    [    0.136749] bio: create slab <bio-0> at 0
    [    0.138427] SCSI subsystem initialized
    [    0.139709] usbcore: registered new interface driver usbfs
    [    0.139953] usbcore: registered new interface driver hub
    [    0.140106] usbcore: registered new device driver usb
    [    0.140350] registerd cppi-dma Intr @ IRQ 17
    [    0.140350] Cppi41 Init Done Qmgr-base(e087a000) dma-base(e0878000)
    [    0.140380] Cppi41 Init Done
    [    0.140380] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
    [    0.140625] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
    [    0.141448] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
    [    0.142517] tps65910 1-002d: could not be detected
    [    0.143493] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [    0.144378] Switching to clocksource gp timer
    [    0.155853] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [    0.156005] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    [    0.156250] MUSB0 controller's USBSS revision = 4ea20800
    [    0.157012] musb-hdrc musb-hdrc.0: USB OTG mode controller at e083c000 using DMA, IRQ 18
    [    0.157135] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
    [    0.157379] MUSB1 controller's USBSS revision = 4ea20800
    [    0.157714] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    0.157775] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
    [    0.157897] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    0.157897] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    0.157928] usb usb1: Product: MUSB HDRC host driver
    [    0.157928] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
    [    0.157928] usb usb1: SerialNumber: musb-hdrc.1
    [    0.158569] hub 1-0:1.0: USB hub found
    [    0.158599] hub 1-0:1.0: 1 port detected
    [    0.159027] musb-hdrc musb-hdrc.1: USB Host mode controller at e083e800 using DMA, IRQ 19
    [    0.159362] NET: Registered protocol family 2
    [    0.159515] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.159759] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
    [    0.159973] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.160095] TCP: Hash tables configured (established 16384 bind 16384)
    [    0.160095] TCP reno registered
    [    0.160095] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.160125] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.160278] NET: Registered protocol family 1
    [    0.160491] RPC: Registered named UNIX socket transport module.
    [    0.160491] RPC: Registered udp transport module.
    [    0.160522] RPC: Registered tcp transport module.
    [    0.160522] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.160705] NetWinder Floating Point Emulator V0.97 (double precision)
    [    0.177490] VFS: Disk quotas dquot_6.5.2
    [    0.177551] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.177947] msgmni has been set to 1002
    [    0.180389] alg: No test for stdrng (krng)
    [    0.180908] io scheduler noop registered
    [    0.180908] io scheduler deadline registered
    [    0.180969] io scheduler cfq registered (default)
    [    0.181884] Could not set LED4 to fully on
    [    0.235229] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [    0.807373] console [ttyO0] enabled
    [    0.811462] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    0.819183] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    0.826904] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    0.834564] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    0.842254] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    0.850280] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
    [    0.864135] brd: module loaded
    [    0.871063] loop: module loaded
    [    0.874481] i2c-core: driver [tsl2550] using legacy suspend method
    [    0.880981] i2c-core: driver [tsl2550] using legacy resume method
    [    0.887390] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [    0.964935] No daughter card found
    [    0.968505] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [    0.983673] Board name: A335BNLT
    [    0.987060] Board version: ����
    [    0.990356] The board is a AM335x Beaglebone Black.
    [    0.997436] tps65217 1-0024: TPS65217 ID 0xe version 1.2
    [    1.004913] print_constraints: DCDC1: 900 <--> 1800 mV at 1500 mV 
    [    1.013305] print_constraints: DCDC2: 900 <--> 3300 mV at 1325 mV 
    [    1.021697] print_constraints: DCDC3: 900 <--> 1500 mV at 1125 mV 
    [    1.028350] usb 1-1: new high-speed USB device number 2 using musb-hdrc
    [    1.037139] print_constraints: LDO1: 1000 <--> 3300 mV at 1800 mV 
    [    1.045532] print_constraints: LDO2: 900 <--> 3300 mV at 3300 mV 
    [    1.053802] print_constraints: LDO3: 1800 <--> 3300 mV at 1800 mV 
    [    1.062286] print_constraints: LDO4: 1800 <--> 3300 mV at 3300 mV 
    [    1.069610]  omap_hsmmc.0: alias fck already exists
    [    1.075042]  omap_hsmmc.1: alias fck already exists
    [    1.080444] Configure Bluetooth Enable pin...
    [    1.086486] registered am33xx_sr device
    [    1.092071] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.099182] omap2-nand driver initializing
    [    1.103607] OneNAND driver initializing
    [    1.108581] CAN device driver interface
    [    1.112579] CAN bus driver for Bosch D_CAN controller 1.0
    [    1.164947] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    [    1.171386] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
    [    1.178588] davinci_mdio.0: probed
    [    1.182159] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720
    [    1.191040] usbcore: registered new interface driver zd1201
    [    1.197082] usbcore: registered new interface driver cdc_ether
    [    1.203308] usbcore: registered new interface driver cdc_eem
    [    1.209381] usbcore: registered new interface driver dm9601
    [    1.215240] cdc_ncm: 04-Aug-2011
    [    1.218841] usbcore: registered new interface driver cdc_ncm
    [    1.224761] Initializing USB Mass Storage driver...
    [    1.230072] usbcore: registered new interface driver usb-storage
    [    1.236358] USB Mass Storage support registered.
    [    1.241577] mousedev: PS/2 mouse device common for all mice
    [    1.248504] usb 1-1: New USB device found, idVendor=1bc7, idProduct=0021
    [    1.255554] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [    1.263000] usb 1-1: Product: Telit Wireless Module
    [    1.268127] usb 1-1: Manufacturer: Telit wireless solutions
    [    1.273925] usb 1-1: SerialNumber: 352681050046771
    [    1.279327] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
    [    1.286376] am33xx-rtc: already running
    [    1.290557] i2c /dev entries driver
    [    1.294525] Linux video capture interface: v2.00
    [    1.299621] usbcore: registered new interface driver uvcvideo
    [    1.305633] USB Video Class driver (1.1.1)
    [    1.425842] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    1.508056] cpuidle: using governor ladder
    [    1.512817] cpuidle: using governor menu
    [    1.520568] omap4_aes_mod_init: loading AM33X AES driver
    [    1.526275] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
    [    1.532775] omap4_aes_probe: probe() done
    [    1.537445] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
    [    1.543548] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
    [    1.554992] omap4_sham_probe: probe() done
    [    1.565063] usbcore: registered new interface driver usbhid
    [    1.570953] usbhid: USB HID core driver
    [    1.576110] usbcore: registered new interface driver snd-usb-audio
    [    1.655395] ALSA device list:
    [    1.658508]   No soundcards found.
    [    1.662048] oprofile: hardware counters not available
    [    1.667327] oprofile: using timer interrupt.
    [    1.671813] nf_conntrack version 0.5.0 (8016 buckets, 32064 max)
    [    1.678619] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    1.684265] TCP cubic registered
    [    1.687683] NET: Registered protocol family 17
    [    1.692413] Bridge firewalling registered
    [    1.696594] can: controller area network core (rev 20090105 abi 8)
    [    1.703125] NET: Registered protocol family 29
    [    1.707763] can: raw protocol (rev 20090105)
    [    1.712219] can: broadcast manager protocol (rev 20090105 t)
    [    1.718170] Registering the dns_resolver key type
    [    1.723114] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    1.731140] ThumbEE CPU extension supported.
    [    1.735656] mux: Failed to setup hwmod io irq -22
    [    1.741210] Power Management for AM33XX family
    [    1.746063] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [    1.752716] Copied the M3 firmware to UMEM
    [    1.757080] Cortex M3 Firmware Version = 0x181
    [    1.762725] create_regulator: DCDC2: Failed to create debugfs directory
    [    1.770294] smartreflex smartreflex: am33xx_sr_probe: Driver initialized
    [    1.784820] clock: disabling unused clocks to save power
    [    1.806365] Detected MACID=bc:6a:29:9f:d8:45
    [    1.811828] cpsw: Detected MACID = bc:6a:29:9f:d8:46
    [    1.818115] omap_rtc am33xx-rtc: setting system clock to 2013-06-26 00:23:27 UTC (1372206207)
    [    1.827545] Waiting for root device /dev/mmcblk0p2...
    [    1.850463] mmc1: new high speed MMC card at address 0001
    [    1.856750] mmcblk0: mmc1:0001 MMC08G 7.31 GiB 
    [    1.861572] mmcblk0boot0: mmc1:0001 MMC08G partition 1 2.00 MiB
    [    1.867889] mmcblk0boot1: mmc1:0001 MMC08G partition 2 2.00 MiB
    [    1.876190]  mmcblk0: p1 p2
    [    1.881286]  mmcblk0boot1: unknown partition table
    [    1.888000]  mmcblk0boot0: unknown partition table
    [    1.942901] kjournald starting.  Commit interval 5 seconds
    [    1.948730] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
    [    1.955963] VFS: Mounted root (ext3 filesystem) readonly on device 179:2.
    [    1.963439] Freeing init memory: 236K
    INIT: version 2.88 booting
    Starting udev
    Error opening /dev/fb0: No such device
    Starting uim-sysfs daemon.
    uim:@ main
    uim:unable to open /sys/devices/platform/kim/install(No such file or directory)
    Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or directory
    bootlogd.
    [    5.682464] EXT3-fs (mmcblk0p2): using internal journal
    ALSA: Restoring mixer settings...
    Configuring network interfaces... /usr/sbin/alsactl: load_state:1686: No soundcards found...
    [    6.356506] net eth0: CPSW phy found : id is : 0x7c0f1
    udhcpc (v1.20.2) started
    Sending discover...
    Sending discover...
    Sending discover...
    No lease, failing
    done.
    INIT: Entering runlevel: 5
    Starting system message bus: dbus.
    Starting Dropbear SSH server: dropbear.
    Starting telnet daemon.
    Performing wifi calibration...
    rm: can't remove '/lib/firmware/ti-connectivity/wl1271-nvs.bin': No such file or directory
    Error: Module wl12xx_sdio is not currently loaded
    nl80211 not found.
    FATAL: Module wl12xx_sdio not found.
    Starting network benchmark server: netserver.
    Starting syslogd/klogd: done
    Starting thttpd.
    Starting Lighttpd Web Server: lighttpd.
    2013-06-26 00:23:41: (log.c.166) server started 
    /
    Starting Matrix GUI application.
    [   18.358642] g_mass_storage: disagrees about version of symbol wake_up_process
    [   18.366149] g_mass_storage: Unknown symbol wake_up_process (err -22)
    ERROR: could not insert 'g_mass_storage': Invalid argument
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the followin GPLv3 packages:
            binutils-symlinks
            binutils
            gdbserver

    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above

    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    Stopping Bootlog daemon: bootlogd.

    _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            

    Arago Project http://arago-project.org am335x-evm ttyO0
     
    am335x-evm login: root
     
    I executed lsmod command to see if it was any module loaded:
    root@am335x-evm:~# lsmod
    Module                  Size  Used by

    As there weren't modules I tried to load them manually:
     

    root@am335x-evm:~# cd /usr/sbin/wlconf
    root@am335x-evm:/usr/sbin/wlconf#./wlconf -o /lib/firmware/ti-connectivity/wl18xx-conf.bin -I official_inis/WL8_System_parameters.ini

    root@am335x-evm:/usr/sbin/wlconf#./wlconf -i /lib/firmware/ti-connectivity/wl18xx-conf.bin -o /lib/firmware/ti-connectivity/wl18xx-conf.bin -s wl18xx.ht.mode=0x01

    root@am335x-evm:/usr/sbin/wlconf# modprobe wlcore_sdio

    [ 116.710510] Disabling lock debugging due to kernel taint
    [ 116.716857] Compat-wireless backport release: ol_r8.a5.01
    [ 116.722503] Backport based on linux-stable.git v3.6.3
    [ 116.727783] compat.git: linux-stable.git

    root@am335x-evm:/usr/sbin/wlconf# modprobe wl18xx
    [ 180.729858] cfg80211: Calling CRDA to update world regulatory domain
    [ 180.861602] wlcore: wl18xx driver version: ol_r8.a6.02
    root@am335x-evm:/usr/sbin/wlconf# [ 180.956146] cfg80211: World regulatory domain updated:
    [ 180.961608] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    [ 180.970153] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [ 180.978240] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [ 180.986328] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [ 180.994415] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [ 181.002502] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

    root@am335x-evm:/usr/sbin/wlconf# lsmod
    Module Size Used by
    wl18xx 57019 0
    wlcore 170563 1 wl18xx
    mac80211 294004 2 wlcore,wl18xx
    cfg80211 177153 3 mac80211,wlcore,wl18xx
    wlcore_sdio 4230 0
    compat 3816 5 wlcore_sdio,cfg80211,mac80211,wlcore,wl18xx

    Then I tried to start wlan0 interface:

    root@am335x-evm:/usr/sbin/wlconf# ifconfig wlan0 up
    ifconfig: SIOCGIFFLAGS: No such device

    What do you think could be the problem?

    I am not sure if I am doing something wrong on the source file board-am335xevm.c

    I will really appreciate your help on this because our customer is waiting for the prototypes more than one week and is getting really nervous.

    Many thanks,

    Ignacio

     
  • Hi,

    If I am not wrong you are having problem with WLAN turn ON, correct?

  • Hi,

    Yes that's it. Could you check if my implementation on board-am335xevm.c file is right?

    Best regards,

    Ignacio

  • Hi Ignacio,

    This is not the correct forum WLAN.

    I will move it WLAN Applications Forum.

  • Hi Ignacio,

    You should see the below print in the kernel logs:
    mmc1: new high speed SDIO card at address 0001
    indicating that the WL8 card is detected and working alright. But I don't see it in the logs that you have shared.

    This means that something is not right in the board file (either the GPIO value or the mmc pin muxing). I see that you have put the changes in the board file unbder this condition:
    if (evm_id == EVM_SK)

    I'm not sure if that is correct. Shouldn't you be using BEAGLE_BONE_BLACK ?


    Regards,
    Gigi Joseph.

  • Hii Sundeep Mandava && Joseph Gigi :

    The OS of BBB is linux3.8 , but this friend port && modify a kernel of 3.2 to run on BBB , i also have interest to port linux 3.2 to run on BBB , so my question : do you know some http or wiki on how to port linux 3.2 to run on BBB ??

    Thank you

  • Hi Tony,

    I could find this: http://elinux.org/Beagleboard:3.2_SDK_On_BeagleBone_Black
    But I think its better you check this specific question on some BBB forums...

    Regards,
    Gigi Joseph.

  • Hi Gigi,

    Sorry for the late response, but I have been very busy in the past few days.

    I am working in the implementation for BEAGLE_BONE_BLACK, I know that I did some changes on the EVM_SK part, but they don't affect to the BEAGLE_BONE_BLACK implementation. 

    I made the wl1835 work as you can see in the log below:

    [ 4.330841] mmc1: card claims to support voltages below the defined range. These will be ignore.
    [ 4.352081] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    [ 4.359039] mmc1: new high speed SDIO card at address 0001
    INIT: version 2.88 booting
    Error opening /dev/fb0: No such device
    Starting udev
    [ 6.045196] Disabling lock debugging due to kernel taint
    [ 6.051544] Compat-wireless backport release: ol_r8.a6.06
    [ 6.057220] Backport based on wl18xx.git ol_r8.a6.02
    [ 6.062408] compat.git: wl18xx.git
    [ 7.539337] cfg80211: Calling CRDA to update world regulatory domain
    [ 7.792633] cfg80211: World regulatory domain updated:
    [ 7.798095] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    [ 7.806640] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [ 7.814727] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [ 7.822845] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [ 7.830932] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [ 7.839019] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [ 7.861083] wlcore: wl18xx driver version: ol_r8.a6.02
    [ 7.914581] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
    [ 7.923828] wlcore: WARNING falling back to default config
    [ 8.277282] wlcore: wl18xx HW: RDL 2, 1857 MIMO, PG 2.2 (ROM 0x11)
    [ 8.297882] wlcore: loaded
    [ 8.300750] wlcore: driver version: ol_r8.a6.02
    [ 8.305450] wlcore: timestamp: Sat Mar 22 10:46:43 2014
    Starting uim-sysfs daemon.
    uim:@ main
    uim:begin polling...
    Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or directory
    bootlogd.
    [ 8.514526] EXT3-fs (mmcblk0p2): using internal journal
    ALSA: Restoring mixer settings...
    /usr/sbin/alsactl: load_state:1686: No soundcards found...
    Configuring network interfaces... [ 9.107727] net eth0: CPSW phy found : id is : 0x7c0f1
    done.
    Wed Jun 26 04:48:00 UTC 2013
    INIT: Entering runlevel: 5
    Starting system message bus: dbus.
    Starting Dropbear SSH server: dropbear.
    Starting telnet daemon.
    Performing wifi calibration...
    rm: can't remove '/lib/firmware/ti-connectivity/wl1271-nvs.bin': No such file or directory
    Error: Module wl12xx_sdio is not currently loaded
    Error: could not load module /lib/modules/3.2.0/updates/drivers/net/wireless/wl12xx/wl12xx_sdio.koy
    Failed to load kernel module using command /sbin/insmod /lib/modules/3.2.0/updates/drivers/net/wiro
    Calibration not complete. Removing half-baked nvs
    FATAL: Module wl12xx_sdio not found.
    Starting network benchmark server: netserver.
    Starting syslogd/klogd: done
    Starting thttpd.
    Starting Lighttpd Web Server: lighttpd.
    2013-06-26 04:48:01: (log.c.166) server started
    /
    Starting Matrix GUI application.
    [ 12.425811] g_mass_storage: disagrees about version of symbol wake_up_process
    [ 12.433349] g_mass_storage: Unknown symbol wake_up_process (err -22)
    ERROR: could not insert 'g_mass_storage': Invalid argument
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the followin GPLv3 packages:
    binutils-symlinks
    binutils
    gdbserver

    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution. This can be done using
    the opkg remove command. i.e.:
    opkg remove <package>
    Where <package> is the name printed in the list above

    NOTE: If the package is a dependency of another package you
    will be notified of the dependent packages. You should
    use the --force-removal-of-dependent-packages option to
    also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    Stopping Bootlog daemon: bootlogd.

    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|

    Arago Project http://arago-project.org am335x-evm ttyO0

    Arago 2013.05 am335x-evm ttyO0

    am335x-evm login: root
    root@am335x-evm:~# lsmod
    Module Size Used by
    wl18xx 57019 0
    wlcore 170563 1 wl18xx
    mac80211 294004 2 wlcore,wl18xx
    cfg80211 177153 3 mac80211,wlcore,wl18xx
    wlcore_sdio 4230 0
    compat 3792 5 wlcore_sdio,cfg80211,mac80211,wlcore,wl18xx
    root@am335x-evm:~#

    I found a board-am335xevm.c on the internet which have some definitions and structures related with the wifi module, which are not implemented in the TI SDK, as this one for example:

    struct ti_st_plat_data wilink_pdata = {
    .nshutdown_gpio = GPIO_TO_PIN(0, 7),
    .dev_name = "/dev/ttyO1",
    .flow_cntrl = 1,
    .baud_rate = 3000000,
    .suspend = plat_kim_suspend,
    .resume = plat_kim_resume,
    .chip_enable = plat_kim_chip_enable,
    .chip_disable = plat_kim_chip_disable,
    };

    I attach my new board-am335xevm.c

    7510.board-am335xevm.c

    But I still have some problems. It only works if I boot from the SD card, which is connected to mmc0. I have an emmc nandflash connected to mmc1 and wl1835 connected to mmc2 and I need to boot from the nandflash. The problem I guess is that a second mmc interface is created in the kernel (mmc1) which is used for communicating with the WLAN sub-system, as is said in the link below:

    http://processors.wiki.ti.com/index.php/WL18xx_Platform_Integration_Guide

    • The mmc2_wl12xx_init() function is placed inside the board configuration structure seen below and when it is called during board startup a second mmc interface is created in the kernel (mmc1) which is used for communicating with the WLAN sub-system.

    So the question is, how can I use mmc0 instead of mmc1 to communicate with the WLAN sub-system. I don't need to use the SD card, but I do need the nandflash.

    Best regards,

    Ignacio

  • Hello,

    Could you find out any possible solution to my problem?

    If not I have another question that is even more urgent for us than the problem with the emmc nand flash. Our client needs to use two bluetooth connections. He is using hci0 loading btwilink kernel module but he also needs to use hci1. I don't know if it is possible to create more than one connection with only one WL1835 module. Anyway we have another module connected to UART2_TXD(B17), UART2_RXD(A17), UART2_RTS(U2) and ,UART2_CTS(U3). How I can create two hci connections? Are the bluetooth drivers prepared to work with two WL1835 modules?

    I would really appreciate your help on this.

    Best regards,

    Ignacio

  • Hi Ignacio,

    The BlueZ bluetooth driver should be able to handle two devices (hci0 & hci1).

    Regards,
    Gigi Joseph.

  • Hi Gigi,

    Can you give me any guidance to initialize the two modules and how to prepare board-am335xevm.c file to be able to handle the two devices with BlueZ bluetooth driver?

    Thanks,

    Ignacio

  • Hello everybody,

    If you have followed my posts you will know that I have different things to resolve about wl1835 and my BBB customized design. The most important thing I need to solve before thursday is to make work the two HCI bluetooth connections with the two wl1835 modules that I have connected in my design to AM3358. At the moment I can create one HCI connection for one of the wl1835 modules and it works okay. I think I should make some changes in board-am335xevm.c and recompile the kernel but I am not sure if I have to duplicate all the structures and functions related with the wl1835 and how to do it exactly. Here are all the functions and structures I use in my board-am335xevm.c file related with wl1835:

    #define AM335XEVM_WLAN_PMENA_GPIO GPIO_TO_PIN(3, 21)

    #define AM335XEVM_WLAN_IRQ_GPIO GPIO_TO_PIN(3, 19)

    struct wl12xx_platform_data am335xevm_wlan_data = {

    .irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO),

    #ifdef CONFIG_MACH_AM335XEVM_WILINK8

            .board_ref_clock = WL12XX_REFCLOCK_38,

            .board_tcxo_clock = WL12XX_TCXOCLOCK_26,

    #else

    .board_ref_clock = WL12XX_REFCLOCK_38_XTAL, /* 38.4Mhz */

    #endif

    .bt_enable_gpio = GPIO_TO_PIN(0, 7),

    .wlan_enable_gpio = GPIO_TO_PIN(3, 21),

    };

    /* Module pin mux for wlan and bluetooth */

    static struct pinmux_config mmc2_wl12xx_pin_mux[] = {

    {"gpmc_a1.mmc2_dat0", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},

    {"gpmc_a2.mmc2_dat1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},

    {"gpmc_a3.mmc2_dat2", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},

    {"gpmc_ben1.mmc2_dat3", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},

    {"gpmc_csn3.mmc2_cmd", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},

    {"gpmc_clk.mmc2_clk", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},

    {NULL, 0},

    };

    static struct pinmux_config uart1_wl12xx_pin_mux[] = {

    {"uart1_ctsn.uart1_ctsn", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},

    {"uart1_rtsn.uart1_rtsn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT},

    {"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},

    {"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL},

    {NULL, 0},

    };

    static struct pinmux_config wl12xx_pin_mux[] = {

    {"mcasp0_ahclkx.gpio3_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},

    {"mcasp0_fsr.gpio3_19", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

    {"ecap0_in_pwm0_out.gpio0_7", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT_PULLUP},

    {NULL, 0},

    };

    static void mmc2_wl12xx_init(int evm_id, int profile)

    {

    setup_pin_mux(mmc2_wl12xx_pin_mux);

    am335x_mmc[1].mmc = 3;

    am335x_mmc[1].name = "wl1271";

    am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD;

    am335x_mmc[1].nonremovable = true;

    am335x_mmc[1].gpio_cd = -EINVAL;

    am335x_mmc[1].gpio_wp = -EINVAL;

    am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */

    /* mmc will be initialized when mmc0_init is called */

    return;

    }

    static void uart1_wl12xx_init(int evm_id, int profile)

    {

    setup_pin_mux(uart1_wl12xx_pin_mux);

    }

    #ifdef CONFIG_TI_ST

    /* TI-ST for WL12xx BT */

    /* Bluetooth Enable PAD for EVM Rev 1.1 and up */

    #define AM33XX_CONTROL_PADCONF_MCASP0_AHCLKX_OFFSET 0x09AC

    /* Bluetooth Enable PAD for EVM Rev 1.0 */

    #define AM33XX_CONTROL_PADCONF_GPMC_CSN2_OFFSET 0x0884

    int plat_kim_suspend(struct platform_device *pdev, pm_message_t state)

    {

    /* TODO: wait for HCI-LL sleep */

    return 0;

    }

    int plat_kim_resume(struct platform_device *pdev)

    {

    return 0;

    }

    int plat_kim_chip_enable(struct kim_data_s *kim_data)

    {

    printk(KERN_DEBUG "%s\n", __func__);

    /* Configure BT_EN pin so that suspend/resume works correctly on rev 1.1 */

    selected_pad = AM33XX_CONTROL_PADCONF_MCASP0_AHCLKX_OFFSET;

    /* Configure BT_EN pin so that suspend/resume works correctly on rev 1.0 */

    /*selected_pad = AM33XX_CONTROL_PADCONF_GPMC_CSN2_OFFSET;*/

    gpio_direction_output(kim_data->nshutdown, 0);

    msleep(1);

    gpio_direction_output(kim_data->nshutdown, 1);

    /* Enable pullup on the enable pin for keeping BT active during suspend */

    pad_mux_value = readl(AM33XX_CTRL_REGADDR(selected_pad));

    pad_mux_value &= (~AM33XX_PULL_DISA);

    writel(pad_mux_value, AM33XX_CTRL_REGADDR(selected_pad));

    return 0;

    }

    int plat_kim_chip_disable(struct kim_data_s *kim_data)

    {

    printk(KERN_DEBUG "%s\n", __func__);

    gpio_direction_output(kim_data->nshutdown, 0);

    /* Disable pullup on the enable pin to allow BT shut down during suspend */

    pad_mux_value = readl(AM33XX_CTRL_REGADDR(selected_pad));

    pad_mux_value |= AM33XX_PULL_DISA;

    writel(pad_mux_value, AM33XX_CTRL_REGADDR(selected_pad));

    return 0;

    }

    struct ti_st_plat_data wilink_pdata = {

    .nshutdown_gpio = GPIO_TO_PIN(0, 7),

    .dev_name = "/dev/ttyO1",

    .flow_cntrl = 1,

    .baud_rate = 3000000,

    .suspend = plat_kim_suspend,

    .resume = plat_kim_resume,

    .chip_enable = plat_kim_chip_enable,

    .chip_disable = plat_kim_chip_disable,

    };

    static struct platform_device wl12xx_device = {

    .name = "kim",

    .id = -1,

    .dev.platform_data = &wilink_pdata,

    };

    static struct platform_device btwilink_device = {

    .name = "btwilink",

    .id = -1,

    };

    #ifdef CONFIG_MACH_AM335XEVM_WILINK8

    static struct platform_device nfcwilink_device = {

            .name = "nfcwilink",

            .id = -1,

    };

    #endif

    static inline void __init am335xevm_init_btwilink(void)

    {

    pr_info("am335xevm: bt init\n");

    platform_device_register(&wl12xx_device);

    platform_device_register(&btwilink_device);

    #ifdef CONFIG_MACH_AM335XEVM_WILINK8

    platform_device_register(&nfcwilink_device);

    #endif

    }

    #endif

    /* WL1271 Audio */

    static struct platform_device wl1271bt_codec_device = {

    .name = "wl1271bt-dummy-codec",

    .id = -1,

    };

    static void wl12xx_bluetooth_enable(void)

    {

    #ifndef CONFIG_TI_ST

    int status = gpio_request(am335xevm_wlan_data.bt_enable_gpio,

    "bt_en\n");

    if (status < 0)

    pr_err("Failed to request gpio for bt_enable");

    pr_info("Configure Bluetooth Enable pin...\n");

    gpio_direction_output(am335xevm_wlan_data.bt_enable_gpio, 0);

    #else

    am335xevm_init_btwilink();

    #endif

    platform_device_register(&wl1271bt_codec_device);

    }

    static int wl12xx_set_power(struct device *dev, int slot, int on, int vdd)

    {

    if (on) {

    gpio_direction_output(am335xevm_wlan_data.wlan_enable_gpio, 1);

    mdelay(70);

    } else {

    gpio_direction_output(am335xevm_wlan_data.wlan_enable_gpio, 0);

    }

    return 0;

    }

    static void wl12xx_init(int evm_id, int profile)

    {

    struct device *dev;

    struct omap_mmc_platform_data *pdata;

    int ret;

    if (evm_id == EVM_SK) {

    am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(1, 29);

    am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(3, 21);

    am335xevm_wlan_data.irq =

    OMAP_GPIO_IRQ(AM335XEVM_SK_WLAN_IRQ_GPIO);

    setup_pin_mux(wl12xx_pin_mux_sk);

    } else {

    setup_pin_mux(wl12xx_pin_mux);

    }

    am335xevm_wlan_data.platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ;

    wl12xx_bluetooth_enable();

    if (wl12xx_set_platform_data(&am335xevm_wlan_data))

    pr_err("error setting wl12xx data\n");

    dev = am335x_mmc[1].dev;

    if (!dev) {

    pr_err("wl12xx mmc device initialization failed\n");

    goto out;

    }

    pdata = dev->platform_data;

    if (!pdata) {

    pr_err("Platfrom data of wl12xx device not set\n");

    goto out;

    }

    ret = gpio_request_one(am335xevm_wlan_data.wlan_enable_gpio,

    GPIOF_OUT_INIT_LOW, "wlan_en");

    if (ret) {

    pr_err("Error requesting wlan enable gpio: %d\n", ret);

    goto out;

    }

    pdata->slots[0].set_power = wl12xx_set_power;

    out:

    return;

    }

    /* Beaglebone Black */

    static struct evm_dev_cfg beagleboneblack_dev_cfg[] = {

    {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    {clkout2_enable, DEV_ON_BASEBOARD, PROFILE_NONE},

    {tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    {mmc1_emmc_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    {mmc2_wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 |

    PROFILE_5)},

    {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    {uart1_wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 |

    PROFILE_5)},

    {wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | PROFILE_5)},

    // {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    // {mcasp0_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    {sgx_init, DEV_ON_BASEBOARD, PROFILE_NONE},

    {NULL, 0, 0},

    };

    /* BeagleBone Black */

    static void setup_beagleboneblack(void)

    {

    pr_info("The board is a AM335x Beaglebone Black.\n");

    /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */

    am335x_mmc[0].gpio_wp = -EINVAL;

    _configure_device(BEAGLE_BONE_BLACK, beagleboneblack_dev_cfg,

    PROFILE_NONE);

    /* TPS65217 regulator has full constraints */

    regulator_has_full_constraints();

    am33xx_cpsw_init(AM33XX_CPSW_MODE_MII, NULL, NULL);

    }

    Please give some help on this, our project is out of time for weeks.

    Best regards,

    Ignacio

  • Hi,

    Yes you need to duplicate the structures and functions related with the wl1835 for bluetooth.

    You need to use two uart(hci0 & hci1) to communicate with the host processor. 

    I have not tried it myself before.

    But It will be good, if you share the reason why you want to have two Bluetooth modules? what is the use case?

  • Hi Sundeep,

    Thanks for the answer. Our client uses these modules in a traffic control project in highways. In his application he introduces a delay between the scanning of the two bluetooth, it might be to measure the speed of the cars or the direction. I don't know exactly what he does, but he needs the two modules.

    Then I guess it would be something like that:

    #define AM335XEVM_WLAN_PMENA_GPIO GPIO_TO_PIN(3, 21)

    #define AM335XEVM_WLAN_IRQ_GPIO1 GPIO_TO_PIN(3, 19)
    #define AM335XEVM_WLAN_IRQ_GPIO2 GPIO_TO_PIN(0, 27)

    struct wl12xx_platform_data am335xevm_wlan_data1 = {
    .irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO1),
    #ifdef CONFIG_MACH_AM335XEVM_WILINK8
    .board_ref_clock = WL12XX_REFCLOCK_38,
    .board_tcxo_clock = WL12XX_TCXOCLOCK_26,
    #else
    .board_ref_clock = WL12XX_REFCLOCK_38_XTAL, /* 38.4Mhz */
    #endif
    .bt_enable_gpio = GPIO_TO_PIN(0, 7),
    .wlan_enable_gpio = GPIO_TO_PIN(3, 21),
    };

    struct wl12xx_platform_data am335xevm_wlan_data2 = {
    .irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO2),
    #ifdef CONFIG_MACH_AM335XEVM_WILINK8
    .board_ref_clock = WL12XX_REFCLOCK_38,
    .board_tcxo_clock = WL12XX_TCXOCLOCK_26,
    #else
    .board_ref_clock = WL12XX_REFCLOCK_38_XTAL, /* 38.4Mhz */
    #endif
    .bt_enable_gpio = GPIO_TO_PIN(1, 13),
    .wlan_enable_gpio = GPIO_TO_PIN(1, 15),
    };

    /* Module pin mux for wlan and bluetooth */
    static struct pinmux_config mmc2_wl12xx_pin_mux[] = {
    {"gpmc_a1.mmc2_dat0", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_a2.mmc2_dat1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_a3.mmc2_dat2", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_ben1.mmc2_dat3", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_csn3.mmc2_cmd", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
    {"gpmc_clk.mmc2_clk", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
    {NULL, 0},
    };

    static struct pinmux_config uart1_wl12xx_pin_mux[] = {
    {"uart1_ctsn.uart1_ctsn", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
    {"uart1_rtsn.uart1_rtsn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT},
    {"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
    {"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL},
    {NULL, 0},
    };

    static struct pinmux_config wl12xx_pin_mux1[] = {
    {"mcasp0_ahclkx.gpio3_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
    {"mcasp0_fsr.gpio3_19", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
    {"ecap0_in_pwm0_out.gpio0_7", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT_PULLUP},
    {NULL, 0},
    };

    static struct pinmux_config wl12xx_pin_mux2[] = {
    {"mcasp0_ahclkx.gpio1_15", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
    {"mcasp0_fsr.gpio0_27", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
    {"ecap0_in_pwm0_out.gpio1_13", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT_PULLUP},
    {NULL, 0},
    };


    static void mmc2_wl12xx_init(int evm_id, int profile)
    {
    setup_pin_mux(mmc2_wl12xx_pin_mux);

    am335x_mmc[1].mmc = 3;
    am335x_mmc[1].name = "wl1271";
    am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD;
    am335x_mmc[1].nonremovable = true;
    am335x_mmc[1].gpio_cd = -EINVAL;
    am335x_mmc[1].gpio_wp = -EINVAL;
    am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */

    /* mmc will be initialized when mmc0_init is called */
    return;
    }

    static void uart1_wl12xx_init(int evm_id, int profile)
    {
    setup_pin_mux(uart1_wl12xx_pin_mux);
    }

    static void uart2_wl12xx_init(int evm_id, int profile)
    {
    setup_pin_mux(uart2_wl12xx_pin_mux);
    }

    #ifdef CONFIG_TI_ST
    /* TI-ST for WL12xx BT */

    /* Bluetooth Enable PAD for EVM Rev 1.1 and up */
    #define AM33XX_CONTROL_PADCONF_MCASP0_AHCLKX_OFFSET 0x09AC

    /* Bluetooth Enable PAD for EVM Rev 1.0 */
    #define AM33XX_CONTROL_PADCONF_GPMC_CSN2_OFFSET 0x0884

    int plat_kim_suspend(struct platform_device *pdev, pm_message_t state)
    {
    /* TODO: wait for HCI-LL sleep */
    return 0;
    }

    int plat_kim_resume(struct platform_device *pdev)
    {
    return 0;
    }

    int plat_kim_chip_enable(struct kim_data_s *kim_data)
    {
    printk(KERN_DEBUG "%s\n", __func__);

    /* Configure BT_EN pin so that suspend/resume works correctly on rev 1.1 */
    selected_pad = AM33XX_CONTROL_PADCONF_MCASP0_AHCLKX_OFFSET;
    /* Configure BT_EN pin so that suspend/resume works correctly on rev 1.0 */
    /*selected_pad = AM33XX_CONTROL_PADCONF_GPMC_CSN2_OFFSET;*/

    gpio_direction_output(kim_data->nshutdown, 0);
    msleep(1);
    gpio_direction_output(kim_data->nshutdown, 1);

    /* Enable pullup on the enable pin for keeping BT active during suspend */
    pad_mux_value = readl(AM33XX_CTRL_REGADDR(selected_pad));
    pad_mux_value &= (~AM33XX_PULL_DISA);
    writel(pad_mux_value, AM33XX_CTRL_REGADDR(selected_pad));

    return 0;
    }

    int plat_kim_chip_disable(struct kim_data_s *kim_data)
    {
    printk(KERN_DEBUG "%s\n", __func__);

    gpio_direction_output(kim_data->nshutdown, 0);

    /* Disable pullup on the enable pin to allow BT shut down during suspend */
    pad_mux_value = readl(AM33XX_CTRL_REGADDR(selected_pad));
    pad_mux_value |= AM33XX_PULL_DISA;
    writel(pad_mux_value, AM33XX_CTRL_REGADDR(selected_pad));

    return 0;
    }

    struct ti_st_plat_data wilink_pdata1 = {
    .nshutdown_gpio = GPIO_TO_PIN(0, 7),
    .dev_name = "/dev/ttyO1",
    .flow_cntrl = 1,
    .baud_rate = 3000000,
    .suspend = plat_kim_suspend,
    .resume = plat_kim_resume,
    .chip_enable = plat_kim_chip_enable,
    .chip_disable = plat_kim_chip_disable,
    };

    struct ti_st_plat_data wilink_pdata2 = {
    .nshutdown_gpio = GPIO_TO_PIN(1, 13),
    .dev_name = "/dev/ttyO2",
    .flow_cntrl = 1,
    .baud_rate = 3000000,
    .suspend = plat_kim_suspend,
    .resume = plat_kim_resume,
    .chip_enable = plat_kim_chip_enable,
    .chip_disable = plat_kim_chip_disable,
    };

    static struct platform_device wl12xx_device1 = {
    .name = "kim",
    .id = -1,
    .dev.platform_data = &wilink_pdata1,
    };

    static struct platform_device wl12xx_device2 = {
    .name = "kim",
    .id = -1,
    .dev.platform_data = &wilink_pdata2,
    };

    static struct platform_device btwilink_device = {
    .name = "btwilink",
    .id = -1,
    };

    #ifdef CONFIG_MACH_AM335XEVM_WILINK8
    static struct platform_device nfcwilink_device = {
    .name = "nfcwilink",
    .id = -1,
    };
    #endif

    static inline void __init am335xevm_init_btwilink(void)
    {
    pr_info("am335xevm: bt init\n");

    platform_device_register(&wl12xx_device1);
    platform_device_register(&wl12xx_device2);
    platform_device_register(&btwilink_device);
    #ifdef CONFIG_MACH_AM335XEVM_WILINK8
    platform_device_register(&nfcwilink_device);
    #endif
    }
    #endif

    /* WL1271 Audio */
    static struct platform_device wl1271bt_codec_device = {
    .name = "wl1271bt-dummy-codec",
    .id = -1,
    };

    static void wl12xx_bluetooth_enable1(void)
    {
    #ifndef CONFIG_TI_ST
    int status = gpio_request(am335xevm_wlan_data1.bt_enable_gpio,
    "bt_en\n");
    if (status < 0)
    pr_err("Failed to request gpio for bt_enable");

    pr_info("Configure Bluetooth Enable pin...\n");
    gpio_direction_output(am335xevm_wlan_data1.bt_enable_gpio, 0);
    #else
    am335xevm_init_btwilink();
    #endif
    platform_device_register(&wl1271bt_codec_device);
    }

    static void wl12xx_bluetooth_enable2(void)
    {
    #ifndef CONFIG_TI_ST
    int status = gpio_request(am335xevm_wlan_data2.bt_enable_gpio,
    "bt_en\n");
    if (status < 0)
    pr_err("Failed to request gpio for bt_enable");

    pr_info("Configure Bluetooth Enable pin...\n");
    gpio_direction_output(am335xevm_wlan_data2.bt_enable_gpio, 0);
    #else
    am335xevm_init_btwilink();
    #endif
    platform_device_register(&wl1271bt_codec_device);
    }

    static int wl12xx_set_power1(struct device *dev, int slot, int on, int vdd)
    {
    if (on) {
    gpio_direction_output(am335xevm_wlan_data1.wlan_enable_gpio, 1);
    mdelay(70);
    } else {
    gpio_direction_output(am335xevm_wlan_data1.wlan_enable_gpio, 0);
    }

    return 0;
    }

    static int wl12xx_set_power2(struct device *dev, int slot, int on, int vdd)
    {
    if (on) {
    gpio_direction_output(am335xevm_wlan_data2.wlan_enable_gpio, 1);
    mdelay(70);
    } else {
    gpio_direction_output(am335xevm_wlan_data2.wlan_enable_gpio, 0);
    }

    return 0;
    }

    static void wl12xx_init1(int evm_id, int profile)
    {
    struct device *dev;
    struct omap_mmc_platform_data *pdata;
    int ret;

    if (evm_id == EVM_SK) {
    am335xevm_wlan_data1.wlan_enable_gpio = GPIO_TO_PIN(1, 29);
    am335xevm_wlan_data1.bt_enable_gpio = GPIO_TO_PIN(3, 21);
    am335xevm_wlan_data1.irq =
    OMAP_GPIO_IRQ(AM335XEVM_SK_WLAN_IRQ_GPIO);
    setup_pin_mux(wl12xx_pin_mux_sk);
    } else {
    setup_pin_mux(wl12xx_pin_mux1);
    }
    am335xevm_wlan_data1.platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
    wl12xx_bluetooth_enable1();

    if (wl12xx_set_platform_data(&am335xevm_wlan_data1))
    pr_err("error setting wl12xx data\n");

    dev = am335x_mmc[1].dev;
    if (!dev) {
    pr_err("wl12xx mmc device initialization failed\n");
    goto out;
    }

    pdata = dev->platform_data;
    if (!pdata) {
    pr_err("Platfrom data of wl12xx device not set\n");
    goto out;
    }

    ret = gpio_request_one(am335xevm_wlan_data1.wlan_enable_gpio,
    GPIOF_OUT_INIT_LOW, "wlan_en");
    if (ret) {
    pr_err("Error requesting wlan enable gpio: %d\n", ret);
    goto out;
    }


    pdata->slots[0].set_power = wl12xx_set_power;
    out:
    return;
    }

    static void wl12xx_init2(int evm_id, int profile)
    {
    struct device *dev;
    struct omap_mmc_platform_data *pdata;
    int ret;

    if (evm_id == EVM_SK) {
    am335xevm_wlan_data2.wlan_enable_gpio = GPIO_TO_PIN(1, 29);
    am335xevm_wlan_data2.bt_enable_gpio = GPIO_TO_PIN(3, 21);
    am335xevm_wlan_data2.irq =
    OMAP_GPIO_IRQ(AM335XEVM_SK_WLAN_IRQ_GPIO);
    setup_pin_mux(wl12xx_pin_mux_sk);
    } else {
    setup_pin_mux(wl12xx_pin_mux2);
    }
    am335xevm_wlan_data2.platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
    wl12xx_bluetooth_enable2();

    if (wl12xx_set_platform_data(&am335xevm_wlan_data2))
    pr_err("error setting wl12xx data\n");

    dev = am335x_mmc[1].dev;
    if (!dev) {
    pr_err("wl12xx mmc device initialization failed\n");
    goto out;
    }

    pdata = dev->platform_data;
    if (!pdata) {
    pr_err("Platfrom data of wl12xx device not set\n");
    goto out;
    }

    ret = gpio_request_one(am335xevm_wlan_data2.wlan_enable_gpio,
    GPIOF_OUT_INIT_LOW, "wlan_en");
    if (ret) {
    pr_err("Error requesting wlan enable gpio: %d\n", ret);
    goto out;
    }


    pdata->slots[0].set_power = wl12xx_set_power;
    out:
    return;
    }


    /* Beaglebone Black */
    static struct evm_dev_cfg beagleboneblack_dev_cfg[] = {
    {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {clkout2_enable, DEV_ON_BASEBOARD, PROFILE_NONE},
    {tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {mmc1_emmc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {mmc2_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {uart1_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {uart2_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {wl12xx_init1, DEV_ON_BASEBOARD, PROFILE_NONE},
    {wl12xx_init2, DEV_ON_BASEBOARD, PROFILE_NONE},
    // {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    // {mcasp0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {sgx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {NULL, 0, 0},
    };

    /* BeagleBone Black */
    static void setup_beagleboneblack(void)
    {
    pr_info("The board is a AM335x Beaglebone Black.\n");

    /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */
    am335x_mmc[0].gpio_wp = -EINVAL;

    _configure_device(BEAGLE_BONE_BLACK, beagleboneblack_dev_cfg,
    PROFILE_NONE);

    /* TPS65217 regulator has full constraints */
    regulator_has_full_constraints();

    am33xx_cpsw_init(AM33XX_CPSW_MODE_MII, NULL, NULL);
    }

    Am I right?

    I can not test it right now because I am in a work trip and I don't have the board with me and today I am coming back from SF to Spain but if you could please tell me if I am in the right direction I would appreciate it because after my return I have to make it work in not more than one day. I will be able to check the email sometime during my trip.

    Best regards,

    Ignacio

     

  • Hi,

    I think you are in the right direction.  

  • Hello,

    I have been trying to compile the kernel duplicating all the functions and structures related with wl1835 module in board-am335xevm.c to be able to use the two modules and creating two hci bluetooth connections. I have tested the two modules separately before duplicating functions and structures changing the configuration of the serial port and the gpio to enable of the bluetooth, and both work separately correctly. After that I tried to make work both at the same time but I couldn' create the two hci connections. One of the doubts I have is how the structures in board-am335xevm.c are related with the bluetooth driver. This is the code related with wl1835 I have written in board-am335xevm.c:

    int plat_kim_suspend(struct platform_device *pdev, pm_message_t state)
    {
    /* TODO: wait for HCI-LL sleep */
    return 0;
    }

    int plat_kim_resume(struct platform_device *pdev)
    {
    return 0;
    }

    int plat_kim_chip_enable(struct kim_data_s *kim_data)
    {
    printk(KERN_DEBUG "%s\n", __func__);

    /* Configure BT_EN pin so that suspend/resume works correctly on rev 1.1 */
    selected_pad = AM33XX_CONTROL_PADCONF_MCASP0_AHCLKX_OFFSET;
    /* Configure BT_EN pin so that suspend/resume works correctly on rev 1.0 */
    /*selected_pad = AM33XX_CONTROL_PADCONF_GPMC_CSN2_OFFSET;*/

    gpio_direction_output(kim_data->nshutdown, 0);
    msleep(1);
    gpio_direction_output(kim_data->nshutdown, 1);

    /* Enable pullup on the enable pin for keeping BT active during suspend */
    pad_mux_value = readl(AM33XX_CTRL_REGADDR(selected_pad));
    pad_mux_value &= (~AM33XX_PULL_DISA);
    writel(pad_mux_value, AM33XX_CTRL_REGADDR(selected_pad));

    return 0;
    }

    int plat_kim_chip_disable(struct kim_data_s *kim_data)
    {
    printk(KERN_DEBUG "%s\n", __func__);

    gpio_direction_output(kim_data->nshutdown, 0);

    /* Disable pullup on the enable pin to allow BT shut down during suspend */
    pad_mux_value = readl(AM33XX_CTRL_REGADDR(selected_pad));
    pad_mux_value |= AM33XX_PULL_DISA;
    writel(pad_mux_value, AM33XX_CTRL_REGADDR(selected_pad));

    return 0;
    }

    struct ti_st_plat_data wilink_pdata1 = {
    .nshutdown_gpio = GPIO_TO_PIN(0, 7),
    .dev_name = "/dev/ttyO1",
    .flow_cntrl = 1,
    .baud_rate = 3000000,
    .suspend = plat_kim_suspend,
    .resume = plat_kim_resume,
    .chip_enable = plat_kim_chip_enable,
    .chip_disable = plat_kim_chip_disable,
    };

    struct ti_st_plat_data wilink_pdata2 = {
    .nshutdown_gpio = GPIO_TO_PIN(1, 13),
    .dev_name = "/dev/ttyO2",
    .flow_cntrl = 1,
    .baud_rate = 3000000,
    .suspend = plat_kim_suspend,
    .resume = plat_kim_resume,
    .chip_enable = plat_kim_chip_enable,
    .chip_disable = plat_kim_chip_disable,
    };

    static struct platform_device wl12xx_device1 = {
    .name = "kim",
    .id = -1,
    .dev.platform_data = &wilink_pdata1,
    };

    static struct platform_device wl12xx_device2 = {
    .name = "kim2",
    .id = -1,
    .dev.platform_data = &wilink_pdata2,
    };

    static struct platform_device btwilink_device1 = {
    .name = "btwilink",
    .id = -1,
    };

    static struct platform_device btwilink_device2 = {
    .name = "btwilink2",
    .id = -1,
    };

    #ifdef CONFIG_MACH_AM335XEVM_WILINK8
    static struct platform_device nfcwilink_device = {
    .name = "nfcwilink",
    .id = -1,
    };
    #endif

    static inline void __init am335xevm_init_btwilink1(void)
    {
    pr_info("am335xevm: bt init\n");

    platform_device_register(&wl12xx_device1);
    platform_device_register(&btwilink_device1);
    #ifdef CONFIG_MACH_AM335XEVM_WILINK8
    platform_device_register(&nfcwilink_device);
    #endif
    }

    static inline void __init am335xevm_init_btwilink2(void)
    {
    pr_info("am335xevm: bt init\n");

    platform_device_register(&wl12xx_device2);
    platform_device_register(&btwilink_device2);
    #ifdef CONFIG_MACH_AM335XEVM_WILINK8
    platform_device_register(&nfcwilink_device);
    #endif
    }

    #endif

    /* WL1271 Audio */
    static struct platform_device wl1271bt_codec_device1 = {
    .name = "wl1271bt-dummy-codec",
    .id = -1,
    };

    /* WL1271 Audio */
    static struct platform_device wl1271bt_codec_device2 = {
    .name = "wl1271bt-dummy-codec2",
    .id = -1,
    };

    static void wl12xx_bluetooth_enable1(void)
    {
    #ifndef CONFIG_TI_ST
    int status = gpio_request(am335xevm_wlan_data1.bt_enable_gpio,
    "bt_en\n");
    if (status < 0)
    pr_err("Failed to request gpio for bt_enable");

    pr_info("Configure Bluetooth Enable pin...\n");
    gpio_direction_output(am335xevm_wlan_data1.bt_enable_gpio, 0);
    #else
    am335xevm_init_btwilink1();
    #endif
    platform_device_register(&wl1271bt_codec_device1);
    }

    static void wl12xx_bluetooth_enable2(void)
    {
    #ifndef CONFIG_TI_ST
    int status = gpio_request(am335xevm_wlan_data2.bt_enable_gpio,
    "bt_en\n");
    if (status < 0)
    pr_err("Failed to request gpio for bt_enable");

    pr_info("Configure Bluetooth Enable pin...\n");
    gpio_direction_output(am335xevm_wlan_data2.bt_enable_gpio, 0);
    #else
    am335xevm_init_btwilink2();
    #endif
    platform_device_register(&wl1271bt_codec_device2);
    }

    static int wl12xx_set_power1(struct device *dev, int slot, int on, int vdd)
    {
    if (on) {
    gpio_direction_output(am335xevm_wlan_data1.wlan_enable_gpio, 1);
    mdelay(70);
    } else {
    gpio_direction_output(am335xevm_wlan_data1.wlan_enable_gpio, 0);
    }

    return 0;
    }

    static int wl12xx_set_power2(struct device *dev, int slot, int on, int vdd)
    {
    if (on) {
    gpio_direction_output(am335xevm_wlan_data2.wlan_enable_gpio, 1);
    mdelay(70);
    } else {
    gpio_direction_output(am335xevm_wlan_data2.wlan_enable_gpio, 0);
    }

    return 0;
    }

    static void wl12xx_init1(int evm_id, int profile)
    {
    struct device *dev;
    struct omap_mmc_platform_data *pdata;
    int ret;

    if (evm_id == EVM_SK) {
    am335xevm_wlan_data1.wlan_enable_gpio = GPIO_TO_PIN(1, 29);
    am335xevm_wlan_data1.bt_enable_gpio = GPIO_TO_PIN(3, 21);
    am335xevm_wlan_data1.irq =
    OMAP_GPIO_IRQ(AM335XEVM_SK_WLAN_IRQ_GPIO);
    setup_pin_mux(wl12xx_pin_mux_sk);
    } else {
    setup_pin_mux(wl12xx_pin_mux1);
    }
    am335xevm_wlan_data1.platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
    wl12xx_bluetooth_enable1();
    wl12xx_bluetooth_enable2();
    if (wl12xx_set_platform_data(&am335xevm_wlan_data1))
    pr_err("error setting wl12xx data\n");

    dev = am335x_mmc[1].dev;
    if (!dev) {
    pr_err("wl12xx mmc device initialization failed\n");
    goto out;
    }

    pdata = dev->platform_data;
    if (!pdata) {
    pr_err("Platfrom data of wl12xx device not set\n");
    goto out;
    }

    ret = gpio_request_one(am335xevm_wlan_data1.wlan_enable_gpio,
    GPIOF_OUT_INIT_LOW, "wlan_en");
    if (ret) {
    pr_err("Error requesting wlan enable gpio: %d\n", ret);
    goto out;
    }


    pdata->slots[0].set_power = wl12xx_set_power1;
    out:
    return;
    }

    static void wl12xx_init2(int evm_id, int profile)
    {
    struct device *dev;
    struct omap_mmc_platform_data *pdata;
    int ret;

    if (evm_id == EVM_SK) {
    am335xevm_wlan_data2.wlan_enable_gpio = GPIO_TO_PIN(1, 29);
    am335xevm_wlan_data2.bt_enable_gpio = GPIO_TO_PIN(3, 21);
    am335xevm_wlan_data2.irq =
    OMAP_GPIO_IRQ(AM335XEVM_SK_WLAN_IRQ_GPIO);
    setup_pin_mux(wl12xx_pin_mux_sk);
    } else {
    setup_pin_mux(wl12xx_pin_mux2);
    }
    am335xevm_wlan_data2.platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
    wl12xx_bluetooth_enable2();

    if (wl12xx_set_platform_data(&am335xevm_wlan_data2))
    pr_err("error setting wl12xx data\n");

    dev = am335x_mmc[1].dev;
    if (!dev) {
    pr_err("wl12xx mmc device initialization failed\n");
    goto out;
    }

    pdata = dev->platform_data;
    if (!pdata) {
    pr_err("Platfrom data of wl12xx device not set\n");
    goto out;
    }

    ret = gpio_request_one(am335xevm_wlan_data2.wlan_enable_gpio,
    GPIOF_OUT_INIT_LOW, "wlan_en");
    if (ret) {
    pr_err("Error requesting wlan enable gpio: %d\n", ret);
    goto out;
    }


    pdata->slots[0].set_power = wl12xx_set_power2;
    out:
    return;
    }

    /* Beaglebone Black */
    static struct evm_dev_cfg beagleboneblack_dev_cfg[] = {
    {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {clkout2_enable, DEV_ON_BASEBOARD, PROFILE_NONE},
    {tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {mmc1_emmc_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {mmc2_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {uart1_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {uart2_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {wl12xx_init1, DEV_ON_BASEBOARD, PROFILE_NONE},
    {wl12xx_init2, DEV_ON_BASEBOARD, PROFILE_NONE},
    // {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    // {mcasp0_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {sgx_init, DEV_ON_BASEBOARD, PROFILE_NONE},
    {NULL, 0, 0},
    };

    In my .config file I have CONFIG_TI_ST=y 

    To compile the bluetooth drivers I have followed the instructions in this link:

    http://processors.wiki.ti.com/index.php/WL18xx_WiFi_Build_Process

    And in the bluetooth drivers I had a look into the btwilink.c file. I supose that this file is connected in some way with the code in the kernel and I don't know if I should add some code in btwilink.c to be able to create two hci connections. Do you know how is the code related between the kernel side and the drivers?

    What I have seen is that if I change the name inside this structure:

    static struct platform_device btwilink_device1 = {
    .name = "btwilink",
    .id = -1,
    };

    to btwilink1 instead of btwilink, it does not work, because I supose it uses the same name as the kernel module. Any suggestions?

    Best regards,

    Ignacio

  • Hi Sundeep,

    I haven't been able to make work the two bluetooth modules at the same time. I talked with my client and in the end the reason why he needs two bluetooth modules is because he needs to connect two antennas one polarized vertically and the other horizontally to get the maximum coverage. He scans the bluetooth network to find the mac addresses of the devices in a traffic control project in highways just to estimate the number of vehicles that pass throw. I think one solution is just to connect the two antennas to one bluetooth with a splitter. Which solution do you think he could get the best results, with two bluetooth modules with one antenna per module, or with just one bluetooth module and one splitter to connect the two antennas.

    Best regards,

    Ignacio