dtsi vs dts files, where to better understand this

Stephen Warren swarren at wwwdotorg.org
Thu Mar 22 07:36:35 EST 2012


On 03/21/2012 12:36 PM, John Linn wrote:
> Hi,
> 
> I've done some digging and not found any info, maybe I looked in the
> wrong places.
> 
> I'm trying to better understand how the dtsi file works with the dts
> file and what can go in each file.

The basic idea is that what's inside the SoC is identical across all
boards using that SoC. This information is put into the .dtsi file so it
can be included by the .dts file for any boards using the SoC.

Anything that's board-specific goes into the board's individual .dts
file. This might be new nodes to e.g. define which chips are connected
to an I2C bus hosted by the SoC, and much more.

Where properties existing in both, the most recent value in parsing
order overrides any earlier values. So for example, if the .dtsi file
said that 'status = "disabled"' for a particular HW module, the board
.dts could later override it by saying 'status = "okay"' within the same
node.

One other factor: Something like an SDHCI controller may have properties
that are defined by the SoC (e.g. compatible, reg, interrupts), and
properties that are defined by the board (e.g. the GPIO ID to use for
CD, WP, etc.). Just set the relevant properties in the .dtsi and .dts
files and they'll get merged together to form the final device tree.

Was that what you were looking for?


More information about the devicetree-discuss mailing list