Hans 3.15 kernel and Cubietruck wifi

647 views
Skip to first unread message

jons...@gmail.com

unread,
Jun 11, 2014, 8:26:40 PM6/11/14
to linux-sunxi
Where do I get brcmfmac43362-sdio.txt?

brcmfmac43362-sdio.bin was in Ubuntu.

--
Jon Smirl
jons...@gmail.com

Ian Campbell

unread,
Jun 12, 2014, 8:47:00 AM6/12/14
to linux...@googlegroups.com
On Wed, 2014-06-11 at 20:26 -0400, jons...@gmail.com wrote:
> Where do I get brcmfmac43362-sdio.txt?

I seem to be using
http://dl.cubieboard.org/public/Cubieboard/benn/firmware/ap6210/nvram_ap6210.txt but I don't recall how I discovered that.

Ian.


jons...@gmail.com

unread,
Jun 12, 2014, 9:21:10 AM6/12/14
to linux-sunxi
I added the ap6210.txt file. Now I get...

root@linaro-developer:~# dmesg | grep brcm
[ 14.656712] brcmfmac: F1 signature read @0x18000000=0x1591a962
[ 15.123388] brcmfmac: brcmf_c_preinit_dcmds: Firmware version =
wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d
[ 15.208407] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
[ 15.259285] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
[ 15.290611] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
[ 15.330720] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
[ 15.345610] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
[ 15.396557] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
[ 15.440398] usbcore: registered new interface driver brcmfmac
root@linaro-developer:~#
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Jon Smirl
jons...@gmail.com

jons...@gmail.com

unread,
Jun 12, 2014, 9:24:10 AM6/12/14
to linux-sunxi
But I do have a wlan0 device now. I'll see if it works.
--
Jon Smirl
jons...@gmail.com

Ian Campbell

unread,
Jun 12, 2014, 11:31:15 AM6/12/14
to linux...@googlegroups.com
I think I got those too but it did work.

Hans de Goede

unread,
Jun 12, 2014, 4:26:56 PM6/12/14
to linux...@googlegroups.com
Hi,

On 06/12/2014 03:21 PM, jons...@gmail.com wrote:
> I added the ap6210.txt file. Now I get...
>
> root@linaro-developer:~# dmesg | grep brcm
> [ 14.656712] brcmfmac: F1 signature read @0x18000000=0x1591a962
> [ 15.123388] brcmfmac: brcmf_c_preinit_dcmds: Firmware version =
> wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d
> [ 15.208407] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
> [ 15.259285] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
> [ 15.290611] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
> [ 15.330720] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
> [ 15.345610] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
> [ 15.396557] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
> [ 15.440398] usbcore: registered new interface driver brcmfmac

Those are "normal" this is the brcmfmac driver trying to enable some
features which are not supported on this model wifi chip.

Regards,

Hans

jons...@gmail.com

unread,
Jun 12, 2014, 5:16:47 PM6/12/14
to linux-sunxi, Hans de Goede
How is nvram_ap6210.txt, which I renamed to brcmfmac43362-sdio.txt,
going to get distributed? Was that the right file?

I have Emilio's DMA patches applied to your devel kernel and I'm
hacking on the sunxi-codec driver to begin with. They applied with
trivial adjustments.


>
> Regards,
>
> Hans

Hans de Goede

unread,
Jun 13, 2014, 3:53:22 AM6/13/14
to jons...@gmail.com, linux-sunxi
Hi,

On 06/12/2014 11:16 PM, jons...@gmail.com wrote:
> On Thu, Jun 12, 2014 at 4:26 PM, Hans de Goede <hdeg...@redhat.com> wrote:
>> Hi,
>>
>> On 06/12/2014 03:21 PM, jons...@gmail.com wrote:
>>> I added the ap6210.txt file. Now I get...
>>>
>>> root@linaro-developer:~# dmesg | grep brcm
>>> [ 14.656712] brcmfmac: F1 signature read @0x18000000=0x1591a962
>>> [ 15.123388] brcmfmac: brcmf_c_preinit_dcmds: Firmware version =
>>> wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d
>>> [ 15.208407] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
>>> [ 15.259285] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
>>> [ 15.290611] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
>>> [ 15.330720] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
>>> [ 15.345610] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
>>> [ 15.396557] brcmfmac: brcmf_fil_cmd_data: Failed err=-23
>>> [ 15.440398] usbcore: registered new interface driver brcmfmac
>>
>> Those are "normal" this is the brcmfmac driver trying to enable some
>> features which are not supported on this model wifi chip.
>
> How is nvram_ap6210.txt, which I renamed to brcmfmac43362-sdio.txt,
> going to get distributed? Was that the right file?

Yes it is the right file.

As for how this is going to get distributed, the nvram files are board
specific, so I plan to write a patch to allow specifying a nvram-filename
property in devicetree in the sdio-function devicetree node (which also
holds the oob irq info), brcmfmac will then use brcmfmac43362-sdio-%s.txt
as nvram txt filename when this property is present.

With this patch in place, distributions can simply distribute all nvram
files for boards which they support. As for how the distributions are
going to get these nvram files, I think adding them to linux-firmware
is the best approach.

If you've any comments are a better idea to deal with this I'm all ears.

Regards,

Hans

Ian Campbell

unread,
Jun 13, 2014, 6:15:34 AM6/13/14
to linux...@googlegroups.com, jons...@gmail.com
OOI, are they likely to end up completely unique per board or do we
expect that actually there will be a small(ish) number of distinct
configurations each used on a set of boards?

I really hope it's the latter!

Ian.

Hans de Goede

unread,
Jun 13, 2014, 7:06:53 AM6/13/14
to linux...@googlegroups.com, jons...@gmail.com
Hi,
Likely the latter, ie the ap6210 module is used on several boards, and all
those boards share the same nvram file.

Regards,

Hans

jons...@gmail.com

unread,
Jun 13, 2014, 7:47:03 AM6/13/14
to Hans de Goede, linux-sunxi
Why are they called NVRAM? NVRAM usually means non-volatile RAM.
Maybe they don't have to be loaded every time?



>>
>> I really hope it's the latter!
>
> Likely the latter, ie the ap6210 module is used on several boards, and all
> those boards share the same nvram file.
>
> Regards,
>
> Hans



--
Jon Smirl
jons...@gmail.com

Hans de Goede

unread,
Jun 13, 2014, 8:10:48 AM6/13/14
to linux...@googlegroups.com
Hi,
Because (AFAIK) with usb versions of the same chip this info is really
stored in some non volatile storage. However since sdio devices are
soldered onto a board, manufacturers can save a few cents by not having
any non volatile storage and instead embedding the info in the operating
system info.

Regards,

Hans

Ian Campbell

unread,
Jun 13, 2014, 9:57:25 AM6/13/14
to linux...@googlegroups.com, jons...@gmail.com
Oh good! I suppose it makes sense for brcmfmac43362-sdio-%s.txt and the
dtb prop etc to be "ap6210" rather than cubietruck then, at least by
default, which should be far more manageable.

Ian.

Александр Берсенев

unread,
Jun 14, 2014, 8:47:33 AM6/14/14
to linux...@googlegroups.com, hdeg...@redhat.com
Hi,

I have wifi working on cubietruck, but after several minutes of operation it stops work. The kernel was compiled from the latest sunxi-devel branch of linux-sunxi repo.

Ifconfig says that wlan1 is running, but all operation fails by timeout.

# iwlist wlan1 scan
wlan1     Interface doesn't support scanning : Connection timed out

# time iwconfig wlan1
wlan1     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
real    0m4.999s
user    0m0.000s
sys     0m0.010s


Each second two messages appears in dmesg:
brcmfmac: brcmf_sdiod_regrw_helper: failed to read data F1@0x0a020, err: -110
brcmfmac: brcmf_sdio_dpc: failed backplane access over SDIO, halting operation 

More related messages:
brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
brcmfmac: brcmf_fil_cmd_data: Failed err=-110
brcmfmac: brcmf_cfg80211_get_tx_power: error (-110)
brcmfmac: brcmf_do_escan: error (-110)
brcmfmac: brcmf_cfg80211_scan: scan error (-110)

The command rmmod brcmfmac never finishes.

Also, when wifi stops work, mmc error messages repeat in dmesg:
[  245.780430] sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD SBE !!
[  245.780489] sunxi-mmc 1c12000.mmc: data error, sending stop command
[  245.780550] brcmfmac: brcmf_sdio_readframes: RXHEADER FAILED: -110
[  245.780561] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame, send NAK
[  245.784798] brcmfmac: brcmf_sdiod_regrw_helper: failed to write data F1@0x0a040, err: -5
[  245.784912] brcmfmac: brcmf_sdio_hdparse: seq 4: sequence number error, expect 5
[  246.122616] sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
[  246.122672] sunxi-mmc 1c12000.mmc: data error, sending stop command
[  246.460309] sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
[  246.460354] sunxi-mmc 1c12000.mmc: data error, sending stop command
[  246.797996] sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
[  246.798043] sunxi-mmc 1c12000.mmc: data error, sending stop command
[  246.798085] brcmfmac: brcmf_sdiod_regrw_helper: failed to read data F1@0x0a020, err: -110
[  246.798115] brcmfmac: brcmf_sdio_dpc: failed backplane access over SDIO, halting operation
[  247.133900] sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
[  247.133947] sunxi-mmc 1c12000.mmc: data error, sending stop command
[  247.471573] sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
[  247.471613] sunxi-mmc 1c12000.mmc: data error, sending stop command
[  247.809240] sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
[  247.809283] sunxi-mmc 1c12000.mmc: data error, sending stop command
[  247.809323] brcmfmac: brcmf_sdiod_regrw_helper: failed to read data F1@0x0a020, err: -110
[  247.809354] brcmfmac: brcmf_sdio_dpc: failed backplane access over SDIO, halting operation

When wifi module is unloaded there are not any mmc errors.

I use dd if=/dev/zero bs=64k command via ssh to test wifi.

I can also check other versions of kernel.

Best,
Alexander Bersenev

пятница, 13 июня 2014 г., 2:26:56 UTC+6 пользователь Hans de Goede написал:

Александр Берсенев

unread,
Jun 14, 2014, 9:12:52 AM6/14/14
to linux...@googlegroups.com, hdeg...@redhat.com
Just tested on 
Linux Cubian 3.14.0-rc8+ #118 SMP Fri Apr 18 16:10:07 YEKT 2014 armv7l GNU/Linux

and with other microcd-card, all is the same.

Best,
Alexander Bersenev

суббота, 14 июня 2014 г., 18:47:33 UTC+6 пользователь Александр Берсенев написал:

Hans de Goede

unread,
Jun 15, 2014, 6:25:29 AM6/15/14
to Александр Берсенев, linux...@googlegroups.com
Hi,
Right, this is the infamous SBE error, a known issue, for which I've been
unable to find a fix. Any help with fixing this is very much welcome.

After the first SBE error any commands reading data from the device
will fail with a DTO error. But it is the first SBE error which seems
to kill things. I've reviewed the sunxi-mmc code countless times and tried
various approaches (such as resetting the entire mmc controller) to work
around this, but all without success.

Regards,

Hans

jons...@gmail.com

unread,
Jun 15, 2014, 8:04:26 AM6/15/14
to linux-sunxi, Arend van Spriel, Александр Берсенев
Does Broadcom know what this is, or do they have a better way to debug it?

Arend van Spriel

unread,
Jun 16, 2014, 4:41:07 AM6/16/14
to jons...@gmail.com, linux-sunxi, Александр Берсенев
Where can I find the linux-sunxi repo? github?

Gr. AvS

Hans de Goede

unread,
Jun 16, 2014, 5:08:21 AM6/16/14
to linux...@googlegroups.com, jons...@gmail.com, Александр Берсенев
Hi Arend,
You should be able to reproduce this with the upstream 3.16-rc1 kernel which
should have all the necessary bits. I say should because I've not rebased
my tree yet, so I'm not 100% sure yet.

Note this will get you support for the sdio brcmfmac module without oob interrupts,
but the SBE problem exhibits itself both with and without oob interrupts.

Alternatively you could use:
https://github.com/jwrdegoede/linux-sunxi/commits/sunxi-devel

Which currently is 3.15 + a set of sunxi patches, this one does do oob irq
support. I plan to rebase this on top of 3.16 (which should cause most patches
to get dropped) + forse-push during the coming days.

Or you can use:
https://github.com/linux-sunxi/linux-sunxi/commits/sunxi-devel

Which currently holds the same https://github.com/jwrdegoede/linux-sunxi/commits/sunxi-devel
and won't get rebased to 3.16 until 3.16 has proven to at least be somewhat
usable. Basically this is a copy of https://github.com/jwrdegoede/linux-sunxi/commits/sunxi-devel
which gets updated somewhat more conservatively.

Regards,

Hans

mvoront...@gmail.com

unread,
Aug 20, 2014, 7:11:56 AM8/20/14
to linux...@googlegroups.com, jons...@gmail.com, b...@hackerdom.ru, hdeg...@redhat.com
Yup, mainline 3.16.1 the same thing!

Maxim
Reply all
Reply to author
Forward
0 new messages