Freescale i.mx25 SDIO/Libertas issue
Hello,
I am trying to use a Wi2Wi 802.11b/g (W2CBW009S) module attached to an i.MX25 cpu, specifically the i.MX25 PDK from freescale, although I've also tried it on a DeviceSolutions Topaz i.MX25. However it is unable to fully load the driver, leaving me with the following in the logs:
[ 30.149097] libertas_sdio mmc0:0001:1: (unregistered net_device): command 0x00a9 timed out [ 30.153759] libertas_sdio mmc0:0001:1: (unregistered net_device): Timeout submitting command 0x00a9 [ 30.158843] libertas_sdio mmc0:0001:1: (unregistered net_device): PREP_CMD: command 0x00a9 failed: -110 [ 30.164126] libertas_sdio mmc0:0001:1: (unregistered net_device):
CMD_FUNC_INIT cmd failed
This wifi chip is based around the Marvell 8688 core.
I have also tried using an 8686 device, and in that case it is unable to even complete loading the firmware, failing with the following:
[ 14.753132] libertas_sdio: Firmware req_size: 17 [ 14.755713] libertas_sdio: failed to load firmware: -5 [ 14.759272] libertas_sdio: probe of mmc0:0001:1 failed with error -5
Note: I added the 'req_size: ' debugging message in
Has anyone successfully used the i.MX25 SDIO controller with anything other than straight MMC cards (which seem to work fine in the setup that I have)?
Regards,
Andre Renaud
Quoted 15 lines · Andre Renaud
Hello,
I am trying to use a Wi2Wi 802.11b/g (W2CBW009S) module attached to an i.MX25 cpu, specifically the i.MX25 PDK from freescale, although I've also tried it on a DeviceSolutions Topaz i.MX25. However it is unable to fully load the driver, leaving me with the following in the logs:
[ ? 30.149097]libertas_sdiommc0:0001:1: (unregisterednet_device):
command0x00a9timed out
[ ? 30.153759]libertas_sdiommc0:0001:1: (unregisterednet_device):
Timeout submitting command0x00a9
[ ? 30.158843]libertas_sdiommc0:0001:1: (unregisterednet_device):PREP_CMD: command0x00a9failed: -110
[ ? 30.164126]libertas_sdiommc0:0001:1: (unregisterednet_device):CMD_FUNC_INITcmd failed
This wifi chip is based around the Marvell 8688 core.
Quoted 6 lines
I have also tried using an 8686 device, and in that case it is unable to even complete loading the firmware, failing with the following:
[ ? 14.753132]libertas_sdio: Firmwarereq_size: 17
[ ? 14.755713]libertas_sdio: failed to load firmware: -5
[ ? 14.759272]libertas_sdio: probe of mmc0:0001:1 failed with error -5
Note: I added the 'req_size: ' debugging message in
I assume this error happens after the driver uploaded the helper firmware and switched to multi-block transfers?
Which kernel version are you working on? I'm asking because I fixed a similar bug some months ago which I happend to see an a MX31 CPU with a 8686 attach to the SDIO bus. The MX3 MMC controller has bug severe bug in its CRC calculation code which causes multi-block transfers on a 4-bit bus to fail, and hence the only solution was to switch to a 1-bit bus. But I don't known whether this also affects MX25 cores.
Anyway - this workaround was merged more than a year ago. See if you have commit 1eb46d ("libertas/sdio: 8686: set ECSI bit for 1-bit transfers") in your tree.
Daniel
Hi Daniel,
Quoted 26 lines · Daniel Mack
Quoted 15 lines · Andre Renaud
Hello,
I am trying to use a Wi2Wi 802.11b/g (W2CBW009S) module attached to an i.MX25 cpu, specifically the i.MX25 PDK from freescale, although I've also tried it on a DeviceSolutions Topaz i.MX25. However it is unable to fully load the driver, leaving me with the following in the logs:
[ ? 30.149097]libertas_sdiommc0:0001:1: (unregisterednet_device):
command0x00a9timed out
[ ? 30.153759]libertas_sdiommc0:0001:1: (unregisterednet_device):
Timeout submitting command0x00a9
[ ? 30.158843]libertas_sdiommc0:0001:1: (unregisterednet_device):PREP_CMD: command0x00a9failed: -110
[ ? 30.164126]libertas_sdiommc0:0001:1: (unregisterednet_device):CMD_FUNC_INITcmd failed
This wifi chip is based around the Marvell 8688 core.Quoted 6 lines
I have also tried using an 8686 device, and in that case it is unable to even complete loading the firmware, failing with the following:
[ ? 14.753132]libertas_sdio: Firmwarereq_size: 17
[ ? 14.755713]libertas_sdio: failed to load firmware: -5
[ ? 14.759272]libertas_sdio: probe of mmc0:0001:1 failed with error -5
Note: I added the 'req_size: ' debugging message inI assume this error happens after the driver uploaded the helper firmware and switched to multi-block transfers?
Quoted 6 lines
Which kernel version are you working on? I'm asking because I fixed a similar bug some months ago which I happend to see an a MX31 CPU with a 8686 attach to the SDIO bus. The MX3 MMC controller has bug severe bug in its CRC calculation code which causes multi-block transfers on a 4-bit bus to fail, and hence the only solution was to switch to a 1-bit bus. But I don't known whether this also affects MX25 cores.
The MX25 has a different SD controller (eSDHC) than the one found on MX31 and such issue is not present.
Regards,
Fabio Estevam
Quoted 36 lines · Fabio Estevam
Hi Daniel,
Quoted 26 lines · Daniel Mack
Quoted 15 lines · Andre Renaud
Hello,
I am trying to use a Wi2Wi 802.11b/g (W2CBW009S) module attached to an i.MX25 cpu, specifically the i.MX25 PDK from freescale, although I've also tried it on a DeviceSolutions Topaz i.MX25. However it is unable to fully load the driver, leaving me with the following in the logs:
[ ? 30.149097]libertas_sdiommc0:0001:1: (unregisterednet_device):
command0x00a9timed out
[ ? 30.153759]libertas_sdiommc0:0001:1: (unregisterednet_device):
Timeout submitting command0x00a9
[ ? 30.158843]libertas_sdiommc0:0001:1: (unregisterednet_device):PREP_CMD: command0x00a9failed: -110
[ ? 30.164126]libertas_sdiommc0:0001:1: (unregisterednet_device):CMD_FUNC_INITcmd failed
This wifi chip is based around the Marvell 8688 core.Quoted 6 lines
I have also tried using an 8686 device, and in that case it is unable to even complete loading the firmware, failing with the following:
[ ? 14.753132]libertas_sdio: Firmwarereq_size: 17
[ ? 14.755713]libertas_sdio: failed to load firmware: -5
[ ? 14.759272]libertas_sdio: probe of mmc0:0001:1 failed with error -5
Note: I added the 'req_size: ' debugging message inI assume this error happens after the driver uploaded the helper firmware and switched to multi-block transfers?
Quoted 6 lines
Which kernel version are you working on? I'm asking because I fixed a similar bug some months ago which I happend to see an a MX31 CPU with a 8686 attach to the SDIO bus. The MX3 MMC controller has bug severe bug in its CRC calculation code which causes multi-block transfers on a 4-bit bus to fail, and hence the only solution was to switch to a 1-bit bus. But I don't known whether this also affects MX25 cores.
Quoted 2 lines
The MX25 has a different SD controller (eSDHC) than the one found on MX31 and such issue is not present.
Ah ok. Thanks for the clarification.
Daniel
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Andre,
please never reply to people personally when you started a discussion in the public. Always use the "reply to all" function, so others can chime in.
Quoted 10 lines · Andre Renaud
Quoted 10 lines
I assume this error happens after the driver uploaded the helper firmware and switched to multi-block transfers?
Which kernel version are you working on? I'm asking because I fixed a similar bug some months ago which I happend to see an a MX31 CPU with a 8686 attach to the SDIO bus. The MX3 MMC controller has bug severe bug in its CRC calculation code which causes multi-block transfers on a 4-bit bus to fail, and hence the only solution was to switch to a 1-bit bus. But I don't known whether this also affects MX25 cores.
Quoted 8 lines
Quoted 3 lines
Anyway - this workaround was merged more than a year ago. See if you have commit 1eb46d ("libertas/sdio: 8686: set ECSI bit for 1-bit transfers") in your tree.
Hi Daniel,
Can you tell me how you force the MX3 into 1-bit mode? I definitely have the patch you're referring to - I'm using the head of the mainline git tree, and I've verified it is there.
Ok, as Fabian pointed out, the SDHC controller on MX25 SoCs is completely different, so what I told you can't be the reason, and as I've never worked with these sort of devices, I can't help much. All I can recommend is that you trace the driver code with printk()s to see where it's bailing out.
Daniel
Hi Andre,
Quoted 17 lines · Andre Renaud
Hello,
I am trying to use a Wi2Wi 802.11b/g (W2CBW009S) module attached to an i.MX25 cpu, specifically the i.MX25 PDK from freescale, although I've also tried it on a DeviceSolutions Topaz i.MX25. However it is unable to fully load the driver, leaving me with the following in the logs:[ 30.149097] libertas_sdio mmc0:0001:1: (unregistered net_device): command 0x00a9 timed out [ 30.153759] libertas_sdio mmc0:0001:1: (unregistered net_device): Timeout submitting command 0x00a9 [ 30.158843] libertas_sdio mmc0:0001:1: (unregistered net_device): PREP_CMD: command 0x00a9 failed: -110 [ 30.164126] libertas_sdio mmc0:0001:1: (unregistered net_device):
CMD_FUNC_INITcmd failed
This wifi chip is based around the Marvell 8688 core.I have also tried using an 8686 device, and in that case it is unable to even complete loading the firmware, failing with the following:
Quoted 9 lines
[ 14.753132] libertas_sdio: Firmware req_size: 17 [ 14.755713] libertas_sdio: failed to load firmware: -5 [ 14.759272] libertas_sdio: probe of mmc0:0001:1 failed with error -5Note: I added the '
req_size: ' debugging message inHas anyone successfully used the i.MX25 SDIO controller with anything other than straight MMC cards (which seem to work fine in the setup that I have)?
I used this Marvel WiFi 8686 in our previous product powered by i.MX51 and it worked fine. You need to load the firmware before using it. Just put your binaries inside firmware directory on linux kernel and setup your kernel config:
CONFIG_FW_LOADER=y CONFIG_FIRMWARE_IN_KERNEL=y
-CONFIG_EXTRA_FIRMWARE="" +CONFIG_EXTRA_FIRMWARE="sd8686_helper.bin sd8686.bin" +CONFIG_EXTRA_FIRMWARE_DIR="firmware"
Best Regards,
Alan
Quoted 11 lines
I used this Marvel WiFi 8686 in our previous product powered by i.MX51 and it worked fine. You need to load the firmware before using it. Just put your binaries inside firmware directory on linux kernel and setup your kernel config:
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y(quoted diff) +2
-1-CONFIG_EXTRA_FIRMWARE="" +CONFIG_EXTRA_FIRMWARE="sd8686_helper.bin sd8686.bin" +CONFIG_EXTRA_FIRMWARE_DIR="firmware"
Quoted 4 lines
Best Regards,
Alan
Hi Alan, just a quick question. I am fairly new to all this linux embedded world. I just wandered what this code you wrote actually does. I searched around and I understand that it plugs some extra firmware into the kernel at compiling time, however I don't really understand what "firmware" really means in this case.
I mean, does it mean the driver itself? because I though all you had to do to include a driver into the kernel was put the source codes in the "/drivers" directory in the kernel's directory and modify a bit the makefile so that it is compiled.. is this not right?
Thanks for your time ;)
Quoted 17 lines · Andre Renaud
Hello,
I am trying to use a Wi2Wi 802.11b/g (W2CBW009S) module attached to an i.MX25 cpu, specifically the i.MX25 PDK from freescale, although I've also tried it on a DeviceSolutions Topaz i.MX25. However it is unable to fully load the driver, leaving me with the following in the logs:[ 30.149097] libertas_sdio mmc0:0001:1: (unregistered net_device): command 0x00a9 timed out [ 30.153759] libertas_sdio mmc0:0001:1: (unregistered net_device): Timeout submitting command 0x00a9 [ 30.158843] libertas_sdio mmc0:0001:1: (unregistered net_device): PREP_CMD: command 0x00a9 failed: -110 [ 30.164126] libertas_sdio mmc0:0001:1: (unregistered net_device):
CMD_FUNC_INITcmd failed
This wifi chip is based around the Marvell 8688 core.I have also tried using an 8686 device, and in that case it is unable to even complete loading the firmware, failing with the following:
Quoted 8 lines
[ 14.753132] libertas_sdio: Firmware req_size: 17 [ 14.755713] libertas_sdio: failed to load firmware: -5 [ 14.759272] libertas_sdio: probe of mmc0:0001:1 failed with error -5Note: I added the '
req_size: ' debugging message inHas anyone successfully used the i.MX25 SDIO controller with anything other than straight MMC cards (which seem to work fine in the setup that I have)?
If I enable the libertas debugging details, I get some more information:
libertas sdio: waiting for firmware to boot...
mmc0: starting CMD52 arg 10008000 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001000 00000000 00000000 00000000
mmc0: starting CMD52 arg 10008200 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001000 00000000 00000000 00000000
mmc0: starting CMD52 arg 10008000 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001000 00000000 00000000 00000000
mmc0: starting CMD52 arg 10008200 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001000 00000000 00000000 00000000
mmc0: starting CMD52 arg 10008000 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001000 00000000 00000000 00000000
mmc0: starting CMD52 arg 10008200 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001000 00000000 00000000 00000000
mmc0: starting CMD52 arg 10008000 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 000010dc 00000000 00000000 00000000
mmc0: starting CMD52 arg 10008200 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 000010fe 00000000 00000000 00000000 libertas sdio: Firmware loaded
mmc0: starting CMD52 arg 80022000 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001000 00000000 00000000 00000000
mmc0: starting CMD52 arg 80022201 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001001 00000000 00000000 00000000
mmc0: starting CMD52 arg 10008600 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001005 00000000 00000000 00000000
mmc0: starting CMD52 arg 9000080f flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 0000100f 00000000 00000000 00000000 libertas sdio: send function INIT command
libertas cmd: DNLD_CMD: command 0x00a9, seq 1, size 8
mmc0: starting CMD52 arg 10004000 flags 00000195
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD52): 0: 00001009 00000000 00000000 00000000
mmc0: starting CMD53 arg 9200000c flags 000001b5
mmc0: blksz 12 blocks 1 flags 00000100 tsac 1000 ms nsac 0
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x0000000b
mmc0: req done (CMD53): 0: 00002000 00000000 00000000 00000000
mmc0: 12 bytes transferred: 0libertas_sdio mmc0:0001:1: (unregistered net_device): command 0x00a9 timed outlibertas_sdio mmc0:0001:1: (unregistered net_device): Timeout submitting command 0x00a9libertas_sdio mmc0:0001:1: (unregistered net_device): PREP_CMD: command 0x00a9 failed: -110libertas_sdio mmc0:0001:1: (unregistered net_device): CMD_FUNC_INIT cmd failed
This seems to imply that the unit is correctly loading the firmware, and then when it determines that the firmware has loaded, and tries to issue the CMD_FUNC_INIT command, this times out.
Can anyone explain how I can begin debugging this, or confirm if they've had this operate on the sdhci-esdhc-imx controller present in the i.MX25?
Regards,
Andre
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello Zamek,
Quoted 20 lines
05/31/2011 04:14 AM keltez?ssel, Andre Renaud ?rta:
Quoted 9 lines
If I enable the libertas debugging details, I get some more information:
This seems to imply that the unit is correctly loading the firmware, and then when it determines that the firmware has loaded, and tries to issue the
CMD_FUNC_INITcommand, this times out.Can anyone explain how I can begin debugging this, or confirm if they've had this operate on the sdhci-esdhc-imx controller present in the i.MX25?
I got same errors with 2.6.31 kernel. As I suggested earlier use 2.6.35 from Freescale.
git clone http://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git
cd linux-2.6-imx
git checkout rel_imx_2.6.35_11.04.01
copy .config from your 2.6.31
make ARCH=arm oldconfig
make ARCH=arm menuconfig
Quoted 3 lines
It works for me well.
Is your wifi card hard wired or plugined?
Thanks for that information - using that kernel branch I have had it all working properly, on both an 8686 and 8688 Marvell SDIO device. These are both external (plugged in).
I was hoping to do a git bisect to determine where the fault lay, however it seems that the imx tree uses a completely different SDIO driver. I have validated the Libertas driver on a different CPU (atmel) from the same kernel, so I'm assuming at this stage that the fault lies in the SDIO driver in the current Linux mainline.
Regards,
Andre
Signature · 8 lines
Bluewater Systems - An Aiotec Company Andre Renaud andre at bluewatersys.com 5 Amuri Park, 404 Barbadoes St www.bluewatersys.com PO Box 13 889, Christchurch 8013 www.aiotec.co.nz New Zealand Phone: +64 3 3779127 Freecall: Australia 1800 148 751 Fax: +64 3 3779135 USA 1800 261 2934
Hi people, my company is also considering developing a platform for the MX25 including a wifi module based on marvell's 8686 chip using the SDIO interface. I am not very experienced in the topic and right now
we are only trying to establish some especifications and making a budget.
I just wanted to know wether it is hard to get all this going.
I have read all this thread but i don't really get what the real problem is, specially when somebody talks about some firmware and kernel configuration....
I just expected to connect the module to the SDIO bus loading the driver the and configuring some stuff (wifi-network, access key etc.) what am I missing? I just wanna know if a rocky like me will be able to pull through with all this.
Thanks a lot :P