From: Stephen Warren <swarren@wwwdotorg.org>
To: Tom Rini <trini@ti.com>
Cc: Tom Rini <tom.rini@gmail.com>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
cross-distro@lists.linaro.org,
Mark Rutland <Mark.Rutland@arm.com>,
devicetree@vger.kernel.org,
Ian Campbell <ian.campbell@citrix.com>,
Arnd Bergmann <arnd@arndb.de>,
Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>
Subject: Re: [RFC] Best practices for hardware shipping device trees
Date: Thu, 15 Aug 2013 16:34:35 -0600 [thread overview]
Message-ID: <520D577B.2080903@wwwdotorg.org> (raw)
In-Reply-To: <20130815185659.GC9190@bill-the-cat>
On 08/15/2013 12:56 PM, Tom Rini wrote:
> On Thu, Aug 15, 2013 at 11:31:54AM -0600, Stephen Warren wrote:
>> On 08/15/2013 10:37 AM, Tom Rini wrote:
>>> On Thu, Aug 15, 2013 at 09:30:01AM -0600, Stephen Warren wrote:
...
>>>> We certainly expect U-Boot to update the DT that's passed to the kernel,
>>>> for:
>> ...
>>>> * Possibly to add a "simplefb" node, until the kernel has LCD panel
>>>> support (CDF).
>>>
>>> Can we talk about that last one more? That sounds like some sort of
>>> temporary binding. Or am I using the terms wrong? But, it sounds like
>>> we're saying add whatever nodes might be missing?
> [snip useful explanation of what simplefb is]
>> simplefb information could get into DT in a couple ways:
>>
>> 1) The DTB for the platform could include the simplefb node right from
>> the start.
>>
>> This model would be appropriate for more permanent use of simplefb,
>> since the node appears in the orignial DT.
>>
>> In this case, the bootloader would at least have to fill in the physical
>> memory address of the frame-buffer that it allocated. If the display is
>> device with variable resolution, rather than a fixed built-in LCD, the
>> bootloader would also have to fill in the resolution properties.
>>
>> 2) The DTB for the platform doesn't include the simplefb node.
>>
>> This would be appropriate for platforms that use simplefb as a temporary
>> step until complete OS support for the display HW is present, so a real
>> driver can be used. This prevents DTBs from ever having the
>> soon-to-be-removed simplefb node encoded into them.
>>
>> In this case, the bootloader would have to add a completely new simplefb
>> node to the DT, and fill in all the properties.
>
> OK, now why wouldn't the right thing to do here be to #1 and later in
> time, the DT is updated when the better drivers are merged in?
>
> I don't think it's strictly a bad thing to say that firmware/bootloader
> is allowed to construct temporary nodes, but we should make it clear
> when that's an OK practice. Yes?
For systems where simplefb is a transitional measure (i.e. where it
would eventually make sense to define a complete binding for the HW),
I'd prefer to avoid churn in the *.dts files by never including the
simplefb node in them, but rather adding it dynamically. In other words,
we don't add something to the file just to take it away later.
That's the logic behind why I wrote separate "add node" and "fill in
node" functions for the simplefb in U-Boot.
One thing that's slightly different about simplefb is that the node
isn't useful without the bootloader filling in some information, which
generally isn't true of DT content.
It'd certainly be technically possible to just add the simplefb node
into DT in all cases, then swap it out later when something else came along.
next prev parent reply other threads:[~2013-08-15 22:34 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 15:13 [RFC] Best practices for hardware shipping device trees Tom Rini
2013-08-14 16:38 ` Jason Cooper
2013-08-14 18:41 ` Tom Rini
2013-08-14 18:53 ` Jason Cooper
2013-08-14 16:44 ` Stephen Warren
2013-08-14 17:20 ` Jason Cooper
2013-08-14 18:25 ` Tom Rini
2013-08-15 0:37 ` Nicolas Pitre
2013-08-15 2:09 ` Tom Rini
2013-08-15 2:57 ` Nicolas Pitre
2013-08-15 14:53 ` Tom Rini
2013-08-15 15:30 ` Stephen Warren
2013-08-15 16:37 ` Tom Rini
2013-08-15 17:31 ` Stephen Warren
2013-08-15 18:56 ` Tom Rini
2013-08-15 22:34 ` Stephen Warren [this message]
2013-08-15 15:45 ` Nicolas Pitre
2013-08-15 17:00 ` Tom Rini
2013-08-15 23:59 ` David Gibson
2013-08-16 2:51 ` Nicolas Pitre
2013-08-19 0:15 ` David Gibson
2013-08-19 18:43 ` Nicolas Pitre
2013-08-20 6:40 ` Alexander Graf
2013-08-20 12:02 ` Nicolas Pitre
2013-08-20 17:02 ` Matt Sealey
2013-08-20 17:29 ` Nicolas Pitre
2013-08-20 15:03 ` Tom Rini
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=520D577B.2080903@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=Mark.Rutland@arm.com \
--cc=arnd@arndb.de \
--cc=cross-distro@lists.linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=ian.campbell@citrix.com \
--cc=nicolas.pitre@linaro.org \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=tom.rini@gmail.com \
--cc=trini@ti.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).