devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Pantelis Antoniou
	<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
Cc: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	David Gibson
	<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>,
	Jon Loeliger <jdl-CYoMK+44s/E@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Jan Luebbe <jlu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Matt Porter <mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v7 3/5] dtc: Document the dynamic plugin internals
Date: Thu, 26 May 2016 09:55:54 -0700	[thread overview]
Message-ID: <57472A9A.1060903@gmail.com> (raw)
In-Reply-To: <CAL_JsqLTrSP577ViKRjoqyagWw4+dZuQQsTMMXdoU3n9HZSYZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Pantelis,

On 5/26/2016 6:49 AM, Rob Herring wrote:
> On Thu, May 26, 2016 at 2:16 AM, Pantelis Antoniou
> <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
>> Hi David,
>>
>>> On May 26, 2016, at 10:12 , David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6rL0yjEaa7Ru@public.gmane.orgau> wrote:
>>>
>>> On Thu, May 26, 2016 at 09:36:02AM +0300, Pantelis Antoniou wrote:
>>>> Hi David,
>>>>
>>>>> On May 26, 2016, at 09:33 , David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6vUpdFzICT1y@public.gmane.orgd.au> wrote:
>>>>>
>>>>> On Thu, May 26, 2016 at 09:31:20AM +0300, Pantelis Antoniou wrote:
>>>>>> Hi David,
>>>>>>
>>>>>>> On May 26, 2016, at 09:28 , David Gibson <david-xT8FGy+AXnQMXKaNCjofrA@public.gmane.org.id.au> wrote:
>>>>>>>
>>>>>>> On Thu, May 26, 2016 at 09:14:49AM +0300, Pantelis Antoniou wrote:
>>>>>>>> Hi Frank,
>>>>>>>>
>>>>>>>>> On May 25, 2016, at 22:13 , Frank Rowand <frowand.list@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>> On 5/24/2016 10:50 AM, Pantelis Antoniou wrote:
>>>>>>>>>> Provides the document explaining the internal mechanics of
>>>>>>>>>> plugins and options.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
>>>>>>>>>> ---
>>>>>>>>>> Documentation/dt-object-internal.txt | 318 +++++++++++++++++++++++++++++++++++

< snip >

>>>>>>>>>> +So the bar peripheral's DTS format would be of the form:
>>>>>>>>>> +
>>>>>>>>>> +/dts-v1/ /plugin/;    /* allow undefined references and record them */
>>>>>>>>>> +/ {
>>>>>>>>>> +      ....    /* various properties for loader use; i.e. part id etc. */
>>>>>>>>>> +      fragment@0 {
>>>>>>>>>> +              target = <&ocp>;
>>>>>>>>>> +              __overlay__ {
>>>>>>>>>> +                      /* bar peripheral */
>>>>>>>>>> +                      bar {
>>>>>>>>>> +                              compatible = "corp,bar";
>>>>>>>>>> +                              ... /* various properties and child nodes */
>>>>>>>>>> +                      }
>>>>>>>>>
>>>>>>>>>                     };
>>>>>>>>>
>>>>>>>>>> +              };
>>>>>>>>>> +      };
>>>>>>>>>> +};
>>>>>>>>>
>>>>>>>>> Other than the fact that the above syntax is already in the Linux
>>>>>>>>> kernel overlay implementation, is there a need for the target
>>>>>>>>> property and the __overlay__ node?  I haven't figured out what
>>>>>>>>> extra value they provide.
>>>>>>>>>
>>>>>>>>> Without those added, the overlay dts becomes simpler (though for a
>>>>>>>>> multi-node target path example this would be more complex unless a label
>>>>>>>>> was used for the target node):
>>>>>>>>>
>>>>>>>>> +/dts-v1/ /plugin/;     /* allow undefined references and record them */
>>>>>>>>> +/ {
>>>>>>>>> +       ....    /* various properties for loader use; i.e. part id etc. */
>>>>>>>>> +       ocp {
>>>>>>>>> +                       /* bar peripheral */
>>>>>>>>> +                       bar {
>>>>>>>>> +                               compatible = "corp,bar";
>>>>>>>>> +                               ... /* various properties and child nodes */
>>>>>>>>> +                       };
>>>>>>>>> +       };
>>>>>>>>> +};
>>>>>>>>>
>>>>>>>>
>>>>>>>> No.
>>>>>>>>
>>>>>>>> That only works if the overlay is applied in a single platform.
>>>>>>>>
>>>>>>>> I have working cases where the same overlay is applied on a ppc and a x86
>>>>>>>> platform.
>>>>>>>
>>>>>>> Huh?  How so..
>>>>>>>
>>>>>>
>>>>>> Yes, it does work. Yes it’s being used right now. It is a very valid use case.
>>>>>>
>>>>>> Think carrier boards on enterprise routers, plugging to a main board
>>>>>> that’s either ppc or x86 (or anything else for that matter).
>>>>>
>>>>> Sorry, I wasn't clear.  I have no problem believing overlays can be
>>>>> applied on multiple platforms.
>>>>>
>>>>> What I can't see is how Frank's format breaks that.  AFAICT it
>>>>> contains exactly the same information in a simpler encoding.
>>>>>
>>>>
>>>> It breaks it because it’s missing the target property.
>>>>
>>>> The layout of the base tree is not going to be the same in different
>>>> platforms, so in the above example ‘ocp’ would not exist in x86 for
>>>> instance.
>>>
>>> I think you're misinterpreting Frank's suggestion.  As I understand it
>>> the node names of the top level nodes in his format aren't treated as
>>> literal node names, but instead treated as label names which are
>>> resolved similarly to the phandle external fixups.
>>>
>>> Actually.. that is one serious problem with Frank's format, it doesn't
>>> (easily) allow multiple fragments to be applied to the same target.
>>>
>>
>> Ugh, yeah I misinterpreted that. Still, it is not going to work with the patches
>> I queued with multiple target support.

OK, so you are talking about the "[RFC] of: Portable Device Tree connector"
email from 4/27 (just to provide an easy link for everyone).  I'm still
trying to figure that out.

So other than that, am I missing something else about what extra
functionality the extra layers of nodes provides?


> Queued implies accepted which they are not. The multiple ways of
> expressing targets bothers me. Upstream still has no external
> interface to overlays, so I think there is still room to change things
> if we decide it is worthwhile. Better now than stuck with something
> forever.
> 
> I too was wondering about the current syntax before this thread
> started. We have 2 levels of nodes before we get to any useful
> information with the current syntax.
> 
> Rob
> 

  parent reply	other threads:[~2016-05-26 16:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 17:50 [PATCH v7 0/5] dtc: Dynamic DT support Pantelis Antoniou
     [not found] ` <1464112239-29856-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-24 17:50   ` [PATCH v7 1/5] util: Add xasprintf portable asprintf variant Pantelis Antoniou
     [not found]     ` <1464112239-29856-2-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-25  5:16       ` David Gibson
2016-05-24 17:50   ` [PATCH v7 2/5] DTBO magic and dtbo format options Pantelis Antoniou
     [not found]     ` <1464112239-29856-3-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-25 18:51       ` Frank Rowand
     [not found]         ` <5745F42E.9080100-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-26  0:10           ` David Gibson
2016-05-26  0:11       ` David Gibson
2016-05-24 17:50   ` [PATCH v7 3/5] dtc: Document the dynamic plugin internals Pantelis Antoniou
     [not found]     ` <1464112239-29856-4-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-25 19:13       ` Frank Rowand
     [not found]         ` <5745F95F.6000600-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-26  4:58           ` David Gibson
     [not found]             ` <20160526045801.GD17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-26  6:16               ` Pantelis Antoniou
2016-05-26  6:14           ` Pantelis Antoniou
     [not found]             ` <1151E0EF-B811-4C0B-858A-00810BE9BA42-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26  6:28               ` David Gibson
     [not found]                 ` <20160526062848.GG17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-26  6:31                   ` Pantelis Antoniou
     [not found]                     ` <8CAE1792-841B-4048-B6B1-1F0F973E2E34-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26  6:33                       ` David Gibson
     [not found]                         ` <20160526063334.GH17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-26  6:36                           ` Pantelis Antoniou
     [not found]                             ` <BE239F34-7B36-4A78-BE21-AA48CB8349E4-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26  7:12                               ` David Gibson
     [not found]                                 ` <20160526071243.GI17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-26  7:16                                   ` Pantelis Antoniou
     [not found]                                     ` <C43C3B01-5DF5-49DF-848D-0BEA48E3DB6E-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26 13:49                                       ` Rob Herring
     [not found]                                         ` <CAL_JsqLTrSP577ViKRjoqyagWw4+dZuQQsTMMXdoU3n9HZSYZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-26 16:55                                           ` Frank Rowand [this message]
     [not found]                                             ` <57472A9A.1060903-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-26 17:09                                               ` Pantelis Antoniou
     [not found]                                                 ` <EAD64177-3519-4CD2-AFB6-5EB765CC7459-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26 21:31                                                   ` Frank Rowand
     [not found]                                                     ` <57476B27.9070008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-27 14:52                                                       ` Pantelis Antoniou
     [not found]                                                         ` <26CE3FC4-2B09-45E9-94E2-9EA7836A684F-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-30  4:22                                                           ` David Gibson
     [not found]                                                             ` <20160530042210.GD17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-06-30  2:59                                                               ` Frank Rowand
     [not found]                                                                 ` <57748B01.4050601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-30  5:17                                                                   ` David Gibson
2016-05-24 17:50   ` [PATCH v7 4/5] dtc: Plugin and fixup support Pantelis Antoniou
     [not found]     ` <1464112239-29856-5-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-27  7:33       ` David Gibson
     [not found]         ` <20160527073306.GA17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-31  5:06           ` David Gibson
     [not found]             ` <20160531050634.GJ17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-06-02 17:13               ` Pantelis Antoniou
     [not found]                 ` <60DA9B11-16A5-49C6-AB27-888D4FCBE3A3-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-06-03  1:11                   ` David Gibson
2016-05-24 17:50   ` [PATCH v7 5/5] plugin: Transparently support old style syntax Pantelis Antoniou

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=57472A9A.1060903@gmail.com \
    --to=frowand.list-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=jdl-CYoMK+44s/E@public.gmane.org \
    --cc=jlu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@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).