From: Arend van Spriel <arend@broadcom.com>
To: Chen-Yu Tsai <wens@csie.org>, linux-sunxi <linux-sunxi@googlegroups.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Julian Calaby <julian.calaby@gmail.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
Olliver Schinagl <oliver+list@schinagl.nl>, <benn@cubietech.com>
Subject: Re: [linux-sunxi] Firmware for Bluetooth (and wifi)
Date: Thu, 2 Jan 2014 14:59:18 +0100 [thread overview]
Message-ID: <52C570B6.30500@broadcom.com> (raw)
In-Reply-To: <CAGb2v67Q=q4vyOftb+BLhAYR-6d04dDP3+kY3b88U8_vCvAmgQ@mail.gmail.com>
On 12/27/2013 01:36 PM, Chen-Yu Tsai wrote:
> Hi,
>
> On Fri, Dec 27, 2013 at 7:47 PM, Arend van Spriel <arend@broadcom.com> wrote:
>> On 12/26/2013 05:13 PM, Chen-Yu Tsai wrote:
>>> Hi,
>>>
>>> On Thu, Dec 19, 2013 at 6:12 PM, Chen-Yu Tsai <wens@csie.org> wrote:
>>>> Hi,
>>>>
>>>> On Thu, Dec 19, 2013 at 12:39 AM, Chen-Yu Tsai <wens@csie.org> wrote:
>>>>> Hi,
>>>>>
>>>>> On Thu, Dec 19, 2013 at 12:16 AM, Arend van Spriel <arend@broadcom.com> wrote:
>>>>>> On 12/18/2013 02:12 PM, Hans de Goede wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> On 12/18/2013 11:31 AM, Arend van Spriel wrote:
>>>>>>>> On 12/05/2013 10:46 PM, Julian Calaby wrote:
>>>>>>>>> Firstly, are there any plans to support the BCM43362 chipset with the
>>>>>>>>> brcmfmac driver in the near future?
>>>>>>>>
>>>>>>>> Hi Julian,
>>>>>>>>
>>>>>>>> I am working on a patch to support this chip. It is looking promising.
>>>>>>>> Just have to go after a firmware image to be sure.
>>>>>>>
>>>>>>> Cool. Do you have a cubietruck? With my latest wip tree:
>>>>>>> https://github.com/jwrdegoede/linux-sunxi/commits/sunxi-next
>>>>>>
>>>>>> No cubietruck here. I googled the term last week because it came up and
>>>>>> found embeddedcomputer.nl selling it.
>>>>>>
>>>>>>> We've mmc/sdio controller support on top of 3.13-rc4, it would be
>>>>>>> nice if we could also get the wifi and bluetooth to work here.
>>>>
>>>> I got the chip to respond to probing. It is BCM43362 for sure.
>>>>
>>>> root@cubietruck:/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1# cat device
>>>> 0xa962
>>>> root@cubietruck:/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1# cat vendor
>>>> 0x02d0
>>>>
>>>> Vendor ID is Broadcom. Device ID is 43362.
>>>> But I get two devices, mmc1:0001:1 and mmc1:0001:2. I don't know
>>>> if this is normal or not.
>>
>> There might be three devices/functions. The last digit of the device
>> indicates the SDIO function number. Function 1 allows access to F1
>> registers in the SDIO core of the device and F2 is for WLAN
>> functionality. F3 could be providing BT functionality, but I am not
>> familiar with that part.
>>
>>> Merry Christmas everyone. I got AP6210 (BCM43362) to work with mainline
>>> brcmfmac driver. I only tested managed mode. Monitor mode does not work.
>>> You can use firmware from CubieTech images.
>>
>> brcmfmac does not support monitor mode. It does support AP mode and P2P
>> modes.
>>
>>> Things missing:
>>>
>>> 1. output clock is using default 32KHz from 24M / 750.
>>> need to find some place to put clk_set_rate call.
>>
>> What clock is this? You mean there is a clock output driven by the
>> AP6210 module or Cubieboard provides it to the module.
>
> Cubieboard provides it to the module.
>
> BCM43362 (WiFi) and BCM20710 (BT) both accept an external 32768 Hz
> clock as low power clock. They can also use internal oscillator for
> this, so it is optional. But according to BCM20710 datasheet, this
> external clock is required to auto-detect the frequency of the main
> oscillator if it's not the default 20MHz. On the CubieTruck, it is
> 26 MHz. For just WiFi, I think we don't need it.
>
>>> 2. BCM43362 out-of-band interrupts not supported.
>>> OOB interrupt in brcmfmac is set using platform data.
>>> Need to put this is board code, or add device tree support.
>>
>> It would be good to add device tree support so the driver can first look
>> for device tree data and have platform data and in-band as backup mechanism.
>
> I'm not sure how to add support. Add a child node to the SD/MMC
> controller, perhaps? I thought SDIO devices were like USB, in
> that the system scans the bus and detects them.
>
>>> Core ID and addresses were found using bcmdhd driver debug output.
>>> Arend might want to take a look at the patch:
>>>
>>> https://github.com/wens/linux/commit/d945809d27de930eba5db0ca4bb7936e3ca88865
>>
>> I have different addresses from the chip documentation, but my test spin
>> went poorly. So much for hardware documentation. I will give these
>> values a try. In my patch there is also bcm43362 specific SDIO drive
>> strength programming (see attachment). The patch won't apply as my tree
>> is a bit different due to some rework in the SDIO part of brcmfmac. So
>> you probably need to pick the missing part from it.
>
> Maybe it's a remarked chip? (is that possible?)
> The firmware CubieTech has is for a BCM40181 though.
>
> Added the drive strength programming by hand. Changed the table variable
> name to match the others. Pushed on to my tree. Beware there are some
> hacks trying to get BT to work. :p
>
>>
>>> Working tree:
>>>
>>> https://github.com/wens/linux/tree/wip/sunxi-next-wifi
>>>
>>> Comments welcome :)
>>
>> No comment, but: Nice work!
>
> Thanks. BTW, who should submit the patch? :)
Hi Chen-Yu,
I confirmed the patch is working with a revision 0 of the device. What
chip revision does it give in your log (need to load brcmfmac with
module parameter debug=4).
Regards,
Arend
>>
>>>>
>>>> Bluetooth still isn't responding.
>>>
>>> Bluetooth still not working. :(
>>> Has anyone had any luck with this?
>>>
>>>>
>>>>>>> I'm certainly willing to give some patches for this a try. Do you
>>>>>>> have an example of what the dts file for a board with broadcom sdio
>>>>>>> wifi looks like ?
>>>>>>
>>>>>> I am still struggling with dts changes for a Pandaboard. As I understood
>>>>>> the cubietruck uses AP6210 module and the dts really depends on how
>>>>>> things are wired up with it. Apart from the SDIO lines it may have an
>>>>>> additional GPIO output to power the module and GPIO inputs to wakeup the
>>>>>> host and interrupt line.
>>>>>
>>>>> Yes it does. 2 GPIO lines for power, 1 for WiFi, 1 for BT.
>>>>> Also takes 2 GPIO inputs for interrupts. Not sure how to feed this
>>>>> to the driver. Last, it takes a clock output out of the A20 for the
>>>>> low power 32k clock. Not sure if this is mandatory?
>>>>>
>>>>> I've read the schematics more than a few times. I can get a dts out
>>>>> tomorrow. I was planning on doing the clock output and rfkill part
>>>>> first.
>>>>
>>>> Here's my tree, in case anyone wants to play around. It will be rebased
>>>> a lot.
>>>>
>>>> https://github.com/wens/linux/tree/wip/sunxi-next-wifi
>>>>
>>>> The DT is not finished yet. External interrupts and low power clock are
>>>> still missing. Can anyone provide an example for useing the PIO EINT
>>>> interrupt pins?
>>>>
>>>>
>>>> Cheers,
>>>>
>>>> ChenYu
>>
>> --
>> 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+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2014-01-02 13:59 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <52A040CE.5040706@schinagl.nl>
[not found] ` <CAFXj5xjJ0DTa0Qo1avLboQF-e3TFv3aEr_jjkuZjinwuTzXykQ@mail.gmail.com>
[not found] ` <52A09B5B.70800@schinagl.nl>
2013-12-05 21:46 ` [linux-sunxi] Firmware for Bluetooth (and wifi) Julian Calaby
2013-12-06 9:00 ` Arend van Spriel
2013-12-18 10:31 ` Arend van Spriel
2013-12-18 13:12 ` Hans de Goede
2013-12-18 16:16 ` Arend van Spriel
2013-12-18 16:39 ` Chen-Yu Tsai
2013-12-19 10:12 ` Chen-Yu Tsai
2013-12-26 16:13 ` Chen-Yu Tsai
2013-12-26 20:29 ` Hans de Goede
2013-12-27 11:47 ` Arend van Spriel
2013-12-27 12:36 ` Chen-Yu Tsai
2014-01-02 13:59 ` Arend van Spriel [this message]
2014-01-02 17:09 ` Chen-Yu Tsai
[not found] ` <5ce9ab14-5794-4c0d-a859-7a158655f58e@googlegroups.com>
2014-01-02 19:26 ` Michal Suchanek
2014-01-02 20:29 ` Arend van Spriel
2014-01-02 21:03 ` Arend van Spriel
2014-01-03 3:02 ` Chen-Yu Tsai
2014-01-08 8:56 ` Arend van Spriel
2014-01-08 9:23 ` Chen-Yu Tsai
2014-01-08 9:33 ` Arend van Spriel
2014-01-08 10:17 ` Chen-Yu Tsai
2014-01-23 22:39 ` Hans de Goede
2014-01-24 10:25 ` Arend van Spriel
2014-01-24 16:34 ` Hans de Goede
2014-01-26 8:53 ` Arend van Spriel
2014-01-26 8:56 ` Arend van Spriel
2014-01-26 10:23 ` Hans de Goede
2014-01-26 12:58 ` Arend van Spriel
2014-01-26 13:19 ` Hans de Goede
2014-01-26 12:07 ` Hans de Goede
2014-01-26 15:49 ` Hans de Goede
2014-01-26 11:04 ` Arend van Spriel
2014-01-26 12:09 ` Hans de Goede
2014-01-26 12:50 ` Arend van Spriel
2014-01-02 16:52 ` Michal Suchanek
2014-01-02 17:11 ` Chen-Yu Tsai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52C570B6.30500@broadcom.com \
--to=arend@broadcom.com \
--cc=benn@cubietech.com \
--cc=hdegoede@redhat.com \
--cc=julian.calaby@gmail.com \
--cc=linux-sunxi@googlegroups.com \
--cc=linux-wireless@vger.kernel.org \
--cc=oliver+list@schinagl.nl \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).