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
prev parent reply other threads:[~2014-01-28 10:41 UTC|newest]
Thread overview: 7+ 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>
[not found] ` <CAGRGNgWBgWqoPUdHSm2OXGb8r-ca5NX2z4_v0eG6oOMgJRd3HQ@mail.gmail.com>
[not found] ` <52B17973.1000608@broadcom.com>
[not found] ` <52B19F38.7060503@redhat.com>
[not found] ` <52B1CA51.4010202@broadcom.com>
[not found] ` <CAGb2v67cnP0yth0xxBKcaW_T2fF+4nP4r6h9NLqy5FV2x=hO=Q@mail.gmail.com>
[not found] ` <CAGb2v67mmYnyPeOd4Wwp1zHs7EC_Gr+gEdaaMWeKP5z_Z_SVGA@mail.gmail.com>
[not found] ` <CAGb2v66646-1Sye=Eb04_SoeCGBU064OePcxDi7th1fqU8XfBg@mail.gmail.com>
[not found] ` <52BD68BA.3080304@broadcom.com>
[not found] ` <CAGb2v67Q=q4vyOftb+BLhAYR-6d04dDP3+kY3b88U8_vCvAmgQ@mail.gmail.com>
[not found] ` <52CD12D4.5030008@broadcom.com>
[not found] ` <CAGb2v64+5Rgs6JxD0iH3bcwXPOm-xyS_LSmWLfx0qiMQwreOeQ@mail.gmail.com>
[not found] ` <52E19A27.7000402@redhat.com>
[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 ` Firmware for Bluetooth (and wifi) 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]
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 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).