public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Simon Glass <sjg@chromium.org>, Rob Herring <robherring2@gmail.com>
Cc: Lucas Stach <dev@lynxeye.de>,
	lak <linux-arm-kernel@lists.infradead.org>,
	Stephen Warren <swarren@nvidia.com>,
	Russell King <linux@arm.linux.org.uk>, Lee Jones <lee@kernel.org>,
	Devicetree Discuss <devicetree@vger.kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	lk <linux-kernel@vger.kernel.org>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Rob Herring <robh+dt@kernel.org>,
	linux-rpi-kernel@lists.infradead.org,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH] arm: rpi: Device tree modifications for U-Boot
Date: Tue, 15 Sep 2015 20:54:42 -0700	[thread overview]
Message-ID: <55F8E802.7090008@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ2L1TOOmiUSKk-=gpAUt8tvZU1SkGBmdbHJR1tBhE2nTA@mail.gmail.com>

On 08/28/2015 11:27 AM, Simon Glass wrote:
> Hi Rob,
> 
> On 25 August 2015 at 10:22, Rob Herring <robherring2@gmail.com> wrote:
>> On Sat, Aug 15, 2015 at 8:46 AM, Simon Glass <sjg@chromium.org> wrote:
>>> Hi Rob,
>>>
>>> On 14 August 2015 at 14:29, Rob Herring <robherring2@gmail.com> wrote:
>>>> On Fri, Aug 14, 2015 at 1:34 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>> -linux-tegra
>>>>>
>>>>> Hi,
>>>>>
>>>>> On 12 August 2015 at 07:21, Simon Glass <sjg@chromium.org> wrote:
>>>>>> Hi Lucas,
>>>>>>
>>>>>> On 11 August 2015 at 11:05, Lucas Stach <dev@lynxeye.de> wrote:
>>>>>>> Hi Simon,
>>>>>>>
>>>>>>> why did you send this to the Tegra ML?
>>>>>>>
>>>>>>> Am Dienstag, den 11.08.2015, 08:25 -0600 schrieb Simon Glass:
>>>>>>>> This updates the device tree from the kernel version to something suitable
>>>>>>>> for U-Boot:
>>>>>>>>
>>>>>>>> - Add stdout-path alias for console
>>>>>>>> - Mark the /soc node to be available pre-relocation so that the early
>>>>>>>> serial console works (we need the 'ranges' property to be available)

[... discussion of u-boot,dm-pre-reloc property]
>>>> Can't the need for that property change over time? Either as more
>>>> drivers are converted to DM you need to add this or you add some
>>>> feature that depends on a driver (e.g. get a board rev or boot mode
>>>> from GPIO). You would have backwards compatibility issues with this.
>>>> I'm somewhat less worried about that for u-boot as we should be
>>>> bundling the dtb and bootloader rather than kernel and dtb. For the
>>>> UART, you can just get which UART to initialize early from
>>>> stdout-path. But for other cases, couldn't you just have the platform
>>>> provide the list of needed drivers. Then when u-boot needs change, you
>>>> just change u-boot.
>>>
>>> Yes U-Boot and its device tree are normally built from the same tree
>>> at the same time. We don't expect to have to support an older or newer
>>> device tree with the same U-Boot binary. So I don't see a problem
>>> here.
>>
>> My point is that if I had to pick how bootloader+dtb+kernel are
>> bundled or not, I would rather see the dtb in sync with the bootloader
>> rather than the kernel. But I can't decide that for everyone and
>> neither can you. You still have a compatibility problem and that has
>> to be addressed.
> 
> What are you getting at here? If I move to a new kernel and still use
> an old device tree I may be missing features, or fail to boot. Don't
> do that!

One of the central points of DT is that it is an ABI. As such, moving to
a new kernel and continuing to use the same old DTB *MUST NOT* break
anything. Of course, you won't get any features enabled/described in any
new DT if you don't use it.

...
> After reading your email I am none the wiser about what you are suggesting.
> 
> This is not a screwy case. Every board will have a console. In some
> cases it is inside a 'soc {' node and in some cases it is not. The
> pure solution would be to mark every UART node with
> u-boot,dm-pre-reloc and we can do that if you prefer. It isn't
> necessary though for the reasons I previously explained.
> 
> It seems reasonable that U-Boot should be able to add private
> properties to the device tree, intended for U-Boot, just as Linux
> does. What is the problem here?

Why is that reasonable? DT is intended to describe the HW. It is
supposed to be OS-agnostic. Having U-Boot-specific properties completely
goes against that.

What Linux-specific properties are you referring to? The only one I
recall you mentioning (although I'm missing a lot of sleep right now) is
the keycodes in the input binding. While the DT property name for those
is linux,... and the values happen to match internal Linux numbering,
there's absolutely nothing Linux specific about the /concept/ of a
keycode, and some numbering scheme had to be picked. There's nothing
practical or conceptual stopping any other OS/SW-stack from translating
those Linux IDs into something internally meaningful. Conversely, the
concept of e.g. "u-boot,dm-pre-reloc" is not something that translates
at all to any other OS/WW-stack.

  parent reply	other threads:[~2015-09-16  3:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 14:25 [PATCH] arm: rpi: Device tree modifications for U-Boot Simon Glass
2015-08-11 17:05 ` Lucas Stach
2015-08-11 17:29   ` Stephen Warren
2015-08-11 19:38     ` Lucas Stach
2015-08-12 13:21   ` Simon Glass
2015-08-14 18:34     ` Simon Glass
2015-08-14 20:29       ` Rob Herring
2015-08-15 13:46         ` Simon Glass
2015-08-25 16:22           ` Rob Herring
2015-08-28 18:27             ` Simon Glass
2015-09-09 18:08               ` Simon Glass
2015-09-16  3:54               ` Stephen Warren [this message]
2015-08-15  3:46     ` Stephen Warren
2015-08-15 13:47       ` Simon Glass
2015-10-08 15:50 ` Pavel Machek

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=55F8E802.7090008@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=dev@lynxeye.de \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=robherring2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=swarren@nvidia.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