This is an old revision of the document!
Overview
Proper .dts file design.
One board, one .dts file
Every distinct board merits its own .dts file, as in:
am335x-boneblack.dtsam335x-boneblack-wireless.dtsam335x-boneblue.dtsam335x-bone.dtsam335x-bonegreen.dtsam335x-bonegreen-wireless.dts
Proper use of .dtsi files
There is no reason to make local copies of kernel-supplied .dtsi files and alter them; such files should be included as is, and all alterations should be made in the .dts file or a more general board-related .dtsi file supplied by that developer. Any alterations that involve actual removal of included content should be done via one of the two directives:
/delete-property//delete-node/
This functionality was introduced into the Linux kernel file scripts/dtc/dtc-lexer.l file in Sept of 2012:
commit cd296721a9645f9f28800a072490fa15458d1fb7
Author: Stephen Warren <swarren@nvidia.com>
Date: Fri Sep 28 21:25:59 2012 +0000
dtc: import latest upstream dtc
This updates scripts/dtc to commit 317a5d9 "dtc: zero out new label
objects" from git://git.jdl.com/software/dtc.git.
This adds features such as:
* /bits/ syntax for cell data.
* Math expressions within cell data.
* The ability to delete properties or nodes.
* Support for #line directives in the input file, which allows the use of
cpp on *.dts.
* -i command-line option (/include/ path)
* -W/-E command-line options for error/warning control.
* Removal of spew to STDOUT containing the filename being compiled.
* Many additions to the libfdt API.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Examples can be seen here.