u-boot DT configuration node

Michal Simek michal.simek at xilinx.com
Tue Apr 28 15:50:54 CEST 2020


On 28. 04. 20 15:23, Rob Herring wrote:
> On Wed, Apr 1, 2020 at 4:23 AM Michal Simek <michal.simek at xilinx.com> wrote:
>>
>> Hi Rob and others,
>>
>> for couple of years already u-boot is using config node in root DT for
>> u-boot configuration.
>>
>> Here is one example in u-boot source code.
>> https://gitlab.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/exynos5250-spring.dts#L47
>>
>> And here is dt binding description
>> https://gitlab.denx.de/u-boot/u-boot/-/blob/master/doc/device-tree-bindings/config.txt
>>
>> I was checking dt binding specification and there no such a thing
>> described there. It means I expect this is more adhoc u-boot solution.
>> We have reached the point where could be beneficial to put some u-boot
>> specific configurations to DT.
>>
>> Actually I have done similar thing some time ago too by using chosen
>> node and add xilinx specific property there to point to eeprom.
>> https://gitlab.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/zynqmp-zcu102-revA.dts#L39
> 
> In this case, I think an alias should be used as it's more of just a
> shortcut to finding a specific node.

What alias name do you suggest to use?
We have systems where one i2c eeprom described based board and another
i2c eeprom describe bootable module. And I need to have shotcuts to both
of them.

dt specification doesn't list any keywords for aliases but there is
generic name recommendation.

Based on keywords it should look like this.
eeprom0 = ...;
eeprom1 = ...;


> 
>> I think it is a time to discuss it and do it properly.
>>
>> First of all my question is where we could list SW prefixes to make sure
>> that they are listed and everybody is aware about it. We have
>> vendor-prefixes and we should have a way to record also prefixes for sw
>> projects. U-Boot is using u-boot. Xen has file in the kernel with using
>> xen prefix. At least these two should be listed.
> 
> Documentation/devicetree/bindings/vendor-prefixes.yaml.

thx

> 
>> Next my question is what is the recommended way to pass sw specific
>> parameters via DT? I think using chosen node is more appropriate then
>> adhoc config node. Or is there a better way how this should be done?
> 
> /chosen
> 
> For vendor specific things though I would be cautious. If they are
> settings for a specific device, then they probably belong in the
> device's node. Second, are they really vendor specific? What we don't
> want is each vendor doing the same thing in slightly different ways.

For u-boot specific setting like - offsets it should be generic for
everybody. I was already talking to Loic that for saving u-boot
variables to QSPI we should be using MTD partition map and put there
maybe a flag to say that this is the location for storing them.

Thanks,
Michal




More information about the U-Boot mailing list