1 Device Tree Source Format (version 1)
2 =====================================
4 The Device Tree Source (DTS) format is a textual representation of a
5 device tree in a form that can be processed by dtc into a binary
6 device tree in the form expected by the kernel. The description below
7 is not a formal syntax definition of DTS, but describes the basic
8 constructs used to represent device trees.
10 Node and property definitions
11 -----------------------------
13 Device tree nodes are defined with a node name and unit address with
14 braces marking the start and end of the node definition. They may be
17 [label:] node-name[@unit-address] {
18 [properties definitions]
22 Nodes may contain property definitions and/or child node
23 definitions. If both are present, properties must come before child
26 Property definitions are name value pairs in the form:
27 [label:] property-name = value;
28 except for properties with empty (zero length) value which have the
30 [label:] property-name;
32 Property values may be defined as an array of 32-bit integer cells, as
33 NUL-terminated strings, as bytestrings or a combination of these.
35 * Arrays of cells are represented by angle brackets surrounding a
36 space separated list of C-style integers
38 e.g. interrupts = <17 0xc>;
40 * A 64-bit value is represented with two 32-bit cells.
42 e.g. clock-frequency = <0x00000001 0x00000000>;
44 * A NUL-terminated string value is represented using double quotes
45 (the property value is considered to include the terminating NUL
48 e.g. compatible = "simple-bus";
50 * A bytestring is enclosed in square brackets [] with each byte
51 represented by two hexadecimal digits. Spaces between each byte are
54 e.g. local-mac-address = [00 00 12 34 56 78]; or equivalently
55 local-mac-address = [000012345678];
57 * Values may have several comma-separated components, which are
58 concatenated together.
59 e.g. compatible = "ns16550", "ns8250";
60 example = <0xf00f0000 19>, "a strange property format";
62 * In a cell array a reference to another node will be expanded to that
63 node's phandle. References may by '&' followed by a node's label:
64 e.g. interrupt-parent = < &mpic >;
65 or they may be '&' followed by a node's full path in braces:
66 e.g. interrupt-parent = < &{/soc/interrupt-controller@40000} >;
68 * Outside a cell array, a reference to another node will be expanded
69 to that node's full path.
70 e.g. ethernet0 = &EMAC0;
72 * Labels may also appear before or after any component of a property
73 value, or between cells of a cell array, or between bytes of a
75 e.g. reg = reglabel: <0 sizelabel: 0x1000000>;
76 e.g. prop = [ab cd ef byte4: 00 ff fe];
77 e.g. str = start: "string value" end: ;
83 Version 1 DTS files have the overall layout:
89 [property definitions]
93 * The "/dts-v1/;" must be present to identify the file as a version 1
94 DTS (dts files without this tag will be treated by dtc as being in
95 the obsolete "version 0", which uses a different format for integers
96 amongst other small but incompatible changes).
98 * Memory reservations define an entry for the device tree blob's
99 memory reservation table. They have the form:
100 e.g. /memreserve/ <address> <length>;
101 Where <address> and <length> are 64-bit C-style integers.
103 * The / { ... }; section defines the root node of the device tree.
105 * C style (/* ... */) and C++ style (// ...) comments are supported.
109 -- David Gibson <david@gibson.dropbear.id.au>
110 -- Yoder Stuart <stuart.yoder@freescale.com>