Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1583

RE: RZ/A1 RSK Device Tree add WiFi/BT using SDIO interface with TI Wilink8

$
0
0

I'm making some more progress. When I boot up now, the wl18xx on the SDIO interface is detected and enumerated:

mmc0: queuing unknown CIS tuple 0x91 (3 bytes)

mmc0: new high speed SDIO card at address 0001

*****************

*****************

WL18XX_SDIO_PROBE

*****************

*****************

Setting if_ops to sdio_ops

wl18xx_driver wl18xx.0.auto: Firmware path is:

wl18xx_driver wl18xx.0.auto: Attempting to load firmware from here: /lib/firmware/updates/3.14.28-ltsi/ti-connectivity/wl1271-nvs.bin

wl18xx_driver wl18xx.0.auto: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wl18xx_driver wl18xx.0.auto: Did successfully load firmware: /lib/firmware/updates/ti-connectivity/wl1271-nvs.bin

wl18xx_driver wl18xx.0.auto: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wl18xx_driver wl18xx.0.auto: Firmware path is: /lib/firmware/updates/ti-connectivity/wl1271-nvs.bin

wl18xx_driver wl18xx.0.auto: Attempting to load firmware from here: /lib/firmware/updates/ti-connectivity/wl1271-nvs.bin

wl18xx_driver wl18xx.0.auto: Attempting to load firmware from here: /lib/firmware/updates/3.14.28-ltsi/ti-connectivity/wl18xx-conf.bin

wl18xx_driver wl18xx.0.auto: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wl18xx_driver wl18xx.0.auto: Did successfully load firmware: /lib/firmware/updates/ti-connectivity/wl18xx-conf.bin

wl18xx_driver wl18xx.0.auto: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wl12xx_sdio_set_power() Called

wl12xx_sdio_set_power() Power On

wl12xx_sdio_power_on() Setting Power On

wl12xx_sdio_power_on() Failed to set power on...

wl1271: Power On call returned: 0 [GPIO is: 0]

wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)

wl12xx_sdio_set_power() Called

wl12xx_sdio_set_power() Power Off

cfg80211: Updating information on frequency 2412 MHz with regulatory rule:

cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)

...

cfg80211: Updating information on frequency 5180 MHz with regulatory rule:

cfg80211: 5170000 KHz - 5250000 KHz @ 160000 KHz), (600 mBi, 2000 mBm)

...

cfg80211: Updating information on frequency 5700 MHz with regulatory rule:

cfg80211: 5490000 KHz - 5730000 KHz @ 160000 KHz), (600 mBi, 2000 mBm)

cfg80211: Disabling freq 5745 MHz

cfg80211: Disabling freq 5765 MHz

cfg80211: Disabling freq 5785 MHz

cfg80211: Disabling freq 5805 MHz

cfg80211: Disabling freq 5825 MHz

wlcore: loaded

I also get a wlan0 device:

$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 32:33:34:35:FF:FF
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:103 Base address:0x3000 DMA chan:ff

lo Link encap:Local Loopback
LOOPBACK MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr DE:AD:BE:EF:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

However, when I try to run wpa_supplicant to associate with a known access point, I get the following errors:

$ wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
wl12xx_sdio_set_power() Called
wl12xx_sdio_set_power() Power On
wl12xx_sdio_power_on() Setting Power On
wl12xx_sdio_power_on() Failed to set power on...
wl1271: Power On call returned: 0 [GPIO is: 0]
wl18xx_driver wl18xx.0.auto: Firmware path is:
wl18xx_driver wl18xx.0.auto: Attempting to load firmware from here:
wl18xx_driver wl18xx.0.auto: Attempting to load firmware from here: /lib/firmware/updates/3.14.28-ltsi/ti-connectivity/wl18xx-fw-2.bin
wl18xx_driver wl18xx.0.auto: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wl18xx_driver wl18xx.0.auto: Did successfully load firmware: /lib/firmware/updates/ti-connectivity/wl18xx-fw-2.bin
wl18xx_driver wl18xx.0.auto: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wlcore: ERROR timeout waiting for the hardware to complete initialization
wl12xx_sdio_set_power() Called
wl12xx_sdio_set_power() Power Off
wl12xx_sdio_set_power() Called
wl12xx_sdio_set_power() Power On
wl12xx_sdio_power_on() Setting Power On
wl12xx_sdio_power_on() Failed to set power on...
wl1271: Power On call returned: 0 [GPIO is: 0]
wlcore: ERROR timeout waiting for the hardware to complete initialization
wl12xx_sdio_set_power() Called
wl12xx_sdio_set_power() Power Off
wl12xx_sdio_set_power() Called
wl12xx_sdio_set_power() Power On
wl12xx_sdio_power_on() Setting Power On
wl12xx_sdio_power_on() Failed to set power on...
wl1271: Power On call returned: 0 [GPIO is: 0]
wlcore: ERROR timeout waiting for the hardware to complete initialization
wl12xx_sdio_set_power() Called
wl12xx_sdio_set_power() Power Off
wlcore: ERROR firmware boot failed despite 3 retries
Could not set interface wlan0 flags (UP): Input/output error
nl80211: Could not set interface 'wlan0' UP
wlan0: Failed to initialize driver interface

I'm pretty sure this means the WLAN_IRQ I setup is not working. When I look in /proc/interrupts I see that the SDIO interface has had quite a few interrupts but the wl18xx has 0!

$ cat /proc/interrupts
CPU0
41: 129 GIC 41 RZA1DMA
42: 0 GIC 42 RZA1DMA
...
97: 0 GIC 97 vdc5fb.0: iv8_vbuferr
98: 0 GIC 98 wl18xx
139: 43098 GIC 139 sh-mtu2
...
305: 0 GIC 305 sh_mobile_sdhi.1
306: 183361 GIC 306 sh_mobile_sdhi.1
307: 0 GIC 307 sh_mobile_sdhi.1
308: 0 GIC 308 sh-rtc alarm
309: 0 GIC 309 sh-rtc period
310: 0 GIC 310 sh-rtc carry
Err: 0

I think I misconfigured the interrupt. I am trying to use P7_1 ( GPIO 98 ). In the board-rskrza1.c, I've configured it like this:

struct irq_res const irq_keep_list[] __initconst = {
// {32, 1}, /* IRQ0 */
{33, 1}, /* IRQ1 (for ft5x06-ts Touchsreen) */
// {34, 1}, /* IRQ2 */
// {35, 1}, /* IRQ3 */
// {36, 1}, /* IRQ4 */
// {37, 1}, /* IRQ5 */
// {38, 1}, /* IRQ6 */
// {39, 1}, /* IRQ7 */
// {40, 1}, /* PL310ERR (L2 Cache error - not used) */
{41, 17}, /* RZA1_DMA */
{73, 1}, /* USB0 (host/device) */
{74, 1}, /* USB1 (host/device) */
{75, 23}, /* VDC0 */
{98, 1}, /* CUSTOMIZATION - Wilink 8 IRQ */
// {99, 23}, /* VDC1 */
{126, 1}, /* JCU */
{134, 2}, /* OSTM */
{139, 1}, /* MTU2-TGI0A (Kernel jiffies) */
// {170, 2}, {146, 2}, /* ADC and MTU2-TGI1A */
{189, 8}, /* RIIC0 (Touchscreen) */
// {197, 8}, /* RIIC1 */
// {205, 8}, /* RIIC2 */
{213, 8}, /* RIIC3 (Port Expander, EEPROM (MAC Addr), Audio Codec) */
// {221, 4}, /* SCIF0 */
// {225, 4}, /* SCIF1 */
{229, 4}, /* SCIF2 (Console) */
// {233, 4}, /* SCIF3 */
// {237, 4}, /* SCIF4 */
// {241, 4}, /* SCIF5 */
// {245, 4}, /* SCIF6 */
// {249, 4}, /* SCIF7 */
// {253, 2}, /* CAN GERR/GRECC */
// {255, 3}, /* CAN0 */
// {258, 3}, /* CAN1 */
// {261, 3}, /* CAN2 */
// {264, 3}, /* CAN3 */
// {267, 3}, /* CAN4 */
// {270, 3}, /* RSPI0 */
// {273, 3}, /* RSPI1 */
// {276, 3}, /* RSPI2 */
// {279, 3}, /* RSPI3 */
// {282, 3}, /* RSPI4 */
{299, 3}, /* MMC */
// {302, 3}, /* SDHI0 */
{305, 3}, /* SDHI1 */
{308, 3}, /* RTC */
{359, 1}, /* ETH */
};

// CUSTOMIZATION
struct wl12xx_platform_data custom_board_wlan_data __initdata = {
.irq = 98,
};

r7s72100_pfc_pin_assign(98, PMODE, DIR_IN);

pr_info("WILINK8 WLAN: Setting up wl12xx platform data\n");

if (wl12xx_set_platform_data(&custom_board_wlan_data))
pr_info("WILINK8 WLAN: Error setting up wl12xx platform data\n");

Am I setting up the IRQ correctly in the board file for the RZ/A1? Thank you.


Viewing all articles
Browse latest Browse all 1583

Latest Images

Trending Articles



Latest Images