Re: [PATCH 2/3] devicetree: add binding for Aurora VLSI NB8800 Ethernet controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Marc Gonzalez <marc_gonzalez@xxxxxxxxxxxxxxxx> 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@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux