[U-Boot] Configuring U-Boot through device tree

Stephen Warren swarren at wwwdotorg.org
Tue Oct 29 17:05:51 CET 2013


On 10/28/2013 10:56 AM, Dirk Behme wrote:
> Am 27.10.2013 18:07, schrieb Detlev Zundel:
> ...
>> ** Configuring U-Boot through device tree
>> - _What_ should be configured?
>> - Google requires every new U-Boot driver to be configured through
>>    device tree in U-Boot
>> - Configuring U-Boot through device trees shall aim for using the
>>    exact same tree from the Linux kernel.
> 
> At ELCE, I attended the Barebox presentation. One Barebox feature
> presented there was "Configure Barbox through device tree". So the
> Barebox people seem to have this already running for some selected
> boards. After their presentation I asked them "how do you decide which
> parts are configured in the boot loader, and which in the kernel,
> then?". And got the quick answer "in doubt, the configuration is done
> two times".
> 
> Do we really want this?
> 
> If we use the same device tree for U-Boot and the Linux kernel (which
> most probably makes sense)

If the same DT (schema at least) isn't used for all SW running on the
HW, then you aren't doing DT, but simply something that looks like it.

> do we really want to do the initialization
> part we do already in U-Boot again in the kernel?

It's possible to put all the e.g. one-time pinmux setup into the U-Boot
DT and strip it out of the kernel DT. This would prevent it being
applied twice. Of course, you can only do this once you're sure that
U-Boot is actually parsing the pinmux from DT and applying it, which
isn't the case yet. And since that requires a newer U-Boot, you probably
don't want to assume this by default in the kernel DTs; leave this to
people to do locally if they care about the extra few micro seconds.

The important thing is to use the same schema for all DTs, more than use
the exact same DT binary. For example, the kernel might have more
devices/nodes present if you want to enable more functionality, but you
might want to strip down the set of devices that are enabled in U-Boot
for simplicity.


More information about the U-Boot mailing list