devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Alexandre Torgue <alexandre.torgue-qxv4g6HH51o@public.gmane.org>
Cc: Frank Rowand
	<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Tom Rini <trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	Kumar Gala <kumar.gala-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"ksummit-discuss-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I@public.gmane.org"
	<ksummit-discuss-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I@public.gmane.org>,
	Rob Herring <rob.herring-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Pantelis Antoniou
	<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	Andrew Turner <andrew-/GQUgJ3qWXsIvnNNuaVxrw@public.gmane.org>,
	Andy Gross <andy.gross-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [Ksummit-discuss] Devicetree Workshop at Kernel Summit Prague (26 Oct 2017)
Date: Fri, 20 Oct 2017 21:01:41 +1100	[thread overview]
Message-ID: <20171020100141.GI13245@umbus> (raw)
In-Reply-To: <fea62563-6629-6d79-06a9-3d17c97ad238-qxv4g6HH51o@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 8513 bytes --]

On Fri, Oct 20, 2017 at 11:55:20AM +0200, Alexandre Torgue wrote:
> Hi Frank,
> 
> On 10/19/2017 08:46 PM, Frank Rowand wrote:
> > On 10/19/17 07:59, Rob Herring wrote:
> > > On Thu, Oct 19, 2017 at 9:00 AM, Alexandre Torgue
> > > <alexandre.torgue-qxv4g6HH51o@public.gmane.org> wrote:
> > > > Hi Rob,
> > > > 
> > > > 
> > > > On 10/19/2017 01:53 AM, Rob Herring wrote:
> > > > > On Wed, Oct 18, 2017 at 6:28 PM, Andrew Turner <andrew-/GQUgJ3qWXt9iftTYHNiNg@public.gmane.org.nz>
> > > > > wrote:
> > > 
> > > [...]
> > > 
> > > > > >   From the FreeBSD perspective I’d like it if there was a common repo for
> > > > > > all devicetree consumers to share. We are trying to not have FreeBSD
> > > > > > specific properties as this has caused issues in the past where we had (and
> > > > > > still have) FreeBSD specific dts files. We are trying to remove these as
> > > > > > drivers are updated to handle the common bindings.
> > > > > 
> > > > > 
> > > > > Are you aware of this repo[1]? I don't have a sense for how widely
> > > > > used it is. If not, it is intended to provide a common repository of
> > > > > binding docs and dts files. If so, what are your issues with using it?
> > > > > It's generated from the kernel tree with git-filter-branch and through
> > > > > the kernel tree is the only way to add things currently. But there's
> > > > > no requirement that you add a Linux driver to submit a binding or dts
> > > > > change. We could consider taking patches against the tree directly,
> > > > > and the maintainers (me) can fixup the paths and apply to the kernel
> > > > > tree.
> > > > > 
> > > > > If there's bindings in the kernel tree you think are crap and Linux
> > > > > specific, I'd like to know that too. We should start flagging those.
> > > > > 
> > > > > > I have also spoken with some NetBSD and OpenBSD developers. They are both
> > > > > > using devicetree to handle device enumeration. Having all 5 projects using a
> > > > > > common set of dts files and binding would simplify keeping them in sync.
> > > > > 
> > > > > 
> > > > > There's more than 5 likely: linux, 3x BSD, u-boot, barebox, zephyr,
> > > > > ARM trusted firmware?, UEFI?, ?
> > > > 
> > > > 
> > > > First, sorry to come late in this discussion (please be tolerant if you
> > > > already respond to following requests/interrogations in precedent mails :)).
> > > >  From STmicro point of view we have the same kind of requests/needs than
> > > > Andrew. We think about the possibility to use same DTS files for Linux,
> > > > U-boot, ATF and Zephir (others could come with other vendors). Currently our
> > > > main concerns about this are:
> > > > 
> > > > 1-How to reduce dtb size:
> > > >          --> Reading some thread, you already start this task with Nicolas.
> > > > Does it concerns only XiP system ?
> > > 
> > > That's the main focus ATM. Nico has looked at shrinking code usage too
> > > such as the tty layer and scheduler, but those have faced resistance.
> > > We need actual products to prove the value (and that's a chicken and
> > > egg problem).
> > > 
> > > >          -->For example, I want to use the same dtsi files between Linux and
> > > > U-boot. If in u-boot dts file I overload several "status" entry by
> > > > "disabled", is it possible that compiler doesn't build it ? And what about
> > > > not used phandle ?
> > > 
> > > You certainly could remove disabled nodes in dtc. I'm not sure how
> > > hard it would be to plumb into dtc. I think phandle properties are
> > > already only created if there's a reference to them. If that is
> > 
> > Yes, phandles are only created if referenced, unless compiled
> > for loading overlays into:
> > 
> 
> Are there DTC "extra" options to use to not build those useless phandles ? I
> just tried to revert the dtb to dts (using following command:
>  ./scripts/dtc/dtc -I dtb -O dts -o stm32f469-disco-flat.dts
> arch/arm/boot/dts/stm32f469-disco.dtb)

As he said, phandles are only created if referenced in the normal mode
of operation.  Only if you add extra options for allowing overlays
(-@) will phandles be created for all labelled nodes (because it's
impossible for dtc to determine which ones are necessary).

> I see that phandles not used are in the dts output file.

Uh.. what do you mean by that?  Do you just mean you don't see any
&whatever in the dts output?  You'll never get that - once the
phandles are resolved, they're just integers, when decompiling there's
no way for dtc to determine which integers used to be phandles.

> It is especially an
> issue for pinmux phandles. All pinmux groups possibilities are written
> inside (in my case) stm32f4-pinctrl.dtsi. This file is included in each
> stm32 board dts files, and in those stm32 board dts files only required node
> are enabled. But I see that all pinmux definitions are embedded inside dtb
> binary (even ones not used in board dts file).
> 
> 
> regards
> Alex
> 
> > $ cat test1.dts
> > /dts-v1/;
> > / {
> > 	mynode: node {
> > 	};
> > };
> > $ cat test2.dts
> > /dts-v1/;
> > / {
> > 	mynode: node {
> > 		myprop = < &mynode >;
> > 	};
> > };
> > $ scripts/dtc/dtx_diff test1.dts
> > /dts-v1/;
> > 
> > / {
> > 
> > 	mynode: node {
> > 	};
> > };
> > $ scripts/dtc/dtx_diff test2.dts
> > /dts-v1/;
> > 
> > / {
> > 
> > 	mynode: node {
> > 		myprop = <0x1>;
> > 		phandle = <0x1>;
> > 	};
> > };
> > 
> > 
> > If symbols are enabled for a base device tree, so that overlays
> > can later reference them, then all symbols generate phandles:
> > 
> > $ dtc -@ -O dts test1.dts
> > /dts-v1/;
> > 
> > / {
> > 
> > 	mynode: node {
> > 		phandle = <0x1>;
> > 	};
> > 
> > 	__symbols__ {
> > 		mynode = "/node";
> > 	};
> > };
> > 
> > > created before you deleted nodes, then it would probably be hard to
> > > find and remove all of those. It would be similar to solving the
> > > device dependency problem. Or do you mean something like disable the
> > > clock controller node if there are no enabled references to it? I
> > > don't think we could do something like that generically and reliably.
> > > 
> > > We did recently stop creating both "phandle" and "linux,phandle"
> > > properties by default in dtc, so that will save some size.
> > > 
> > > > 2- The place of DT files (sources/scripts). I see (and clone) your
> > > > "devicetree-rebasing.git" tree, it's a good start point. Currently (correct
> > > > me  if I'm wrong) the Kernel seems to "lead" the devicetree bindings and
> > > > devicetree dts(i) files.
> > > 
> > > Yes, and there's not really any changing that regardless of where
> > > bindings and dts files live given Linux has the broadest h/w support.
> > > 
> > > > By using this external repo, it would be maybe
> > > > easier to integrate changes for other components than Linux Kernel ?
> > > 
> > > Yes, barebox at least regularly imports it.
> > > 
> > > > We
> > > > could have (per vendor), same dtsi files which describes the hardware (SoC +
> > > > board) and a extra dts files (at least at beginning) per software components
> > > > to overload nodes (to disable some nodes not required (see (1)), to change
> > > > bindings which are different regarding component ...).
> > > 
> > > You mean dtsi files to disable nodes for linux, u-boot, etc. That may
> > > make sense for mutually exclusive things like FreeBSD vs. Linux, but
> > > for say u-boot, we really want u-boot and Linux (or whatever OS is
> > > loaded) to use the same dtb. Having different dtbs is going to
> > > increase your memory usage.
> > > 
> > > > It will also allow to have all dt script / tools for all components at only
> > > > one place.
> > > > 
> > > > Once again, sorry if I repeat things already discussed but I wanted to
> > > > expose what STMicro has in mind for DT. It will be a good topic to discuss
> > > > at Prague.
> > > 
> > > Yes, but I won't be there.
> > > 
> > > Rob
> > > _______________________________________________
> > > Ksummit-discuss mailing list
> > > Ksummit-discuss-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I@public.gmane.org
> > > https://lists.linuxfoundation.org/mailman/listinfo/ksummit-discuss
> > > 
> > 
> 

-- 
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: 833 bytes --]

  parent reply	other threads:[~2017-10-20 10:01 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 20:39 Devicetree Workshop at Kernel Summit Prague (26 Oct 2017) Grant Likely
     [not found] ` <CACxGe6sxKzNKZbdGA-G=Th2oHwuanyC2kGYuaFcKbSRkuhep+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-14 12:34   ` [Ksummit-discuss] " Thomas Petazzoni
     [not found]     ` <20171014143457.72df1f54-dFHcqWZE4ncJmsy6czSMtA@public.gmane.org>
2017-10-17 13:30       ` Grant Likely
2017-10-16  5:36   ` Michal Simek
     [not found]     ` <39f87f46-da67-11d9-4336-213c13025568-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2017-10-16 14:11       ` Rob Herring
     [not found]         ` <CABGGiswXP800Pshc8jpVv3N4O-u2hFHJs-Ut_xVe8xV9ixcJSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-18 14:04           ` Michal Simek
     [not found]             ` <52c0aa5e-4995-9c0e-babb-60ec84a3deff-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2017-10-18 14:28               ` Andre Przywara
     [not found]                 ` <00068711-a9b8-e879-8212-b7eb4141e4b7-5wv7dgnIgG8@public.gmane.org>
2017-10-18 15:32                   ` Rob Herring
     [not found]                     ` <CAL_Jsq+JiLgPLZSncWu=rQh80pnCXd0WpkLEkASPXeFSOMt4yg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-18 16:05                       ` Andre Przywara
     [not found]                         ` <44857e9c-85c3-f1f7-514d-28d9966d243e-5wv7dgnIgG8@public.gmane.org>
2017-10-18 16:20                           ` Pantelis Antoniou
2017-10-16 16:40       ` Ben Dooks
     [not found]         ` <8a168960-2dae-35cc-e610-0fe257c9121d-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2017-10-16 18:44           ` Heiko Stübner
2017-10-16 19:45           ` Rob Herring
     [not found]             ` <CAL_JsqJxFJSE-=778oHvNgpaBzhX9mBSzh1a0ZMvwSG69qStLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-17 13:38               ` Grant Likely
     [not found]                 ` <CACxGe6vkxTwUw2ma_ykZQ0JsKUQTeffMC+g4pq6LnaN9qoY2_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-17 23:45                   ` Frank Rowand
2017-10-17 13:32       ` Grant Likely
     [not found]         ` <CACxGe6uiDCJw5g070kCbDEUBEPoz9rqswUc75Bx2h-9+6mxe2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-18 10:08           ` Thomas Petazzoni
2017-10-16 16:42   ` Ben Dooks
     [not found]     ` <7384dfc6-1068-eb6a-ae5f-7e805be8c48e-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2017-10-17 13:34       ` Grant Likely
2017-10-17  9:48   ` Boris Brezillon
2017-10-17 13:21     ` Tom Rini
2017-10-17 13:48     ` Grant Likely
     [not found]       ` <CACxGe6tPQxwzN14TZtgNhw7OOuePLJxODrn-_b4gMDGzAFEf1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-17 16:21         ` Ian Lepore
     [not found]           ` <1508257276.74236.38.camel-h+KGxgPPiopAfugRpC6u6w@public.gmane.org>
2017-10-17 17:02             ` Kumar Gala
     [not found]               ` <2D4E6B6D-8F07-46D0-BB36-D97916802893-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-10-17 17:24                 ` Geert Uytterhoeven
     [not found]                   ` <CAMuHMdW-=-CdnD5Eb_w7fc7=c64i+bu=yv9_c0cj3UM940d8EA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-17 19:03                     ` Bird, Timothy
     [not found]                       ` <ECADFF3FD767C149AD96A924E7EA6EAF3E64B904-t8YLG9SB9XQEb75RT/aEbJZPSYnAH24X@public.gmane.org>
2017-10-18 12:14                         ` Grant Likely
     [not found]                           ` <CACxGe6s8CbzRY7L1znq-nQ52eHp3pOu4X3pCX35ocQShnA_Ecw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-18 12:59                             ` Pantelis Antoniou
     [not found]                               ` <B7292660-D602-473E-9B47-CF7B4D2449D7-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
2017-10-18 13:18                                 ` Alexandre Belloni
     [not found]                                   ` <20171018131809.q5nccysb2j7lu4bn-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2017-10-18 13:21                                     ` Geert Uytterhoeven
     [not found]                                       ` <CAMuHMdXhQQpnQEgOu92MVNd=m2FvkqD9XcYS3rMVMHpB2zY0Qw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-18 17:41                                         ` Bird, Timothy
     [not found]                                           ` <ECADFF3FD767C149AD96A924E7EA6EAF3E64BBCD-t8YLG9SB9XQEb75RT/aEbJZPSYnAH24X@public.gmane.org>
2017-10-18 18:00                                             ` Rob Herring
2017-10-18 21:10                                             ` Alexandre Belloni
2017-10-18 16:18                                     ` David Woodhouse
2017-10-18 14:13                                 ` Rob Herring
2017-10-18 17:45                                   ` Bird, Timothy
2017-10-18 14:07                     ` Kumar Gala
2017-10-17 17:25             ` Rob Herring
2017-10-18 10:11             ` Thomas Petazzoni
2017-10-18 10:35     ` Chen-Yu Tsai
     [not found]       ` <CAGb2v67GU4uW7uPMrqFjTW0qBR6LPNeX4Md+tf9S=HRWT_GVqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-18 11:09         ` Mark Brown
     [not found]           ` <20171018110958.mh76pngzluazmc7y-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-10-18 17:59             ` Tom Rini
2017-10-18 23:28               ` Andrew Turner
     [not found]                 ` <FD387FCC-3F95-48DF-B412-3384EF96FCFC-/GQUgJ3qWXsIvnNNuaVxrw@public.gmane.org>
2017-10-18 23:53                   ` Rob Herring
     [not found]                     ` <CAL_JsqJTE5p0zjm-66D2143dEx+xQ0uKCV-20kMt-kq=SOa-8Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-19 14:00                       ` Alexandre Torgue
     [not found]                         ` <23a238d7-0b3d-8b46-b2fe-88b9d0841aa1-qxv4g6HH51o@public.gmane.org>
2017-10-19 14:59                           ` Rob Herring
     [not found]                             ` <CAL_Jsq+p=-yTY4BNKXdSccPcBWsCUkP8HPQ-ergZXPB8msY5ig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-19 18:46                               ` Frank Rowand
     [not found]                                 ` <59E8F2EC.5090602-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-20  9:55                                   ` Alexandre Torgue
     [not found]                                     ` <fea62563-6629-6d79-06a9-3d17c97ad238-qxv4g6HH51o@public.gmane.org>
2017-10-20 10:01                                       ` David Gibson [this message]
2017-10-20 13:37                                       ` Rob Herring
     [not found]                                         ` <CAL_Jsq+kYCWFR5vSCuvT--N-hHTfFfEVrsv8VHw7PMiyONYs8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-22  8:25                                           ` David Gibson
2017-10-20 13:47                               ` Alexandre Torgue
2017-10-19  0:04               ` Mark Brown
2017-10-19 11:10   ` Grant Likely
     [not found]     ` <CACxGe6vhYV5dbnNQXyRoPq=XSA5HOtpN0FCqyoKvGVbRu-aRqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-24  7:37       ` [Ksummit-discuss] " Boris Brezillon
2017-10-25 14:40         ` Maxime Ripard
2017-10-26  5:47       ` Frank Rowand
2017-10-26  7:17       ` Grant Likely

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=20171020100141.GI13245@umbus \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=alexandre.torgue-qxv4g6HH51o@public.gmane.org \
    --cc=andrew-/GQUgJ3qWXsIvnNNuaVxrw@public.gmane.org \
    --cc=andy.gross-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-spec-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=ksummit-discuss-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I@public.gmane.org \
    --cc=kumar.gala-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=rob.herring-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=trini-OWPKS81ov/FWk0Htik3J/w@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).