[RFC] [PATCH] ARM: tegra: emc: device tree bindings

Olof Johansson olof at lixom.net
Thu Oct 20 02:06:35 EST 2011


On Wed, Oct 19, 2011 at 7:36 AM, Rob Herring <robherring2 at gmail.com> wrote:
> On 10/18/2011 10:28 PM, Olof Johansson wrote:
>> On Tue, Oct 18, 2011 at 7:37 PM, Rob Herring <robherring2 at gmail.com> wrote:
>>> On 10/18/2011 04:01 PM, Stephen Warren wrote:
>>>> I only suggested the well-known-named sub-nodes in order to eliminate
>>>> the need for a compatible property.
>>>>
>>>> My inclination is that if we use compatible to distinguish the tables
>>>> from anything else, there's little point having the extra level of nodes;
>>>> we may as well lay it out as in your original patch, just with an explicit
>>>> nvidia,ram-code property in each table (or omitted/ignored when not using
>>>> it) instead of reg?
>>>
>>> Node names should be generic like serial or ethernet. Compatible is used
>>> to specify the specific model.
>>
>> In cases where unit addresses can be used to separate out identical
>> entries, yes. For something like this, there's no logical addressing
>> of the tables so something else must be used to distinguish them.
>
> Using the frequency as was previously proposed would work assuming that
> is unique.

Someone suggested (off-list) to just use dummy addressing like cpu
nodes do. Sounds reasonable to me.

So:

emc {
  compatible = "tegra20-emc";
  nvidia,use-ram-code;
  emc-tables@<ram-code> {
     nvidia,ram-code = < <ram-code> >;
     emc-table@<dummy enumerator> {
        compatible = "tegra20-emc-table";
        clock-frequency = < >;
        nvidia,emc-regs = < >;
     }
  }

This also avoids having to handle 2-dimensional dummy numbering (i.e.
<ramcode,table-number>) by breaking it in two levels:

Where nvidia,use-ram-code is missing in the emc node, the immediate
child nodes will be scanned for the compatible nodes
Where nvidia,use-ram-code is present, first scan will be of all child
nodes containing an nvidia,ram-code property, then from there treat it
the same as the first case.

In the above, none of the names have meaning, so they can be changed
as needed (but these seem like a reasonably generic and descriptive
name to me).


-Olof


More information about the devicetree-discuss mailing list