From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Pantelis Antoniou
<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
Cc: frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@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: Mon, 30 May 2016 14:22:10 +1000 [thread overview]
Message-ID: <20160530042210.GD17226@voom.fritz.box> (raw)
In-Reply-To: <26CE3FC4-2B09-45E9-94E2-9EA7836A684F-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 9314 bytes --]
On Fri, May 27, 2016 at 05:52:41PM +0300, Pantelis Antoniou wrote:
> Hi Frank,
>
> > On May 27, 2016, at 00:31 , Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > On 5/26/2016 10:09 AM, Pantelis Antoniou wrote:
> >> Hi Frank,
> >>
> >>> On May 26, 2016, at 19:55 , Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >>>
> >>> 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+AXnRB3Ne2BGzF6ryscVyMRj84@public.gmane.org.au> 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+AXnRB3Ne2BGzF6g@public.gmane.orgid.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+AXnSZP5U4TJ/6Hg@public.gmane.orgr.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?
> >>>
> >>
> >> No, I’m talking about the new target options patchset.
> >>
> >> "of: overlays: New target methods” & in particular
> >>
> >> "of: overlay: Implement target index support"
> >
> > Thanks for the pointer. I don't think the target options approach
> > is the way to handle the issue (see my reply a couple of minutes
> > ago in that thread).
> >
> >>
> >>>
> >>>> 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.
> >>>>
> >>
> >> That’s on purpose. The first level is to contain load manager specific details,
> >> i.e. part-numbers and other platform specific properties.
> >>
> >> The second level contains the per fragment properties (at the moment targets).
> >
> > My suggestion removed the target property.
>
> Removing the target property requires using a loader. That may be fine
> in general and in fact that’s what the target root methods do (setting
> the target root to ‘/‘ makes them equivalent to your version).
I can't quite make sense of that comment. No matter the encoding,
you're always going to need some sort of a loader.
> > What other properties are you envisioning? (Looking for the architectural
> > vision that you have.)
> >
>
> Oh, there are a lot of properties that can be provided.
>
> For instance you can declare manufacturing info (like part numbers, version numbers,
> serial numbers that can be used for quirking). You can declare things like load order
> when you need precedence of overlays (i.e. on the bone the soldered on hdmi output
> should be disabled when an add on cape with display capability is attached).
> You can declare resources (i.e. pins or power draw figures) to make a decision
> whether enabling an expansion board is safe.
>
> I’m sure more ideas will come when we put it into wide-spread use.
Yeah. I'm not entirely sure I'm convinced by the specific examples
given so far. However, in general I can see the value in providing a
way we can extend to add more metadata. The two level structure with
__overlay__ gives us that, whereas the one level approach doesn't.
> > If load manager specific details are appropriate in the devicetree (a whole
> > different discussion) then maybe a /chosen/load-manager node could exist to
> > hold them instead of putting them in /, where the patch currently locates
> > "/* various properties for loader use; i.e. part id etc. */".
>
> Oh yes. But that’s something for us to figure out.
>
> Regards
>
> — Pantelis
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-30 4:22 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
[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 [this message]
[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=20160530042210.GD17226@voom.fritz.box \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@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).