mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Cc: DT <devicetree@vger.kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	<linux-kernel@vger.kernel.org>,
	Sebastian Frias <sebastian_frias@sigmadesigns.com>,
	Thibaud Cornic <thibaud_cornic@sigmadesigns.com>,
	Mason <slash.tmp@free.fr>
Subject: Re: [PATCH 2/3] devicetree: add binding for Aurora VLSI NB8800 Ethernet controller
Date: Mon, 26 Oct 2015 13:54:10 +0000	[thread overview]
Message-ID: <yw1xsi4xenwd.fsf@unicorn.mansr.com> (raw)
In-Reply-To: <562E2A61.2080306@sigmadesigns.com> (Marc Gonzalez's message of "Mon, 26 Oct 2015 14:28:01 +0100")

Marc Gonzalez <marc_gonzalez@sigmadesigns.com> writes:

>>> So I should write something like this in my DT?
>>>
>>>   eth0: ethernet@26000 {
>>>     compatible = "sigma,smp8734-ethernet", "sigma,smp8640-ethernet", "aurora,nb8800";
>>>
>>> Hmmm, you mention this below, but you used "sigma,smp8759-ethernet".
>>> What about earlier chips?
>> 
>> OK, how about this scheme then:
>> 
>> - Device trees list the exact chip, the chip family, the oldest
>>   compatible family, and finally the basic "aurora,nb8800".  For the
>>   SMP8759 that would look like this:
>>   "sigma,smp8759-ethernet", "sigma,smp87xx-ethernet", "sigma,smp864x-ethernet",
>>     "aurora,nb8800"
>
> AFAICT, the list of tango4 chips is (in chronological order)
>
> 8910, 8734, 8756, 8758, 8759
>
> The problem I see is that Sigma already has plans for non-tango4
> 87xx SoCs (two in fact: 8760 and 8762, as far as I've heard).
> (What a mess.)
>
> I would think the "chip family" needs to use the code-name like
> tango3 or tango4 (for lack of a better discriminant).
>
> Also, (purely hypothetical) suppose something changed in 8756 and up.
> How would the 8758 pick up the improvement, but not the 8734?
>
> I'm also confused, because I thought I read somewhere not to use
> wildcards in compatible strings... <Looking> It was there:
> http://devicetree.org/Device_Tree_Usage#Understanding_the_compatible_Property
> (Sorry, some of this stuff is a bit hard for me to grok.)

Right, and you just illustrated why wildcards are bad.  Sorry for the
confusion.  I should have known better than to look at existing
bindings.  Let's drop that idea.

Let's try something else:

Device trees list the exact chip, the oldest chip with the same
features, and the oldest compatible chip.  From the sound of things,
that means the smp8759 should use "sigma,smp8759-ethernet",
"sigma,smp8910-ethernet", "sigma,smp8642-ethernet", "aurora,nb8800".

> Finally, I think what you decide to do can also be done for the
> interrupt controller, right?

Sure, the same scheme should be used for all on-chip devices.

-- 
Måns Rullgård
mans@mansr.com

  reply	other threads:[~2015-10-26 13:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22 14:02 [PATCH 1/3] devicetree: add vendor prefix for Aurora VLSI Mans Rullgard
2015-10-22 14:02 ` [PATCH 2/3] devicetree: add binding for Aurora VLSI NB8800 Ethernet controller Mans Rullgard
2015-10-22 14:34   ` Rob Herring
2015-10-23 12:10   ` Marc Gonzalez
2015-10-23 13:28     ` Rob Herring
2015-10-23 13:41     ` Måns Rullgård
2015-10-23 13:57       ` Marc Gonzalez
2015-10-23 14:06         ` Måns Rullgård
2015-10-26  9:34       ` Marc Gonzalez
2015-10-26 12:05         ` Måns Rullgård
2015-10-26 13:28           ` Marc Gonzalez
2015-10-26 13:54             ` Måns Rullgård [this message]
2015-10-26 14:05               ` Marc Gonzalez
2015-10-26 14:11                 ` Måns Rullgård
2015-10-22 14:02 ` [PATCH 3/3] net: ethernet: add driver " Mans Rullgard
2015-10-22 14:41   ` David Miller
2015-10-22 17:18     ` Måns Rullgård
2015-10-22 14:55   ` kbuild test robot
2015-10-22 22:08   ` kbuild test robot
2015-10-23  0:31   ` Florian Fainelli
2015-10-23 15:20     ` Måns Rullgård
2015-10-23 17:36       ` Florian Fainelli
2015-10-24 15:45         ` Måns Rullgård
2015-10-22 14:35 ` [PATCH 1/3] devicetree: add vendor prefix for Aurora VLSI 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=yw1xsi4xenwd.fsf@unicorn.mansr.com \
    --to=mans@mansr.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc_gonzalez@sigmadesigns.com \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sebastian_frias@sigmadesigns.com \
    --cc=slash.tmp@free.fr \
    --cc=thibaud_cornic@sigmadesigns.com \
    /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

all inboxes | Powered by JetHome®