From: Tom Rini <trini@konsulko.com>
To: "François Ozog" <francois.ozog@linaro.org>
Cc: "Liviu Dudau" <liviu.dudau@foss.arm.com>,
"Neil Armstrong" <narmstrong@baylibre.com>,
"Vladimir Oltean" <vladimir.oltean@nxp.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bin Meng" <bin.meng@windriver.com>,
"Kever Yang" <kever.yang@rock-chips.com>,
"Sean Anderson" <seanga2@gmail.com>,
"Atish Patra" <atish.patra@wdc.com>,
"Zong Li" <zong.li@sifive.com>, "Stefan Roese" <sr@denx.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Rainer Boschung" <rainer.boschung@hitachi-powergrids.com>,
"Stephen Warren" <swarren@nvidia.com>,
"Oleksandr Andrushchenko" <oleksandr_andrushchenko@epam.com>,
"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
"Niel Fourie" <lusus@denx.de>,
"Michal Simek" <michal.simek@xilinx.com>,
"Marek Behún" <marek.behun@nic.cz>,
"Jerry Van Baren" <vanbaren@cideas.com>,
"Ramon Fried" <rfried.dev@gmail.com>,
"Jagan Teki" <jagan@amarulasolutions.com>,
"Valentin Longchamp" <valentin.longchamp@hitachi-powergrids.com>,
"Heiko Schocher" <hs@denx.de>,
"Peter Robinson" <pbrobinson@gmail.com>,
"Sinan Akman" <sinan@writeme.com>,
"Thomas Fitzsimmons" <fitzsim@fitzsim.org>,
"Wolfgang Denk" <wd@denx.de>,
"Stephen Warren" <swarren@wwwdotorg.org>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
"Andre Przywara" <andre.przywara@arm.com>,
"Tim Harvey" <tharvey@gateworks.com>,
"Ashok Reddy Soma" <ashok.reddy.soma@xilinx.com>,
"Rick Chen" <rick@andestech.com>,
"Alexander Graf" <agraf@csgraf.de>,
"Green Wan" <green.wan@sifive.com>,
"T Karthik Reddy" <t.karthik.reddy@xilinx.com>,
"Anastasiia Lukianenko" <anastasiia_lukianenko@epam.com>,
"Albert Aribaud" <albert.u.boot@aribaud.net>,
"Michal Simek" <monstr@monstr.eu>,
"Matthias Brugger" <mbrugger@suse.com>,
Leo <ycliang@andestech.com>, "Tero Kristo" <kristo@kernel.org>,
"U-Boot Mailing List" <u-boot@lists.denx.de>,
"David Abdurachmanov" <david.abdurachmanov@sifive.com>,
"Priyanka Jain" <priyanka.jain@nxp.com>,
"Simon Glass" <sjg@chromium.org>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Christian Hewitt" <christianshewitt@gmail.com>,
"Aaron Williams" <awilliams@marvell.com>,
"Tuomas Tynkkynen" <tuomas.tynkkynen@iki.fi>,
"Heinrich Schuchardt" <heinrich.schuchardt@canonical.com>,
"Tianrui Wei" <tianrui-wei@outlook.com>,
"Bin Meng" <bmeng.cn@gmail.com>, "Pali Rohár" <pali@kernel.org>,
"Dimitri John Ledkov" <dimitri.ledkov@canonical.com>,
"Padmarao Begari" <padmarao.begari@microchip.com>
Subject: Re: [PATCH 00/16] fdt: Make OF_BOARD a boolean option
Date: Wed, 27 Oct 2021 10:30:54 -0400 [thread overview]
Message-ID: <20211027143054.GY8284@bill-the-cat> (raw)
In-Reply-To: <CAHFG_=Vnpj1T_rqaxnHFTz4H4wiw_ziUJP0VudFS4WBUOb0i6w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 10081 bytes --]
On Wed, Oct 27, 2021 at 03:48:48PM +0200, François Ozog wrote:
> On Wed, 27 Oct 2021 at 15:38, Tom Rini <trini@konsulko.com> wrote:
>
> > On Wed, Oct 27, 2021 at 03:30:18PM +0200, François Ozog wrote:
> > > Hi Tom,
> > >
> > > On Wed, 27 Oct 2021 at 14:59, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > > On Tue, Oct 26, 2021 at 09:46:38AM +0300, Ilias Apalodimas wrote:
> > > > > Hi Simon,
> > > > >
> > > > > A bit late to the party, sorry!
> > > > >
> > > > > [...]
> > > > >
> > > > > > >
> > > > > > > I really want to see what the binary case looks like since we
> > could
> > > > then
> > > > > > > kill off rpi_{3,3_b,4}_defconfig and I would need to see if we
> > could
> > > > > > > then also do a rpi_arm32_defconfig too.
> > > > > > >
> > > > > > > I want to see less device trees in U-Boot sources, if they can
> > come
> > > > > > > functionally correct from the hardware/our caller.
> > > > > > >
> > > > > > > And I'm not seeing how we make use of "U-Boot /config" if we also
> > > > don't
> > > > > > > use the device tree from build time at run time, ignoring the
> > device
> > > > > > > tree provided to us at run time by the caller.
> > > > > >
> > > > > > Firstly I should say that I find building firmware very messy and
> > > > > > confusing these days. Lots of things to build and it's hard to find
> > > > > > the instructions. It doesn't have to be that way, but if we carry
> > on
> > > > > > as we are, it will continue to be messy and in five years you will
> > > > > > need a Ph.D and a lucky charm to boot on any modern board. My
> > > > > > objective here is to simplify things, bringing some consistency to
> > the
> > > > > > different components. Binman was one effort there. I feel that
> > putting
> > > > > > at least the U-Boot house in order, in my role as devicetree
> > > > > > maintainer (and as author of devicetree support in U-Boot back in
> > > > > > 2011), is the next step.
> > > > > >
> > > > > > If we set things up correctly and agree on the bindings, devicetree
> > > > > > can be the unifying configuration mechanism through the whole of
> > > > > > firmware (except for very early bits) and into the OS, this will
> > set
> > > > > > us up very well to deal with the complexity that is coming.
> > > > > >
> > > > > > Anyway, here are the mental steps that I've gone through over the
> > past
> > > > > > two months:
> > > > > >
> > > > > > Step 1: At present, some people think U-Boot is not even allowed to
> > > > > > have its own nodes/properties in the DT. It is an abuse of the
> > > > > > devicetree standard, like the /chosen node but with less history.
> > We
> > > > > > should sacrifice efficiency, expedience and expandability on the
> > altar
> > > > > > of 'devicetree is a hardware description'. How do we get over that
> > > > > > one? Wel, I just think we need to accept that U-Boot uses
> > devicetree
> > > > > > for its own purposes, as well as for booting the OS. I am not
> > saying
> > > > > > it always has to have those properties, but with existing features
> > > > > > like verified boot, SPL as well as complex firmware images where
> > > > > > U-Boot needs to be able to find things in the image, it is
> > essential.
> > > > > > So let's just assume that we need this everywhere, since we
> > certainly
> > > > > > need it in at least some places.
> > > > > >
> > > > > > (stop reading here if you disagree, because nothing below will make
> > > > > > any sense...you can still use U-Boot v2011.06 which doesn't have
> > > > > > OF_CONTROL :-)
> > > > >
> > > > > Having U-Boot keep it's *internal* config state in DTs is fine.
> > Adding
> > > > > that to the DTs that are copied over from linux isn't imho. There
> > are
> > > > > various reasons for that. First of all syncing device trees is a
> > huge
> > > > pain
> > > > > and that's probably one of the main reasons our DTs are out of sync
> > for a
> > > > > large number of boards.
> > > >
> > > > This re-sync is only a pain because:
> > > > 1. Some platforms have been modifying the core dts files LIKE THEY ARE
> > > > NOT SUPPOSED TO.
> > > > 2. DTS files are getting closer to being the super stable API that has
> > > > been promised now that there's validation tools.
> > > >
> > > > Some SoCs, like stm32 are doing an amazing job and keeping things in
> > > > sync, every release. Others like NXP are violating rule #1.
> > >
> > > With NXP commitment to SystemReady on some IMX8 boards, I think this is
> > > changing,
> > > at least for the SystemReady boards.
> >
> > I'd really like to see some progress (as would the other non-NXP folks
> > working on NXP SoCs) in that regard.
> >
> > > > Still
> > > > others like some TI platforms get bit by #2 (I solved one of these, and
> > > > need to cycle back to the one you and I talked about on IRC a while
> > > > back, I bet it's another node name dash changed to underbar).
> > > >
> > > > > The point is this was fine in 2011 were we had SPL only, but the
> > reality
> > > > > today is completely different. There's previous stage boot loaders
> > (and
> > > > > enough cases were vendors prefer those over SPL). If that bootloader
> > > > needs
> > > > > to use it's own device tree for whatever reason, imposing
> > restrictions
> > > > on
> > > > > it wrt to the device tree it has to include, and require them to
> > have
> > > > > knowledge of U-Boot and it's internal config mechanism makes no
> > sense not
> > > > > to mention it doesn't scale at all.
> > > >
> > > > If you are passing the full device tree around, a few more
> > > > nodes/properties aren't going to make the situation worse. If we're
> > > > talking about a 60 kilobyte blob one more kilobyte isn't where we call
> > > > the line, especially since if we wait another 6 months it'll be a 62
> > > > kilobyte file coming in from Linux instead.
> > >
> > > This is not about size but about firmware supply chain organization.
> >
> > That's great since it means we just need the bindings reviewed then
> > everyone can pass whatever everyone else needs.
> >
> > > > > Step 2: Assume U-Boot has its own nodes/properties. How do they get
> > > > > > there? Well, we have u-boot.dtsi files for that (the 2016 patch
> > > > > > "6d427c6b1fa binman: Automatically include a U-Boot .dtsi file"),
> > we
> > > > > > have binman definitions, etc. So we need a way to overlay those
> > things
> > > > > > into the DT. We already support this for in-tree DTs, so IMO this
> > is
> > > > > > easy. Just require every board to have an in-tree DT. It helps with
> > > > > > discoverability and documentation, anyway. That is this series.
> > > > >
> > > > > Again, the board might decide for it's own reason to provide it's own
> > > > DT.
> > > > > IMHO U-Boot must be able to cope with that and asking DTs to be
> > included
> > > > in
> > > > > U-Boot source is not the right way to do that, not to mention cases
> > were
> > > > > that's completely unrealistic (e.g QEMU or a board that reads the DTB
> > > > from
> > > > > it's flash).
> > > > >
> > > > > > (I think most of us are at the beginning of step 2, unsure about it
> > > > > > and worried about step 3)
> > > > > >
> > > > > > Step 3: Ah, but there are flows (i.e. boards that use a particular
> > > > > > flow only, or boards that sometimes use a flow) which need the DT
> > to
> > > > > > come from a prior stage. How to handle that? IMO that is only
> > going to
> > > > > > grow as every man and his dog get into the write-a-bootloader
> > > > > > business.
> > > > >
> > > > > And that's exactly why we have to come up with something that scales,
> > > > without
> > > > > having to add a bunch of unusable DTs in U-Boot.
> > > >
> > > > Both of these are solved by having our bindings reviewed and upstreamed
> > > > and then what we need included in the authoritative dts files.
> > > >
> > > There shall be authoritative System Device Trees as vendors are working
> > on.
> > > Those System Device Trees cover all aspects of a board, not just the
> > > Cortex-A part that U-Boot cares about.
> > > Out of those system device trees, a tool (lopper) is going to carve out
> > the
> > > "authoritative dts for the cortex-A".
> > > Essentially, that carve out will correspond to what would come out of
> > Linux.
> >
> > s/Linux/software/
> >
> > > This scheme will not be generalized, just adopted by vendors on some
> > > boards.
> > > DT for those board become part of the OS ABI (meaning, the driver
> > > developper is constrained).
> >
> > OK? And is going to pick and choose which valid bindings to implement?
> > Or is it going to provide half a node for Linux? No? I assume no. So
> > it will also provide whatever bindings we've upstreamed and say need to
> > be passed.
> >
> Until we can agree on a better scheme, Linux will server as the basis for
> most of the bindings.
Yes, this is the de-facto standard since the beginning.
> Some projects, like TF-A maintain their own bindings specifications. I
And as I keep saying I believe this to be totally wrong. Unless and
only unless the TF-A bindings are for TF-A only to care about, and then
it's just one-off do what you guys want non-standard stuff.
> guess U-Boot shall do the same.
No, U-Boot is going to upstream the bindings that we want to have be
considered official.
> The U-Boot DT (for properties or whatever purpose) can be stored in a
> various of U-Boot decided ways and as part of the TF-A FIP image in the
> ad-hoc section: NT_FW_CONFIG. Passing FIP information to U-Boot to retrieve
> the NF_FW_CONFIG should be part of the blob_list discussion that started a
> while ago.
Yes, we'll have to see where things progress about what bindings are
needed, and where.
> For System Device Tree, the bindings and the master repo will be maintained
> in devicetree.org (AFAIK).
Interesting, okay.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2021-10-27 15:26 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 1:01 [PATCH 00/16] fdt: Make OF_BOARD a boolean option Simon Glass
2021-10-13 1:01 ` [PATCH 01/16] arm: qemu: Mention -nographic in the docs Simon Glass
2021-10-13 1:01 ` [PATCH 02/16] arm: qemu: Explain how to extract the generate devicetree Simon Glass
2021-10-13 1:19 ` François Ozog
2021-10-13 16:58 ` Simon Glass
2021-10-13 17:36 ` Tom Rini
2021-10-13 1:01 ` [PATCH 03/16] riscv: " Simon Glass
2021-10-13 1:01 ` [PATCH 04/16] arm: qemu: Add a devicetree file for qemu_arm Simon Glass
2021-10-13 1:01 ` [PATCH 05/16] arm: qemu: Add a devicetree file for qemu_arm64 Simon Glass
2021-10-13 1:15 ` François Ozog
2021-10-27 14:44 ` Alex Bennée
2021-10-27 14:56 ` Tom Rini
2021-10-27 18:34 ` Simon Glass
2021-10-27 18:39 ` Tom Rini
2021-10-27 19:45 ` Alex Bennée
2021-10-13 1:01 ` [PATCH 06/16] riscv: qemu: Add devicetree files for qemu_riscv32/64 Simon Glass
2021-10-13 4:21 ` Heinrich Schuchardt
2021-10-13 1:29 ` [PATCH 00/16] fdt: Make OF_BOARD a boolean option Bin Meng
2021-10-13 1:34 ` Tom Rini
2021-10-13 8:02 ` François Ozog
2021-10-13 14:47 ` Simon Glass
2021-10-13 17:34 ` François Ozog
2021-10-13 18:06 ` Simon Glass
2021-10-14 14:56 ` Tom Rini
2021-10-14 15:17 ` Simon Glass
2021-10-14 15:28 ` Tom Rini
2021-10-14 17:58 ` François Ozog
2021-10-15 18:03 ` Simon Glass
2021-10-26 6:46 ` Ilias Apalodimas
2021-10-27 12:59 ` Tom Rini
2021-10-27 13:30 ` François Ozog
2021-10-27 13:38 ` Tom Rini
2021-10-27 13:47 ` Ilias Apalodimas
2021-10-27 14:26 ` Tom Rini
2021-10-27 13:48 ` François Ozog
2021-10-27 14:30 ` Tom Rini [this message]
2021-10-28 2:50 ` Simon Glass
2021-10-28 8:21 ` François Ozog
2021-10-28 14:30 ` Simon Glass
2021-10-28 14:50 ` François Ozog
2021-10-28 15:44 ` Simon Glass
2021-10-28 16:25 ` François Ozog
2021-11-02 14:59 ` Simon Glass
2021-11-01 11:04 ` Ilias Apalodimas
2021-11-02 10:06 ` Michael Walle
2021-11-02 12:34 ` François Ozog
2021-11-02 14:59 ` Simon Glass
2021-10-27 12:48 ` Tom Rini
2021-10-27 13:15 ` François Ozog
2021-10-27 13:23 ` Heinrich Schuchardt
2021-10-27 14:55 ` Tom Rini
2021-10-27 15:02 ` Heinrich Schuchardt
2021-10-27 18:04 ` Tom Rini
2021-10-27 14:54 ` Tom Rini
2021-10-27 15:10 ` Mark Kettenis
2021-10-27 15:24 ` Simon Glass
2021-10-27 18:06 ` Tom Rini
2021-10-27 18:11 ` François Ozog
2021-10-27 21:52 ` Mark Kettenis
2021-10-27 16:02 ` François Ozog
2021-10-27 19:06 ` Tom Rini
2021-10-27 22:00 ` François Ozog
2021-10-28 14:41 ` Tom Rini
2021-10-14 16:24 ` Andre Przywara
2021-10-14 17:48 ` François Ozog
2021-10-14 18:12 ` François Ozog
2021-10-14 21:00 ` Simon Glass
2021-10-13 12:39 ` Philippe Mathieu-Daudé
2021-10-13 13:06 ` François Ozog
2021-10-13 4:26 ` Heinrich Schuchardt
2021-10-13 13:06 ` François Ozog
2021-10-13 9:50 ` Andre Przywara
2021-10-13 13:05 ` François Ozog
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=20211027143054.GY8284@bill-the-cat \
--to=trini@konsulko.com \
--cc=agraf@csgraf.de \
--cc=albert.u.boot@aribaud.net \
--cc=anastasiia_lukianenko@epam.com \
--cc=andre.przywara@arm.com \
--cc=ashok.reddy.soma@xilinx.com \
--cc=atish.patra@wdc.com \
--cc=awilliams@marvell.com \
--cc=bin.meng@windriver.com \
--cc=bmeng.cn@gmail.com \
--cc=christianshewitt@gmail.com \
--cc=david.abdurachmanov@sifive.com \
--cc=dimitri.ledkov@canonical.com \
--cc=festevam@gmail.com \
--cc=fitzsim@fitzsim.org \
--cc=francois.ozog@linaro.org \
--cc=green.wan@sifive.com \
--cc=heinrich.schuchardt@canonical.com \
--cc=hs@denx.de \
--cc=ilias.apalodimas@linaro.org \
--cc=jagan@amarulasolutions.com \
--cc=kever.yang@rock-chips.com \
--cc=kristo@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=liviu.dudau@foss.arm.com \
--cc=lusus@denx.de \
--cc=marek.behun@nic.cz \
--cc=mbrugger@suse.com \
--cc=michal.simek@xilinx.com \
--cc=monstr@monstr.eu \
--cc=narmstrong@baylibre.com \
--cc=oleksandr_andrushchenko@epam.com \
--cc=padmarao.begari@microchip.com \
--cc=pali@kernel.org \
--cc=pbrobinson@gmail.com \
--cc=priyanka.jain@nxp.com \
--cc=qemu-devel@nongnu.org \
--cc=rainer.boschung@hitachi-powergrids.com \
--cc=rfried.dev@gmail.com \
--cc=rick@andestech.com \
--cc=seanga2@gmail.com \
--cc=sinan@writeme.com \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=t.karthik.reddy@xilinx.com \
--cc=tharvey@gateworks.com \
--cc=tianrui-wei@outlook.com \
--cc=tuomas.tynkkynen@iki.fi \
--cc=u-boot@lists.denx.de \
--cc=valentin.longchamp@hitachi-powergrids.com \
--cc=vanbaren@cideas.com \
--cc=vladimir.oltean@nxp.com \
--cc=wd@denx.de \
--cc=xypron.glpk@gmx.de \
--cc=ycliang@andestech.com \
--cc=zong.li@sifive.com \
/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).