Skip to content

Commit

Permalink
Squashed 'scripts/dtc/' content from commit 65cc4d2
Browse files Browse the repository at this point in the history
git-subtree-dir: scripts/dtc
git-subtree-split: 65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf
  • Loading branch information
jameswalmsley committed Nov 13, 2013
0 parents commit 3330194
Show file tree
Hide file tree
Showing 210 changed files with 21,086 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.o
*.d
*.a
*.patch
*.so
*~
*.tab.[ch]
lex.yy.c
*.lex.c
/dtc
/fdtdump
/convert-dtsv0
/version_gen.h
/fdtget
/fdtput
/patches
/.pc
43 changes: 43 additions & 0 deletions Documentation/dtc-paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@STRING{pub-IEEE = "IEEE Computer Society"}
@STRING{pub-IEEE:adr = "345 E. 47th St, New York, NY 10017, USA"}

@BOOK{IEEE1275,
key = "IEEE1275",
title = "{IEEE} {S}tandard for {B}oot ({I}nitialization {C}onfiguration) {F}irmware: {C}ore {R}equirements and {P}ractices",
publisher = pub-IEEE,
address = pub-IEEE:adr,
series = "IEEE Std 1275-1994",
year = 1994,
}

@BOOK{IEEE1275-pci,
key = "IEEE1275-pci",
title = "{PCI} {B}us {B}inding to: {IEEE} {S}td 1275-1994 {S}tandard for {B}oot ({I}nitialization {C}onfiguration) {F}irmware",
publisher = pub-IEEE,
address = pub-IEEE:adr,
note = "Revision 2.1",
year = 1998,
}

@MISC{noof1,
author = "Benjamin Herrenschmidt",
title = "Booting the {L}inux/ppc kernel without {O}pen {F}irmware",
month = may,
year = 2005,
note = "v0.1, \url{http://ozlabs.org/pipermail/linuxppc64-dev/2005-May/004073.html}",
}

@MISC{noof5,
author = "Benjamin Herrenschmidt",
title = "Booting the {L}inux/ppc kernel without {O}pen {F}irmware",
month = nov,
year = 2005,
note = "v0.5, \url{http://ozlabs.org/pipermail/linuxppc64-dev/2005-December/006994.html}",
}

@MISC{dtcgit,
author = "David Gibson et al.",
title = "\dtc{}",
howpublished = "git tree",
note = "\url{http://ozlabs.org/~dgibson/dtc/dtc.git}",
}
597 changes: 597 additions & 0 deletions Documentation/dtc-paper.tex

Large diffs are not rendered by default.

122 changes: 122 additions & 0 deletions Documentation/dts-format.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
Device Tree Source Format (version 1)
=====================================

The Device Tree Source (DTS) format is a textual representation of a
device tree in a form that can be processed by dtc into a binary
device tree in the form expected by the kernel. The description below
is not a formal syntax definition of DTS, but describes the basic
constructs used to represent device trees.

Node and property definitions
-----------------------------

Device tree nodes are defined with a node name and unit address with
braces marking the start and end of the node definition. They may be
preceded by a label.

[label:] node-name[@unit-address] {
[properties definitions]
[child nodes]
}

Nodes may contain property definitions and/or child node
definitions. If both are present, properties must come before child
nodes.

Property definitions are name value pairs in the form:
[label:] property-name = value;
except for properties with empty (zero length) value which have the
form:
[label:] property-name;

Property values may be defined as an array of 8, 16, 32, or 64-bit integer
elements, as NUL-terminated strings, as bytestrings or a combination of these.

* Arrays are represented by angle brackets surrounding a space separated list
of C-style integers or character literals. Array elements default to 32-bits
in size. An array of 32-bit elements is also known as a cell list or a list
of cells. A cell being an unsigned 32-bit integer.

e.g. interrupts = <17 0xc>;

* A 64-bit value can be represented with two 32-bit elements.

e.g. clock-frequency = <0x00000001 0x00000000>;

* The storage size of an element can be changed using the /bits/ prefix. The
/bits/ prefix allows for the creation of 8, 16, 32, and 64-bit elements.
The resulting array will not be padded to a multiple of the default 32-bit
element size.

e.g. interrupts = /bits/ 8 <17 0xc>;
e.g. clock-frequency = /bits/ 64 <0x0000000100000000>;

* A NUL-terminated string value is represented using double quotes
(the property value is considered to include the terminating NUL
character).

e.g. compatible = "simple-bus";

* A bytestring is enclosed in square brackets [] with each byte
represented by two hexadecimal digits. Spaces between each byte are
optional.

e.g. local-mac-address = [00 00 12 34 56 78]; or equivalently
local-mac-address = [000012345678];

* Values may have several comma-separated components, which are
concatenated together.
e.g. compatible = "ns16550", "ns8250";
example = <0xf00f0000 19>, "a strange property format";

* In an array a reference to another node will be expanded to that node's
phandle. References may by '&' followed by a node's label:
e.g. interrupt-parent = < &mpic >;
or they may be '&' followed by a node's full path in braces:
e.g. interrupt-parent = < &{/soc/interrupt-controller@40000} >;
References are only permitted in arrays that have an element size of
32-bits.

* Outside an array, a reference to another node will be expanded to that
node's full path.
e.g. ethernet0 = &EMAC0;

* Labels may also appear before or after any component of a property
value, or between elements of an array, or between bytes of a bytestring.
e.g. reg = reglabel: <0 sizelabel: 0x1000000>;
e.g. prop = [ab cd ef byte4: 00 ff fe];
e.g. str = start: "string value" end: ;


File layout
-----------

Version 1 DTS files have the overall layout:
/dts-v1/;

[memory reservations]

/ {
[property definitions]
[child nodes]
};

* The "/dts-v1/;" must be present to identify the file as a version 1
DTS (dts files without this tag will be treated by dtc as being in
the obsolete "version 0", which uses a different format for integers
amongst other small but incompatible changes).

* Memory reservations define an entry for the device tree blob's
memory reservation table. They have the form:
e.g. /memreserve/ <address> <length>;
Where <address> and <length> are 64-bit C-style integers.

* The / { ... }; section defines the root node of the device tree.

* C style (/* ... */) and C++ style (// ...) comments are supported.



-- David Gibson <david@gibson.dropbear.id.au>
-- Yoder Stuart <stuart.yoder@freescale.com>
-- Anton Staaf <robotboy@chromium.org>
Loading

0 comments on commit 3330194

Please sign in to comment.