devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "'Arend van Spriel' via linux-sunxi" <linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Jonas Gorski
	<jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Priit Laes <plaes-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>,
	"John W . Linville"
	<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
	Arend van Spriel <arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	"linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Re: [PATCH 1/4] brcmfmac: Add brcm,nvram_file_name dt property
Date: Mon, 4 Jul 2016 20:36:05 +0200	[thread overview]
Message-ID: <577AAC95.7040800@broadcom.com> (raw)
In-Reply-To: <8717879.O1RMZcQt4V@wuerfel>

On 04-07-16 16:54, Arnd Bergmann wrote:
> On Monday, July 4, 2016 11:08:38 AM CEST Arend Van Spriel wrote:
>> On 4-7-2016 10:55, Arnd Bergmann wrote:
>>> On Monday, July 4, 2016 10:41:20 AM CEST Arend Van Spriel wrote:
>>>> On 2-7-2016 23:30, Arnd Bergmann wrote:
>>>>> On Saturday, July 2, 2016 8:20:35 PM CEST Arend Van Spriel wrote:
>>>>>>> If you want a separate property, then I repeat my very first
>>>>>>> suggestion, the well defined model property.
>>>>>>> e.g.
>>>>>>>
>>>>>>> brcmf@0 {
>>>>>>>         model = "ampak,ap6210";
>>>>>>>         compatible = "brcm,bcm4329-fmac";
>>>>>>>         ...
>>>>>>> };
>>>>>>>
>>>>>>> All device nodes may have a model property, not just the top "machine" one.
>>>>>>
>>>>>> I heard you the first time  I just was not sure what the implications
>>>>>> would be to use it. Hence I suggested a vendor specific property.
>>>>>> However, looking up and reading the definition in ePAPRv1.1 I suppose it
>>>>>> is fine to use the model property:
>>>>>>
>>>>>> Property: model
>>>>>> Value type: <string>
>>>>>> Description:
>>>>>> The model property value is a <string> that specifies the manufacturer’s
>>>>>> model number of the device.
>>>>>>
>>>>>> The recommended format is: “manufacturer,model”, where manufacturer is a
>>>>>> string describing the name of the manufacturer (such as a stock ticker
>>>>>> symbol), and model specifies the model number.
>>>>>
>>>>> The model property is very similar to compatible, except that there is
>>>>> only one entry rather than a list of entries from most specific to
>>>>> most generic.
>>>>
>>>> They seem very similar, but I think there is a conceptual difference.
>>>> The compatible property is mainly used to select the appropriate driver
>>>> and as such the property is typically ignored by device drivers.
>>>> Probably there are exceptions to be found.
>>>>
>>>>> I think by writing the above example as
>>>>>
>>>>>       compatible = "ampak,ap6210", "brcm,bcm4329-fmac";
>>>>>
>>>>> we can provide the same functionality in a slightly simpler way, the driver
>>>>> then just goes on to look for the nvram file for each entry in sequence until
>>>>> it finds one.
>>>>
>>>> Not sure why this would be simpler. Why would traversing the compatible
>>>> string be simpler than handling the model property if present and
>>>> otherwise fallback to the default nvram naming.
>>>
>>> Because you have to walk the list anyway to find the other firmware files:
>>> when you have a specialization of a device that requires listing both values
>>> as compatible, the driver has no idea which of the entries to use, unless
>>> you add a lookup table that adds more complexity.
>>
>> Currently, the brcmfmac bindings describe a single compatible string,
>> ie. "brcm,bcm4329-fmac", which selects the driver/programming model. If
>> that programming model supports "use model property if present,
>> otherwise use default" there is nothing to traverse. The default way in
>> the driver to determine firmware and nvram filename already has a lookup
>> table which uses the chip id and chip revision as key, which are read
>> from the device.
> 
> In drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c I already see
> over a dozen different chips being supported, bcm4329 is only one of
> them. In particular, there seem to be some that have various modules:
> 
>         BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
>         BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4),
>         BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43241_CHIP_ID, 0xFFFFFFC0, 43241B5),
> 
> So if you have a bcm43241, that compatible string probably should
> include both brcm,bcm43241-b4-fmac and brcm,bcm43241-fmac, possibly also
> brcm,bcm4329-fmac, to show that it is a superset of the programming
> interface of that one.

Hi Arnd,

I have to disagree here. The compatible string "brcm,bcm4329-fmac" is
chosen as the bcm4329 chip was the first supported and we never added
others as there is no other programming required. For all supported
devices the same device tree properties apply and are handled the same.
As such there is no need to come up with a new compatible string.

Regards,
Arend

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

  reply	other threads:[~2016-07-04 18:36 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 14:04 [PATCH 1/4] brcmfmac: Add brcm,nvram_file_name dt property Hans de Goede
     [not found] ` <1467209074-15634-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-29 14:04   ` [PATCH 2/4] ARM: dts: sun7i-a20-cubietruck: Set brcm,nvram_file_name Hans de Goede
     [not found]     ` <1467209074-15634-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-29 17:01       ` Kalle Valo
     [not found]         ` <87wpl8c4km.fsf-5ukZ45wKbUHoml4zekdYB16hYfS7NtTn@public.gmane.org>
2016-06-29 18:01           ` [linux-sunxi] " Hans de Goede
2016-06-29 14:04   ` [PATCH 3/4] ARM: dts: sun7i-a20-wits-pro-a20-dkt: " Hans de Goede
2016-06-29 14:04   ` [PATCH 4/4] ARM: dts: sun5i-a10s-auxtek-t004: " Hans de Goede
2016-06-29 14:42   ` [PATCH 1/4] brcmfmac: Add brcm,nvram_file_name dt property Jonas Gorski
     [not found]     ` <CAOiHx=n6itfmvwYQh+jUSDNguQFkos=MzjkDWP=GsupdgvF6KQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-29 15:16       ` Hans de Goede
     [not found]         ` <b49a9e4b-d591-d978-8005-413f39ebf2bd-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-29 17:00           ` Kalle Valo
     [not found]             ` <871t3gdj6p.fsf-5ukZ45wKbUHoml4zekdYB16hYfS7NtTn@public.gmane.org>
2016-06-29 18:01               ` [linux-sunxi] " Hans de Goede
     [not found]                 ` <ea10ff70-26e6-e151-5cea-c54bd12a054c-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-29 18:51                   ` 'Arend Van Spriel' via linux-sunxi
     [not found]                     ` <f8995599-115d-87e5-7928-c029b48584f1-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-06-29 18:57                       ` 'Arend Van Spriel' via linux-sunxi
     [not found]                         ` <fa0bf74d-cba3-0853-753c-64fe049105aa-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-06-30  8:50                           ` Kalle Valo
2016-06-29 19:33                       ` Arnd Bergmann
2016-06-29 19:54                         ` Priit Laes
     [not found]                           ` <1467230078.2598.2.camel-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>
2016-06-29 20:07                             ` Arnd Bergmann
2016-06-30  9:02                             ` Kalle Valo
     [not found]                               ` <87eg7f6odi.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
2016-06-30  9:50                                 ` Hans de Goede
     [not found]                                   ` <e94f58fe-f709-94bd-21f6-144c4e038d17-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-30  9:58                                     ` Kalle Valo
     [not found]                                       ` <87a8i36ls9.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
2016-06-30 10:04                                         ` [linux-sunxi] " Hans de Goede
     [not found]                                           ` <14a3aa66-5851-5537-f6cd-7681fb4cde07-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-30 10:18                                             ` Jonas Gorski
     [not found]                                               ` <CAOiHx==82LHOeQMNVD+dybFifXX690Q6AJTcMBMynjSfUOyGUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-30 10:25                                                 ` [linux-sunxi] " Hans de Goede
     [not found]                                                   ` <8d8bd933-717b-48e4-f002-7b834abed6fd-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-30 11:31                                                     ` Arnd Bergmann
2016-06-30 19:23                                                       ` 'Arend Van Spriel' via linux-sunxi
     [not found]                                                         ` <1f44df41-0111-441b-4671-718eec0c4346-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-07-01  8:51                                                           ` Re: [PATCH 1/4] brcmfmac: Add brcm, nvram_file_name " Arnd Bergmann
2016-07-01  8:58                                                           ` Re: [PATCH 1/4] brcmfmac: Add brcm,nvram_file_name " Jonas Gorski
     [not found]                                                             ` <CAOiHx=m8Zf0T4=BTG6BMRjj3kOHzt4YaQa3yzutmrhFSOyZMmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-02  6:59                                                               ` Kalle Valo
2016-07-02 18:20                                                               ` 'Arend Van Spriel' via linux-sunxi
     [not found]                                                                 ` <ced2a770-2724-bdc9-7e2a-3dc9f76abf29-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-07-02 21:30                                                                   ` Arnd Bergmann
2016-07-04  8:41                                                                     ` [linux-sunxi] " Arend Van Spriel
2016-07-04  8:55                                                                       ` [linux-sunxi] Re: [PATCH 1/4] brcmfmac: Add brcm, nvram_file_name " Arnd Bergmann
2016-07-04  9:08                                                                         ` Re: [PATCH 1/4] brcmfmac: Add brcm,nvram_file_name " 'Arend Van Spriel' via linux-sunxi
     [not found]                                                                           ` <6cc6dabf-e6da-d70d-3cce-a7f1804f233e-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-07-04 14:54                                                                             ` Arnd Bergmann
2016-07-04 18:36                                                                               ` 'Arend van Spriel' via linux-sunxi [this message]
     [not found]                                                                                 ` <577AAC95.7040800-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-07-05 13:43                                                                                   ` Arnd Bergmann
2016-07-06  8:08                                                                                     ` 'Arend Van Spriel' via linux-sunxi
     [not found]                                                                                       ` <CAF7Mx6qcwtwYQhrkNk8o+D6UQBLEQkL-ti7aMQyLVuRo+JMUfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-06 13:42                                                                                         ` Arnd Bergmann
2016-07-06 19:19                                                                                           ` 'Arend Van Spriel' via linux-sunxi
     [not found]                                                                                             ` <bb1beb8d-652d-aa97-e24b-e3e27397dd2e-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-07-07  8:46                                                                                               ` Arnd Bergmann
2016-07-07  9:16                                                                                                 ` 'Arend Van Spriel' via linux-sunxi
     [not found]                                                                                                   ` <27f6d3d3-4bcc-8572-4c7b-b44966ad72f4-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-07-07  9:24                                                                                                     ` Re: [PATCH 1/4] brcmfmac: Add brcm, nvram_file_name " Arnd Bergmann
2016-07-17 21:45                                                                                                 ` Re: [PATCH 1/4] brcmfmac: Add brcm,nvram_file_name " Rob Herring
2016-07-18  7:51                                                                                                   ` 'Arend Van Spriel' via linux-sunxi
2016-06-30  8:46                       ` Kalle Valo
     [not found]                         ` <87mvm36p4d.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
2016-06-30  9:33                           ` Julian Calaby
2016-06-30  9:49                           ` Hans de Goede
2016-06-30  9:53                       ` Hans de Goede
2016-07-01  2:08   ` Rob Herring
2016-07-01  8:17     ` 'Arend Van Spriel' via linux-sunxi
     [not found]       ` <b18cd232-711a-b617-2f09-09c4bdf2c3c4-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-07-01  9:20         ` Arnd Bergmann
2016-07-04 16:12         ` Rob Herring

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=577AAC95.7040800@broadcom.com \
    --to=linux-sunxi-/jypxa39uh5tlh3mbocffw@public.gmane.org \
    --cc=arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=arend.vanspriel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
    --cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=plaes-q/aMd4JkU83YtjvyW6yDsg@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).