Reference Manual

Introduction

Device Tree Usage

If Device Tree is new to you, start with Device Tree Usage page.
That page describes what Device Tree source looks like. It walks through building the
source for a new machine. It describes the basic concepts, shows specific examples,
and covers some advanced features.

use cases, advantages, and things to be aware of are described in "Solving Device Tree Issues" (updated), ELCE October 2015 by Frank Rowand (PDF). dtx_diff is referred to as "dtdiff" in this presentation.

locating source location for properties

boot time messages

device creation

driver registration

binding driver to device

deferred binding

Debugging - random hints

You can set CONFIG_PROC_DEVICETREE to be able to see the device tree information in /proc after booting.
Build the kernel with this option set to 'Y', boot the kernel, then 'cd /proc/device-tree'

/proc/device-tree still does not exist. Now what???
Is CONFIG_PROC_FS enabled?
Is CONFIG_OF enabled?
Does /sys/firmware/devicetree/base exist? (Note that this path is not an ABI, but currently
/proc/devicetree is a soft link to this location.)
Did the bootloader load a devicetree? (Check the boot console or use dmesg to print the boot messages.)

For newer kernels where the CONFIG_PROC_DEVICETREE option does not exist, /proc/device-tree will be
created if CONFIG_PROC_FS is set to 'Y'.

You might also try CONFIG_DEBUG_DRIVER=Y.

Also, often, you can set the line: "#define DEBUG 1" to an individual C file, to produce add debug statements
to the routines in that file. This will activate any pr_debug() lines in the source for that file.

dtx_diff

dtx_diff has two modes of operation:

compare two dtX files

compile a single dtX file (using the normal Linux includes and .config) then decompiles that into a device tree source file.

A dtX file can be a device tree source file, a device tree compiled file (aka .dtb, FDT, or device tree blob), or a file system based subtree (either /proc/device-tree on the target system, or /proc/device-tree can be tarred on the target system and untarred on the system containing dtx_diff).