Commit d9a29c9b authored by Simon Glass's avatar Simon Glass
Browse files

doc: Add documentation about devicetree usage

At present some of the ideas and techniques behind devicetree in U-Boot
are assumed, implied or unsaid. Add some documentation to cover how
devicetree is build, how it can be modified and the rules about using
the various CONFIG_OF_... options.

This patch attracted quite a bit of discussion here:

I have not included the text suggested by François. While I agree that
it would be useful to have an introduction in this space, I do not agree
that we should have two devicetrees or that U-Boot should not have its own
things in the devicetree, so it is not clear to me what we should actually

The 'Devicetree Control in U-Boot' docs were recently merged and these
provide some base info, for now.

Series-to: u-boot
Series-version: 4
Series-links: 261659
Series-cc: Mark Kettenis <>
Series-cc: trini, heinrich
Series-cc: Sean Anderson <>
Series-cc: Ilias Apalodimas <>
Series-changes: 2
- Fix typos per Sean (thank you!) and a few others
- Add a 'Use of U-Boot /config node' section
- Drop mention of dm-verity since that actually uses the kernel cmdline
- Explain that OF_BOARD will still work after these changes (in
  'Once this bug is fixed...' paragraph)
- Expand a bit on the reason why the 'Current situation' is bad
- Clarify in a second place that Linux and U-Boot use the same devicetree
  in 'To be clear, while U-Boot...'
- Expand on why we should have rules for other projects in
  'Devicetree in another project'
- Add a comment as to why devicetree in U-Boot is not 'bad design'
- Reword 'in-tree U-Boot devicetree' to 'devicetree source in U-Boot'
- Rewrite 'Devicetree generated on-the-fly in another project' to cover
  points raised on v1
- Add 'Why does U-Boot have its nodes and properties?'
- Add 'Why not have two devicetrees?'

Series-changes: 3
- Clarify the 'bug' refered to at the top
- Reword 'This means that there' paragraph to explain U-Boot-specific things
- Move to doc/develop/devicetree now that OF_CONTROL is in the docs

doc: Clarify how U-Boot makes use of devicetree
This series includes a documentation update to clarify how U-Boot makes
use of devicetree and its requirements when working with other firmware

Once agreed it should provide more clarity in this area, which seems to
have devolved into a confusing mire recently.

My goal here is to sort out this area one and for all, clearly documenting
the use cases and implications of them. I hope that the end result of this
(substantial) effort will be a shared understanding of how to move
forward in U-Boot and hopefully some ideas for firmware in general.

It also cleans up the config binding since this has got a bit out-of-date.
Signed-off-by: Simon Glass's avatarSimon Glass <>
Reviewed-by: default avatarMarcel Ziswiler <>
parent 803725ac
Pipeline #9176 canceled with stages
in 2 minutes and 16 seconds
This diff is collapsed.
......@@ -11,3 +11,4 @@ build-time and runtime configuration.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment