From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
Tomasz Figa <tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Firmware for Bluetooth (and wifi)
Date: Tue, 28 Jan 2014 11:41:38 +0100 [thread overview]
Message-ID: <52E78962.7080404@redhat.com> (raw)
In-Reply-To: <52E78236.50702-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Hi,
On 01/28/2014 11:11 AM, Arend van Spriel wrote:
> On 01/27/2014 11:12 AM, Tomasz Figa wrote:
>>> The brcmfmac driver that consumes these DT nodes will have a closer look
>>> at the device obtaining the chipid during the probe and determine if it
>>> can support it. So the compatible string indicates that the device needs
>>> a so-called fullmac wireless driver opposed to a mac80211 aka. softmac
>>> wireless driver.
>>
>> The compatible string should guarantee that the chip ID register holds a
>> valid value, so just "wifi-fullmac" or "brcmfmac" sounds too generic to
>
> I am not sure I understand this requirement. Is the DT node claimed
> somehow after of_find_matching_node() and unavailable to other drivers.
>
>> me. The string must specify the family of chips with this chip ID scheme
>> in a reasonably precise way. "brcm,bcm43xx-fmac" maybe? I still see a
>> risk of, say, BCM43999 showing up, which would be a completely different
>> chip. while having the model matching the pattern.
>
> If a completely different chip, ie. BCM43999, shows up in a board the
> device tree should not use "brcm,bcm43xx-fmac". That would be an error
> in the dts file, right? All the devices listed in your bindings patch
> are treated the same, ie. *compatible* on DT level and hence can have
> the same compatible property.
>
> In my opinion that is what the compatible property is about. It
> identifies how a specific category of devices is accessed/configured. As
> an example please see [1]. It shows one compatible string for a binding
> that is used for different MPIC controllers.
>
> Just to be clear, I like your suggestion to use "brcm,bcm43xx-fmac", but
> felt you did not so added my explanation/point of view.
The usual way to solve this is to have the dts file have a list of
compatibility strings going from specific to more generic, so for ie the
wifi on the cubietruck the dts file would contain:
compatible = "brcm,bcm43362", "brcm,bcm43xx-fmac";
And then the brcmfmac driver will contain .compatible = "brcm,bcm43xx-fmac"
If we then ever need to have some specific quirks in the driver the driver
can use of_device_is_compatible(dev->of_node, "brcm,bcm43362") to check for
the 43362.
Their could even be a completely separate driver for the "brcm,bcm43362",
with brcmfmac still claiming "brcm,bcm43xx-fmac", as matching is done
from left to right, so if there is a specific driver and a more generic
one the specific driver will win (assuming both are built-in / loaded
at probe time).
TL;DR: dts file should have:
compatible = "brcm,bcm43362", "brcm,bcm43xx-fmac";
brcmfmac should have:
.compatible = "brcm,bcm43xx-fmac",
So that we can add device specific quirks later (if necessary).
Regards,
Hans
next prev parent reply other threads:[~2014-01-28 10:41 UTC|newest]
Thread overview: 43+ 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
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
[not found] ` <52E19E1C.1010402@redhat.com>
[not found] ` <CAGb2v66KhGoGmoFkTw9PQYBtX 9YQbmxk4oy_tM4LM_UhZMkcZg@mail.gmail.com>
[not found] ` <52E5392B.80605@redhat.com>
[not found] ` <CAGb2v6594vsKCd9E8apojQXE8h6WJj4-doJ8wa85Nt3EFZhXHA@mail.gmail.com>
[not found] ` <CAGb2v6594vsKCd9E8apojQXE8h6WJj4-doJ8wa85Nt3EFZhXHA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-26 21:39 ` Arend van Spriel
[not found] ` <52E580A8.4060600-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2014-01-27 0:20 ` Tomasz Figa
[not found] ` <52E5A631.4030204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-27 4:09 ` Chen-Yu Tsai
2014-01-27 9:21 ` Arend van Spriel
[not found] ` <52E62510.5090103-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2014-01-27 10:12 ` Tomasz Figa
[not found] ` <52E630F4.8090805@gmail.com >
[not found] ` <52E630F4.8090805-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-28 10:11 ` Arend van Spriel
[not found] ` <52E78236.50702@broadcom.! com>
[not found] ` <52E78236.50702-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2014-01-28 10:41 ` Hans de Goede [this message]
2014-01-02 16:52 ` [linux-sunxi] " 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=52E78962.7080404@redhat.com \
--to=hdegoede-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=wens-jdAy2FN1RRM@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.