aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /Documentation/devicetree
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r--Documentation/devicetree/00-INDEX10
-rw-r--r--Documentation/devicetree/bindings/ata/fsl-sata.txt29
-rw-r--r--Documentation/devicetree/bindings/crypto/fsl-sec4.txt397
-rw-r--r--Documentation/devicetree/bindings/eeprom.txt28
-rw-r--r--Documentation/devicetree/bindings/fb/sm501fb.txt34
-rw-r--r--Documentation/devicetree/bindings/gpio/8xxx_gpio.txt60
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio.txt50
-rw-r--r--Documentation/devicetree/bindings/gpio/led.txt58
-rw-r--r--Documentation/devicetree/bindings/hwmon/ads1015.txt73
-rw-r--r--Documentation/devicetree/bindings/i2c/ce4100-i2c.txt93
-rw-r--r--Documentation/devicetree/bindings/i2c/fsl-i2c.txt64
-rw-r--r--Documentation/devicetree/bindings/marvell.txt521
-rw-r--r--Documentation/devicetree/bindings/mmc/fsl-esdhc.txt29
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt30
-rw-r--r--Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt63
-rw-r--r--Documentation/devicetree/bindings/mtd/mtd-physmap.txt90
-rwxr-xr-xDocumentation/devicetree/bindings/net/can/fsl-flexcan.txt61
-rw-r--r--Documentation/devicetree/bindings/net/can/mpc5xxx-mscan.txt53
-rw-r--r--Documentation/devicetree/bindings/net/can/sja1000.txt53
-rw-r--r--Documentation/devicetree/bindings/net/fsl-tsec-phy.txt130
-rw-r--r--Documentation/devicetree/bindings/net/mdio-gpio.txt19
-rw-r--r--Documentation/devicetree/bindings/net/phy.txt25
-rw-r--r--Documentation/devicetree/bindings/open-pic.txt98
-rw-r--r--Documentation/devicetree/bindings/pci/83xx-512x-pci.txt40
-rw-r--r--Documentation/devicetree/bindings/powerpc/4xx/cpm.txt52
-rw-r--r--Documentation/devicetree/bindings/powerpc/4xx/emac.txt148
-rw-r--r--Documentation/devicetree/bindings/powerpc/4xx/ndfc.txt39
-rw-r--r--Documentation/devicetree/bindings/powerpc/4xx/ppc440spe-adma.txt93
-rw-r--r--Documentation/devicetree/bindings/powerpc/4xx/reboot.txt18
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/board.txt63
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cache_sram.txt20
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm.txt67
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/brg.txt21
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/i2c.txt41
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/pic.txt18
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/usb.txt15
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/gpio.txt38
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/network.txt45
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe.txt115
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/firmware.txt24
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/par_io.txt51
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/pincfg.txt60
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/ucc.txt70
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/usb.txt37
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/serial.txt32
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/diu.txt34
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/dma.txt144
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/ecm.txt64
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/gtm.txt31
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/guts.txt25
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/ifc.txt76
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/lbc.txt35
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mcm.txt64
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mcu-mpc8349emitx.txt17
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpc5121-psc.txt70
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt198
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpic-timer.txt38
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpic.txt211
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt43
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/pmc.txt63
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/sec.txt68
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/ssi.txt73
-rw-r--r--Documentation/devicetree/bindings/powerpc/nintendo/gamecube.txt109
-rw-r--r--Documentation/devicetree/bindings/powerpc/nintendo/wii.txt184
-rw-r--r--Documentation/devicetree/bindings/rtc/rtc-cmos.txt28
-rw-r--r--Documentation/devicetree/bindings/serial/altera_jtaguart.txt4
-rw-r--r--Documentation/devicetree/bindings/serial/altera_uart.txt7
-rw-r--r--Documentation/devicetree/bindings/serio/altera_ps2.txt4
-rw-r--r--Documentation/devicetree/bindings/spi/fsl-spi.txt53
-rw-r--r--Documentation/devicetree/bindings/spi/spi-bus.txt57
-rw-r--r--Documentation/devicetree/bindings/spi/spi_altera.txt4
-rw-r--r--Documentation/devicetree/bindings/spi/spi_oc_tiny.txt12
-rw-r--r--Documentation/devicetree/bindings/usb/fsl-usb.txt81
-rw-r--r--Documentation/devicetree/bindings/usb/usb-ehci.txt25
-rw-r--r--Documentation/devicetree/bindings/x86/ce4100.txt38
-rw-r--r--Documentation/devicetree/bindings/x86/interrupt.txt26
-rw-r--r--Documentation/devicetree/bindings/x86/timer.txt6
-rw-r--r--Documentation/devicetree/bindings/xilinx.txt306
-rw-r--r--Documentation/devicetree/booting-without-of.txt1450
79 files changed, 6823 insertions, 0 deletions
diff --git a/Documentation/devicetree/00-INDEX b/Documentation/devicetree/00-INDEX
new file mode 100644
index 000000000000..b78f691fd847
--- /dev/null
+++ b/Documentation/devicetree/00-INDEX
@@ -0,0 +1,10 @@
1Documentation for device trees, a data structure by which bootloaders pass
2hardware layout to Linux in a device-independent manner, simplifying hardware
3probing. This subsystem is maintained by Grant Likely
4<grant.likely@secretlab.ca> and has a mailing list at
5https://lists.ozlabs.org/listinfo/devicetree-discuss
6
700-INDEX
8 - this file
9booting-without-of.txt
10 - Booting Linux without Open Firmware, describes history and format of device trees.
diff --git a/Documentation/devicetree/bindings/ata/fsl-sata.txt b/Documentation/devicetree/bindings/ata/fsl-sata.txt
new file mode 100644
index 000000000000..b46bcf46c3d8
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/fsl-sata.txt
@@ -0,0 +1,29 @@
1* Freescale 8xxx/3.0 Gb/s SATA nodes
2
3SATA nodes are defined to describe on-chip Serial ATA controllers.
4Each SATA port should have its own node.
5
6Required properties:
7- compatible : compatible list, contains 2 entries, first is
8 "fsl,CHIP-sata", where CHIP is the processor
9 (mpc8315, mpc8379, etc.) and the second is
10 "fsl,pq-sata"
11- interrupts : <interrupt mapping for SATA IRQ>
12- cell-index : controller index.
13 1 for controller @ 0x18000
14 2 for controller @ 0x19000
15 3 for controller @ 0x1a000
16 4 for controller @ 0x1b000
17
18Optional properties:
19- interrupt-parent : optional, if needed for interrupt mapping
20- reg : <registers mapping>
21
22Example:
23 sata@18000 {
24 compatible = "fsl,mpc8379-sata", "fsl,pq-sata";
25 reg = <0x18000 0x1000>;
26 cell-index = <1>;
27 interrupts = <2c 8>;
28 interrupt-parent = < &ipic >;
29 };
diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
new file mode 100644
index 000000000000..bf57ecd5d73a
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
@@ -0,0 +1,397 @@
1=====================================================================
2SEC 4 Device Tree Binding
3Copyright (C) 2008-2011 Freescale Semiconductor Inc.
4
5 CONTENTS
6 -Overview
7 -SEC 4 Node
8 -Job Ring Node
9 -Run Time Integrity Check (RTIC) Node
10 -Run Time Integrity Check (RTIC) Memory Node
11 -Secure Non-Volatile Storage (SNVS) Node
12 -Full Example
13
14NOTE: the SEC 4 is also known as Freescale's Cryptographic Accelerator
15Accelerator and Assurance Module (CAAM).
16
17=====================================================================
18Overview
19
20DESCRIPTION
21
22SEC 4 h/w can process requests from 2 types of sources.
231. DPAA Queue Interface (HW interface between Queue Manager & SEC 4).
242. Job Rings (HW interface between cores & SEC 4 registers).
25
26High Speed Data Path Configuration:
27
28HW interface between QM & SEC 4 and also BM & SEC 4, on DPAA-enabled parts
29such as the P4080. The number of simultaneous dequeues the QI can make is
30equal to the number of Descriptor Controller (DECO) engines in a particular
31SEC version. E.g., the SEC 4.0 in the P4080 has 5 DECOs and can thus
32dequeue from 5 subportals simultaneously.
33
34Job Ring Data Path Configuration:
35
36Each JR is located on a separate 4k page, they may (or may not) be made visible
37in the memory partition devoted to a particular core. The P4080 has 4 JRs, so
38up to 4 JRs can be configured; and all 4 JRs process requests in parallel.
39
40=====================================================================
41SEC 4 Node
42
43Description
44
45 Node defines the base address of the SEC 4 block.
46 This block specifies the address range of all global
47 configuration registers for the SEC 4 block. It
48 also receives interrupts from the Run Time Integrity Check
49 (RTIC) function within the SEC 4 block.
50
51PROPERTIES
52
53 - compatible
54 Usage: required
55 Value type: <string>
56 Definition: Must include "fsl,sec-v4.0"
57
58 - #address-cells
59 Usage: required
60 Value type: <u32>
61 Definition: A standard property. Defines the number of cells
62 for representing physical addresses in child nodes.
63
64 - #size-cells
65 Usage: required
66 Value type: <u32>
67 Definition: A standard property. Defines the number of cells
68 for representing the size of physical addresses in
69 child nodes.
70
71 - reg
72 Usage: required
73 Value type: <prop-encoded-array>
74 Definition: A standard property. Specifies the physical
75 address and length of the SEC4 configuration registers.
76 registers
77
78 - ranges
79 Usage: required
80 Value type: <prop-encoded-array>
81 Definition: A standard property. Specifies the physical address
82 range of the SEC 4.0 register space (-SNVS not included). A
83 triplet that includes the child address, parent address, &
84 length.
85
86 - interrupts
87 Usage: required
88 Value type: <prop_encoded-array>
89 Definition: Specifies the interrupts generated by this
90 device. The value of the interrupts property
91 consists of one interrupt specifier. The format
92 of the specifier is defined by the binding document
93 describing the node's interrupt parent.
94
95 - interrupt-parent
96 Usage: (required if interrupt property is defined)
97 Value type: <phandle>
98 Definition: A single <phandle> value that points
99 to the interrupt parent to which the child domain
100 is being mapped.
101
102 Note: All other standard properties (see the ePAPR) are allowed
103 but are optional.
104
105
106EXAMPLE
107 crypto@300000 {
108 compatible = "fsl,sec-v4.0";
109 #address-cells = <1>;
110 #size-cells = <1>;
111 reg = <0x300000 0x10000>;
112 ranges = <0 0x300000 0x10000>;
113 interrupt-parent = <&mpic>;
114 interrupts = <92 2>;
115 };
116
117=====================================================================
118Job Ring (JR) Node
119
120 Child of the crypto node defines data processing interface to SEC 4
121 across the peripheral bus for purposes of processing
122 cryptographic descriptors. The specified address
123 range can be made visible to one (or more) cores.
124 The interrupt defined for this node is controlled within
125 the address range of this node.
126
127 - compatible
128 Usage: required
129 Value type: <string>
130 Definition: Must include "fsl,sec-v4.0-job-ring"
131
132 - reg
133 Usage: required
134 Value type: <prop-encoded-array>
135 Definition: Specifies a two JR parameters: an offset from
136 the parent physical address and the length the JR registers.
137
138 - fsl,liodn
139 Usage: optional-but-recommended
140 Value type: <prop-encoded-array>
141 Definition:
142 Specifies the LIODN to be used in conjunction with
143 the ppid-to-liodn table that specifies the PPID to LIODN mapping.
144 Needed if the PAMU is used. Value is a 12 bit value
145 where value is a LIODN ID for this JR. This property is
146 normally set by boot firmware.
147
148 - interrupts
149 Usage: required
150 Value type: <prop_encoded-array>
151 Definition: Specifies the interrupts generated by this
152 device. The value of the interrupts property
153 consists of one interrupt specifier. The format
154 of the specifier is defined by the binding document
155 describing the node's interrupt parent.
156
157 - interrupt-parent
158 Usage: (required if interrupt property is defined)
159 Value type: <phandle>
160 Definition: A single <phandle> value that points
161 to the interrupt parent to which the child domain
162 is being mapped.
163
164EXAMPLE
165 jr@1000 {
166 compatible = "fsl,sec-v4.0-job-ring";
167 reg = <0x1000 0x1000>;
168 fsl,liodn = <0x081>;
169 interrupt-parent = <&mpic>;
170 interrupts = <88 2>;
171 };
172
173
174=====================================================================
175Run Time Integrity Check (RTIC) Node
176
177 Child node of the crypto node. Defines a register space that
178 contains up to 5 sets of addresses and their lengths (sizes) that
179 will be checked at run time. After an initial hash result is
180 calculated, these addresses are checked by HW to monitor any
181 change. If any memory is modified, a Security Violation is
182 triggered (see SNVS definition).
183
184
185 - compatible
186 Usage: required
187 Value type: <string>
188 Definition: Must include "fsl,sec-v4.0-rtic".
189
190 - #address-cells
191 Usage: required
192 Value type: <u32>
193 Definition: A standard property. Defines the number of cells
194 for representing physical addresses in child nodes. Must
195 have a value of 1.
196
197 - #size-cells
198 Usage: required
199 Value type: <u32>
200 Definition: A standard property. Defines the number of cells
201 for representing the size of physical addresses in
202 child nodes. Must have a value of 1.
203
204 - reg
205 Usage: required
206 Value type: <prop-encoded-array>
207 Definition: A standard property. Specifies a two parameters:
208 an offset from the parent physical address and the length
209 the SEC4 registers.
210
211 - ranges
212 Usage: required
213 Value type: <prop-encoded-array>
214 Definition: A standard property. Specifies the physical address
215 range of the SEC 4 register space (-SNVS not included). A
216 triplet that includes the child address, parent address, &
217 length.
218
219EXAMPLE
220 rtic@6000 {
221 compatible = "fsl,sec-v4.0-rtic";
222 #address-cells = <1>;
223 #size-cells = <1>;
224 reg = <0x6000 0x100>;
225 ranges = <0x0 0x6100 0xe00>;
226 };
227
228=====================================================================
229Run Time Integrity Check (RTIC) Memory Node
230 A child node that defines individual RTIC memory regions that are used to
231 perform run-time integrity check of memory areas that should not modified.
232 The node defines a register that contains the memory address &
233 length (combined) and a second register that contains the hash result
234 in big endian format.
235
236 - compatible
237 Usage: required
238 Value type: <string>
239 Definition: Must include "fsl,sec-v4.0-rtic-memory".
240
241 - reg
242 Usage: required
243 Value type: <prop-encoded-array>
244 Definition: A standard property. Specifies two parameters:
245 an offset from the parent physical address and the length:
246
247 1. The location of the RTIC memory address & length registers.
248 2. The location RTIC hash result.
249
250 - fsl,rtic-region
251 Usage: optional-but-recommended
252 Value type: <prop-encoded-array>
253 Definition:
254 Specifies the HW address (36 bit address) for this region
255 followed by the length of the HW partition to be checked;
256 the address is represented as a 64 bit quantity followed
257 by a 32 bit length.
258
259 - fsl,liodn
260 Usage: optional-but-recommended
261 Value type: <prop-encoded-array>
262 Definition:
263 Specifies the LIODN to be used in conjunction with
264 the ppid-to-liodn table that specifies the PPID to LIODN
265 mapping. Needed if the PAMU is used. Value is a 12 bit value
266 where value is a LIODN ID for this RTIC memory region. This
267 property is normally set by boot firmware.
268
269EXAMPLE
270 rtic-a@0 {
271 compatible = "fsl,sec-v4.0-rtic-memory";
272 reg = <0x00 0x20 0x100 0x80>;
273 fsl,liodn = <0x03c>;
274 fsl,rtic-region = <0x12345678 0x12345678 0x12345678>;
275 };
276
277=====================================================================
278Secure Non-Volatile Storage (SNVS) Node
279
280 Node defines address range and the associated
281 interrupt for the SNVS function. This function
282 monitors security state information & reports
283 security violations.
284
285 - compatible
286 Usage: required
287 Value type: <string>
288 Definition: Must include "fsl,sec-v4.0-mon".
289
290 - reg
291 Usage: required
292 Value type: <prop-encoded-array>
293 Definition: A standard property. Specifies the physical
294 address and length of the SEC4 configuration
295 registers.
296
297 - interrupts
298 Usage: required
299 Value type: <prop_encoded-array>
300 Definition: Specifies the interrupts generated by this
301 device. The value of the interrupts property
302 consists of one interrupt specifier. The format
303 of the specifier is defined by the binding document
304 describing the node's interrupt parent.
305
306 - interrupt-parent
307 Usage: (required if interrupt property is defined)
308 Value type: <phandle>
309 Definition: A single <phandle> value that points
310 to the interrupt parent to which the child domain
311 is being mapped.
312
313EXAMPLE
314 sec_mon@314000 {
315 compatible = "fsl,sec-v4.0-mon";
316 reg = <0x314000 0x1000>;
317 interrupt-parent = <&mpic>;
318 interrupts = <93 2>;
319 };
320
321=====================================================================
322FULL EXAMPLE
323
324 crypto: crypto@300000 {
325 compatible = "fsl,sec-v4.0";
326 #address-cells = <1>;
327 #size-cells = <1>;
328 reg = <0x300000 0x10000>;
329 ranges = <0 0x300000 0x10000>;
330 interrupt-parent = <&mpic>;
331 interrupts = <92 2>;
332
333 sec_jr0: jr@1000 {
334 compatible = "fsl,sec-v4.0-job-ring";
335 reg = <0x1000 0x1000>;
336 interrupt-parent = <&mpic>;
337 interrupts = <88 2>;
338 };
339
340 sec_jr1: jr@2000 {
341 compatible = "fsl,sec-v4.0-job-ring";
342 reg = <0x2000 0x1000>;
343 interrupt-parent = <&mpic>;
344 interrupts = <89 2>;
345 };
346
347 sec_jr2: jr@3000 {
348 compatible = "fsl,sec-v4.0-job-ring";
349 reg = <0x3000 0x1000>;
350 interrupt-parent = <&mpic>;
351 interrupts = <90 2>;
352 };
353
354 sec_jr3: jr@4000 {
355 compatible = "fsl,sec-v4.0-job-ring";
356 reg = <0x4000 0x1000>;
357 interrupt-parent = <&mpic>;
358 interrupts = <91 2>;
359 };
360
361 rtic@6000 {
362 compatible = "fsl,sec-v4.0-rtic";
363 #address-cells = <1>;
364 #size-cells = <1>;
365 reg = <0x6000 0x100>;
366 ranges = <0x0 0x6100 0xe00>;
367
368 rtic_a: rtic-a@0 {
369 compatible = "fsl,sec-v4.0-rtic-memory";
370 reg = <0x00 0x20 0x100 0x80>;
371 };
372
373 rtic_b: rtic-b@20 {
374 compatible = "fsl,sec-v4.0-rtic-memory";
375 reg = <0x20 0x20 0x200 0x80>;
376 };
377
378 rtic_c: rtic-c@40 {
379 compatible = "fsl,sec-v4.0-rtic-memory";
380 reg = <0x40 0x20 0x300 0x80>;
381 };
382
383 rtic_d: rtic-d@60 {
384 compatible = "fsl,sec-v4.0-rtic-memory";
385 reg = <0x60 0x20 0x500 0x80>;
386 };
387 };
388 };
389
390 sec_mon: sec_mon@314000 {
391 compatible = "fsl,sec-v4.0-mon";
392 reg = <0x314000 0x1000>;
393 interrupt-parent = <&mpic>;
394 interrupts = <93 2>;
395 };
396
397=====================================================================
diff --git a/Documentation/devicetree/bindings/eeprom.txt b/Documentation/devicetree/bindings/eeprom.txt
new file mode 100644
index 000000000000..4342c10de1bf
--- /dev/null
+++ b/Documentation/devicetree/bindings/eeprom.txt
@@ -0,0 +1,28 @@
1EEPROMs (I2C)
2
3Required properties:
4
5 - compatible : should be "<manufacturer>,<type>"
6 If there is no specific driver for <manufacturer>, a generic
7 driver based on <type> is selected. Possible types are:
8 24c00, 24c01, 24c02, 24c04, 24c08, 24c16, 24c32, 24c64,
9 24c128, 24c256, 24c512, 24c1024, spd
10
11 - reg : the I2C address of the EEPROM
12
13Optional properties:
14
15 - pagesize : the length of the pagesize for writing. Please consult the
16 manual of your device, that value varies a lot. A wrong value
17 may result in data loss! If not specified, a safety value of
18 '1' is used which will be very slow.
19
20 - read-only: this parameterless property disables writes to the eeprom
21
22Example:
23
24eeprom@52 {
25 compatible = "atmel,24c32";
26 reg = <0x52>;
27 pagesize = <32>;
28};
diff --git a/Documentation/devicetree/bindings/fb/sm501fb.txt b/Documentation/devicetree/bindings/fb/sm501fb.txt
new file mode 100644
index 000000000000..9d9f0098092b
--- /dev/null
+++ b/Documentation/devicetree/bindings/fb/sm501fb.txt
@@ -0,0 +1,34 @@
1* SM SM501
2
3The SM SM501 is a LCD controller, with proper hardware, it can also
4drive DVI monitors.
5
6Required properties:
7- compatible : should be "smi,sm501".
8- reg : contain two entries:
9 - First entry: System Configuration register
10 - Second entry: IO space (Display Controller register)
11- interrupts : SMI interrupt to the cpu should be described here.
12- interrupt-parent : the phandle for the interrupt controller that
13 services interrupts for this device.
14
15Optional properties:
16- mode : select a video mode:
17 <xres>x<yres>[-<bpp>][@<refresh>]
18- edid : verbatim EDID data block describing attached display.
19 Data from the detailed timing descriptor will be used to
20 program the display controller.
21- little-endian: available on big endian systems, to
22 set different foreign endian.
23- big-endian: available on little endian systems, to
24 set different foreign endian.
25
26Example for MPC5200:
27 display@1,0 {
28 compatible = "smi,sm501";
29 reg = <1 0x00000000 0x00800000
30 1 0x03e00000 0x00200000>;
31 interrupts = <1 1 3>;
32 mode = "640x480-32@60";
33 edid = [edid-data];
34 };
diff --git a/Documentation/devicetree/bindings/gpio/8xxx_gpio.txt b/Documentation/devicetree/bindings/gpio/8xxx_gpio.txt
new file mode 100644
index 000000000000..b0019eb5330e
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/8xxx_gpio.txt
@@ -0,0 +1,60 @@
1GPIO controllers on MPC8xxx SoCs
2
3This is for the non-QE/CPM/GUTs GPIO controllers as found on
48349, 8572, 8610 and compatible.
5
6Every GPIO controller node must have #gpio-cells property defined,
7this information will be used to translate gpio-specifiers.
8
9Required properties:
10- compatible : "fsl,<CHIP>-gpio" followed by "fsl,mpc8349-gpio" for
11 83xx, "fsl,mpc8572-gpio" for 85xx and "fsl,mpc8610-gpio" for 86xx.
12- #gpio-cells : Should be two. The first cell is the pin number and the
13 second cell is used to specify optional parameters (currently unused).
14 - interrupts : Interrupt mapping for GPIO IRQ.
15 - interrupt-parent : Phandle for the interrupt controller that
16 services interrupts for this device.
17- gpio-controller : Marks the port as GPIO controller.
18
19Example of gpio-controller nodes for a MPC8347 SoC:
20
21 gpio1: gpio-controller@c00 {
22 #gpio-cells = <2>;
23 compatible = "fsl,mpc8347-gpio", "fsl,mpc8349-gpio";
24 reg = <0xc00 0x100>;
25 interrupts = <74 0x8>;
26 interrupt-parent = <&ipic>;
27 gpio-controller;
28 };
29
30 gpio2: gpio-controller@d00 {
31 #gpio-cells = <2>;
32 compatible = "fsl,mpc8347-gpio", "fsl,mpc8349-gpio";
33 reg = <0xd00 0x100>;
34 interrupts = <75 0x8>;
35 interrupt-parent = <&ipic>;
36 gpio-controller;
37 };
38
39See booting-without-of.txt for details of how to specify GPIO
40information for devices.
41
42To use GPIO pins as interrupt sources for peripherals, specify the
43GPIO controller as the interrupt parent and define GPIO number +
44trigger mode using the interrupts property, which is defined like
45this:
46
47interrupts = <number trigger>, where:
48 - number: GPIO pin (0..31)
49 - trigger: trigger mode:
50 2 = trigger on falling edge
51 3 = trigger on both edges
52
53Example of device using this is:
54
55 funkyfpga@0 {
56 compatible = "funky-fpga";
57 ...
58 interrupts = <4 3>;
59 interrupt-parent = <&gpio1>;
60 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
new file mode 100644
index 000000000000..edaa84d288a1
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -0,0 +1,50 @@
1Specifying GPIO information for devices
2============================================
3
41) gpios property
5-----------------
6
7Nodes that makes use of GPIOs should define them using `gpios' property,
8format of which is: <&gpio-controller1-phandle gpio1-specifier
9 &gpio-controller2-phandle gpio2-specifier
10 0 /* holes are permitted, means no GPIO 3 */
11 &gpio-controller4-phandle gpio4-specifier
12 ...>;
13
14Note that gpio-specifier length is controller dependent.
15
16gpio-specifier may encode: bank, pin position inside the bank,
17whether pin is open-drain and whether pin is logically inverted.
18
19Example of the node using GPIOs:
20
21 node {
22 gpios = <&qe_pio_e 18 0>;
23 };
24
25In this example gpio-specifier is "18 0" and encodes GPIO pin number,
26and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller.
27
282) gpio-controller nodes
29------------------------
30
31Every GPIO controller node must have #gpio-cells property defined,
32this information will be used to translate gpio-specifiers.
33
34Example of two SOC GPIO banks defined as gpio-controller nodes:
35
36 qe_pio_a: gpio-controller@1400 {
37 #gpio-cells = <2>;
38 compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
39 reg = <0x1400 0x18>;
40 gpio-controller;
41 };
42
43 qe_pio_e: gpio-controller@1460 {
44 #gpio-cells = <2>;
45 compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
46 reg = <0x1460 0x18>;
47 gpio-controller;
48 };
49
50
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/gpio/led.txt
new file mode 100644
index 000000000000..064db928c3c1
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/led.txt
@@ -0,0 +1,58 @@
1LEDs connected to GPIO lines
2
3Required properties:
4- compatible : should be "gpio-leds".
5
6Each LED is represented as a sub-node of the gpio-leds device. Each
7node's name represents the name of the corresponding LED.
8
9LED sub-node properties:
10- gpios : Should specify the LED's GPIO, see "Specifying GPIO information
11 for devices" in Documentation/powerpc/booting-without-of.txt. Active
12 low LEDs should be indicated using flags in the GPIO specifier.
13- label : (optional) The label for this LED. If omitted, the label is
14 taken from the node name (excluding the unit address).
15- linux,default-trigger : (optional) This parameter, if present, is a
16 string defining the trigger assigned to the LED. Current triggers are:
17 "backlight" - LED will act as a back-light, controlled by the framebuffer
18 system
19 "default-on" - LED will turn on, but see "default-state" below
20 "heartbeat" - LED "double" flashes at a load average based rate
21 "ide-disk" - LED indicates disk activity
22 "timer" - LED flashes at a fixed, configurable rate
23- default-state: (optional) The initial state of the LED. Valid
24 values are "on", "off", and "keep". If the LED is already on or off
25 and the default-state property is set the to same value, then no
26 glitch should be produced where the LED momentarily turns off (or
27 on). The "keep" setting will keep the LED at whatever its current
28 state is, without producing a glitch. The default is off if this
29 property is not present.
30
31Examples:
32
33leds {
34 compatible = "gpio-leds";
35 hdd {
36 label = "IDE Activity";
37 gpios = <&mcu_pio 0 1>; /* Active low */
38 linux,default-trigger = "ide-disk";
39 };
40
41 fault {
42 gpios = <&mcu_pio 1 0>;
43 /* Keep LED on if BIOS detected hardware fault */
44 default-state = "keep";
45 };
46};
47
48run-control {
49 compatible = "gpio-leds";
50 red {
51 gpios = <&mpc8572 6 0>;
52 default-state = "off";
53 };
54 green {
55 gpios = <&mpc8572 7 0>;
56 default-state = "on";
57 };
58}
diff --git a/Documentation/devicetree/bindings/hwmon/ads1015.txt b/Documentation/devicetree/bindings/hwmon/ads1015.txt
new file mode 100644
index 000000000000..918a507d1159
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/ads1015.txt
@@ -0,0 +1,73 @@
1ADS1015 (I2C)
2
3This device is a 12-bit A-D converter with 4 inputs.
4
5The inputs can be used single ended or in certain differential combinations.
6
7For configuration all possible combinations are mapped to 8 channels:
8 0: Voltage over AIN0 and AIN1.
9 1: Voltage over AIN0 and AIN3.
10 2: Voltage over AIN1 and AIN3.
11 3: Voltage over AIN2 and AIN3.
12 4: Voltage over AIN0 and GND.
13 5: Voltage over AIN1 and GND.
14 6: Voltage over AIN2 and GND.
15 7: Voltage over AIN3 and GND.
16
17Each channel can be configured individually:
18 - pga is the programmable gain amplifier (values are full scale)
19 0: +/- 6.144 V
20 1: +/- 4.096 V
21 2: +/- 2.048 V (default)
22 3: +/- 1.024 V
23 4: +/- 0.512 V
24 5: +/- 0.256 V
25 - data_rate in samples per second
26 0: 128
27 1: 250
28 2: 490
29 3: 920
30 4: 1600 (default)
31 5: 2400
32 6: 3300
33
341) The /ads1015 node
35
36 Required properties:
37
38 - compatible : must be "ti,ads1015"
39 - reg : I2C bus address of the device
40 - #address-cells : must be <1>
41 - #size-cells : must be <0>
42
43 The node contains child nodes for each channel that the platform uses.
44
45 Example ADS1015 node:
46
47 ads1015@49 {
48 compatible = "ti,ads1015";
49 reg = <0x49>;
50 #address-cells = <1>;
51 #size-cells = <0>;
52
53 [ child node definitions... ]
54 }
55
562) channel nodes
57
58 Required properties:
59
60 - reg : the channel number
61
62 Optional properties:
63
64 - ti,gain : the programmable gain amplifier setting
65 - ti,datarate : the converter data rate
66
67 Example ADS1015 channel node:
68
69 channel@4 {
70 reg = <4>;
71 ti,gain = <3>;
72 ti,datarate = <5>;
73 };
diff --git a/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt b/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt
new file mode 100644
index 000000000000..569b16248514
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/ce4100-i2c.txt
@@ -0,0 +1,93 @@
1CE4100 I2C
2----------
3
4CE4100 has one PCI device which is described as the I2C-Controller. This
5PCI device has three PCI-bars, each bar contains a complete I2C
6controller. So we have a total of three independent I2C-Controllers
7which share only an interrupt line.
8The driver is probed via the PCI-ID and is gathering the information of
9attached devices from the devices tree.
10Grant Likely recommended to use the ranges property to map the PCI-Bar
11number to its physical address and to use this to find the child nodes
12of the specific I2C controller. This were his exact words:
13
14 Here's where the magic happens. Each entry in
15 ranges describes how the parent pci address space
16 (middle group of 3) is translated to the local
17 address space (first group of 2) and the size of
18 each range (last cell). In this particular case,
19 the first cell of the local address is chosen to be
20 1:1 mapped to the BARs, and the second is the
21 offset from be base of the BAR (which would be
22 non-zero if you had 2 or more devices mapped off
23 the same BAR)
24
25 ranges allows the address mapping to be described
26 in a way that the OS can interpret without
27 requiring custom device driver code.
28
29This is an example which is used on FalconFalls:
30------------------------------------------------
31 i2c-controller@b,2 {
32 #address-cells = <2>;
33 #size-cells = <1>;
34 compatible = "pci8086,2e68.2",
35 "pci8086,2e68",
36 "pciclass,ff0000",
37 "pciclass,ff00";
38
39 reg = <0x15a00 0x0 0x0 0x0 0x0>;
40 interrupts = <16 1>;
41
42 /* as described by Grant, the first number in the group of
43 * three is the bar number followed by the 64bit bar address
44 * followed by size of the mapping. The bar address
45 * requires also a valid translation in parents ranges
46 * property.
47 */
48 ranges = <0 0 0x02000000 0 0xdffe0500 0x100
49 1 0 0x02000000 0 0xdffe0600 0x100
50 2 0 0x02000000 0 0xdffe0700 0x100>;
51
52 i2c@0 {
53 #address-cells = <1>;
54 #size-cells = <0>;
55 compatible = "intel,ce4100-i2c-controller";
56
57 /* The first number in the reg property is the
58 * number of the bar
59 */
60 reg = <0 0 0x100>;
61
62 /* This I2C controller has no devices */
63 };
64
65 i2c@1 {
66 #address-cells = <1>;
67 #size-cells = <0>;
68 compatible = "intel,ce4100-i2c-controller";
69 reg = <1 0 0x100>;
70
71 /* This I2C controller has one gpio controller */
72 gpio@26 {
73 #gpio-cells = <2>;
74 compatible = "ti,pcf8575";
75 reg = <0x26>;
76 gpio-controller;
77 };
78 };
79
80 i2c@2 {
81 #address-cells = <1>;
82 #size-cells = <0>;
83 compatible = "intel,ce4100-i2c-controller";
84 reg = <2 0 0x100>;
85
86 gpio@26 {
87 #gpio-cells = <2>;
88 compatible = "ti,pcf8575";
89 reg = <0x26>;
90 gpio-controller;
91 };
92 };
93 };
diff --git a/Documentation/devicetree/bindings/i2c/fsl-i2c.txt b/Documentation/devicetree/bindings/i2c/fsl-i2c.txt
new file mode 100644
index 000000000000..1eacd6b20ed5
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/fsl-i2c.txt
@@ -0,0 +1,64 @@
1* I2C
2
3Required properties :
4
5 - reg : Offset and length of the register set for the device
6 - compatible : should be "fsl,CHIP-i2c" where CHIP is the name of a
7 compatible processor, e.g. mpc8313, mpc8543, mpc8544, mpc5121,
8 mpc5200 or mpc5200b. For the mpc5121, an additional node
9 "fsl,mpc5121-i2c-ctrl" is required as shown in the example below.
10
11Recommended properties :
12
13 - interrupts : <a b> where a is the interrupt number and b is a
14 field that represents an encoding of the sense and level
15 information for the interrupt. This should be encoded based on
16 the information in section 2) depending on the type of interrupt
17 controller you have.
18 - interrupt-parent : the phandle for the interrupt controller that
19 services interrupts for this device.
20 - fsl,preserve-clocking : boolean; if defined, the clock settings
21 from the bootloader are preserved (not touched).
22 - clock-frequency : desired I2C bus clock frequency in Hz.
23 - fsl,timeout : I2C bus timeout in microseconds.
24
25Examples :
26
27 /* MPC5121 based board */
28 i2c@1740 {
29 #address-cells = <1>;
30 #size-cells = <0>;
31 compatible = "fsl,mpc5121-i2c", "fsl-i2c";
32 reg = <0x1740 0x20>;
33 interrupts = <11 0x8>;
34 interrupt-parent = <&ipic>;
35 clock-frequency = <100000>;
36 };
37
38 i2ccontrol@1760 {
39 compatible = "fsl,mpc5121-i2c-ctrl";
40 reg = <0x1760 0x8>;
41 };
42
43 /* MPC5200B based board */
44 i2c@3d00 {
45 #address-cells = <1>;
46 #size-cells = <0>;
47 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
48 reg = <0x3d00 0x40>;
49 interrupts = <2 15 0>;
50 interrupt-parent = <&mpc5200_pic>;
51 fsl,preserve-clocking;
52 };
53
54 /* MPC8544 base board */
55 i2c@3100 {
56 #address-cells = <1>;
57 #size-cells = <0>;
58 compatible = "fsl,mpc8544-i2c", "fsl-i2c";
59 reg = <0x3100 0x100>;
60 interrupts = <43 2>;
61 interrupt-parent = <&mpic>;
62 clock-frequency = <400000>;
63 fsl,timeout = <10000>;
64 };
diff --git a/Documentation/devicetree/bindings/marvell.txt b/Documentation/devicetree/bindings/marvell.txt
new file mode 100644
index 000000000000..f1533d91953a
--- /dev/null
+++ b/Documentation/devicetree/bindings/marvell.txt
@@ -0,0 +1,521 @@
1Marvell Discovery mv64[345]6x System Controller chips
2===========================================================
3
4The Marvell mv64[345]60 series of system controller chips contain
5many of the peripherals needed to implement a complete computer
6system. In this section, we define device tree nodes to describe
7the system controller chip itself and each of the peripherals
8which it contains. Compatible string values for each node are
9prefixed with the string "marvell,", for Marvell Technology Group Ltd.
10
111) The /system-controller node
12
13 This node is used to represent the system-controller and must be
14 present when the system uses a system controller chip. The top-level
15 system-controller node contains information that is global to all
16 devices within the system controller chip. The node name begins
17 with "system-controller" followed by the unit address, which is
18 the base address of the memory-mapped register set for the system
19 controller chip.
20
21 Required properties:
22
23 - ranges : Describes the translation of system controller addresses
24 for memory mapped registers.
25 - clock-frequency: Contains the main clock frequency for the system
26 controller chip.
27 - reg : This property defines the address and size of the
28 memory-mapped registers contained within the system controller
29 chip. The address specified in the "reg" property should match
30 the unit address of the system-controller node.
31 - #address-cells : Address representation for system controller
32 devices. This field represents the number of cells needed to
33 represent the address of the memory-mapped registers of devices
34 within the system controller chip.
35 - #size-cells : Size representation for the memory-mapped
36 registers within the system controller chip.
37 - #interrupt-cells : Defines the width of cells used to represent
38 interrupts.
39
40 Optional properties:
41
42 - model : The specific model of the system controller chip. Such
43 as, "mv64360", "mv64460", or "mv64560".
44 - compatible : A string identifying the compatibility identifiers
45 of the system controller chip.
46
47 The system-controller node contains child nodes for each system
48 controller device that the platform uses. Nodes should not be created
49 for devices which exist on the system controller chip but are not used
50
51 Example Marvell Discovery mv64360 system-controller node:
52
53 system-controller@f1000000 { /* Marvell Discovery mv64360 */
54 #address-cells = <1>;
55 #size-cells = <1>;
56 model = "mv64360"; /* Default */
57 compatible = "marvell,mv64360";
58 clock-frequency = <133333333>;
59 reg = <0xf1000000 0x10000>;
60 virtual-reg = <0xf1000000>;
61 ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */
62 0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */
63 0xa0000000 0xa0000000 0x4000000 /* User FLASH */
64 0x00000000 0xf1000000 0x0010000 /* Bridge's regs */
65 0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */
66
67 [ child node definitions... ]
68 }
69
702) Child nodes of /system-controller
71
72 a) Marvell Discovery MDIO bus
73
74 The MDIO is a bus to which the PHY devices are connected. For each
75 device that exists on this bus, a child node should be created. See
76 the definition of the PHY node below for an example of how to define
77 a PHY.
78
79 Required properties:
80 - #address-cells : Should be <1>
81 - #size-cells : Should be <0>
82 - device_type : Should be "mdio"
83 - compatible : Should be "marvell,mv64360-mdio"
84
85 Example:
86
87 mdio {
88 #address-cells = <1>;
89 #size-cells = <0>;
90 device_type = "mdio";
91 compatible = "marvell,mv64360-mdio";
92
93 ethernet-phy@0 {
94 ......
95 };
96 };
97
98
99 b) Marvell Discovery ethernet controller
100
101 The Discover ethernet controller is described with two levels
102 of nodes. The first level describes an ethernet silicon block
103 and the second level describes up to 3 ethernet nodes within
104 that block. The reason for the multiple levels is that the
105 registers for the node are interleaved within a single set
106 of registers. The "ethernet-block" level describes the
107 shared register set, and the "ethernet" nodes describe ethernet
108 port-specific properties.
109
110 Ethernet block node
111
112 Required properties:
113 - #address-cells : <1>
114 - #size-cells : <0>
115 - compatible : "marvell,mv64360-eth-block"
116 - reg : Offset and length of the register set for this block
117
118 Example Discovery Ethernet block node:
119 ethernet-block@2000 {
120 #address-cells = <1>;
121 #size-cells = <0>;
122 compatible = "marvell,mv64360-eth-block";
123 reg = <0x2000 0x2000>;
124 ethernet@0 {
125 .......
126 };
127 };
128
129 Ethernet port node
130
131 Required properties:
132 - device_type : Should be "network".
133 - compatible : Should be "marvell,mv64360-eth".
134 - reg : Should be <0>, <1>, or <2>, according to which registers
135 within the silicon block the device uses.
136 - interrupts : <a> where a is the interrupt number for the port.
137 - interrupt-parent : the phandle for the interrupt controller
138 that services interrupts for this device.
139 - phy : the phandle for the PHY connected to this ethernet
140 controller.
141 - local-mac-address : 6 bytes, MAC address
142
143 Example Discovery Ethernet port node:
144 ethernet@0 {
145 device_type = "network";
146 compatible = "marvell,mv64360-eth";
147 reg = <0>;
148 interrupts = <32>;
149 interrupt-parent = <&PIC>;
150 phy = <&PHY0>;
151 local-mac-address = [ 00 00 00 00 00 00 ];
152 };
153
154
155
156 c) Marvell Discovery PHY nodes
157
158 Required properties:
159 - device_type : Should be "ethernet-phy"
160 - interrupts : <a> where a is the interrupt number for this phy.
161 - interrupt-parent : the phandle for the interrupt controller that
162 services interrupts for this device.
163 - reg : The ID number for the phy, usually a small integer
164
165 Example Discovery PHY node:
166 ethernet-phy@1 {
167 device_type = "ethernet-phy";
168 compatible = "broadcom,bcm5421";
169 interrupts = <76>; /* GPP 12 */
170 interrupt-parent = <&PIC>;
171 reg = <1>;
172 };
173
174
175 d) Marvell Discovery SDMA nodes
176
177 Represent DMA hardware associated with the MPSC (multiprotocol
178 serial controllers).
179
180 Required properties:
181 - compatible : "marvell,mv64360-sdma"
182 - reg : Offset and length of the register set for this device
183 - interrupts : <a> where a is the interrupt number for the DMA
184 device.
185 - interrupt-parent : the phandle for the interrupt controller
186 that services interrupts for this device.
187
188 Example Discovery SDMA node:
189 sdma@4000 {
190 compatible = "marvell,mv64360-sdma";
191 reg = <0x4000 0xc18>;
192 virtual-reg = <0xf1004000>;
193 interrupts = <36>;
194 interrupt-parent = <&PIC>;
195 };
196
197
198 e) Marvell Discovery BRG nodes
199
200 Represent baud rate generator hardware associated with the MPSC
201 (multiprotocol serial controllers).
202
203 Required properties:
204 - compatible : "marvell,mv64360-brg"
205 - reg : Offset and length of the register set for this device
206 - clock-src : A value from 0 to 15 which selects the clock
207 source for the baud rate generator. This value corresponds
208 to the CLKS value in the BRGx configuration register. See
209 the mv64x60 User's Manual.
210 - clock-frequence : The frequency (in Hz) of the baud rate
211 generator's input clock.
212 - current-speed : The current speed setting (presumably by
213 firmware) of the baud rate generator.
214
215 Example Discovery BRG node:
216 brg@b200 {
217 compatible = "marvell,mv64360-brg";
218 reg = <0xb200 0x8>;
219 clock-src = <8>;
220 clock-frequency = <133333333>;
221 current-speed = <9600>;
222 };
223
224
225 f) Marvell Discovery CUNIT nodes
226
227 Represent the Serial Communications Unit device hardware.
228
229 Required properties:
230 - reg : Offset and length of the register set for this device
231
232 Example Discovery CUNIT node:
233 cunit@f200 {
234 reg = <0xf200 0x200>;
235 };
236
237
238 g) Marvell Discovery MPSCROUTING nodes
239
240 Represent the Discovery's MPSC routing hardware
241
242 Required properties:
243 - reg : Offset and length of the register set for this device
244
245 Example Discovery CUNIT node:
246 mpscrouting@b500 {
247 reg = <0xb400 0xc>;
248 };
249
250
251 h) Marvell Discovery MPSCINTR nodes
252
253 Represent the Discovery's MPSC DMA interrupt hardware registers
254 (SDMA cause and mask registers).
255
256 Required properties:
257 - reg : Offset and length of the register set for this device
258
259 Example Discovery MPSCINTR node:
260 mpsintr@b800 {
261 reg = <0xb800 0x100>;
262 };
263
264
265 i) Marvell Discovery MPSC nodes
266
267 Represent the Discovery's MPSC (Multiprotocol Serial Controller)
268 serial port.
269
270 Required properties:
271 - device_type : "serial"
272 - compatible : "marvell,mv64360-mpsc"
273 - reg : Offset and length of the register set for this device
274 - sdma : the phandle for the SDMA node used by this port
275 - brg : the phandle for the BRG node used by this port
276 - cunit : the phandle for the CUNIT node used by this port
277 - mpscrouting : the phandle for the MPSCROUTING node used by this port
278 - mpscintr : the phandle for the MPSCINTR node used by this port
279 - cell-index : the hardware index of this cell in the MPSC core
280 - max_idle : value needed for MPSC CHR3 (Maximum Frame Length)
281 register
282 - interrupts : <a> where a is the interrupt number for the MPSC.
283 - interrupt-parent : the phandle for the interrupt controller
284 that services interrupts for this device.
285
286 Example Discovery MPSCINTR node:
287 mpsc@8000 {
288 device_type = "serial";
289 compatible = "marvell,mv64360-mpsc";
290 reg = <0x8000 0x38>;
291 virtual-reg = <0xf1008000>;
292 sdma = <&SDMA0>;
293 brg = <&BRG0>;
294 cunit = <&CUNIT>;
295 mpscrouting = <&MPSCROUTING>;
296 mpscintr = <&MPSCINTR>;
297 cell-index = <0>;
298 max_idle = <40>;
299 interrupts = <40>;
300 interrupt-parent = <&PIC>;
301 };
302
303
304 j) Marvell Discovery Watch Dog Timer nodes
305
306 Represent the Discovery's watchdog timer hardware
307
308 Required properties:
309 - compatible : "marvell,mv64360-wdt"
310 - reg : Offset and length of the register set for this device
311
312 Example Discovery Watch Dog Timer node:
313 wdt@b410 {
314 compatible = "marvell,mv64360-wdt";
315 reg = <0xb410 0x8>;
316 };
317
318
319 k) Marvell Discovery I2C nodes
320
321 Represent the Discovery's I2C hardware
322
323 Required properties:
324 - device_type : "i2c"
325 - compatible : "marvell,mv64360-i2c"
326 - reg : Offset and length of the register set for this device
327 - interrupts : <a> where a is the interrupt number for the I2C.
328 - interrupt-parent : the phandle for the interrupt controller
329 that services interrupts for this device.
330
331 Example Discovery I2C node:
332 compatible = "marvell,mv64360-i2c";
333 reg = <0xc000 0x20>;
334 virtual-reg = <0xf100c000>;
335 interrupts = <37>;
336 interrupt-parent = <&PIC>;
337 };
338
339
340 l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes
341
342 Represent the Discovery's PIC hardware
343
344 Required properties:
345 - #interrupt-cells : <1>
346 - #address-cells : <0>
347 - compatible : "marvell,mv64360-pic"
348 - reg : Offset and length of the register set for this device
349 - interrupt-controller
350
351 Example Discovery PIC node:
352 pic {
353 #interrupt-cells = <1>;
354 #address-cells = <0>;
355 compatible = "marvell,mv64360-pic";
356 reg = <0x0 0x88>;
357 interrupt-controller;
358 };
359
360
361 m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes
362
363 Represent the Discovery's MPP hardware
364
365 Required properties:
366 - compatible : "marvell,mv64360-mpp"
367 - reg : Offset and length of the register set for this device
368
369 Example Discovery MPP node:
370 mpp@f000 {
371 compatible = "marvell,mv64360-mpp";
372 reg = <0xf000 0x10>;
373 };
374
375
376 n) Marvell Discovery GPP (General Purpose Pins) nodes
377
378 Represent the Discovery's GPP hardware
379
380 Required properties:
381 - compatible : "marvell,mv64360-gpp"
382 - reg : Offset and length of the register set for this device
383
384 Example Discovery GPP node:
385 gpp@f000 {
386 compatible = "marvell,mv64360-gpp";
387 reg = <0xf100 0x20>;
388 };
389
390
391 o) Marvell Discovery PCI host bridge node
392
393 Represents the Discovery's PCI host bridge device. The properties
394 for this node conform to Rev 2.1 of the PCI Bus Binding to IEEE
395 1275-1994. A typical value for the compatible property is
396 "marvell,mv64360-pci".
397
398 Example Discovery PCI host bridge node
399 pci@80000000 {
400 #address-cells = <3>;
401 #size-cells = <2>;
402 #interrupt-cells = <1>;
403 device_type = "pci";
404 compatible = "marvell,mv64360-pci";
405 reg = <0xcf8 0x8>;
406 ranges = <0x01000000 0x0 0x0
407 0x88000000 0x0 0x01000000
408 0x02000000 0x0 0x80000000
409 0x80000000 0x0 0x08000000>;
410 bus-range = <0 255>;
411 clock-frequency = <66000000>;
412 interrupt-parent = <&PIC>;
413 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
414 interrupt-map = <
415 /* IDSEL 0x0a */
416 0x5000 0 0 1 &PIC 80
417 0x5000 0 0 2 &PIC 81
418 0x5000 0 0 3 &PIC 91
419 0x5000 0 0 4 &PIC 93
420
421 /* IDSEL 0x0b */
422 0x5800 0 0 1 &PIC 91
423 0x5800 0 0 2 &PIC 93
424 0x5800 0 0 3 &PIC 80
425 0x5800 0 0 4 &PIC 81
426
427 /* IDSEL 0x0c */
428 0x6000 0 0 1 &PIC 91
429 0x6000 0 0 2 &PIC 93
430 0x6000 0 0 3 &PIC 80
431 0x6000 0 0 4 &PIC 81
432
433 /* IDSEL 0x0d */
434 0x6800 0 0 1 &PIC 93
435 0x6800 0 0 2 &PIC 80
436 0x6800 0 0 3 &PIC 81
437 0x6800 0 0 4 &PIC 91
438 >;
439 };
440
441
442 p) Marvell Discovery CPU Error nodes
443
444 Represent the Discovery's CPU error handler device.
445
446 Required properties:
447 - compatible : "marvell,mv64360-cpu-error"
448 - reg : Offset and length of the register set for this device
449 - interrupts : the interrupt number for this device
450 - interrupt-parent : the phandle for the interrupt controller
451 that services interrupts for this device.
452
453 Example Discovery CPU Error node:
454 cpu-error@0070 {
455 compatible = "marvell,mv64360-cpu-error";
456 reg = <0x70 0x10 0x128 0x28>;
457 interrupts = <3>;
458 interrupt-parent = <&PIC>;
459 };
460
461
462 q) Marvell Discovery SRAM Controller nodes
463
464 Represent the Discovery's SRAM controller device.
465
466 Required properties:
467 - compatible : "marvell,mv64360-sram-ctrl"
468 - reg : Offset and length of the register set for this device
469 - interrupts : the interrupt number for this device
470 - interrupt-parent : the phandle for the interrupt controller
471 that services interrupts for this device.
472
473 Example Discovery SRAM Controller node:
474 sram-ctrl@0380 {
475 compatible = "marvell,mv64360-sram-ctrl";
476 reg = <0x380 0x80>;
477 interrupts = <13>;
478 interrupt-parent = <&PIC>;
479 };
480
481
482 r) Marvell Discovery PCI Error Handler nodes
483
484 Represent the Discovery's PCI error handler device.
485
486 Required properties:
487 - compatible : "marvell,mv64360-pci-error"
488 - reg : Offset and length of the register set for this device
489 - interrupts : the interrupt number for this device
490 - interrupt-parent : the phandle for the interrupt controller
491 that services interrupts for this device.
492
493 Example Discovery PCI Error Handler node:
494 pci-error@1d40 {
495 compatible = "marvell,mv64360-pci-error";
496 reg = <0x1d40 0x40 0xc28 0x4>;
497 interrupts = <12>;
498 interrupt-parent = <&PIC>;
499 };
500
501
502 s) Marvell Discovery Memory Controller nodes
503
504 Represent the Discovery's memory controller device.
505
506 Required properties:
507 - compatible : "marvell,mv64360-mem-ctrl"
508 - reg : Offset and length of the register set for this device
509 - interrupts : the interrupt number for this device
510 - interrupt-parent : the phandle for the interrupt controller
511 that services interrupts for this device.
512
513 Example Discovery Memory Controller node:
514 mem-ctrl@1400 {
515 compatible = "marvell,mv64360-mem-ctrl";
516 reg = <0x1400 0x60>;
517 interrupts = <17>;
518 interrupt-parent = <&PIC>;
519 };
520
521
diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
new file mode 100644
index 000000000000..64bcb8be973c
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
@@ -0,0 +1,29 @@
1* Freescale Enhanced Secure Digital Host Controller (eSDHC)
2
3The Enhanced Secure Digital Host Controller provides an interface
4for MMC, SD, and SDIO types of memory cards.
5
6Required properties:
7 - compatible : should be
8 "fsl,<chip>-esdhc", "fsl,esdhc"
9 - reg : should contain eSDHC registers location and length.
10 - interrupts : should contain eSDHC interrupt.
11 - interrupt-parent : interrupt source phandle.
12 - clock-frequency : specifies eSDHC base clock frequency.
13 - sdhci,wp-inverted : (optional) specifies that eSDHC controller
14 reports inverted write-protect state;
15 - sdhci,1-bit-only : (optional) specifies that a controller can
16 only handle 1-bit data transfers.
17 - sdhci,auto-cmd12: (optional) specifies that a controller can
18 only handle auto CMD12.
19
20Example:
21
22sdhci@2e000 {
23 compatible = "fsl,mpc8378-esdhc", "fsl,esdhc";
24 reg = <0x2e000 0x1000>;
25 interrupts = <42 0x8>;
26 interrupt-parent = <&ipic>;
27 /* Filled in by U-Boot */
28 clock-frequency = <0>;
29};
diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
new file mode 100644
index 000000000000..89a0084df2f7
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
@@ -0,0 +1,30 @@
1MMC/SD/SDIO slot directly connected to a SPI bus
2
3Required properties:
4- compatible : should be "mmc-spi-slot".
5- reg : should specify SPI address (chip-select number).
6- spi-max-frequency : maximum frequency for this device (Hz).
7- voltage-ranges : two cells are required, first cell specifies minimum
8 slot voltage (mV), second cell specifies maximum slot voltage (mV).
9 Several ranges could be specified.
10
11Optional properties:
12- gpios : may specify GPIOs in this order: Card-Detect GPIO,
13 Write-Protect GPIO.
14- interrupts : the interrupt of a card detect interrupt.
15- interrupt-parent : the phandle for the interrupt controller that
16 services interrupts for this device.
17
18Example:
19
20 mmc-slot@0 {
21 compatible = "fsl,mpc8323rdb-mmc-slot",
22 "mmc-spi-slot";
23 reg = <0>;
24 gpios = <&qe_pio_d 14 1
25 &qe_pio_d 15 0>;
26 voltage-ranges = <3300 3300>;
27 spi-max-frequency = <50000000>;
28 interrupts = <42>;
29 interrupt-parent = <&PIC>;
30 };
diff --git a/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
new file mode 100644
index 000000000000..00f1f546b32e
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt
@@ -0,0 +1,63 @@
1Freescale Localbus UPM programmed to work with NAND flash
2
3Required properties:
4- compatible : "fsl,upm-nand".
5- reg : should specify localbus chip select and size used for the chip.
6- fsl,upm-addr-offset : UPM pattern offset for the address latch.
7- fsl,upm-cmd-offset : UPM pattern offset for the command latch.
8
9Optional properties:
10- fsl,upm-wait-flags : add chip-dependent short delays after running the
11 UPM pattern (0x1), after writing a data byte (0x2) or after
12 writing out a buffer (0x4).
13- fsl,upm-addr-line-cs-offsets : address offsets for multi-chip support.
14 The corresponding address lines are used to select the chip.
15- gpios : may specify optional GPIOs connected to the Ready-Not-Busy pins
16 (R/B#). For multi-chip devices, "n" GPIO definitions are required
17 according to the number of chips.
18- chip-delay : chip dependent delay for transferring data from array to
19 read registers (tR). Required if property "gpios" is not used
20 (R/B# pins not connected).
21
22Examples:
23
24upm@1,0 {
25 compatible = "fsl,upm-nand";
26 reg = <1 0 1>;
27 fsl,upm-addr-offset = <16>;
28 fsl,upm-cmd-offset = <8>;
29 gpios = <&qe_pio_e 18 0>;
30
31 flash {
32 #address-cells = <1>;
33 #size-cells = <1>;
34 compatible = "...";
35
36 partition@0 {
37 ...
38 };
39 };
40};
41
42upm@3,0 {
43 #address-cells = <0>;
44 #size-cells = <0>;
45 compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
46 reg = <3 0x0 0x800>;
47 fsl,upm-addr-offset = <0x10>;
48 fsl,upm-cmd-offset = <0x08>;
49 /* Multi-chip NAND device */
50 fsl,upm-addr-line-cs-offsets = <0x0 0x200>;
51 fsl,upm-wait-flags = <0x5>;
52 chip-delay = <25>; // in micro-seconds
53
54 nand@0 {
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "fs";
60 reg = <0x00000000 0x10000000>;
61 };
62 };
63};
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
new file mode 100644
index 000000000000..80152cb567d9
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
@@ -0,0 +1,90 @@
1CFI or JEDEC memory-mapped NOR flash, MTD-RAM (NVRAM...)
2
3Flash chips (Memory Technology Devices) are often used for solid state
4file systems on embedded devices.
5
6 - compatible : should contain the specific model of mtd chip(s)
7 used, if known, followed by either "cfi-flash", "jedec-flash"
8 or "mtd-ram".
9 - reg : Address range(s) of the mtd chip(s)
10 It's possible to (optionally) define multiple "reg" tuples so that
11 non-identical chips can be described in one node.
12 - bank-width : Width (in bytes) of the bank. Equal to the
13 device width times the number of interleaved chips.
14 - device-width : (optional) Width of a single mtd chip. If
15 omitted, assumed to be equal to 'bank-width'.
16 - #address-cells, #size-cells : Must be present if the device has
17 sub-nodes representing partitions (see below). In this case
18 both #address-cells and #size-cells must be equal to 1.
19
20For JEDEC compatible devices, the following additional properties
21are defined:
22
23 - vendor-id : Contains the flash chip's vendor id (1 byte).
24 - device-id : Contains the flash chip's device id (1 byte).
25
26In addition to the information on the mtd bank itself, the
27device tree may optionally contain additional information
28describing partitions of the address space. This can be
29used on platforms which have strong conventions about which
30portions of a flash are used for what purposes, but which don't
31use an on-flash partition table such as RedBoot.
32
33Each partition is represented as a sub-node of the mtd device.
34Each node's name represents the name of the corresponding
35partition of the mtd device.
36
37Flash partitions
38 - reg : The partition's offset and size within the mtd bank.
39 - label : (optional) The label / name for this partition.
40 If omitted, the label is taken from the node name (excluding
41 the unit address).
42 - read-only : (optional) This parameter, if present, is a hint to
43 Linux that this partition should only be mounted
44 read-only. This is usually used for flash partitions
45 containing early-boot firmware images or data which should not
46 be clobbered.
47
48Example:
49
50 flash@ff000000 {
51 compatible = "amd,am29lv128ml", "cfi-flash";
52 reg = <ff000000 01000000>;
53 bank-width = <4>;
54 device-width = <1>;
55 #address-cells = <1>;
56 #size-cells = <1>;
57 fs@0 {
58 label = "fs";
59 reg = <0 f80000>;
60 };
61 firmware@f80000 {
62 label ="firmware";
63 reg = <f80000 80000>;
64 read-only;
65 };
66 };
67
68Here an example with multiple "reg" tuples:
69
70 flash@f0000000,0 {
71 #address-cells = <1>;
72 #size-cells = <1>;
73 compatible = "intel,PC48F4400P0VB", "cfi-flash";
74 reg = <0 0x00000000 0x02000000
75 0 0x02000000 0x02000000>;
76 bank-width = <2>;
77 partition@0 {
78 label = "test-part1";
79 reg = <0 0x04000000>;
80 };
81 };
82
83An example using SRAM:
84
85 sram@2,0 {
86 compatible = "samsung,k6f1616u6a", "mtd-ram";
87 reg = <2 0 0x00200000>;
88 bank-width = <2>;
89 };
90
diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
new file mode 100755
index 000000000000..1a729f089866
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
@@ -0,0 +1,61 @@
1CAN Device Tree Bindings
2------------------------
32011 Freescale Semiconductor, Inc.
4
5fsl,flexcan-v1.0 nodes
6-----------------------
7In addition to the required compatible-, reg- and interrupt-properties, you can
8also specify which clock source shall be used for the controller.
9
10CPI Clock- Can Protocol Interface Clock
11 This CLK_SRC bit of CTRL(control register) selects the clock source to
12 the CAN Protocol Interface(CPI) to be either the peripheral clock
13 (driven by the PLL) or the crystal oscillator clock. The selected clock
14 is the one fed to the prescaler to generate the Serial Clock (Sclock).
15 The PRESDIV field of CTRL(control register) controls a prescaler that
16 generates the Serial Clock (Sclock), whose period defines the
17 time quantum used to compose the CAN waveform.
18
19Can Engine Clock Source
20 There are two sources for CAN clock
21 - Platform Clock It represents the bus clock
22 - Oscillator Clock
23
24 Peripheral Clock (PLL)
25 --------------
26 |
27 --------- -------------
28 | |CPI Clock | Prescaler | Sclock
29 | |---------------->| (1.. 256) |------------>
30 --------- -------------
31 | |
32 -------------- ---------------------CLK_SRC
33 Oscillator Clock
34
35- fsl,flexcan-clock-source : CAN Engine Clock Source.This property selects
36 the peripheral clock. PLL clock is fed to the
37 prescaler to generate the Serial Clock (Sclock).
38 Valid values are "oscillator" and "platform"
39 "oscillator": CAN engine clock source is oscillator clock.
40 "platform" The CAN engine clock source is the bus clock
41 (platform clock).
42
43- fsl,flexcan-clock-divider : for the reference and system clock, an additional
44 clock divider can be specified.
45- clock-frequency: frequency required to calculate the bitrate for FlexCAN.
46
47Note:
48 - v1.0 of flexcan-v1.0 represent the IP block version for P1010 SOC.
49 - P1010 does not have oscillator as the Clock Source.So the default
50 Clock Source is platform clock.
51Examples:
52
53 can0@1c000 {
54 compatible = "fsl,flexcan-v1.0";
55 reg = <0x1c000 0x1000>;
56 interrupts = <48 0x2>;
57 interrupt-parent = <&mpic>;
58 fsl,flexcan-clock-source = "platform";
59 fsl,flexcan-clock-divider = <2>;
60 clock-frequency = <fixed by u-boot>;
61 };
diff --git a/Documentation/devicetree/bindings/net/can/mpc5xxx-mscan.txt b/Documentation/devicetree/bindings/net/can/mpc5xxx-mscan.txt
new file mode 100644
index 000000000000..2fa4fcd38fd6
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/mpc5xxx-mscan.txt
@@ -0,0 +1,53 @@
1CAN Device Tree Bindings
2------------------------
3
4(c) 2006-2009 Secret Lab Technologies Ltd
5Grant Likely <grant.likely@secretlab.ca>
6
7fsl,mpc5200-mscan nodes
8-----------------------
9In addition to the required compatible-, reg- and interrupt-properties, you can
10also specify which clock source shall be used for the controller:
11
12- fsl,mscan-clock-source : a string describing the clock source. Valid values
13 are: "ip" for ip bus clock
14 "ref" for reference clock (XTAL)
15 "ref" is default in case this property is not
16 present.
17
18fsl,mpc5121-mscan nodes
19-----------------------
20In addition to the required compatible-, reg- and interrupt-properties, you can
21also specify which clock source and divider shall be used for the controller:
22
23- fsl,mscan-clock-source : a string describing the clock source. Valid values
24 are: "ip" for ip bus clock
25 "ref" for reference clock
26 "sys" for system clock
27 If this property is not present, an optimal CAN
28 clock source and frequency based on the system
29 clock will be selected. If this is not possible,
30 the reference clock will be used.
31
32- fsl,mscan-clock-divider: for the reference and system clock, an additional
33 clock divider can be specified. By default, a
34 value of 1 is used.
35
36Note that the MPC5121 Rev. 1 processor is not supported.
37
38Examples:
39 can@1300 {
40 compatible = "fsl,mpc5121-mscan";
41 interrupts = <12 0x8>;
42 interrupt-parent = <&ipic>;
43 reg = <0x1300 0x80>;
44 };
45
46 can@1380 {
47 compatible = "fsl,mpc5121-mscan";
48 interrupts = <13 0x8>;
49 interrupt-parent = <&ipic>;
50 reg = <0x1380 0x80>;
51 fsl,mscan-clock-source = "ref";
52 fsl,mscan-clock-divider = <3>;
53 };
diff --git a/Documentation/devicetree/bindings/net/can/sja1000.txt b/Documentation/devicetree/bindings/net/can/sja1000.txt
new file mode 100644
index 000000000000..c2dbcec0ee31
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/sja1000.txt
@@ -0,0 +1,53 @@
1Memory mapped SJA1000 CAN controller from NXP (formerly Philips)
2
3Required properties:
4
5- compatible : should be "nxp,sja1000".
6
7- reg : should specify the chip select, address offset and size required
8 to map the registers of the SJA1000. The size is usually 0x80.
9
10- interrupts: property with a value describing the interrupt source
11 (number and sensitivity) required for the SJA1000.
12
13Optional properties:
14
15- nxp,external-clock-frequency : Frequency of the external oscillator
16 clock in Hz. Note that the internal clock frequency used by the
17 SJA1000 is half of that value. If not specified, a default value
18 of 16000000 (16 MHz) is used.
19
20- nxp,tx-output-mode : operation mode of the TX output control logic:
21 <0x0> : bi-phase output mode
22 <0x1> : normal output mode (default)
23 <0x2> : test output mode
24 <0x3> : clock output mode
25
26- nxp,tx-output-config : TX output pin configuration:
27 <0x01> : TX0 invert
28 <0x02> : TX0 pull-down (default)
29 <0x04> : TX0 pull-up
30 <0x06> : TX0 push-pull
31 <0x08> : TX1 invert
32 <0x10> : TX1 pull-down
33 <0x20> : TX1 pull-up
34 <0x30> : TX1 push-pull
35
36- nxp,clock-out-frequency : clock frequency in Hz on the CLKOUT pin.
37 If not specified or if the specified value is 0, the CLKOUT pin
38 will be disabled.
39
40- nxp,no-comparator-bypass : Allows to disable the CAN input comperator.
41
42For further information, please have a look to the SJA1000 data sheet.
43
44Examples:
45
46can@3,100 {
47 compatible = "nxp,sja1000";
48 reg = <3 0x100 0x80>;
49 interrupts = <2 0>;
50 interrupt-parent = <&mpic>;
51 nxp,external-clock-frequency = <16000000>;
52};
53
diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
new file mode 100644
index 000000000000..2c6be0377f55
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
@@ -0,0 +1,130 @@
1* MDIO IO device
2
3The MDIO is a bus to which the PHY devices are connected. For each
4device that exists on this bus, a child node should be created. See
5the definition of the PHY node in booting-without-of.txt for an example
6of how to define a PHY.
7
8Required properties:
9 - reg : Offset and length of the register set for the device
10 - compatible : Should define the compatible device type for the
11 mdio. Currently, this is most likely to be "fsl,gianfar-mdio"
12
13Example:
14
15 mdio@24520 {
16 reg = <24520 20>;
17 compatible = "fsl,gianfar-mdio";
18
19 ethernet-phy@0 {
20 ......
21 };
22 };
23
24* TBI Internal MDIO bus
25
26As of this writing, every tsec is associated with an internal TBI PHY.
27This PHY is accessed through the local MDIO bus. These buses are defined
28similarly to the mdio buses, except they are compatible with "fsl,gianfar-tbi".
29The TBI PHYs underneath them are similar to normal PHYs, but the reg property
30is considered instructive, rather than descriptive. The reg property should
31be chosen so it doesn't interfere with other PHYs on the bus.
32
33* Gianfar-compatible ethernet nodes
34
35Properties:
36
37 - device_type : Should be "network"
38 - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC"
39 - compatible : Should be "gianfar"
40 - reg : Offset and length of the register set for the device
41 - local-mac-address : List of bytes representing the ethernet address of
42 this controller
43 - interrupts : For FEC devices, the first interrupt is the device's
44 interrupt. For TSEC and eTSEC devices, the first interrupt is
45 transmit, the second is receive, and the third is error.
46 - phy-handle : The phandle for the PHY connected to this ethernet
47 controller.
48 - fixed-link : <a b c d e> where a is emulated phy id - choose any,
49 but unique to the all specified fixed-links, b is duplex - 0 half,
50 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
51 pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
52 - phy-connection-type : a string naming the controller/PHY interface type,
53 i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii",
54 "tbi", or "rtbi". This property is only really needed if the connection
55 is of type "rgmii-id", as all other connection types are detected by
56 hardware.
57 - fsl,magic-packet : If present, indicates that the hardware supports
58 waking up via magic packet.
59 - bd-stash : If present, indicates that the hardware supports stashing
60 buffer descriptors in the L2.
61 - rx-stash-len : Denotes the number of bytes of a received buffer to stash
62 in the L2.
63 - rx-stash-idx : Denotes the index of the first byte from the received
64 buffer to stash in the L2.
65
66Example:
67 ethernet@24000 {
68 device_type = "network";
69 model = "TSEC";
70 compatible = "gianfar";
71 reg = <0x24000 0x1000>;
72 local-mac-address = [ 00 E0 0C 00 73 00 ];
73 interrupts = <29 2 30 2 34 2>;
74 interrupt-parent = <&mpic>;
75 phy-handle = <&phy0>
76 };
77
78* Gianfar PTP clock nodes
79
80General Properties:
81
82 - compatible Should be "fsl,etsec-ptp"
83 - reg Offset and length of the register set for the device
84 - interrupts There should be at least two interrupts. Some devices
85 have as many as four PTP related interrupts.
86
87Clock Properties:
88
89 - fsl,tclk-period Timer reference clock period in nanoseconds.
90 - fsl,tmr-prsc Prescaler, divides the output clock.
91 - fsl,tmr-add Frequency compensation value.
92 - fsl,tmr-fiper1 Fixed interval period pulse generator.
93 - fsl,tmr-fiper2 Fixed interval period pulse generator.
94 - fsl,max-adj Maximum frequency adjustment in parts per billion.
95
96 These properties set the operational parameters for the PTP
97 clock. You must choose these carefully for the clock to work right.
98 Here is how to figure good values:
99
100 TimerOsc = system clock MHz
101 tclk_period = desired clock period nanoseconds
102 NominalFreq = 1000 / tclk_period MHz
103 FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0)
104 tmr_add = ceil(2^32 / FreqDivRatio)
105 OutputClock = NominalFreq / tmr_prsc MHz
106 PulseWidth = 1 / OutputClock microseconds
107 FiperFreq1 = desired frequency in Hz
108 FiperDiv1 = 1000000 * OutputClock / FiperFreq1
109 tmr_fiper1 = tmr_prsc * tclk_period * FiperDiv1 - tclk_period
110 max_adj = 1000000000 * (FreqDivRatio - 1.0) - 1
111
112 The calculation for tmr_fiper2 is the same as for tmr_fiper1. The
113 driver expects that tmr_fiper1 will be correctly set to produce a 1
114 Pulse Per Second (PPS) signal, since this will be offered to the PPS
115 subsystem to synchronize the Linux clock.
116
117Example:
118
119 ptp_clock@24E00 {
120 compatible = "fsl,etsec-ptp";
121 reg = <0x24E00 0xB0>;
122 interrupts = <12 0x8 13 0x8>;
123 interrupt-parent = < &ipic >;
124 fsl,tclk-period = <10>;
125 fsl,tmr-prsc = <100>;
126 fsl,tmr-add = <0x999999A4>;
127 fsl,tmr-fiper1 = <0x3B9AC9F6>;
128 fsl,tmr-fiper2 = <0x00018696>;
129 fsl,max-adj = <659999998>;
130 };
diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.txt b/Documentation/devicetree/bindings/net/mdio-gpio.txt
new file mode 100644
index 000000000000..bc9549529014
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/mdio-gpio.txt
@@ -0,0 +1,19 @@
1MDIO on GPIOs
2
3Currently defined compatibles:
4- virtual,gpio-mdio
5
6MDC and MDIO lines connected to GPIO controllers are listed in the
7gpios property as described in section VIII.1 in the following order:
8
9MDC, MDIO.
10
11Example:
12
13mdio {
14 compatible = "virtual,mdio-gpio";
15 #address-cells = <1>;
16 #size-cells = <0>;
17 gpios = <&qe_pio_a 11
18 &qe_pio_c 6>;
19};
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
new file mode 100644
index 000000000000..bb8c742eb8c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/phy.txt
@@ -0,0 +1,25 @@
1PHY nodes
2
3Required properties:
4
5 - device_type : Should be "ethernet-phy"
6 - interrupts : <a b> where a is the interrupt number and b is a
7 field that represents an encoding of the sense and level
8 information for the interrupt. This should be encoded based on
9 the information in section 2) depending on the type of interrupt
10 controller you have.
11 - interrupt-parent : the phandle for the interrupt controller that
12 services interrupts for this device.
13 - reg : The ID number for the phy, usually a small integer
14 - linux,phandle : phandle for this node; likely referenced by an
15 ethernet controller node.
16
17Example:
18
19ethernet-phy@0 {
20 linux,phandle = <2452000>
21 interrupt-parent = <40000>;
22 interrupts = <35 1>;
23 reg = <0>;
24 device_type = "ethernet-phy";
25};
diff --git a/Documentation/devicetree/bindings/open-pic.txt b/Documentation/devicetree/bindings/open-pic.txt
new file mode 100644
index 000000000000..909a902dff85
--- /dev/null
+++ b/Documentation/devicetree/bindings/open-pic.txt
@@ -0,0 +1,98 @@
1* Open PIC Binding
2
3This binding specifies what properties must be available in the device tree
4representation of an Open PIC compliant interrupt controller. This binding is
5based on the binding defined for Open PIC in [1] and is a superset of that
6binding.
7
8Required properties:
9
10 NOTE: Many of these descriptions were paraphrased here from [1] to aid
11 readability.
12
13 - compatible: Specifies the compatibility list for the PIC. The type
14 shall be <string> and the value shall include "open-pic".
15
16 - reg: Specifies the base physical address(s) and size(s) of this
17 PIC's addressable register space. The type shall be <prop-encoded-array>.
18
19 - interrupt-controller: The presence of this property identifies the node
20 as an Open PIC. No property value shall be defined.
21
22 - #interrupt-cells: Specifies the number of cells needed to encode an
23 interrupt source. The type shall be a <u32> and the value shall be 2.
24
25 - #address-cells: Specifies the number of cells needed to encode an
26 address. The type shall be <u32> and the value shall be 0. As such,
27 'interrupt-map' nodes do not have to specify a parent unit address.
28
29Optional properties:
30
31 - pic-no-reset: The presence of this property indicates that the PIC
32 shall not be reset during runtime initialization. No property value shall
33 be defined. The presence of this property also mandates that any
34 initialization related to interrupt sources shall be limited to sources
35 explicitly referenced in the device tree.
36
37* Interrupt Specifier Definition
38
39 Interrupt specifiers consists of 2 cells encoded as
40 follows:
41
42 - <1st-cell>: The interrupt-number that identifies the interrupt source.
43
44 - <2nd-cell>: The level-sense information, encoded as follows:
45 0 = low-to-high edge triggered
46 1 = active low level-sensitive
47 2 = active high level-sensitive
48 3 = high-to-low edge triggered
49
50* Examples
51
52Example 1:
53
54 /*
55 * An Open PIC interrupt controller
56 */
57 mpic: pic@40000 {
58 // This is an interrupt controller node.
59 interrupt-controller;
60
61 // No address cells so that 'interrupt-map' nodes which reference
62 // this Open PIC node do not need a parent address specifier.
63 #address-cells = <0>;
64
65 // Two cells to encode interrupt sources.
66 #interrupt-cells = <2>;
67
68 // Offset address of 0x40000 and size of 0x40000.
69 reg = <0x40000 0x40000>;
70
71 // Compatible with Open PIC.
72 compatible = "open-pic";
73
74 // The PIC shall not be reset.
75 pic-no-reset;
76 };
77
78Example 2:
79
80 /*
81 * An interrupt generating device that is wired to an Open PIC.
82 */
83 serial0: serial@4500 {
84 // Interrupt source '42' that is active high level-sensitive.
85 // Note that there are only two cells as specified in the interrupt
86 // parent's '#interrupt-cells' property.
87 interrupts = <42 2>;
88
89 // The interrupt controller that this device is wired to.
90 interrupt-parent = <&mpic>;
91 };
92
93* References
94
95[1] Power.org (TM) Standard for Embedded Power Architecture (TM) Platform
96 Requirements (ePAPR), Version 1.0, July 2008.
97 (http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf)
98
diff --git a/Documentation/devicetree/bindings/pci/83xx-512x-pci.txt b/Documentation/devicetree/bindings/pci/83xx-512x-pci.txt
new file mode 100644
index 000000000000..35a465362408
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/83xx-512x-pci.txt
@@ -0,0 +1,40 @@
1* Freescale 83xx and 512x PCI bridges
2
3Freescale 83xx and 512x SOCs include the same pci bridge core.
4
583xx/512x specific notes:
6- reg: should contain two address length tuples
7 The first is for the internal pci bridge registers
8 The second is for the pci config space access registers
9
10Example (MPC8313ERDB)
11 pci0: pci@e0008500 {
12 cell-index = <1>;
13 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
14 interrupt-map = <
15 /* IDSEL 0x0E -mini PCI */
16 0x7000 0x0 0x0 0x1 &ipic 18 0x8
17 0x7000 0x0 0x0 0x2 &ipic 18 0x8
18 0x7000 0x0 0x0 0x3 &ipic 18 0x8
19 0x7000 0x0 0x0 0x4 &ipic 18 0x8
20
21 /* IDSEL 0x0F - PCI slot */
22 0x7800 0x0 0x0 0x1 &ipic 17 0x8
23 0x7800 0x0 0x0 0x2 &ipic 18 0x8
24 0x7800 0x0 0x0 0x3 &ipic 17 0x8
25 0x7800 0x0 0x0 0x4 &ipic 18 0x8>;
26 interrupt-parent = <&ipic>;
27 interrupts = <66 0x8>;
28 bus-range = <0x0 0x0>;
29 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
30 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
31 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
32 clock-frequency = <66666666>;
33 #interrupt-cells = <1>;
34 #size-cells = <2>;
35 #address-cells = <3>;
36 reg = <0xe0008500 0x100 /* internal registers */
37 0xe0008300 0x8>; /* config space access registers */
38 compatible = "fsl,mpc8349-pci";
39 device_type = "pci";
40 };
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/cpm.txt b/Documentation/devicetree/bindings/powerpc/4xx/cpm.txt
new file mode 100644
index 000000000000..ee459806d35e
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/4xx/cpm.txt
@@ -0,0 +1,52 @@
1PPC4xx Clock Power Management (CPM) node
2
3Required properties:
4 - compatible : compatible list, currently only "ibm,cpm"
5 - dcr-access-method : "native"
6 - dcr-reg : < DCR register range >
7
8Optional properties:
9 - er-offset : All 4xx SoCs with a CPM controller have
10 one of two different order for the CPM
11 registers. Some have the CPM registers
12 in the following order (ER,FR,SR). The
13 others have them in the following order
14 (SR,ER,FR). For the second case set
15 er-offset = <1>.
16 - unused-units : specifier consist of one cell. For each
17 bit in the cell, the corresponding bit
18 in CPM will be set to turn off unused
19 devices.
20 - idle-doze : specifier consist of one cell. For each
21 bit in the cell, the corresponding bit
22 in CPM will be set to turn off unused
23 devices. This is usually just CPM[CPU].
24 - standby : specifier consist of one cell. For each
25 bit in the cell, the corresponding bit
26 in CPM will be set on standby and
27 restored on resume.
28 - suspend : specifier consist of one cell. For each
29 bit in the cell, the corresponding bit
30 in CPM will be set on suspend (mem) and
31 restored on resume. Note, for standby
32 and suspend the corresponding bits can
33 be different or the same. Usually for
34 standby only class 2 and 3 units are set.
35 However, the interface does not care.
36 If they are the same, the additional
37 power saving will be seeing if support
38 is available to put the DDR in self
39 refresh mode and any additional power
40 saving techniques for the specific SoC.
41
42Example:
43 CPM0: cpm {
44 compatible = "ibm,cpm";
45 dcr-access-method = "native";
46 dcr-reg = <0x160 0x003>;
47 er-offset = <0>;
48 unused-units = <0x00000100>;
49 idle-doze = <0x02000000>;
50 standby = <0xfeff0000>;
51 suspend = <0xfeff791d>;
52};
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/emac.txt b/Documentation/devicetree/bindings/powerpc/4xx/emac.txt
new file mode 100644
index 000000000000..2161334a7ca5
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/4xx/emac.txt
@@ -0,0 +1,148 @@
1 4xx/Axon EMAC ethernet nodes
2
3 The EMAC ethernet controller in IBM and AMCC 4xx chips, and also
4 the Axon bridge. To operate this needs to interact with a ths
5 special McMAL DMA controller, and sometimes an RGMII or ZMII
6 interface. In addition to the nodes and properties described
7 below, the node for the OPB bus on which the EMAC sits must have a
8 correct clock-frequency property.
9
10 i) The EMAC node itself
11
12 Required properties:
13 - device_type : "network"
14
15 - compatible : compatible list, contains 2 entries, first is
16 "ibm,emac-CHIP" where CHIP is the host ASIC (440gx,
17 405gp, Axon) and second is either "ibm,emac" or
18 "ibm,emac4". For Axon, thus, we have: "ibm,emac-axon",
19 "ibm,emac4"
20 - interrupts : <interrupt mapping for EMAC IRQ and WOL IRQ>
21 - interrupt-parent : optional, if needed for interrupt mapping
22 - reg : <registers mapping>
23 - local-mac-address : 6 bytes, MAC address
24 - mal-device : phandle of the associated McMAL node
25 - mal-tx-channel : 1 cell, index of the tx channel on McMAL associated
26 with this EMAC
27 - mal-rx-channel : 1 cell, index of the rx channel on McMAL associated
28 with this EMAC
29 - cell-index : 1 cell, hardware index of the EMAC cell on a given
30 ASIC (typically 0x0 and 0x1 for EMAC0 and EMAC1 on
31 each Axon chip)
32 - max-frame-size : 1 cell, maximum frame size supported in bytes
33 - rx-fifo-size : 1 cell, Rx fifo size in bytes for 10 and 100 Mb/sec
34 operations.
35 For Axon, 2048
36 - tx-fifo-size : 1 cell, Tx fifo size in bytes for 10 and 100 Mb/sec
37 operations.
38 For Axon, 2048.
39 - fifo-entry-size : 1 cell, size of a fifo entry (used to calculate
40 thresholds).
41 For Axon, 0x00000010
42 - mal-burst-size : 1 cell, MAL burst size (used to calculate thresholds)
43 in bytes.
44 For Axon, 0x00000100 (I think ...)
45 - phy-mode : string, mode of operations of the PHY interface.
46 Supported values are: "mii", "rmii", "smii", "rgmii",
47 "tbi", "gmii", rtbi", "sgmii".
48 For Axon on CAB, it is "rgmii"
49 - mdio-device : 1 cell, required iff using shared MDIO registers
50 (440EP). phandle of the EMAC to use to drive the
51 MDIO lines for the PHY used by this EMAC.
52 - zmii-device : 1 cell, required iff connected to a ZMII. phandle of
53 the ZMII device node
54 - zmii-channel : 1 cell, required iff connected to a ZMII. Which ZMII
55 channel or 0xffffffff if ZMII is only used for MDIO.
56 - rgmii-device : 1 cell, required iff connected to an RGMII. phandle
57 of the RGMII device node.
58 For Axon: phandle of plb5/plb4/opb/rgmii
59 - rgmii-channel : 1 cell, required iff connected to an RGMII. Which
60 RGMII channel is used by this EMAC.
61 Fox Axon: present, whatever value is appropriate for each
62 EMAC, that is the content of the current (bogus) "phy-port"
63 property.
64
65 Optional properties:
66 - phy-address : 1 cell, optional, MDIO address of the PHY. If absent,
67 a search is performed.
68 - phy-map : 1 cell, optional, bitmap of addresses to probe the PHY
69 for, used if phy-address is absent. bit 0x00000001 is
70 MDIO address 0.
71 For Axon it can be absent, though my current driver
72 doesn't handle phy-address yet so for now, keep
73 0x00ffffff in it.
74 - rx-fifo-size-gige : 1 cell, Rx fifo size in bytes for 1000 Mb/sec
75 operations (if absent the value is the same as
76 rx-fifo-size). For Axon, either absent or 2048.
77 - tx-fifo-size-gige : 1 cell, Tx fifo size in bytes for 1000 Mb/sec
78 operations (if absent the value is the same as
79 tx-fifo-size). For Axon, either absent or 2048.
80 - tah-device : 1 cell, optional. If connected to a TAH engine for
81 offload, phandle of the TAH device node.
82 - tah-channel : 1 cell, optional. If appropriate, channel used on the
83 TAH engine.
84
85 Example:
86
87 EMAC0: ethernet@40000800 {
88 device_type = "network";
89 compatible = "ibm,emac-440gp", "ibm,emac";
90 interrupt-parent = <&UIC1>;
91 interrupts = <1c 4 1d 4>;
92 reg = <40000800 70>;
93 local-mac-address = [00 04 AC E3 1B 1E];
94 mal-device = <&MAL0>;
95 mal-tx-channel = <0 1>;
96 mal-rx-channel = <0>;
97 cell-index = <0>;
98 max-frame-size = <5dc>;
99 rx-fifo-size = <1000>;
100 tx-fifo-size = <800>;
101 phy-mode = "rmii";
102 phy-map = <00000001>;
103 zmii-device = <&ZMII0>;
104 zmii-channel = <0>;
105 };
106
107 ii) McMAL node
108
109 Required properties:
110 - device_type : "dma-controller"
111 - compatible : compatible list, containing 2 entries, first is
112 "ibm,mcmal-CHIP" where CHIP is the host ASIC (like
113 emac) and the second is either "ibm,mcmal" or
114 "ibm,mcmal2".
115 For Axon, "ibm,mcmal-axon","ibm,mcmal2"
116 - interrupts : <interrupt mapping for the MAL interrupts sources:
117 5 sources: tx_eob, rx_eob, serr, txde, rxde>.
118 For Axon: This is _different_ from the current
119 firmware. We use the "delayed" interrupts for txeob
120 and rxeob. Thus we end up with mapping those 5 MPIC
121 interrupts, all level positive sensitive: 10, 11, 32,
122 33, 34 (in decimal)
123 - dcr-reg : < DCR registers range >
124 - dcr-parent : if needed for dcr-reg
125 - num-tx-chans : 1 cell, number of Tx channels
126 - num-rx-chans : 1 cell, number of Rx channels
127
128 iii) ZMII node
129
130 Required properties:
131 - compatible : compatible list, containing 2 entries, first is
132 "ibm,zmii-CHIP" where CHIP is the host ASIC (like
133 EMAC) and the second is "ibm,zmii".
134 For Axon, there is no ZMII node.
135 - reg : <registers mapping>
136
137 iv) RGMII node
138
139 Required properties:
140 - compatible : compatible list, containing 2 entries, first is
141 "ibm,rgmii-CHIP" where CHIP is the host ASIC (like
142 EMAC) and the second is "ibm,rgmii".
143 For Axon, "ibm,rgmii-axon","ibm,rgmii"
144 - reg : <registers mapping>
145 - revision : as provided by the RGMII new version register if
146 available.
147 For Axon: 0x0000012a
148
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/ndfc.txt b/Documentation/devicetree/bindings/powerpc/4xx/ndfc.txt
new file mode 100644
index 000000000000..869f0b5f16e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/4xx/ndfc.txt
@@ -0,0 +1,39 @@
1AMCC NDFC (NanD Flash Controller)
2
3Required properties:
4- compatible : "ibm,ndfc".
5- reg : should specify chip select and size used for the chip (0x2000).
6
7Optional properties:
8- ccr : NDFC config and control register value (default 0).
9- bank-settings : NDFC bank configuration register value (default 0).
10
11Notes:
12- partition(s) - follows the OF MTD standard for partitions
13
14Example:
15
16ndfc@1,0 {
17 compatible = "ibm,ndfc";
18 reg = <0x00000001 0x00000000 0x00002000>;
19 ccr = <0x00001000>;
20 bank-settings = <0x80002222>;
21 #address-cells = <1>;
22 #size-cells = <1>;
23
24 nand {
25 #address-cells = <1>;
26 #size-cells = <1>;
27
28 partition@0 {
29 label = "kernel";
30 reg = <0x00000000 0x00200000>;
31 };
32 partition@200000 {
33 label = "root";
34 reg = <0x00200000 0x03E00000>;
35 };
36 };
37};
38
39
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/ppc440spe-adma.txt b/Documentation/devicetree/bindings/powerpc/4xx/ppc440spe-adma.txt
new file mode 100644
index 000000000000..515ebcf1b97d
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/4xx/ppc440spe-adma.txt
@@ -0,0 +1,93 @@
1PPC440SPe DMA/XOR (DMA Controller and XOR Accelerator)
2
3Device nodes needed for operation of the ppc440spe-adma driver
4are specified hereby. These are I2O/DMA, DMA and XOR nodes
5for DMA engines and Memory Queue Module node. The latter is used
6by ADMA driver for configuration of RAID-6 H/W capabilities of
7the PPC440SPe. In addition to the nodes and properties described
8below, the ranges property of PLB node must specify ranges for
9DMA devices.
10
11 i) The I2O node
12
13 Required properties:
14
15 - compatible : "ibm,i2o-440spe";
16 - reg : <registers mapping>
17 - dcr-reg : <DCR registers range>
18
19 Example:
20
21 I2O: i2o@400100000 {
22 compatible = "ibm,i2o-440spe";
23 reg = <0x00000004 0x00100000 0x100>;
24 dcr-reg = <0x060 0x020>;
25 };
26
27
28 ii) The DMA node
29
30 Required properties:
31
32 - compatible : "ibm,dma-440spe";
33 - cell-index : 1 cell, hardware index of the DMA engine
34 (typically 0x0 and 0x1 for DMA0 and DMA1)
35 - reg : <registers mapping>
36 - dcr-reg : <DCR registers range>
37 - interrupts : <interrupt mapping for DMA0/1 interrupts sources:
38 2 sources: DMAx CS FIFO Needs Service IRQ (on UIC0)
39 and DMA Error IRQ (on UIC1). The latter is common
40 for both DMA engines>.
41 - interrupt-parent : needed for interrupt mapping
42
43 Example:
44
45 DMA0: dma0@400100100 {
46 compatible = "ibm,dma-440spe";
47 cell-index = <0>;
48 reg = <0x00000004 0x00100100 0x100>;
49 dcr-reg = <0x060 0x020>;
50 interrupt-parent = <&DMA0>;
51 interrupts = <0 1>;
52 #interrupt-cells = <1>;
53 #address-cells = <0>;
54 #size-cells = <0>;
55 interrupt-map = <
56 0 &UIC0 0x14 4
57 1 &UIC1 0x16 4>;
58 };
59
60
61 iii) XOR Accelerator node
62
63 Required properties:
64
65 - compatible : "amcc,xor-accelerator";
66 - reg : <registers mapping>
67 - interrupts : <interrupt mapping for XOR interrupt source>
68 - interrupt-parent : for interrupt mapping
69
70 Example:
71
72 xor-accel@400200000 {
73 compatible = "amcc,xor-accelerator";
74 reg = <0x00000004 0x00200000 0x400>;
75 interrupt-parent = <&UIC1>;
76 interrupts = <0x1f 4>;
77 };
78
79
80 iv) Memory Queue Module node
81
82 Required properties:
83
84 - compatible : "ibm,mq-440spe";
85 - dcr-reg : <DCR registers range>
86
87 Example:
88
89 MQ0: mq {
90 compatible = "ibm,mq-440spe";
91 dcr-reg = <0x040 0x020>;
92 };
93
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt b/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt
new file mode 100644
index 000000000000..d7217260589c
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt
@@ -0,0 +1,18 @@
1Reboot property to control system reboot on PPC4xx systems:
2
3By setting "reset_type" to one of the following values, the default
4software reset mechanism may be overidden. Here the possible values of
5"reset_type":
6
7 1 - PPC4xx core reset
8 2 - PPC4xx chip reset
9 3 - PPC4xx system reset (default)
10
11Example:
12
13 cpu@0 {
14 device_type = "cpu";
15 model = "PowerPC,440SPe";
16 ...
17 reset-type = <2>; /* Use chip-reset */
18 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
new file mode 100644
index 000000000000..39e941515a36
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
@@ -0,0 +1,63 @@
1* Board Control and Status (BCSR)
2
3Required properties:
4
5 - compatible : Should be "fsl,<board>-bcsr"
6 - reg : Offset and length of the register set for the device
7
8Example:
9
10 bcsr@f8000000 {
11 compatible = "fsl,mpc8360mds-bcsr";
12 reg = <f8000000 8000>;
13 };
14
15* Freescale on board FPGA
16
17This is the memory-mapped registers for on board FPGA.
18
19Required properities:
20- compatible : should be "fsl,fpga-pixis".
21- reg : should contain the address and the length of the FPPGA register
22 set.
23- interrupt-parent: should specify phandle for the interrupt controller.
24- interrupts : should specify event (wakeup) IRQ.
25
26Example (MPC8610HPCD):
27
28 board-control@e8000000 {
29 compatible = "fsl,fpga-pixis";
30 reg = <0xe8000000 32>;
31 interrupt-parent = <&mpic>;
32 interrupts = <8 8>;
33 };
34
35* Freescale BCSR GPIO banks
36
37Some BCSR registers act as simple GPIO controllers, each such
38register can be represented by the gpio-controller node.
39
40Required properities:
41- compatible : Should be "fsl,<board>-bcsr-gpio".
42- reg : Should contain the address and the length of the GPIO bank
43 register.
44- #gpio-cells : Should be two. The first cell is the pin number and the
45 second cell is used to specify optional parameters (currently unused).
46- gpio-controller : Marks the port as GPIO controller.
47
48Example:
49
50 bcsr@1,0 {
51 #address-cells = <1>;
52 #size-cells = <1>;
53 compatible = "fsl,mpc8360mds-bcsr";
54 reg = <1 0 0x8000>;
55 ranges = <0 1 0 0x8000>;
56
57 bcsr13: gpio-controller@d {
58 #gpio-cells = <2>;
59 compatible = "fsl,mpc8360mds-bcsr-gpio";
60 reg = <0xd 1>;
61 gpio-controller;
62 };
63 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cache_sram.txt b/Documentation/devicetree/bindings/powerpc/fsl/cache_sram.txt
new file mode 100644
index 000000000000..781955f5217d
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cache_sram.txt
@@ -0,0 +1,20 @@
1* Freescale PQ3 and QorIQ based Cache SRAM
2
3Freescale's mpc85xx and some QorIQ platforms provide an
4option of configuring a part of (or full) cache memory
5as SRAM. This cache SRAM representation in the device
6tree should be done as under:-
7
8Required properties:
9
10- compatible : should be "fsl,p2020-cache-sram"
11- fsl,cache-sram-ctlr-handle : points to the L2 controller
12- reg : offset and length of the cache-sram.
13
14Example:
15
16cache-sram@fff00000 {
17 fsl,cache-sram-ctlr-handle = <&L2>;
18 reg = <0 0xfff00000 0 0x10000>;
19 compatible = "fsl,p2020-cache-sram";
20};
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm.txt
new file mode 100644
index 000000000000..160c752484b4
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm.txt
@@ -0,0 +1,67 @@
1* Freescale Communications Processor Module
2
3NOTE: This is an interim binding, and will likely change slightly,
4as more devices are supported. The QE bindings especially are
5incomplete.
6
7* Root CPM node
8
9Properties:
10- compatible : "fsl,cpm1", "fsl,cpm2", or "fsl,qe".
11- reg : A 48-byte region beginning with CPCR.
12
13Example:
14 cpm@119c0 {
15 #address-cells = <1>;
16 #size-cells = <1>;
17 #interrupt-cells = <2>;
18 compatible = "fsl,mpc8272-cpm", "fsl,cpm2";
19 reg = <119c0 30>;
20 }
21
22* Properties common to multiple CPM/QE devices
23
24- fsl,cpm-command : This value is ORed with the opcode and command flag
25 to specify the device on which a CPM command operates.
26
27- fsl,cpm-brg : Indicates which baud rate generator the device
28 is associated with. If absent, an unused BRG
29 should be dynamically allocated. If zero, the
30 device uses an external clock rather than a BRG.
31
32- reg : Unless otherwise specified, the first resource represents the
33 scc/fcc/ucc registers, and the second represents the device's
34 parameter RAM region (if it has one).
35
36* Multi-User RAM (MURAM)
37
38The multi-user/dual-ported RAM is expressed as a bus under the CPM node.
39
40Ranges must be set up subject to the following restrictions:
41
42- Children's reg nodes must be offsets from the start of all muram, even
43 if the user-data area does not begin at zero.
44- If multiple range entries are used, the difference between the parent
45 address and the child address must be the same in all, so that a single
46 mapping can cover them all while maintaining the ability to determine
47 CPM-side offsets with pointer subtraction. It is recommended that
48 multiple range entries not be used.
49- A child address of zero must be translatable, even if no reg resources
50 contain it.
51
52A child "data" node must exist, compatible with "fsl,cpm-muram-data", to
53indicate the portion of muram that is usable by the OS for arbitrary
54purposes. The data node may have an arbitrary number of reg resources,
55all of which contribute to the allocatable muram pool.
56
57Example, based on mpc8272:
58 muram@0 {
59 #address-cells = <1>;
60 #size-cells = <1>;
61 ranges = <0 0 10000>;
62
63 data@0 {
64 compatible = "fsl,cpm-muram-data";
65 reg = <0 2000 9800 800>;
66 };
67 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/brg.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/brg.txt
new file mode 100644
index 000000000000..4c7d45eaf025
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/brg.txt
@@ -0,0 +1,21 @@
1* Baud Rate Generators
2
3Currently defined compatibles:
4fsl,cpm-brg
5fsl,cpm1-brg
6fsl,cpm2-brg
7
8Properties:
9- reg : There may be an arbitrary number of reg resources; BRG
10 numbers are assigned to these in order.
11- clock-frequency : Specifies the base frequency driving
12 the BRG.
13
14Example:
15 brg@119f0 {
16 compatible = "fsl,mpc8272-brg",
17 "fsl,cpm2-brg",
18 "fsl,cpm-brg";
19 reg = <119f0 10 115f0 10>;
20 clock-frequency = <d#25000000>;
21 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/i2c.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/i2c.txt
new file mode 100644
index 000000000000..87bc6048667e
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/i2c.txt
@@ -0,0 +1,41 @@
1* I2C
2
3The I2C controller is expressed as a bus under the CPM node.
4
5Properties:
6- compatible : "fsl,cpm1-i2c", "fsl,cpm2-i2c"
7- reg : On CPM2 devices, the second resource doesn't specify the I2C
8 Parameter RAM itself, but the I2C_BASE field of the CPM2 Parameter RAM
9 (typically 0x8afc 0x2).
10- #address-cells : Should be one. The cell is the i2c device address with
11 the r/w bit set to zero.
12- #size-cells : Should be zero.
13- clock-frequency : Can be used to set the i2c clock frequency. If
14 unspecified, a default frequency of 60kHz is being used.
15The following two properties are deprecated. They are only used by legacy
16i2c drivers to find the bus to probe:
17- linux,i2c-index : Can be used to hard code an i2c bus number. By default,
18 the bus number is dynamically assigned by the i2c core.
19- linux,i2c-class : Can be used to override the i2c class. The class is used
20 by legacy i2c device drivers to find a bus in a specific context like
21 system management, video or sound. By default, I2C_CLASS_HWMON (1) is
22 being used. The definition of the classes can be found in
23 include/i2c/i2c.h
24
25Example, based on mpc823:
26
27 i2c@860 {
28 compatible = "fsl,mpc823-i2c",
29 "fsl,cpm1-i2c";
30 reg = <0x860 0x20 0x3c80 0x30>;
31 interrupts = <16>;
32 interrupt-parent = <&CPM_PIC>;
33 fsl,cpm-command = <0x10>;
34 #address-cells = <1>;
35 #size-cells = <0>;
36
37 rtc@68 {
38 compatible = "dallas,ds1307";
39 reg = <0x68>;
40 };
41 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/pic.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/pic.txt
new file mode 100644
index 000000000000..8e3ee1681618
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/pic.txt
@@ -0,0 +1,18 @@
1* Interrupt Controllers
2
3Currently defined compatibles:
4- fsl,cpm1-pic
5 - only one interrupt cell
6- fsl,pq1-pic
7- fsl,cpm2-pic
8 - second interrupt cell is level/sense:
9 - 2 is falling edge
10 - 8 is active low
11
12Example:
13 interrupt-controller@10c00 {
14 #interrupt-cells = <2>;
15 interrupt-controller;
16 reg = <10c00 80>;
17 compatible = "mpc8272-pic", "fsl,cpm2-pic";
18 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/usb.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/usb.txt
new file mode 100644
index 000000000000..74bfda4bb824
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/cpm/usb.txt
@@ -0,0 +1,15 @@
1* USB (Universal Serial Bus Controller)
2
3Properties:
4- compatible : "fsl,cpm1-usb", "fsl,cpm2-usb", "fsl,qe-usb"
5
6Example:
7 usb@11bc0 {
8 #address-cells = <1>;
9 #size-cells = <0>;
10 compatible = "fsl,cpm2-usb";
11 reg = <11b60 18 8b00 100>;
12 interrupts = <b 8>;
13 interrupt-parent = <&PIC>;
14 fsl,cpm-command = <2e600000>;
15 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/gpio.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/gpio.txt
new file mode 100644
index 000000000000..349f79fd7076
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/gpio.txt
@@ -0,0 +1,38 @@
1Every GPIO controller node must have #gpio-cells property defined,
2this information will be used to translate gpio-specifiers.
3
4On CPM1 devices, all ports are using slightly different register layouts.
5Ports A, C and D are 16bit ports and Ports B and E are 32bit ports.
6
7On CPM2 devices, all ports are 32bit ports and use a common register layout.
8
9Required properties:
10- compatible : "fsl,cpm1-pario-bank-a", "fsl,cpm1-pario-bank-b",
11 "fsl,cpm1-pario-bank-c", "fsl,cpm1-pario-bank-d",
12 "fsl,cpm1-pario-bank-e", "fsl,cpm2-pario-bank"
13- #gpio-cells : Should be two. The first cell is the pin number and the
14 second cell is used to specify optional parameters (currently unused).
15- gpio-controller : Marks the port as GPIO controller.
16
17Example of three SOC GPIO banks defined as gpio-controller nodes:
18
19 CPM1_PIO_A: gpio-controller@950 {
20 #gpio-cells = <2>;
21 compatible = "fsl,cpm1-pario-bank-a";
22 reg = <0x950 0x10>;
23 gpio-controller;
24 };
25
26 CPM1_PIO_B: gpio-controller@ab8 {
27 #gpio-cells = <2>;
28 compatible = "fsl,cpm1-pario-bank-b";
29 reg = <0xab8 0x10>;
30 gpio-controller;
31 };
32
33 CPM1_PIO_E: gpio-controller@ac8 {
34 #gpio-cells = <2>;
35 compatible = "fsl,cpm1-pario-bank-e";
36 reg = <0xac8 0x18>;
37 gpio-controller;
38 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/network.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/network.txt
new file mode 100644
index 000000000000..0e4269446580
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/network.txt
@@ -0,0 +1,45 @@
1* Network
2
3Currently defined compatibles:
4- fsl,cpm1-scc-enet
5- fsl,cpm2-scc-enet
6- fsl,cpm1-fec-enet
7- fsl,cpm2-fcc-enet (third resource is GFEMR)
8- fsl,qe-enet
9
10Example:
11
12 ethernet@11300 {
13 device_type = "network";
14 compatible = "fsl,mpc8272-fcc-enet",
15 "fsl,cpm2-fcc-enet";
16 reg = <11300 20 8400 100 11390 1>;
17 local-mac-address = [ 00 00 00 00 00 00 ];
18 interrupts = <20 8>;
19 interrupt-parent = <&PIC>;
20 phy-handle = <&PHY0>;
21 fsl,cpm-command = <12000300>;
22 };
23
24* MDIO
25
26Currently defined compatibles:
27fsl,pq1-fec-mdio (reg is same as first resource of FEC device)
28fsl,cpm2-mdio-bitbang (reg is port C registers)
29
30Properties for fsl,cpm2-mdio-bitbang:
31fsl,mdio-pin : pin of port C controlling mdio data
32fsl,mdc-pin : pin of port C controlling mdio clock
33
34Example:
35 mdio@10d40 {
36 device_type = "mdio";
37 compatible = "fsl,mpc8272ads-mdio-bitbang",
38 "fsl,mpc8272-mdio-bitbang",
39 "fsl,cpm2-mdio-bitbang";
40 reg = <10d40 14>;
41 #address-cells = <1>;
42 #size-cells = <0>;
43 fsl,mdio-pin = <12>;
44 fsl,mdc-pin = <13>;
45 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe.txt
new file mode 100644
index 000000000000..4f8930263dd9
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe.txt
@@ -0,0 +1,115 @@
1* Freescale QUICC Engine module (QE)
2This represents qe module that is installed on PowerQUICC II Pro.
3
4NOTE: This is an interim binding; it should be updated to fit
5in with the CPM binding later in this document.
6
7Basically, it is a bus of devices, that could act more or less
8as a complete entity (UCC, USB etc ). All of them should be siblings on
9the "root" qe node, using the common properties from there.
10The description below applies to the qe of MPC8360 and
11more nodes and properties would be extended in the future.
12
13i) Root QE device
14
15Required properties:
16- compatible : should be "fsl,qe";
17- model : precise model of the QE, Can be "QE", "CPM", or "CPM2"
18- reg : offset and length of the device registers.
19- bus-frequency : the clock frequency for QUICC Engine.
20- fsl,qe-num-riscs: define how many RISC engines the QE has.
21- fsl,qe-num-snums: define how many serial number(SNUM) the QE can use for the
22 threads.
23
24Optional properties:
25- fsl,firmware-phandle:
26 Usage: required only if there is no fsl,qe-firmware child node
27 Value type: <phandle>
28 Definition: Points to a firmware node (see "QE Firmware Node" below)
29 that contains the firmware that should be uploaded for this QE.
30 The compatible property for the firmware node should say,
31 "fsl,qe-firmware".
32
33Recommended properties
34- brg-frequency : the internal clock source frequency for baud-rate
35 generators in Hz.
36
37Example:
38 qe@e0100000 {
39 #address-cells = <1>;
40 #size-cells = <1>;
41 #interrupt-cells = <2>;
42 compatible = "fsl,qe";
43 ranges = <0 e0100000 00100000>;
44 reg = <e0100000 480>;
45 brg-frequency = <0>;
46 bus-frequency = <179A7B00>;
47 }
48
49* Multi-User RAM (MURAM)
50
51Required properties:
52- compatible : should be "fsl,qe-muram", "fsl,cpm-muram".
53- mode : the could be "host" or "slave".
54- ranges : Should be defined as specified in 1) to describe the
55 translation of MURAM addresses.
56- data-only : sub-node which defines the address area under MURAM
57 bus that can be allocated as data/parameter
58
59Example:
60
61 muram@10000 {
62 compatible = "fsl,qe-muram", "fsl,cpm-muram";
63 ranges = <0 00010000 0000c000>;
64
65 data-only@0{
66 compatible = "fsl,qe-muram-data",
67 "fsl,cpm-muram-data";
68 reg = <0 c000>;
69 };
70 };
71
72* QE Firmware Node
73
74This node defines a firmware binary that is embedded in the device tree, for
75the purpose of passing the firmware from bootloader to the kernel, or from
76the hypervisor to the guest.
77
78The firmware node itself contains the firmware binary contents, a compatible
79property, and any firmware-specific properties. The node should be placed
80inside a QE node that needs it. Doing so eliminates the need for a
81fsl,firmware-phandle property. Other QE nodes that need the same firmware
82should define an fsl,firmware-phandle property that points to the firmware node
83in the first QE node.
84
85The fsl,firmware property can be specified in the DTS (possibly using incbin)
86or can be inserted by the boot loader at boot time.
87
88Required properties:
89 - compatible
90 Usage: required
91 Value type: <string>
92 Definition: A standard property. Specify a string that indicates what
93 kind of firmware it is. For QE, this should be "fsl,qe-firmware".
94
95 - fsl,firmware
96 Usage: required
97 Value type: <prop-encoded-array>, encoded as an array of bytes
98 Definition: A standard property. This property contains the firmware
99 binary "blob".
100
101Example:
102 qe1@e0080000 {
103 compatible = "fsl,qe";
104 qe_firmware:qe-firmware {
105 compatible = "fsl,qe-firmware";
106 fsl,firmware = [0x70 0xcd 0x00 0x00 0x01 0x46 0x45 ...];
107 };
108 ...
109 };
110
111 qe2@e0090000 {
112 compatible = "fsl,qe";
113 fsl,firmware-phandle = <&qe_firmware>;
114 ...
115 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/firmware.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/firmware.txt
new file mode 100644
index 000000000000..249db3a15d15
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/firmware.txt
@@ -0,0 +1,24 @@
1* Uploaded QE firmware
2
3 If a new firmware has been uploaded to the QE (usually by the
4 boot loader), then a 'firmware' child node should be added to the QE
5 node. This node provides information on the uploaded firmware that
6 device drivers may need.
7
8 Required properties:
9 - id: The string name of the firmware. This is taken from the 'id'
10 member of the qe_firmware structure of the uploaded firmware.
11 Device drivers can search this string to determine if the
12 firmware they want is already present.
13 - extended-modes: The Extended Modes bitfield, taken from the
14 firmware binary. It is a 64-bit number represented
15 as an array of two 32-bit numbers.
16 - virtual-traps: The virtual traps, taken from the firmware binary.
17 It is an array of 8 32-bit numbers.
18
19Example:
20 firmware {
21 id = "Soft-UART";
22 extended-modes = <0 0>;
23 virtual-traps = <0 0 0 0 0 0 0 0>;
24 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/par_io.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/par_io.txt
new file mode 100644
index 000000000000..60984260207b
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/par_io.txt
@@ -0,0 +1,51 @@
1* Parallel I/O Ports
2
3This node configures Parallel I/O ports for CPUs with QE support.
4The node should reside in the "soc" node of the tree. For each
5device that using parallel I/O ports, a child node should be created.
6See the definition of the Pin configuration nodes below for more
7information.
8
9Required properties:
10- device_type : should be "par_io".
11- reg : offset to the register set and its length.
12- num-ports : number of Parallel I/O ports
13
14Example:
15par_io@1400 {
16 reg = <1400 100>;
17 #address-cells = <1>;
18 #size-cells = <0>;
19 device_type = "par_io";
20 num-ports = <7>;
21 ucc_pin@01 {
22 ......
23 };
24
25Note that "par_io" nodes are obsolete, and should not be used for
26the new device trees. Instead, each Par I/O bank should be represented
27via its own gpio-controller node:
28
29Required properties:
30- #gpio-cells : should be "2".
31- compatible : should be "fsl,<chip>-qe-pario-bank",
32 "fsl,mpc8323-qe-pario-bank".
33- reg : offset to the register set and its length.
34- gpio-controller : node to identify gpio controllers.
35
36Example:
37 qe_pio_a: gpio-controller@1400 {
38 #gpio-cells = <2>;
39 compatible = "fsl,mpc8360-qe-pario-bank",
40 "fsl,mpc8323-qe-pario-bank";
41 reg = <0x1400 0x18>;
42 gpio-controller;
43 };
44
45 qe_pio_e: gpio-controller@1460 {
46 #gpio-cells = <2>;
47 compatible = "fsl,mpc8360-qe-pario-bank",
48 "fsl,mpc8323-qe-pario-bank";
49 reg = <0x1460 0x18>;
50 gpio-controller;
51 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/pincfg.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/pincfg.txt
new file mode 100644
index 000000000000..c5b43061db3a
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/pincfg.txt
@@ -0,0 +1,60 @@
1* Pin configuration nodes
2
3Required properties:
4- linux,phandle : phandle of this node; likely referenced by a QE
5 device.
6- pio-map : array of pin configurations. Each pin is defined by 6
7 integers. The six numbers are respectively: port, pin, dir,
8 open_drain, assignment, has_irq.
9 - port : port number of the pin; 0-6 represent port A-G in UM.
10 - pin : pin number in the port.
11 - dir : direction of the pin, should encode as follows:
12
13 0 = The pin is disabled
14 1 = The pin is an output
15 2 = The pin is an input
16 3 = The pin is I/O
17
18 - open_drain : indicates the pin is normal or wired-OR:
19
20 0 = The pin is actively driven as an output
21 1 = The pin is an open-drain driver. As an output, the pin is
22 driven active-low, otherwise it is three-stated.
23
24 - assignment : function number of the pin according to the Pin Assignment
25 tables in User Manual. Each pin can have up to 4 possible functions in
26 QE and two options for CPM.
27 - has_irq : indicates if the pin is used as source of external
28 interrupts.
29
30Example:
31 ucc_pin@01 {
32 linux,phandle = <140001>;
33 pio-map = <
34 /* port pin dir open_drain assignment has_irq */
35 0 3 1 0 1 0 /* TxD0 */
36 0 4 1 0 1 0 /* TxD1 */
37 0 5 1 0 1 0 /* TxD2 */
38 0 6 1 0 1 0 /* TxD3 */
39 1 6 1 0 3 0 /* TxD4 */
40 1 7 1 0 1 0 /* TxD5 */
41 1 9 1 0 2 0 /* TxD6 */
42 1 a 1 0 2 0 /* TxD7 */
43 0 9 2 0 1 0 /* RxD0 */
44 0 a 2 0 1 0 /* RxD1 */
45 0 b 2 0 1 0 /* RxD2 */
46 0 c 2 0 1 0 /* RxD3 */
47 0 d 2 0 1 0 /* RxD4 */
48 1 1 2 0 2 0 /* RxD5 */
49 1 0 2 0 2 0 /* RxD6 */
50 1 4 2 0 2 0 /* RxD7 */
51 0 7 1 0 1 0 /* TX_EN */
52 0 8 1 0 1 0 /* TX_ER */
53 0 f 2 0 1 0 /* RX_DV */
54 0 10 2 0 1 0 /* RX_ER */
55 0 0 2 0 1 0 /* RX_CLK */
56 2 9 1 0 3 0 /* GTX_CLK - CLK10 */
57 2 8 2 0 1 0>; /* GTX125 - CLK9 */
58 };
59
60
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/ucc.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/ucc.txt
new file mode 100644
index 000000000000..e47734bee3f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/ucc.txt
@@ -0,0 +1,70 @@
1* UCC (Unified Communications Controllers)
2
3Required properties:
4- device_type : should be "network", "hldc", "uart", "transparent"
5 "bisync", "atm", or "serial".
6- compatible : could be "ucc_geth" or "fsl_atm" and so on.
7- cell-index : the ucc number(1-8), corresponding to UCCx in UM.
8- reg : Offset and length of the register set for the device
9- interrupts : <a b> where a is the interrupt number and b is a
10 field that represents an encoding of the sense and level
11 information for the interrupt. This should be encoded based on
12 the information in section 2) depending on the type of interrupt
13 controller you have.
14- interrupt-parent : the phandle for the interrupt controller that
15 services interrupts for this device.
16- pio-handle : The phandle for the Parallel I/O port configuration.
17- port-number : for UART drivers, the port number to use, between 0 and 3.
18 This usually corresponds to the /dev/ttyQE device, e.g. <0> = /dev/ttyQE0.
19 The port number is added to the minor number of the device. Unlike the
20 CPM UART driver, the port-number is required for the QE UART driver.
21- soft-uart : for UART drivers, if specified this means the QE UART device
22 driver should use "Soft-UART" mode, which is needed on some SOCs that have
23 broken UART hardware. Soft-UART is provided via a microcode upload.
24- rx-clock-name: the UCC receive clock source
25 "none": clock source is disabled
26 "brg1" through "brg16": clock source is BRG1-BRG16, respectively
27 "clk1" through "clk24": clock source is CLK1-CLK24, respectively
28- tx-clock-name: the UCC transmit clock source
29 "none": clock source is disabled
30 "brg1" through "brg16": clock source is BRG1-BRG16, respectively
31 "clk1" through "clk24": clock source is CLK1-CLK24, respectively
32The following two properties are deprecated. rx-clock has been replaced
33with rx-clock-name, and tx-clock has been replaced with tx-clock-name.
34Drivers that currently use the deprecated properties should continue to
35do so, in order to support older device trees, but they should be updated
36to check for the new properties first.
37- rx-clock : represents the UCC receive clock source.
38 0x00 : clock source is disabled;
39 0x1~0x10 : clock source is BRG1~BRG16 respectively;
40 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively.
41- tx-clock: represents the UCC transmit clock source;
42 0x00 : clock source is disabled;
43 0x1~0x10 : clock source is BRG1~BRG16 respectively;
44 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively.
45
46Required properties for network device_type:
47- mac-address : list of bytes representing the ethernet address.
48- phy-handle : The phandle for the PHY connected to this controller.
49
50Recommended properties:
51- phy-connection-type : a string naming the controller/PHY interface type,
52 i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal
53 Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only),
54 "tbi", or "rtbi".
55
56Example:
57 ucc@2000 {
58 device_type = "network";
59 compatible = "ucc_geth";
60 cell-index = <1>;
61 reg = <2000 200>;
62 interrupts = <a0 0>;
63 interrupt-parent = <700>;
64 mac-address = [ 00 04 9f 00 23 23 ];
65 rx-clock = "none";
66 tx-clock = "clk9";
67 phy-handle = <212000>;
68 phy-connection-type = "gmii";
69 pio-handle = <140001>;
70 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/usb.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/usb.txt
new file mode 100644
index 000000000000..9ccd5f30405b
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/usb.txt
@@ -0,0 +1,37 @@
1Freescale QUICC Engine USB Controller
2
3Required properties:
4- compatible : should be "fsl,<chip>-qe-usb", "fsl,mpc8323-qe-usb".
5- reg : the first two cells should contain usb registers location and
6 length, the next two two cells should contain PRAM location and
7 length.
8- interrupts : should contain USB interrupt.
9- interrupt-parent : interrupt source phandle.
10- fsl,fullspeed-clock : specifies the full speed USB clock source:
11 "none": clock source is disabled
12 "brg1" through "brg16": clock source is BRG1-BRG16, respectively
13 "clk1" through "clk24": clock source is CLK1-CLK24, respectively
14- fsl,lowspeed-clock : specifies the low speed USB clock source:
15 "none": clock source is disabled
16 "brg1" through "brg16": clock source is BRG1-BRG16, respectively
17 "clk1" through "clk24": clock source is CLK1-CLK24, respectively
18- hub-power-budget : USB power budget for the root hub, in mA.
19- gpios : should specify GPIOs in this order: USBOE, USBTP, USBTN, USBRP,
20 USBRN, SPEED (optional), and POWER (optional).
21
22Example:
23
24usb@6c0 {
25 compatible = "fsl,mpc8360-qe-usb", "fsl,mpc8323-qe-usb";
26 reg = <0x6c0 0x40 0x8b00 0x100>;
27 interrupts = <11>;
28 interrupt-parent = <&qeic>;
29 fsl,fullspeed-clock = "clk21";
30 gpios = <&qe_pio_b 2 0 /* USBOE */
31 &qe_pio_b 3 0 /* USBTP */
32 &qe_pio_b 8 0 /* USBTN */
33 &qe_pio_b 9 0 /* USBRP */
34 &qe_pio_b 11 0 /* USBRN */
35 &qe_pio_e 20 0 /* SPEED */
36 &qe_pio_e 21 0 /* POWER */>;
37};
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/serial.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/serial.txt
new file mode 100644
index 000000000000..2ea76d9d137c
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/serial.txt
@@ -0,0 +1,32 @@
1* Serial
2
3Currently defined compatibles:
4- fsl,cpm1-smc-uart
5- fsl,cpm2-smc-uart
6- fsl,cpm1-scc-uart
7- fsl,cpm2-scc-uart
8- fsl,qe-uart
9
10Modem control lines connected to GPIO controllers are listed in the gpios
11property as described in booting-without-of.txt, section IX.1 in the following
12order:
13
14CTS, RTS, DCD, DSR, DTR, and RI.
15
16The gpios property is optional and can be left out when control lines are
17not used.
18
19Example:
20
21 serial@11a00 {
22 device_type = "serial";
23 compatible = "fsl,mpc8272-scc-uart",
24 "fsl,cpm2-scc-uart";
25 reg = <11a00 20 8000 100>;
26 interrupts = <28 8>;
27 interrupt-parent = <&PIC>;
28 fsl,cpm-brg = <1>;
29 fsl,cpm-command = <00800000>;
30 gpios = <&gpio_c 15 0
31 &gpio_d 29 0>;
32 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/diu.txt b/Documentation/devicetree/bindings/powerpc/fsl/diu.txt
new file mode 100644
index 000000000000..b66cb6d31d69
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/diu.txt
@@ -0,0 +1,34 @@
1* Freescale Display Interface Unit
2
3The Freescale DIU is a LCD controller, with proper hardware, it can also
4drive DVI monitors.
5
6Required properties:
7- compatible : should be "fsl,diu" or "fsl,mpc5121-diu".
8- reg : should contain at least address and length of the DIU register
9 set.
10- interrupts : one DIU interrupt should be described here.
11- interrupt-parent : the phandle for the interrupt controller that
12 services interrupts for this device.
13
14Optional properties:
15- edid : verbatim EDID data block describing attached display.
16 Data from the detailed timing descriptor will be used to
17 program the display controller.
18
19Example (MPC8610HPCD):
20 display@2c000 {
21 compatible = "fsl,diu";
22 reg = <0x2c000 100>;
23 interrupts = <72 2>;
24 interrupt-parent = <&mpic>;
25 };
26
27Example for MPC5121:
28 display@2100 {
29 compatible = "fsl,mpc5121-diu";
30 reg = <0x2100 0x100>;
31 interrupts = <64 0x8>;
32 interrupt-parent = <&ipic>;
33 edid = [edid-data];
34 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/dma.txt b/Documentation/devicetree/bindings/powerpc/fsl/dma.txt
new file mode 100644
index 000000000000..2a4b4bce6110
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/dma.txt
@@ -0,0 +1,144 @@
1* Freescale 83xx DMA Controller
2
3Freescale PowerPC 83xx have on chip general purpose DMA controllers.
4
5Required properties:
6
7- compatible : compatible list, contains 2 entries, first is
8 "fsl,CHIP-dma", where CHIP is the processor
9 (mpc8349, mpc8360, etc.) and the second is
10 "fsl,elo-dma"
11- reg : <registers mapping for DMA general status reg>
12- ranges : Should be defined as specified in 1) to describe the
13 DMA controller channels.
14- cell-index : controller index. 0 for controller @ 0x8100
15- interrupts : <interrupt mapping for DMA IRQ>
16- interrupt-parent : optional, if needed for interrupt mapping
17
18
19- DMA channel nodes:
20 - compatible : compatible list, contains 2 entries, first is
21 "fsl,CHIP-dma-channel", where CHIP is the processor
22 (mpc8349, mpc8350, etc.) and the second is
23 "fsl,elo-dma-channel". However, see note below.
24 - reg : <registers mapping for channel>
25 - cell-index : dma channel index starts at 0.
26
27Optional properties:
28 - interrupts : <interrupt mapping for DMA channel IRQ>
29 (on 83xx this is expected to be identical to
30 the interrupts property of the parent node)
31 - interrupt-parent : optional, if needed for interrupt mapping
32
33Example:
34 dma@82a8 {
35 #address-cells = <1>;
36 #size-cells = <1>;
37 compatible = "fsl,mpc8349-dma", "fsl,elo-dma";
38 reg = <0x82a8 4>;
39 ranges = <0 0x8100 0x1a4>;
40 interrupt-parent = <&ipic>;
41 interrupts = <71 8>;
42 cell-index = <0>;
43 dma-channel@0 {
44 compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
45 cell-index = <0>;
46 reg = <0 0x80>;
47 interrupt-parent = <&ipic>;
48 interrupts = <71 8>;
49 };
50 dma-channel@80 {
51 compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
52 cell-index = <1>;
53 reg = <0x80 0x80>;
54 interrupt-parent = <&ipic>;
55 interrupts = <71 8>;
56 };
57 dma-channel@100 {
58 compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
59 cell-index = <2>;
60 reg = <0x100 0x80>;
61 interrupt-parent = <&ipic>;
62 interrupts = <71 8>;
63 };
64 dma-channel@180 {
65 compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
66 cell-index = <3>;
67 reg = <0x180 0x80>;
68 interrupt-parent = <&ipic>;
69 interrupts = <71 8>;
70 };
71 };
72
73* Freescale 85xx/86xx DMA Controller
74
75Freescale PowerPC 85xx/86xx have on chip general purpose DMA controllers.
76
77Required properties:
78
79- compatible : compatible list, contains 2 entries, first is
80 "fsl,CHIP-dma", where CHIP is the processor
81 (mpc8540, mpc8540, etc.) and the second is
82 "fsl,eloplus-dma"
83- reg : <registers mapping for DMA general status reg>
84- cell-index : controller index. 0 for controller @ 0x21000,
85 1 for controller @ 0xc000
86- ranges : Should be defined as specified in 1) to describe the
87 DMA controller channels.
88
89- DMA channel nodes:
90 - compatible : compatible list, contains 2 entries, first is
91 "fsl,CHIP-dma-channel", where CHIP is the processor
92 (mpc8540, mpc8560, etc.) and the second is
93 "fsl,eloplus-dma-channel". However, see note below.
94 - cell-index : dma channel index starts at 0.
95 - reg : <registers mapping for channel>
96 - interrupts : <interrupt mapping for DMA channel IRQ>
97 - interrupt-parent : optional, if needed for interrupt mapping
98
99Example:
100 dma@21300 {
101 #address-cells = <1>;
102 #size-cells = <1>;
103 compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma";
104 reg = <0x21300 4>;
105 ranges = <0 0x21100 0x200>;
106 cell-index = <0>;
107 dma-channel@0 {
108 compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
109 reg = <0 0x80>;
110 cell-index = <0>;
111 interrupt-parent = <&mpic>;
112 interrupts = <20 2>;
113 };
114 dma-channel@80 {
115 compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
116 reg = <0x80 0x80>;
117 cell-index = <1>;
118 interrupt-parent = <&mpic>;
119 interrupts = <21 2>;
120 };
121 dma-channel@100 {
122 compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
123 reg = <0x100 0x80>;
124 cell-index = <2>;
125 interrupt-parent = <&mpic>;
126 interrupts = <22 2>;
127 };
128 dma-channel@180 {
129 compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel";
130 reg = <0x180 0x80>;
131 cell-index = <3>;
132 interrupt-parent = <&mpic>;
133 interrupts = <23 2>;
134 };
135 };
136
137Note on DMA channel compatible properties: The compatible property must say
138"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel" to be used by the Elo DMA
139driver (fsldma). Any DMA channel used by fsldma cannot be used by another
140DMA driver, such as the SSI sound drivers for the MPC8610. Therefore, any DMA
141channel that should be used for another driver should not use
142"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel". For the SSI drivers, for
143example, the compatible property should be "fsl,ssi-dma-channel". See ssi.txt
144for more information.
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ecm.txt b/Documentation/devicetree/bindings/powerpc/fsl/ecm.txt
new file mode 100644
index 000000000000..f514f29c67d6
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/ecm.txt
@@ -0,0 +1,64 @@
1=====================================================================
2E500 LAW & Coherency Module Device Tree Binding
3Copyright (C) 2009 Freescale Semiconductor Inc.
4=====================================================================
5
6Local Access Window (LAW) Node
7
8The LAW node represents the region of CCSR space where local access
9windows are configured. For ECM based devices this is the first 4k
10of CCSR space that includes CCSRBAR, ALTCBAR, ALTCAR, BPTR, and some
11number of local access windows as specified by fsl,num-laws.
12
13PROPERTIES
14
15 - compatible
16 Usage: required
17 Value type: <string>
18 Definition: Must include "fsl,ecm-law"
19
20 - reg
21 Usage: required
22 Value type: <prop-encoded-array>
23 Definition: A standard property. The value specifies the
24 physical address offset and length of the CCSR space
25 registers.
26
27 - fsl,num-laws
28 Usage: required
29 Value type: <u32>
30 Definition: The value specifies the number of local access
31 windows for this device.
32
33=====================================================================
34
35E500 Coherency Module Node
36
37The E500 LAW node represents the region of CCSR space where ECM config
38and error reporting registers exist, this is the second 4k (0x1000)
39of CCSR space.
40
41PROPERTIES
42
43 - compatible
44 Usage: required
45 Value type: <string>
46 Definition: Must include "fsl,CHIP-ecm", "fsl,ecm" where
47 CHIP is the processor (mpc8572, mpc8544, etc.)
48
49 - reg
50 Usage: required
51 Value type: <prop-encoded-array>
52 Definition: A standard property. The value specifies the
53 physical address offset and length of the CCSR space
54 registers.
55
56 - interrupts
57 Usage: required
58 Value type: <prop-encoded-array>
59
60 - interrupt-parent
61 Usage: required
62 Value type: <phandle>
63
64=====================================================================
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/gtm.txt b/Documentation/devicetree/bindings/powerpc/fsl/gtm.txt
new file mode 100644
index 000000000000..9a33efded4bc
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/gtm.txt
@@ -0,0 +1,31 @@
1* Freescale General-purpose Timers Module
2
3Required properties:
4 - compatible : should be
5 "fsl,<chip>-gtm", "fsl,gtm" for SOC GTMs
6 "fsl,<chip>-qe-gtm", "fsl,qe-gtm", "fsl,gtm" for QE GTMs
7 "fsl,<chip>-cpm2-gtm", "fsl,cpm2-gtm", "fsl,gtm" for CPM2 GTMs
8 - reg : should contain gtm registers location and length (0x40).
9 - interrupts : should contain four interrupts.
10 - interrupt-parent : interrupt source phandle.
11 - clock-frequency : specifies the frequency driving the timer.
12
13Example:
14
15timer@500 {
16 compatible = "fsl,mpc8360-gtm", "fsl,gtm";
17 reg = <0x500 0x40>;
18 interrupts = <90 8 78 8 84 8 72 8>;
19 interrupt-parent = <&ipic>;
20 /* filled by u-boot */
21 clock-frequency = <0>;
22};
23
24timer@440 {
25 compatible = "fsl,mpc8360-qe-gtm", "fsl,qe-gtm", "fsl,gtm";
26 reg = <0x440 0x40>;
27 interrupts = <12 13 14 15>;
28 interrupt-parent = <&qeic>;
29 /* filled by u-boot */
30 clock-frequency = <0>;
31};
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
new file mode 100644
index 000000000000..9e7a2417dac5
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
@@ -0,0 +1,25 @@
1* Global Utilities Block
2
3The global utilities block controls power management, I/O device
4enabling, power-on-reset configuration monitoring, general-purpose
5I/O signal configuration, alternate function selection for multiplexed
6signals, and clock control.
7
8Required properties:
9
10 - compatible : Should define the compatible device type for
11 global-utilities.
12 - reg : Offset and length of the register set for the device.
13
14Recommended properties:
15
16 - fsl,has-rstcr : Indicates that the global utilities register set
17 contains a functioning "reset control register" (i.e. the board
18 is wired to reset upon setting the HRESET_REQ bit in this register).
19
20Example:
21 global-utilities@e0000 { /* global utilities block */
22 compatible = "fsl,mpc8548-guts";
23 reg = <e0000 1000>;
24 fsl,has-rstcr;
25 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt b/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt
new file mode 100644
index 000000000000..939a26d541f6
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt
@@ -0,0 +1,76 @@
1Integrated Flash Controller
2
3Properties:
4- name : Should be ifc
5- compatible : should contain "fsl,ifc". The version of the integrated
6 flash controller can be found in the IFC_REV register at
7 offset zero.
8
9- #address-cells : Should be either two or three. The first cell is the
10 chipselect number, and the remaining cells are the
11 offset into the chipselect.
12- #size-cells : Either one or two, depending on how large each chipselect
13 can be.
14- reg : Offset and length of the register set for the device
15- interrupts : IFC has two interrupts. The first one is the "common"
16 interrupt(CM_EVTER_STAT), and second is the NAND interrupt
17 (NAND_EVTER_STAT).
18
19- ranges : Each range corresponds to a single chipselect, and covers
20 the entire access window as configured.
21
22Child device nodes describe the devices connected to IFC such as NOR (e.g.
23cfi-flash) and NAND (fsl,ifc-nand). There might be board specific devices
24like FPGAs, CPLDs, etc.
25
26Example:
27
28 ifc@ffe1e000 {
29 compatible = "fsl,ifc", "simple-bus";
30 #address-cells = <2>;
31 #size-cells = <1>;
32 reg = <0x0 0xffe1e000 0 0x2000>;
33 interrupts = <16 2 19 2>;
34
35 /* NOR, NAND Flashes and CPLD on board */
36 ranges = <0x0 0x0 0x0 0xee000000 0x02000000
37 0x1 0x0 0x0 0xffa00000 0x00010000
38 0x3 0x0 0x0 0xffb00000 0x00020000>;
39
40 flash@0,0 {
41 #address-cells = <1>;
42 #size-cells = <1>;
43 compatible = "cfi-flash";
44 reg = <0x0 0x0 0x2000000>;
45 bank-width = <2>;
46 device-width = <1>;
47
48 partition@0 {
49 /* 32MB for user data */
50 reg = <0x0 0x02000000>;
51 label = "NOR Data";
52 };
53 };
54
55 flash@1,0 {
56 #address-cells = <1>;
57 #size-cells = <1>;
58 compatible = "fsl,ifc-nand";
59 reg = <0x1 0x0 0x10000>;
60
61 partition@0 {
62 /* This location must not be altered */
63 /* 1MB for u-boot Bootloader Image */
64 reg = <0x0 0x00100000>;
65 label = "NAND U-Boot Image";
66 read-only;
67 };
68 };
69
70 cpld@3,0 {
71 #address-cells = <1>;
72 #size-cells = <1>;
73 compatible = "fsl,p1010rdb-cpld";
74 reg = <0x3 0x0 0x000001f>;
75 };
76 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/lbc.txt b/Documentation/devicetree/bindings/powerpc/fsl/lbc.txt
new file mode 100644
index 000000000000..3300fec501c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/lbc.txt
@@ -0,0 +1,35 @@
1* Chipselect/Local Bus
2
3Properties:
4- name : Should be localbus
5- #address-cells : Should be either two or three. The first cell is the
6 chipselect number, and the remaining cells are the
7 offset into the chipselect.
8- #size-cells : Either one or two, depending on how large each chipselect
9 can be.
10- ranges : Each range corresponds to a single chipselect, and cover
11 the entire access window as configured.
12
13Example:
14 localbus@f0010100 {
15 compatible = "fsl,mpc8272-localbus",
16 "fsl,pq2-localbus";
17 #address-cells = <2>;
18 #size-cells = <1>;
19 reg = <f0010100 40>;
20
21 ranges = <0 0 fe000000 02000000
22 1 0 f4500000 00008000>;
23
24 flash@0,0 {
25 compatible = "jedec-flash";
26 reg = <0 0 2000000>;
27 bank-width = <4>;
28 device-width = <1>;
29 };
30
31 board-control@1,0 {
32 reg = <1 0 20>;
33 compatible = "fsl,mpc8272ads-bcsr";
34 };
35 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mcm.txt b/Documentation/devicetree/bindings/powerpc/fsl/mcm.txt
new file mode 100644
index 000000000000..4ceda9b3b413
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mcm.txt
@@ -0,0 +1,64 @@
1=====================================================================
2MPX LAW & Coherency Module Device Tree Binding
3Copyright (C) 2009 Freescale Semiconductor Inc.
4=====================================================================
5
6Local Access Window (LAW) Node
7
8The LAW node represents the region of CCSR space where local access
9windows are configured. For MCM based devices this is the first 4k
10of CCSR space that includes CCSRBAR, ALTCBAR, ALTCAR, BPTR, and some
11number of local access windows as specified by fsl,num-laws.
12
13PROPERTIES
14
15 - compatible
16 Usage: required
17 Value type: <string>
18 Definition: Must include "fsl,mcm-law"
19
20 - reg
21 Usage: required
22 Value type: <prop-encoded-array>
23 Definition: A standard property. The value specifies the
24 physical address offset and length of the CCSR space
25 registers.
26
27 - fsl,num-laws
28 Usage: required
29 Value type: <u32>
30 Definition: The value specifies the number of local access
31 windows for this device.
32
33=====================================================================
34
35MPX Coherency Module Node
36
37The MPX LAW node represents the region of CCSR space where MCM config
38and error reporting registers exist, this is the second 4k (0x1000)
39of CCSR space.
40
41PROPERTIES
42
43 - compatible
44 Usage: required
45 Value type: <string>
46 Definition: Must include "fsl,CHIP-mcm", "fsl,mcm" where
47 CHIP is the processor (mpc8641, mpc8610, etc.)
48
49 - reg
50 Usage: required
51 Value type: <prop-encoded-array>
52 Definition: A standard property. The value specifies the
53 physical address offset and length of the CCSR space
54 registers.
55
56 - interrupts
57 Usage: required
58 Value type: <prop-encoded-array>
59
60 - interrupt-parent
61 Usage: required
62 Value type: <phandle>
63
64=====================================================================
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mcu-mpc8349emitx.txt b/Documentation/devicetree/bindings/powerpc/fsl/mcu-mpc8349emitx.txt
new file mode 100644
index 000000000000..0f766333b6eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mcu-mpc8349emitx.txt
@@ -0,0 +1,17 @@
1Freescale MPC8349E-mITX-compatible Power Management Micro Controller Unit (MCU)
2
3Required properties:
4- compatible : "fsl,<mcu-chip>-<board>", "fsl,mcu-mpc8349emitx".
5- reg : should specify I2C address (0x0a).
6- #gpio-cells : should be 2.
7- gpio-controller : should be present.
8
9Example:
10
11mcu@0a {
12 #gpio-cells = <2>;
13 compatible = "fsl,mc9s08qg8-mpc8349emitx",
14 "fsl,mcu-mpc8349emitx";
15 reg = <0x0a>;
16 gpio-controller;
17};
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpc5121-psc.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpc5121-psc.txt
new file mode 100644
index 000000000000..8832e8798912
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpc5121-psc.txt
@@ -0,0 +1,70 @@
1MPC5121 PSC Device Tree Bindings
2
3PSC in UART mode
4----------------
5
6For PSC in UART mode the needed PSC serial devices
7are specified by fsl,mpc5121-psc-uart nodes in the
8fsl,mpc5121-immr SoC node. Additionally the PSC FIFO
9Controller node fsl,mpc5121-psc-fifo is requered there:
10
11fsl,mpc5121-psc-uart nodes
12--------------------------
13
14Required properties :
15 - compatible : Should contain "fsl,mpc5121-psc-uart" and "fsl,mpc5121-psc"
16 - cell-index : Index of the PSC in hardware
17 - reg : Offset and length of the register set for the PSC device
18 - interrupts : <a b> where a is the interrupt number of the
19 PSC FIFO Controller and b is a field that represents an
20 encoding of the sense and level information for the interrupt.
21 - interrupt-parent : the phandle for the interrupt controller that
22 services interrupts for this device.
23
24Recommended properties :
25 - fsl,rx-fifo-size : the size of the RX fifo slice (a multiple of 4)
26 - fsl,tx-fifo-size : the size of the TX fifo slice (a multiple of 4)
27
28
29fsl,mpc5121-psc-fifo node
30-------------------------
31
32Required properties :
33 - compatible : Should be "fsl,mpc5121-psc-fifo"
34 - reg : Offset and length of the register set for the PSC
35 FIFO Controller
36 - interrupts : <a b> where a is the interrupt number of the
37 PSC FIFO Controller and b is a field that represents an
38 encoding of the sense and level information for the interrupt.
39 - interrupt-parent : the phandle for the interrupt controller that
40 services interrupts for this device.
41
42
43Example for a board using PSC0 and PSC1 devices in serial mode:
44
45serial@11000 {
46 compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
47 cell-index = <0>;
48 reg = <0x11000 0x100>;
49 interrupts = <40 0x8>;
50 interrupt-parent = < &ipic >;
51 fsl,rx-fifo-size = <16>;
52 fsl,tx-fifo-size = <16>;
53};
54
55serial@11100 {
56 compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
57 cell-index = <1>;
58 reg = <0x11100 0x100>;
59 interrupts = <40 0x8>;
60 interrupt-parent = < &ipic >;
61 fsl,rx-fifo-size = <16>;
62 fsl,tx-fifo-size = <16>;
63};
64
65pscfifo@11f00 {
66 compatible = "fsl,mpc5121-psc-fifo";
67 reg = <0x11f00 0x100>;
68 interrupts = <40 0x8>;
69 interrupt-parent = < &ipic >;
70};
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt
new file mode 100644
index 000000000000..4ccb2cd5df94
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpc5200.txt
@@ -0,0 +1,198 @@
1MPC5200 Device Tree Bindings
2----------------------------
3
4(c) 2006-2009 Secret Lab Technologies Ltd
5Grant Likely <grant.likely@secretlab.ca>
6
7Naming conventions
8------------------
9For mpc5200 on-chip devices, the format for each compatible value is
10<chip>-<device>[-<mode>]. The OS should be able to match a device driver
11to the device based solely on the compatible value. If two drivers
12match on the compatible list; the 'most compatible' driver should be
13selected.
14
15The split between the MPC5200 and the MPC5200B leaves a bit of a
16conundrum. How should the compatible property be set up to provide
17maximum compatibility information; but still accurately describe the
18chip? For the MPC5200; the answer is easy. Most of the SoC devices
19originally appeared on the MPC5200. Since they didn't exist anywhere
20else; the 5200 compatible properties will contain only one item;
21"fsl,mpc5200-<device>".
22
23The 5200B is almost the same as the 5200, but not quite. It fixes
24silicon bugs and it adds a small number of enhancements. Most of the
25devices either provide exactly the same interface as on the 5200. A few
26devices have extra functions but still have a backwards compatible mode.
27To express this information as completely as possible, 5200B device trees
28should have two items in the compatible list:
29 compatible = "fsl,mpc5200b-<device>","fsl,mpc5200-<device>";
30
31It is *strongly* recommended that 5200B device trees follow this convention
32(instead of only listing the base mpc5200 item).
33
34ie. ethernet on mpc5200: compatible = "fsl,mpc5200-fec";
35 ethernet on mpc5200b: compatible = "fsl,mpc5200b-fec", "fsl,mpc5200-fec";
36
37Modal devices, like PSCs, also append the configured function to the
38end of the compatible field. ie. A PSC in i2s mode would specify
39"fsl,mpc5200-psc-i2s", not "fsl,mpc5200-i2s". This convention is chosen to
40avoid naming conflicts with non-psc devices providing the same
41function. For example, "fsl,mpc5200-spi" and "fsl,mpc5200-psc-spi" describe
42the mpc5200 simple spi device and a PSC spi mode respectively.
43
44At the time of writing, exact chip may be either 'fsl,mpc5200' or
45'fsl,mpc5200b'.
46
47The soc node
48------------
49This node describes the on chip SOC peripherals. Every mpc5200 based
50board will have this node, and as such there is a common naming
51convention for SOC devices.
52
53Required properties:
54name description
55---- -----------
56ranges Memory range of the internal memory mapped registers.
57 Should be <0 [baseaddr] 0xc000>
58reg Should be <[baseaddr] 0x100>
59compatible mpc5200: "fsl,mpc5200-immr"
60 mpc5200b: "fsl,mpc5200b-immr"
61system-frequency 'fsystem' frequency in Hz; XLB, IPB, USB and PCI
62 clocks are derived from the fsystem clock.
63bus-frequency IPB bus frequency in Hz. Clock rate
64 used by most of the soc devices.
65
66soc child nodes
67---------------
68Any on chip SOC devices available to Linux must appear as soc5200 child nodes.
69
70Note: The tables below show the value for the mpc5200. A mpc5200b device
71tree should use the "fsl,mpc5200b-<device>","fsl,mpc5200-<device>" form.
72
73Required soc5200 child nodes:
74name compatible Description
75---- ---------- -----------
76cdm@<addr> fsl,mpc5200-cdm Clock Distribution
77interrupt-controller@<addr> fsl,mpc5200-pic need an interrupt
78 controller to boot
79bestcomm@<addr> fsl,mpc5200-bestcomm Bestcomm DMA controller
80
81Recommended soc5200 child nodes; populate as needed for your board
82name compatible Description
83---- ---------- -----------
84timer@<addr> fsl,mpc5200-gpt General purpose timers
85gpio@<addr> fsl,mpc5200-gpio MPC5200 simple gpio controller
86gpio@<addr> fsl,mpc5200-gpio-wkup MPC5200 wakeup gpio controller
87rtc@<addr> fsl,mpc5200-rtc Real time clock
88mscan@<addr> fsl,mpc5200-mscan CAN bus controller
89pci@<addr> fsl,mpc5200-pci PCI bridge
90serial@<addr> fsl,mpc5200-psc-uart PSC in serial mode
91i2s@<addr> fsl,mpc5200-psc-i2s PSC in i2s mode
92ac97@<addr> fsl,mpc5200-psc-ac97 PSC in ac97 mode
93spi@<addr> fsl,mpc5200-psc-spi PSC in spi mode
94irda@<addr> fsl,mpc5200-psc-irda PSC in IrDA mode
95spi@<addr> fsl,mpc5200-spi MPC5200 spi device
96ethernet@<addr> fsl,mpc5200-fec MPC5200 ethernet device
97ata@<addr> fsl,mpc5200-ata IDE ATA interface
98i2c@<addr> fsl,mpc5200-i2c I2C controller
99usb@<addr> fsl,mpc5200-ohci,ohci-be USB controller
100xlb@<addr> fsl,mpc5200-xlb XLB arbitrator
101
102fsl,mpc5200-gpt nodes
103---------------------
104On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board
105design supports the internal wdt, then the device node for GPT0 should
106include the empty property 'fsl,has-wdt'. Note that this does not activate
107the watchdog. The timer will function as a GPT if the timer api is used, and
108it will function as watchdog if the watchdog device is used. The watchdog
109mode has priority over the gpt mode, i.e. if the watchdog is activated, any
110gpt api call to this timer will fail with -EBUSY.
111
112If you add the property
113 fsl,wdt-on-boot = <n>;
114GPT0 will be marked as in-use watchdog, i.e. blocking every gpt access to it.
115If n>0, the watchdog is started with a timeout of n seconds. If n=0, the
116configuration of the watchdog is not touched. This is useful in two cases:
117- just mark GPT0 as watchdog, blocking gpt accesses, and configure it later;
118- do not touch a configuration assigned by the boot loader which supervises
119 the boot process itself.
120
121The watchdog will respect the CONFIG_WATCHDOG_NOWAYOUT option.
122
123An mpc5200-gpt can be used as a single line GPIO controller. To do so,
124add the following properties to the gpt node:
125 gpio-controller;
126 #gpio-cells = <2>;
127When referencing the GPIO line from another node, the first cell must always
128be zero and the second cell represents the gpio flags and described in the
129gpio device tree binding.
130
131An mpc5200-gpt can be used as a single line edge sensitive interrupt
132controller. To do so, add the following properties to the gpt node:
133 interrupt-controller;
134 #interrupt-cells = <1>;
135When referencing the IRQ line from another node, the cell represents the
136sense mode; 1 for edge rising, 2 for edge falling.
137
138fsl,mpc5200-psc nodes
139---------------------
140The PSCs should include a cell-index which is the index of the PSC in
141hardware. cell-index is used to determine which shared SoC registers to
142use when setting up PSC clocking. cell-index number starts at '0'. ie:
143 PSC1 has 'cell-index = <0>'
144 PSC4 has 'cell-index = <3>'
145
146PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in
147i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the
148compatible field.
149
150
151fsl,mpc5200-gpio and fsl,mpc5200-gpio-wkup nodes
152------------------------------------------------
153Each GPIO controller node should have the empty property gpio-controller and
154#gpio-cells set to 2. First cell is the GPIO number which is interpreted
155according to the bit numbers in the GPIO control registers. The second cell
156is for flags which is currently unused.
157
158fsl,mpc5200-fec nodes
159---------------------
160The FEC node can specify one of the following properties to configure
161the MII link:
162- fsl,7-wire-mode - An empty property that specifies the link uses 7-wire
163 mode instead of MII
164- current-speed - Specifies that the MII should be configured for a fixed
165 speed. This property should contain two cells. The
166 first cell specifies the speed in Mbps and the second
167 should be '0' for half duplex and '1' for full duplex
168- phy-handle - Contains a phandle to an Ethernet PHY.
169
170Interrupt controller (fsl,mpc5200-pic) node
171-------------------------------------------
172The mpc5200 pic binding splits hardware IRQ numbers into two levels. The
173split reflects the layout of the PIC hardware itself, which groups
174interrupts into one of three groups; CRIT, MAIN or PERP. Also, the
175Bestcomm dma engine has it's own set of interrupt sources which are
176cascaded off of peripheral interrupt 0, which the driver interprets as a
177fourth group, SDMA.
178
179The interrupts property for device nodes using the mpc5200 pic consists
180of three cells; <L1 L2 level>
181
182 L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3]
183 L2 := interrupt number; directly mapped from the value in the
184 "ICTL PerStat, MainStat, CritStat Encoded Register"
185 level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3]
186
187For external IRQs, use the following interrupt property values (how to
188specify external interrupts is a frequently asked question):
189External interrupts:
190 external irq0: interrupts = <0 0 n>;
191 external irq1: interrupts = <1 1 n>;
192 external irq2: interrupts = <1 2 n>;
193 external irq3: interrupts = <1 3 n>;
194'n' is sense (0: level high, 1: edge rising, 2: edge falling 3: level low)
195
196fsl,mpc5200-mscan nodes
197-----------------------
198See file can.txt in this directory.
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic-timer.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic-timer.txt
new file mode 100644
index 000000000000..df41958140e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic-timer.txt
@@ -0,0 +1,38 @@
1* Freescale MPIC timers
2
3Required properties:
4- compatible: "fsl,mpic-global-timer"
5
6- reg : Contains two regions. The first is the main timer register bank
7 (GTCCRxx, GTBCRxx, GTVPRxx, GTDRxx). The second is the timer control
8 register (TCRx) for the group.
9
10- fsl,available-ranges: use <start count> style section to define which
11 timer interrupts can be used. This property is optional; without this,
12 all timers within the group can be used.
13
14- interrupts: one interrupt per timer in the group, in order, starting
15 with timer zero. If timer-available-ranges is present, only the
16 interrupts that correspond to available timers shall be present.
17
18Example:
19 /* Note that this requires #interrupt-cells to be 4 */
20 timer0: timer@41100 {
21 compatible = "fsl,mpic-global-timer";
22 reg = <0x41100 0x100 0x41300 4>;
23
24 /* Another AMP partition is using timers 0 and 1 */
25 fsl,available-ranges = <2 2>;
26
27 interrupts = <2 0 3 0
28 3 0 3 0>;
29 };
30
31 timer1: timer@42100 {
32 compatible = "fsl,mpic-global-timer";
33 reg = <0x42100 0x100 0x42300 4>;
34 interrupts = <4 0 3 0
35 5 0 3 0
36 6 0 3 0
37 7 0 3 0>;
38 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
new file mode 100644
index 000000000000..2cf38bd841fd
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
@@ -0,0 +1,211 @@
1=====================================================================
2Freescale MPIC Interrupt Controller Node
3Copyright (C) 2010,2011 Freescale Semiconductor Inc.
4=====================================================================
5
6The Freescale MPIC interrupt controller is found on all PowerQUICC
7and QorIQ processors and is compatible with the Open PIC. The
8notable difference from Open PIC binding is the addition of 2
9additional cells in the interrupt specifier defining interrupt type
10information.
11
12PROPERTIES
13
14 - compatible
15 Usage: required
16 Value type: <string>
17 Definition: Shall include "fsl,mpic". Freescale MPIC
18 controllers compatible with this binding have Block
19 Revision Registers BRR1 and BRR2 at offset 0x0 and
20 0x10 in the MPIC.
21
22 - reg
23 Usage: required
24 Value type: <prop-encoded-array>
25 Definition: A standard property. Specifies the physical
26 offset and length of the device's registers within the
27 CCSR address space.
28
29 - interrupt-controller
30 Usage: required
31 Value type: <empty>
32 Definition: Specifies that this node is an interrupt
33 controller
34
35 - #interrupt-cells
36 Usage: required
37 Value type: <u32>
38 Definition: Shall be 2 or 4. A value of 2 means that interrupt
39 specifiers do not contain the interrupt-type or type-specific
40 information cells.
41
42 - #address-cells
43 Usage: required
44 Value type: <u32>
45 Definition: Shall be 0.
46
47 - pic-no-reset
48 Usage: optional
49 Value type: <empty>
50 Definition: The presence of this property specifies that the
51 MPIC must not be reset by the client program, and that
52 the boot program has initialized all interrupt source
53 configuration registers to a sane state-- masked or
54 directed at other cores. This ensures that the client
55 program will not receive interrupts for sources not belonging
56 to the client. The presence of this property also mandates
57 that any initialization related to interrupt sources shall
58 be limited to sources explicitly referenced in the device tree.
59
60INTERRUPT SPECIFIER DEFINITION
61
62 Interrupt specifiers consists of 4 cells encoded as
63 follows:
64
65 <1st-cell> interrupt-number
66
67 Identifies the interrupt source. The meaning
68 depends on the type of interrupt.
69
70 Note: If the interrupt-type cell is undefined
71 (i.e. #interrupt-cells = 2), this cell
72 should be interpreted the same as for
73 interrupt-type 0-- i.e. an external or
74 normal SoC device interrupt.
75
76 <2nd-cell> level-sense information, encoded as follows:
77 0 = low-to-high edge triggered
78 1 = active low level-sensitive
79 2 = active high level-sensitive
80 3 = high-to-low edge triggered
81
82 <3rd-cell> interrupt-type
83
84 The following types are supported:
85
86 0 = external or normal SoC device interrupt
87
88 The interrupt-number cell contains
89 the SoC device interrupt number. The
90 type-specific cell is undefined. The
91 interrupt-number is derived from the
92 MPIC a block of registers referred to as
93 the "Interrupt Source Configuration Registers".
94 Each source has 32-bytes of registers
95 (vector/priority and destination) in this
96 region. So interrupt 0 is at offset 0x0,
97 interrupt 1 is at offset 0x20, and so on.
98
99 1 = error interrupt
100
101 The interrupt-number cell contains
102 the SoC device interrupt number for
103 the error interrupt. The type-specific
104 cell identifies the specific error
105 interrupt number.
106
107 2 = MPIC inter-processor interrupt (IPI)
108
109 The interrupt-number cell identifies
110 the MPIC IPI number. The type-specific
111 cell is undefined.
112
113 3 = MPIC timer interrupt
114
115 The interrupt-number cell identifies
116 the MPIC timer number. The type-specific
117 cell is undefined.
118
119 <4th-cell> type-specific information
120
121 The type-specific cell is encoded as follows:
122
123 - For interrupt-type 1 (error interrupt),
124 the type-specific cell contains the
125 bit number of the error interrupt in the
126 Error Interrupt Summary Register.
127
128EXAMPLE 1
129 /*
130 * mpic interrupt controller with 4 cells per specifier
131 */
132 mpic: pic@40000 {
133 compatible = "fsl,mpic";
134 interrupt-controller;
135 #interrupt-cells = <4>;
136 #address-cells = <0>;
137 reg = <0x40000 0x40000>;
138 };
139
140EXAMPLE 2
141 /*
142 * The MPC8544 I2C controller node has an internal
143 * interrupt number of 27. As per the reference manual
144 * this corresponds to interrupt source configuration
145 * registers at 0x5_0560.
146 *
147 * The interrupt source configuration registers begin
148 * at 0x5_0000.
149 *
150 * To compute the interrupt specifier interrupt number
151 *
152 * 0x560 >> 5 = 43
153 *
154 * The interrupt source configuration registers begin
155 * at 0x5_0000, and so the i2c vector/priority registers
156 * are at 0x5_0560.
157 */
158 i2c@3000 {
159 #address-cells = <1>;
160 #size-cells = <0>;
161 cell-index = <0>;
162 compatible = "fsl-i2c";
163 reg = <0x3000 0x100>;
164 interrupts = <43 2>;
165 interrupt-parent = <&mpic>;
166 dfsrr;
167 };
168
169
170EXAMPLE 3
171 /*
172 * Definition of a node defining the 4
173 * MPIC IPI interrupts. Note the interrupt
174 * type of 2.
175 */
176 ipi@410a0 {
177 compatible = "fsl,mpic-ipi";
178 reg = <0x40040 0x10>;
179 interrupts = <0 0 2 0
180 1 0 2 0
181 2 0 2 0
182 3 0 2 0>;
183 };
184
185EXAMPLE 4
186 /*
187 * Definition of a node defining the MPIC
188 * global timers. Note the interrupt
189 * type of 3.
190 */
191 timer0: timer@41100 {
192 compatible = "fsl,mpic-global-timer";
193 reg = <0x41100 0x100 0x41300 4>;
194 interrupts = <0 0 3 0
195 1 0 3 0
196 2 0 3 0
197 3 0 3 0>;
198 };
199
200EXAMPLE 5
201 /*
202 * Definition of an error interrupt (interrupt type 1).
203 * SoC interrupt number is 16 and the specific error
204 * interrupt bit in the error interrupt summary register
205 * is 23.
206 */
207 memory-controller@8000 {
208 compatible = "fsl,p4080-memory-controller";
209 reg = <0x8000 0x1000>;
210 interrupts = <16 2 1 23>;
211 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt
new file mode 100644
index 000000000000..70558c3f3682
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/msi-pic.txt
@@ -0,0 +1,43 @@
1* Freescale MSI interrupt controller
2
3Required properties:
4- compatible : compatible list, contains 2 entries,
5 first is "fsl,CHIP-msi", where CHIP is the processor(mpc8610, mpc8572,
6 etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on
7 the parent type.
8
9- reg : should contain the address and the length of the shared message
10 interrupt register set.
11
12- msi-available-ranges: use <start count> style section to define which
13 msi interrupt can be used in the 256 msi interrupts. This property is
14 optional, without this, all the 256 MSI interrupts can be used.
15 Each available range must begin and end on a multiple of 32 (i.e.
16 no splitting an individual MSI register or the associated PIC interrupt).
17
18- interrupts : each one of the interrupts here is one entry per 32 MSIs,
19 and routed to the host interrupt controller. the interrupts should
20 be set as edge sensitive. If msi-available-ranges is present, only
21 the interrupts that correspond to available ranges shall be present.
22
23- interrupt-parent: the phandle for the interrupt controller
24 that services interrupts for this device. for 83xx cpu, the interrupts
25 are routed to IPIC, and for 85xx/86xx cpu the interrupts are routed
26 to MPIC.
27
28Example:
29 msi@41600 {
30 compatible = "fsl,mpc8610-msi", "fsl,mpic-msi";
31 reg = <0x41600 0x80>;
32 msi-available-ranges = <0 0x100>;
33 interrupts = <
34 0xe0 0
35 0xe1 0
36 0xe2 0
37 0xe3 0
38 0xe4 0
39 0xe5 0
40 0xe6 0
41 0xe7 0>;
42 interrupt-parent = <&mpic>;
43 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt b/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt
new file mode 100644
index 000000000000..07256b7ffcaa
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt
@@ -0,0 +1,63 @@
1* Power Management Controller
2
3Properties:
4- compatible: "fsl,<chip>-pmc".
5
6 "fsl,mpc8349-pmc" should be listed for any chip whose PMC is
7 compatible. "fsl,mpc8313-pmc" should also be listed for any chip
8 whose PMC is compatible, and implies deep-sleep capability.
9
10 "fsl,mpc8548-pmc" should be listed for any chip whose PMC is
11 compatible. "fsl,mpc8536-pmc" should also be listed for any chip
12 whose PMC is compatible, and implies deep-sleep capability.
13
14 "fsl,mpc8641d-pmc" should be listed for any chip whose PMC is
15 compatible; all statements below that apply to "fsl,mpc8548-pmc" also
16 apply to "fsl,mpc8641d-pmc".
17
18 Compatibility does not include bit assignments in SCCR/PMCDR/DEVDISR; these
19 bit assignments are indicated via the sleep specifier in each device's
20 sleep property.
21
22- reg: For devices compatible with "fsl,mpc8349-pmc", the first resource
23 is the PMC block, and the second resource is the Clock Configuration
24 block.
25
26 For devices compatible with "fsl,mpc8548-pmc", the first resource
27 is a 32-byte block beginning with DEVDISR.
28
29- interrupts: For "fsl,mpc8349-pmc"-compatible devices, the first
30 resource is the PMC block interrupt.
31
32- fsl,mpc8313-wakeup-timer: For "fsl,mpc8313-pmc"-compatible devices,
33 this is a phandle to an "fsl,gtm" node on which timer 4 can be used as
34 a wakeup source from deep sleep.
35
36Sleep specifiers:
37
38 fsl,mpc8349-pmc: Sleep specifiers consist of one cell. For each bit
39 that is set in the cell, the corresponding bit in SCCR will be saved
40 and cleared on suspend, and restored on resume. This sleep controller
41 supports disabling and resuming devices at any time.
42
43 fsl,mpc8536-pmc: Sleep specifiers consist of three cells, the third of
44 which will be ORed into PMCDR upon suspend, and cleared from PMCDR
45 upon resume. The first two cells are as described for fsl,mpc8578-pmc.
46 This sleep controller only supports disabling devices during system
47 sleep, or permanently.
48
49 fsl,mpc8548-pmc: Sleep specifiers consist of one or two cells, the
50 first of which will be ORed into DEVDISR (and the second into
51 DEVDISR2, if present -- this cell should be zero or absent if the
52 hardware does not have DEVDISR2) upon a request for permanent device
53 disabling. This sleep controller does not support configuring devices
54 to disable during system sleep (unless supported by another compatible
55 match), or dynamically.
56
57Example:
58
59 power@b00 {
60 compatible = "fsl,mpc8313-pmc", "fsl,mpc8349-pmc";
61 reg = <0xb00 0x100 0xa00 0x100>;
62 interrupts = <80 8>;
63 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/sec.txt b/Documentation/devicetree/bindings/powerpc/fsl/sec.txt
new file mode 100644
index 000000000000..2b6f2d45c45a
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/sec.txt
@@ -0,0 +1,68 @@
1Freescale SoC SEC Security Engines
2
3Required properties:
4
5- compatible : Should contain entries for this and backward compatible
6 SEC versions, high to low, e.g., "fsl,sec2.1", "fsl,sec2.0"
7- reg : Offset and length of the register set for the device
8- interrupts : the SEC's interrupt number
9- fsl,num-channels : An integer representing the number of channels
10 available.
11- fsl,channel-fifo-len : An integer representing the number of
12 descriptor pointers each channel fetch fifo can hold.
13- fsl,exec-units-mask : The bitmask representing what execution units
14 (EUs) are available. It's a single 32-bit cell. EU information
15 should be encoded following the SEC's Descriptor Header Dword
16 EU_SEL0 field documentation, i.e. as follows:
17
18 bit 0 = reserved - should be 0
19 bit 1 = set if SEC has the ARC4 EU (AFEU)
20 bit 2 = set if SEC has the DES/3DES EU (DEU)
21 bit 3 = set if SEC has the message digest EU (MDEU/MDEU-A)
22 bit 4 = set if SEC has the random number generator EU (RNG)
23 bit 5 = set if SEC has the public key EU (PKEU)
24 bit 6 = set if SEC has the AES EU (AESU)
25 bit 7 = set if SEC has the Kasumi EU (KEU)
26 bit 8 = set if SEC has the CRC EU (CRCU)
27 bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B)
28
29remaining bits are reserved for future SEC EUs.
30
31- fsl,descriptor-types-mask : The bitmask representing what descriptors
32 are available. It's a single 32-bit cell. Descriptor type information
33 should be encoded following the SEC's Descriptor Header Dword DESC_TYPE
34 field documentation, i.e. as follows:
35
36 bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type
37 bit 1 = set if SEC supports the ipsec_esp descriptor type
38 bit 2 = set if SEC supports the common_nonsnoop desc. type
39 bit 3 = set if SEC supports the 802.11i AES ccmp desc. type
40 bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type
41 bit 5 = set if SEC supports the srtp descriptor type
42 bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type
43 bit 7 = set if SEC supports the pkeu_assemble descriptor type
44 bit 8 = set if SEC supports the aesu_key_expand_output desc.type
45 bit 9 = set if SEC supports the pkeu_ptmul descriptor type
46 bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type
47 bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type
48
49 ..and so on and so forth.
50
51Optional properties:
52
53- interrupt-parent : the phandle for the interrupt controller that
54 services interrupts for this device.
55
56Example:
57
58 /* MPC8548E */
59 crypto@30000 {
60 compatible = "fsl,sec2.1", "fsl,sec2.0";
61 reg = <0x30000 0x10000>;
62 interrupts = <29 2>;
63 interrupt-parent = <&mpic>;
64 fsl,num-channels = <4>;
65 fsl,channel-fifo-len = <24>;
66 fsl,exec-units-mask = <0xfe>;
67 fsl,descriptor-types-mask = <0x12b0ebf>;
68 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ssi.txt b/Documentation/devicetree/bindings/powerpc/fsl/ssi.txt
new file mode 100644
index 000000000000..5ff76c9c57d2
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/ssi.txt
@@ -0,0 +1,73 @@
1Freescale Synchronous Serial Interface
2
3The SSI is a serial device that communicates with audio codecs. It can
4be programmed in AC97, I2S, left-justified, or right-justified modes.
5
6Required properties:
7- compatible: Compatible list, contains "fsl,ssi".
8- cell-index: The SSI, <0> = SSI1, <1> = SSI2, and so on.
9- reg: Offset and length of the register set for the device.
10- interrupts: <a b> where a is the interrupt number and b is a
11 field that represents an encoding of the sense and
12 level information for the interrupt. This should be
13 encoded based on the information in section 2)
14 depending on the type of interrupt controller you
15 have.
16- interrupt-parent: The phandle for the interrupt controller that
17 services interrupts for this device.
18- fsl,mode: The operating mode for the SSI interface.
19 "i2s-slave" - I2S mode, SSI is clock slave
20 "i2s-master" - I2S mode, SSI is clock master
21 "lj-slave" - left-justified mode, SSI is clock slave
22 "lj-master" - l.j. mode, SSI is clock master
23 "rj-slave" - right-justified mode, SSI is clock slave
24 "rj-master" - r.j., SSI is clock master
25 "ac97-slave" - AC97 mode, SSI is clock slave
26 "ac97-master" - AC97 mode, SSI is clock master
27- fsl,playback-dma: Phandle to a node for the DMA channel to use for
28 playback of audio. This is typically dictated by SOC
29 design. See the notes below.
30- fsl,capture-dma: Phandle to a node for the DMA channel to use for
31 capture (recording) of audio. This is typically dictated
32 by SOC design. See the notes below.
33- fsl,fifo-depth: The number of elements in the transmit and receive FIFOs.
34 This number is the maximum allowed value for SFCSR[TFWM0].
35- fsl,ssi-asynchronous:
36 If specified, the SSI is to be programmed in asynchronous
37 mode. In this mode, pins SRCK, STCK, SRFS, and STFS must
38 all be connected to valid signals. In synchronous mode,
39 SRCK and SRFS are ignored. Asynchronous mode allows
40 playback and capture to use different sample sizes and
41 sample rates. Some drivers may require that SRCK and STCK
42 be connected together, and SRFS and STFS be connected
43 together. This would still allow different sample sizes,
44 but not different sample rates.
45
46Optional properties:
47- codec-handle: Phandle to a 'codec' node that defines an audio
48 codec connected to this SSI. This node is typically
49 a child of an I2C or other control node.
50
51Child 'codec' node required properties:
52- compatible: Compatible list, contains the name of the codec
53
54Child 'codec' node optional properties:
55- clock-frequency: The frequency of the input clock, which typically comes
56 from an on-board dedicated oscillator.
57
58Notes on fsl,playback-dma and fsl,capture-dma:
59
60On SOCs that have an SSI, specific DMA channels are hard-wired for playback
61and capture. On the MPC8610, for example, SSI1 must use DMA channel 0 for
62playback and DMA channel 1 for capture. SSI2 must use DMA channel 2 for
63playback and DMA channel 3 for capture. The developer can choose which
64DMA controller to use, but the channels themselves are hard-wired. The
65purpose of these two properties is to represent this hardware design.
66
67The device tree nodes for the DMA channels that are referenced by
68"fsl,playback-dma" and "fsl,capture-dma" must be marked as compatible with
69"fsl,ssi-dma-channel". The SOC-specific compatible string (e.g.
70"fsl,mpc8610-dma-channel") can remain. If these nodes are left as
71"fsl,elo-dma-channel" or "fsl,eloplus-dma-channel", then the generic Elo DMA
72drivers (fsldma) will attempt to use them, and it will conflict with the
73sound drivers.
diff --git a/Documentation/devicetree/bindings/powerpc/nintendo/gamecube.txt b/Documentation/devicetree/bindings/powerpc/nintendo/gamecube.txt
new file mode 100644
index 000000000000..b558585b1aaf
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/nintendo/gamecube.txt
@@ -0,0 +1,109 @@
1
2Nintendo GameCube device tree
3=============================
4
51) The "flipper" node
6
7 This node represents the multi-function "Flipper" chip, which packages
8 many of the devices found in the Nintendo GameCube.
9
10 Required properties:
11
12 - compatible : Should be "nintendo,flipper"
13
141.a) The Video Interface (VI) node
15
16 Represents the interface between the graphics processor and a external
17 video encoder.
18
19 Required properties:
20
21 - compatible : should be "nintendo,flipper-vi"
22 - reg : should contain the VI registers location and length
23 - interrupts : should contain the VI interrupt
24
251.b) The Processor Interface (PI) node
26
27 Represents the data and control interface between the main processor
28 and graphics and audio processor.
29
30 Required properties:
31
32 - compatible : should be "nintendo,flipper-pi"
33 - reg : should contain the PI registers location and length
34
351.b.i) The "Flipper" interrupt controller node
36
37 Represents the interrupt controller within the "Flipper" chip.
38 The node for the "Flipper" interrupt controller must be placed under
39 the PI node.
40
41 Required properties:
42
43 - compatible : should be "nintendo,flipper-pic"
44
451.c) The Digital Signal Procesor (DSP) node
46
47 Represents the digital signal processor interface, designed to offload
48 audio related tasks.
49
50 Required properties:
51
52 - compatible : should be "nintendo,flipper-dsp"
53 - reg : should contain the DSP registers location and length
54 - interrupts : should contain the DSP interrupt
55
561.c.i) The Auxiliary RAM (ARAM) node
57
58 Represents the non cpu-addressable ram designed mainly to store audio
59 related information.
60 The ARAM node must be placed under the DSP node.
61
62 Required properties:
63
64 - compatible : should be "nintendo,flipper-aram"
65 - reg : should contain the ARAM start (zero-based) and length
66
671.d) The Disk Interface (DI) node
68
69 Represents the interface used to communicate with mass storage devices.
70
71 Required properties:
72
73 - compatible : should be "nintendo,flipper-di"
74 - reg : should contain the DI registers location and length
75 - interrupts : should contain the DI interrupt
76
771.e) The Audio Interface (AI) node
78
79 Represents the interface to the external 16-bit stereo digital-to-analog
80 converter.
81
82 Required properties:
83
84 - compatible : should be "nintendo,flipper-ai"
85 - reg : should contain the AI registers location and length
86 - interrupts : should contain the AI interrupt
87
881.f) The Serial Interface (SI) node
89
90 Represents the interface to the four single bit serial interfaces.
91 The SI is a proprietary serial interface used normally to control gamepads.
92 It's NOT a RS232-type interface.
93
94 Required properties:
95
96 - compatible : should be "nintendo,flipper-si"
97 - reg : should contain the SI registers location and length
98 - interrupts : should contain the SI interrupt
99
1001.g) The External Interface (EXI) node
101
102 Represents the multi-channel SPI-like interface.
103
104 Required properties:
105
106 - compatible : should be "nintendo,flipper-exi"
107 - reg : should contain the EXI registers location and length
108 - interrupts : should contain the EXI interrupt
109
diff --git a/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt b/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt
new file mode 100644
index 000000000000..36afa322b04b
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt
@@ -0,0 +1,184 @@
1
2Nintendo Wii device tree
3========================
4
50) The root node
6
7 This node represents the Nintendo Wii video game console.
8
9 Required properties:
10
11 - model : Should be "nintendo,wii"
12 - compatible : Should be "nintendo,wii"
13
141) The "hollywood" node
15
16 This node represents the multi-function "Hollywood" chip, which packages
17 many of the devices found in the Nintendo Wii.
18
19 Required properties:
20
21 - compatible : Should be "nintendo,hollywood"
22
231.a) The Video Interface (VI) node
24
25 Represents the interface between the graphics processor and a external
26 video encoder.
27
28 Required properties:
29
30 - compatible : should be "nintendo,hollywood-vi","nintendo,flipper-vi"
31 - reg : should contain the VI registers location and length
32 - interrupts : should contain the VI interrupt
33
341.b) The Processor Interface (PI) node
35
36 Represents the data and control interface between the main processor
37 and graphics and audio processor.
38
39 Required properties:
40
41 - compatible : should be "nintendo,hollywood-pi","nintendo,flipper-pi"
42 - reg : should contain the PI registers location and length
43
441.b.i) The "Flipper" interrupt controller node
45
46 Represents the "Flipper" interrupt controller within the "Hollywood" chip.
47 The node for the "Flipper" interrupt controller must be placed under
48 the PI node.
49
50 Required properties:
51
52 - #interrupt-cells : <1>
53 - compatible : should be "nintendo,flipper-pic"
54 - interrupt-controller
55
561.c) The Digital Signal Procesor (DSP) node
57
58 Represents the digital signal processor interface, designed to offload
59 audio related tasks.
60
61 Required properties:
62
63 - compatible : should be "nintendo,hollywood-dsp","nintendo,flipper-dsp"
64 - reg : should contain the DSP registers location and length
65 - interrupts : should contain the DSP interrupt
66
671.d) The Serial Interface (SI) node
68
69 Represents the interface to the four single bit serial interfaces.
70 The SI is a proprietary serial interface used normally to control gamepads.
71 It's NOT a RS232-type interface.
72
73 Required properties:
74
75 - compatible : should be "nintendo,hollywood-si","nintendo,flipper-si"
76 - reg : should contain the SI registers location and length
77 - interrupts : should contain the SI interrupt
78
791.e) The Audio Interface (AI) node
80
81 Represents the interface to the external 16-bit stereo digital-to-analog
82 converter.
83
84 Required properties:
85
86 - compatible : should be "nintendo,hollywood-ai","nintendo,flipper-ai"
87 - reg : should contain the AI registers location and length
88 - interrupts : should contain the AI interrupt
89
901.f) The External Interface (EXI) node
91
92 Represents the multi-channel SPI-like interface.
93
94 Required properties:
95
96 - compatible : should be "nintendo,hollywood-exi","nintendo,flipper-exi"
97 - reg : should contain the EXI registers location and length
98 - interrupts : should contain the EXI interrupt
99
1001.g) The Open Host Controller Interface (OHCI) nodes
101
102 Represent the USB 1.x Open Host Controller Interfaces.
103
104 Required properties:
105
106 - compatible : should be "nintendo,hollywood-usb-ohci","usb-ohci"
107 - reg : should contain the OHCI registers location and length
108 - interrupts : should contain the OHCI interrupt
109
1101.h) The Enhanced Host Controller Interface (EHCI) node
111
112 Represents the USB 2.0 Enhanced Host Controller Interface.
113
114 Required properties:
115
116 - compatible : should be "nintendo,hollywood-usb-ehci","usb-ehci"
117 - reg : should contain the EHCI registers location and length
118 - interrupts : should contain the EHCI interrupt
119
1201.i) The Secure Digital Host Controller Interface (SDHCI) nodes
121
122 Represent the Secure Digital Host Controller Interfaces.
123
124 Required properties:
125
126 - compatible : should be "nintendo,hollywood-sdhci","sdhci"
127 - reg : should contain the SDHCI registers location and length
128 - interrupts : should contain the SDHCI interrupt
129
1301.j) The Inter-Processor Communication (IPC) node
131
132 Represent the Inter-Processor Communication interface. This interface
133 enables communications between the Broadway and the Starlet processors.
134
135 - compatible : should be "nintendo,hollywood-ipc"
136 - reg : should contain the IPC registers location and length
137 - interrupts : should contain the IPC interrupt
138
1391.k) The "Hollywood" interrupt controller node
140
141 Represents the "Hollywood" interrupt controller within the
142 "Hollywood" chip.
143
144 Required properties:
145
146 - #interrupt-cells : <1>
147 - compatible : should be "nintendo,hollywood-pic"
148 - reg : should contain the controller registers location and length
149 - interrupt-controller
150 - interrupts : should contain the cascade interrupt of the "flipper" pic
151 - interrupt-parent: should contain the phandle of the "flipper" pic
152
1531.l) The General Purpose I/O (GPIO) controller node
154
155 Represents the dual access 32 GPIO controller interface.
156
157 Required properties:
158
159 - #gpio-cells : <2>
160 - compatible : should be "nintendo,hollywood-gpio"
161 - reg : should contain the IPC registers location and length
162 - gpio-controller
163
1641.m) The control node
165
166 Represents the control interface used to setup several miscellaneous
167 settings of the "Hollywood" chip like boot memory mappings, resets,
168 disk interface mode, etc.
169
170 Required properties:
171
172 - compatible : should be "nintendo,hollywood-control"
173 - reg : should contain the control registers location and length
174
1751.n) The Disk Interface (DI) node
176
177 Represents the interface used to communicate with mass storage devices.
178
179 Required properties:
180
181 - compatible : should be "nintendo,hollywood-di"
182 - reg : should contain the DI registers location and length
183 - interrupts : should contain the DI interrupt
184
diff --git a/Documentation/devicetree/bindings/rtc/rtc-cmos.txt b/Documentation/devicetree/bindings/rtc/rtc-cmos.txt
new file mode 100644
index 000000000000..7382989b3052
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-cmos.txt
@@ -0,0 +1,28 @@
1 Motorola mc146818 compatible RTC
2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4Required properties:
5 - compatible : "motorola,mc146818"
6 - reg : should contain registers location and length.
7
8Optional properties:
9 - interrupts : should contain interrupt.
10 - interrupt-parent : interrupt source phandle.
11 - ctrl-reg : Contains the initial value of the control register also
12 called "Register B".
13 - freq-reg : Contains the initial value of the frequency register also
14 called "Regsiter A".
15
16"Register A" and "B" are usually initialized by the firmware (BIOS for
17instance). If this is not done, it can be performed by the driver.
18
19ISA Example:
20
21 rtc@70 {
22 compatible = "motorola,mc146818";
23 interrupts = <8 3>;
24 interrupt-parent = <&ioapic1>;
25 ctrl-reg = <2>;
26 freq-reg = <0x26>;
27 reg = <1 0x70 2>;
28 };
diff --git a/Documentation/devicetree/bindings/serial/altera_jtaguart.txt b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
new file mode 100644
index 000000000000..c152f65f9a28
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
@@ -0,0 +1,4 @@
1Altera JTAG UART
2
3Required properties:
4- compatible : should be "ALTR,juart-1.0"
diff --git a/Documentation/devicetree/bindings/serial/altera_uart.txt b/Documentation/devicetree/bindings/serial/altera_uart.txt
new file mode 100644
index 000000000000..71cae3f70100
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/altera_uart.txt
@@ -0,0 +1,7 @@
1Altera UART
2
3Required properties:
4- compatible : should be "ALTR,uart-1.0"
5
6Optional properties:
7- clock-frequency : frequency of the clock input to the UART
diff --git a/Documentation/devicetree/bindings/serio/altera_ps2.txt b/Documentation/devicetree/bindings/serio/altera_ps2.txt
new file mode 100644
index 000000000000..4d9eecc2ef7d
--- /dev/null
+++ b/Documentation/devicetree/bindings/serio/altera_ps2.txt
@@ -0,0 +1,4 @@
1Altera UP PS/2 controller
2
3Required properties:
4- compatible : should be "ALTR,ps2-1.0".
diff --git a/Documentation/devicetree/bindings/spi/fsl-spi.txt b/Documentation/devicetree/bindings/spi/fsl-spi.txt
new file mode 100644
index 000000000000..777abd7399d5
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/fsl-spi.txt
@@ -0,0 +1,53 @@
1* SPI (Serial Peripheral Interface)
2
3Required properties:
4- cell-index : QE SPI subblock index.
5 0: QE subblock SPI1
6 1: QE subblock SPI2
7- compatible : should be "fsl,spi".
8- mode : the SPI operation mode, it can be "cpu" or "cpu-qe".
9- reg : Offset and length of the register set for the device
10- interrupts : <a b> where a is the interrupt number and b is a
11 field that represents an encoding of the sense and level
12 information for the interrupt. This should be encoded based on
13 the information in section 2) depending on the type of interrupt
14 controller you have.
15- interrupt-parent : the phandle for the interrupt controller that
16 services interrupts for this device.
17
18Optional properties:
19- gpios : specifies the gpio pins to be used for chipselects.
20 The gpios will be referred to as reg = <index> in the SPI child nodes.
21 If unspecified, a single SPI device without a chip select can be used.
22
23Example:
24 spi@4c0 {
25 cell-index = <0>;
26 compatible = "fsl,spi";
27 reg = <4c0 40>;
28 interrupts = <82 0>;
29 interrupt-parent = <700>;
30 mode = "cpu";
31 gpios = <&gpio 18 1 // device reg=<0>
32 &gpio 19 1>; // device reg=<1>
33 };
34
35
36* eSPI (Enhanced Serial Peripheral Interface)
37
38Required properties:
39- compatible : should be "fsl,mpc8536-espi".
40- reg : Offset and length of the register set for the device.
41- interrupts : should contain eSPI interrupt, the device has one interrupt.
42- fsl,espi-num-chipselects : the number of the chipselect signals.
43
44Example:
45 spi@110000 {
46 #address-cells = <1>;
47 #size-cells = <0>;
48 compatible = "fsl,mpc8536-espi";
49 reg = <0x110000 0x1000>;
50 interrupts = <53 0x2>;
51 interrupt-parent = <&mpic>;
52 fsl,espi-num-chipselects = <4>;
53 };
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
new file mode 100644
index 000000000000..e782add2e457
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
@@ -0,0 +1,57 @@
1SPI (Serial Peripheral Interface) busses
2
3SPI busses can be described with a node for the SPI master device
4and a set of child nodes for each SPI slave on the bus. For this
5discussion, it is assumed that the system's SPI controller is in
6SPI master mode. This binding does not describe SPI controllers
7in slave mode.
8
9The SPI master node requires the following properties:
10- #address-cells - number of cells required to define a chip select
11 address on the SPI bus.
12- #size-cells - should be zero.
13- compatible - name of SPI bus controller following generic names
14 recommended practice.
15No other properties are required in the SPI bus node. It is assumed
16that a driver for an SPI bus device will understand that it is an SPI bus.
17However, the binding does not attempt to define the specific method for
18assigning chip select numbers. Since SPI chip select configuration is
19flexible and non-standardized, it is left out of this binding with the
20assumption that board specific platform code will be used to manage
21chip selects. Individual drivers can define additional properties to
22support describing the chip select layout.
23
24SPI slave nodes must be children of the SPI master node and can
25contain the following properties.
26- reg - (required) chip select address of device.
27- compatible - (required) name of SPI device following generic names
28 recommended practice
29- spi-max-frequency - (required) Maximum SPI clocking speed of device in Hz
30- spi-cpol - (optional) Empty property indicating device requires
31 inverse clock polarity (CPOL) mode
32- spi-cpha - (optional) Empty property indicating device requires
33 shifted clock phase (CPHA) mode
34- spi-cs-high - (optional) Empty property indicating device requires
35 chip select active high
36
37SPI example for an MPC5200 SPI bus:
38 spi@f00 {
39 #address-cells = <1>;
40 #size-cells = <0>;
41 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
42 reg = <0xf00 0x20>;
43 interrupts = <2 13 0 2 14 0>;
44 interrupt-parent = <&mpc5200_pic>;
45
46 ethernet-switch@0 {
47 compatible = "micrel,ks8995m";
48 spi-max-frequency = <1000000>;
49 reg = <0>;
50 };
51
52 codec@1 {
53 compatible = "ti,tlv320aic26";
54 spi-max-frequency = <100000>;
55 reg = <1>;
56 };
57 };
diff --git a/Documentation/devicetree/bindings/spi/spi_altera.txt b/Documentation/devicetree/bindings/spi/spi_altera.txt
new file mode 100644
index 000000000000..dda375943506
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi_altera.txt
@@ -0,0 +1,4 @@
1Altera SPI
2
3Required properties:
4- compatible : should be "ALTR,spi-1.0".
diff --git a/Documentation/devicetree/bindings/spi/spi_oc_tiny.txt b/Documentation/devicetree/bindings/spi/spi_oc_tiny.txt
new file mode 100644
index 000000000000..d95c0b367a04
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi_oc_tiny.txt
@@ -0,0 +1,12 @@
1OpenCores tiny SPI
2
3Required properties:
4- compatible : should be "opencores,tiny-spi-rtlsvn2".
5- gpios : should specify GPIOs used for chipselect.
6Optional properties:
7- clock-frequency : input clock frequency to the core.
8- baud-width: width, in bits, of the programmable divider used to scale
9 the input clock to SCLK.
10
11The clock-frequency and baud-width properties are needed only if the divider
12is programmable. They are not needed if the divider is fixed.
diff --git a/Documentation/devicetree/bindings/usb/fsl-usb.txt b/Documentation/devicetree/bindings/usb/fsl-usb.txt
new file mode 100644
index 000000000000..bd5723f0b67e
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/fsl-usb.txt
@@ -0,0 +1,81 @@
1Freescale SOC USB controllers
2
3The device node for a USB controller that is part of a Freescale
4SOC is as described in the document "Open Firmware Recommended
5Practice : Universal Serial Bus" with the following modifications
6and additions :
7
8Required properties :
9 - compatible : Should be "fsl-usb2-mph" for multi port host USB
10 controllers, or "fsl-usb2-dr" for dual role USB controllers
11 or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121
12 - phy_type : For multi port host USB controllers, should be one of
13 "ulpi", or "serial". For dual role USB controllers, should be
14 one of "ulpi", "utmi", "utmi_wide", or "serial".
15 - reg : Offset and length of the register set for the device
16 - port0 : boolean; if defined, indicates port0 is connected for
17 fsl-usb2-mph compatible controllers. Either this property or
18 "port1" (or both) must be defined for "fsl-usb2-mph" compatible
19 controllers.
20 - port1 : boolean; if defined, indicates port1 is connected for
21 fsl-usb2-mph compatible controllers. Either this property or
22 "port0" (or both) must be defined for "fsl-usb2-mph" compatible
23 controllers.
24 - dr_mode : indicates the working mode for "fsl-usb2-dr" compatible
25 controllers. Can be "host", "peripheral", or "otg". Default to
26 "host" if not defined for backward compatibility.
27
28Recommended properties :
29 - interrupts : <a b> where a is the interrupt number and b is a
30 field that represents an encoding of the sense and level
31 information for the interrupt. This should be encoded based on
32 the information in section 2) depending on the type of interrupt
33 controller you have.
34 - interrupt-parent : the phandle for the interrupt controller that
35 services interrupts for this device.
36
37Optional properties :
38 - fsl,invert-drvvbus : boolean; for MPC5121 USB0 only. Indicates the
39 port power polarity of internal PHY signal DRVVBUS is inverted.
40 - fsl,invert-pwr-fault : boolean; for MPC5121 USB0 only. Indicates
41 the PWR_FAULT signal polarity is inverted.
42
43Example multi port host USB controller device node :
44 usb@22000 {
45 compatible = "fsl-usb2-mph";
46 reg = <22000 1000>;
47 #address-cells = <1>;
48 #size-cells = <0>;
49 interrupt-parent = <700>;
50 interrupts = <27 1>;
51 phy_type = "ulpi";
52 port0;
53 port1;
54 };
55
56Example dual role USB controller device node :
57 usb@23000 {
58 compatible = "fsl-usb2-dr";
59 reg = <23000 1000>;
60 #address-cells = <1>;
61 #size-cells = <0>;
62 interrupt-parent = <700>;
63 interrupts = <26 1>;
64 dr_mode = "otg";
65 phy = "ulpi";
66 };
67
68Example dual role USB controller device node for MPC5121ADS:
69
70 usb@4000 {
71 compatible = "fsl,mpc5121-usb2-dr";
72 reg = <0x4000 0x1000>;
73 #address-cells = <1>;
74 #size-cells = <0>;
75 interrupt-parent = < &ipic >;
76 interrupts = <44 0x8>;
77 dr_mode = "otg";
78 phy_type = "utmi_wide";
79 fsl,invert-drvvbus;
80 fsl,invert-pwr-fault;
81 };
diff --git a/Documentation/devicetree/bindings/usb/usb-ehci.txt b/Documentation/devicetree/bindings/usb/usb-ehci.txt
new file mode 100644
index 000000000000..fa18612f757b
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt
@@ -0,0 +1,25 @@
1USB EHCI controllers
2
3Required properties:
4 - compatible : should be "usb-ehci".
5 - reg : should contain at least address and length of the standard EHCI
6 register set for the device. Optional platform-dependent registers
7 (debug-port or other) can be also specified here, but only after
8 definition of standard EHCI registers.
9 - interrupts : one EHCI interrupt should be described here.
10If device registers are implemented in big endian mode, the device
11node should have "big-endian-regs" property.
12If controller implementation operates with big endian descriptors,
13"big-endian-desc" property should be specified.
14If both big endian registers and descriptors are used by the controller
15implementation, "big-endian" property can be specified instead of having
16both "big-endian-regs" and "big-endian-desc".
17
18Example (Sequoia 440EPx):
19 ehci@e0000300 {
20 compatible = "ibm,usb-ehci-440epx", "usb-ehci";
21 interrupt-parent = <&UIC0>;
22 interrupts = <1a 4>;
23 reg = <0 e0000300 90 0 e0000390 70>;
24 big-endian;
25 };
diff --git a/Documentation/devicetree/bindings/x86/ce4100.txt b/Documentation/devicetree/bindings/x86/ce4100.txt
new file mode 100644
index 000000000000..b49ae593a60b
--- /dev/null
+++ b/Documentation/devicetree/bindings/x86/ce4100.txt
@@ -0,0 +1,38 @@
1CE4100 Device Tree Bindings
2---------------------------
3
4The CE4100 SoC uses for in core peripherals the following compatible
5format: <vendor>,<chip>-<device>.
6Many of the "generic" devices like HPET or IO APIC have the ce4100
7name in their compatible property because they first appeared in this
8SoC.
9
10The CPU node
11------------
12 cpu@0 {
13 device_type = "cpu";
14 compatible = "intel,ce4100";
15 reg = <0>;
16 lapic = <&lapic0>;
17 };
18
19The reg property describes the CPU number. The lapic property points to
20the local APIC timer.
21
22The SoC node
23------------
24
25This node describes the in-core peripherals. Required property:
26 compatible = "intel,ce4100-cp";
27
28The PCI node
29------------
30This node describes the PCI bus on the SoC. Its property should be
31 compatible = "intel,ce4100-pci", "pci";
32
33If the OS is using the IO-APIC for interrupt routing then the reported
34interrupt numbers for devices is no longer true. In order to obtain the
35correct interrupt number, the child node which represents the device has
36to contain the interrupt property. Besides the interrupt property it has
37to contain at least the reg property containing the PCI bus address and
38compatible property according to "PCI Bus Binding Revision 2.1".
diff --git a/Documentation/devicetree/bindings/x86/interrupt.txt b/Documentation/devicetree/bindings/x86/interrupt.txt
new file mode 100644
index 000000000000..7d19f494f19a
--- /dev/null
+++ b/Documentation/devicetree/bindings/x86/interrupt.txt
@@ -0,0 +1,26 @@
1Interrupt chips
2---------------
3
4* Intel I/O Advanced Programmable Interrupt Controller (IO APIC)
5
6 Required properties:
7 --------------------
8 compatible = "intel,ce4100-ioapic";
9 #interrupt-cells = <2>;
10
11 Device's interrupt property:
12
13 interrupts = <P S>;
14
15 The first number (P) represents the interrupt pin which is wired to the
16 IO APIC. The second number (S) represents the sense of interrupt which
17 should be configured and can be one of:
18 0 - Edge Rising
19 1 - Level Low
20 2 - Level High
21 3 - Edge Falling
22
23* Local APIC
24 Required property:
25
26 compatible = "intel,ce4100-lapic";
diff --git a/Documentation/devicetree/bindings/x86/timer.txt b/Documentation/devicetree/bindings/x86/timer.txt
new file mode 100644
index 000000000000..c688af58e3bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/x86/timer.txt
@@ -0,0 +1,6 @@
1Timers
2------
3
4* High Precision Event Timer (HPET)
5 Required property:
6 compatible = "intel,ce4100-hpet";
diff --git a/Documentation/devicetree/bindings/xilinx.txt b/Documentation/devicetree/bindings/xilinx.txt
new file mode 100644
index 000000000000..299d0923537b
--- /dev/null
+++ b/Documentation/devicetree/bindings/xilinx.txt
@@ -0,0 +1,306 @@
1 d) Xilinx IP cores
2
3 The Xilinx EDK toolchain ships with a set of IP cores (devices) for use
4 in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range
5 of standard device types (network, serial, etc.) and miscellaneous
6 devices (gpio, LCD, spi, etc). Also, since these devices are
7 implemented within the fpga fabric every instance of the device can be
8 synthesised with different options that change the behaviour.
9
10 Each IP-core has a set of parameters which the FPGA designer can use to
11 control how the core is synthesized. Historically, the EDK tool would
12 extract the device parameters relevant to device drivers and copy them
13 into an 'xparameters.h' in the form of #define symbols. This tells the
14 device drivers how the IP cores are configured, but it requires the kernel
15 to be recompiled every time the FPGA bitstream is resynthesized.
16
17 The new approach is to export the parameters into the device tree and
18 generate a new device tree each time the FPGA bitstream changes. The
19 parameters which used to be exported as #defines will now become
20 properties of the device node. In general, device nodes for IP-cores
21 will take the following form:
22
23 (name): (generic-name)@(base-address) {
24 compatible = "xlnx,(ip-core-name)-(HW_VER)"
25 [, (list of compatible devices), ...];
26 reg = <(baseaddr) (size)>;
27 interrupt-parent = <&interrupt-controller-phandle>;
28 interrupts = < ... >;
29 xlnx,(parameter1) = "(string-value)";
30 xlnx,(parameter2) = <(int-value)>;
31 };
32
33 (generic-name): an open firmware-style name that describes the
34 generic class of device. Preferably, this is one word, such
35 as 'serial' or 'ethernet'.
36 (ip-core-name): the name of the ip block (given after the BEGIN
37 directive in system.mhs). Should be in lowercase
38 and all underscores '_' converted to dashes '-'.
39 (name): is derived from the "PARAMETER INSTANCE" value.
40 (parameter#): C_* parameters from system.mhs. The C_ prefix is
41 dropped from the parameter name, the name is converted
42 to lowercase and all underscore '_' characters are
43 converted to dashes '-'.
44 (baseaddr): the baseaddr parameter value (often named C_BASEADDR).
45 (HW_VER): from the HW_VER parameter.
46 (size): the address range size (often C_HIGHADDR - C_BASEADDR + 1).
47
48 Typically, the compatible list will include the exact IP core version
49 followed by an older IP core version which implements the same
50 interface or any other device with the same interface.
51
52 'reg', 'interrupt-parent' and 'interrupts' are all optional properties.
53
54 For example, the following block from system.mhs:
55
56 BEGIN opb_uartlite
57 PARAMETER INSTANCE = opb_uartlite_0
58 PARAMETER HW_VER = 1.00.b
59 PARAMETER C_BAUDRATE = 115200
60 PARAMETER C_DATA_BITS = 8
61 PARAMETER C_ODD_PARITY = 0
62 PARAMETER C_USE_PARITY = 0
63 PARAMETER C_CLK_FREQ = 50000000
64 PARAMETER C_BASEADDR = 0xEC100000
65 PARAMETER C_HIGHADDR = 0xEC10FFFF
66 BUS_INTERFACE SOPB = opb_7
67 PORT OPB_Clk = CLK_50MHz
68 PORT Interrupt = opb_uartlite_0_Interrupt
69 PORT RX = opb_uartlite_0_RX
70 PORT TX = opb_uartlite_0_TX
71 PORT OPB_Rst = sys_bus_reset_0
72 END
73
74 becomes the following device tree node:
75
76 opb_uartlite_0: serial@ec100000 {
77 device_type = "serial";
78 compatible = "xlnx,opb-uartlite-1.00.b";
79 reg = <ec100000 10000>;
80 interrupt-parent = <&opb_intc_0>;
81 interrupts = <1 0>; // got this from the opb_intc parameters
82 current-speed = <d#115200>; // standard serial device prop
83 clock-frequency = <d#50000000>; // standard serial device prop
84 xlnx,data-bits = <8>;
85 xlnx,odd-parity = <0>;
86 xlnx,use-parity = <0>;
87 };
88
89 Some IP cores actually implement 2 or more logical devices. In
90 this case, the device should still describe the whole IP core with
91 a single node and add a child node for each logical device. The
92 ranges property can be used to translate from parent IP-core to the
93 registers of each device. In addition, the parent node should be
94 compatible with the bus type 'xlnx,compound', and should contain
95 #address-cells and #size-cells, as with any other bus. (Note: this
96 makes the assumption that both logical devices have the same bus
97 binding. If this is not true, then separate nodes should be used
98 for each logical device). The 'cell-index' property can be used to
99 enumerate logical devices within an IP core. For example, the
100 following is the system.mhs entry for the dual ps2 controller found
101 on the ml403 reference design.
102
103 BEGIN opb_ps2_dual_ref
104 PARAMETER INSTANCE = opb_ps2_dual_ref_0
105 PARAMETER HW_VER = 1.00.a
106 PARAMETER C_BASEADDR = 0xA9000000
107 PARAMETER C_HIGHADDR = 0xA9001FFF
108 BUS_INTERFACE SOPB = opb_v20_0
109 PORT Sys_Intr1 = ps2_1_intr
110 PORT Sys_Intr2 = ps2_2_intr
111 PORT Clkin1 = ps2_clk_rx_1
112 PORT Clkin2 = ps2_clk_rx_2
113 PORT Clkpd1 = ps2_clk_tx_1
114 PORT Clkpd2 = ps2_clk_tx_2
115 PORT Rx1 = ps2_d_rx_1
116 PORT Rx2 = ps2_d_rx_2
117 PORT Txpd1 = ps2_d_tx_1
118 PORT Txpd2 = ps2_d_tx_2
119 END
120
121 It would result in the following device tree nodes:
122
123 opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
124 #address-cells = <1>;
125 #size-cells = <1>;
126 compatible = "xlnx,compound";
127 ranges = <0 a9000000 2000>;
128 // If this device had extra parameters, then they would
129 // go here.
130 ps2@0 {
131 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
132 reg = <0 40>;
133 interrupt-parent = <&opb_intc_0>;
134 interrupts = <3 0>;
135 cell-index = <0>;
136 };
137 ps2@1000 {
138 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
139 reg = <1000 40>;
140 interrupt-parent = <&opb_intc_0>;
141 interrupts = <3 0>;
142 cell-index = <0>;
143 };
144 };
145
146 Also, the system.mhs file defines bus attachments from the processor
147 to the devices. The device tree structure should reflect the bus
148 attachments. Again an example; this system.mhs fragment:
149
150 BEGIN ppc405_virtex4
151 PARAMETER INSTANCE = ppc405_0
152 PARAMETER HW_VER = 1.01.a
153 BUS_INTERFACE DPLB = plb_v34_0
154 BUS_INTERFACE IPLB = plb_v34_0
155 END
156
157 BEGIN opb_intc
158 PARAMETER INSTANCE = opb_intc_0
159 PARAMETER HW_VER = 1.00.c
160 PARAMETER C_BASEADDR = 0xD1000FC0
161 PARAMETER C_HIGHADDR = 0xD1000FDF
162 BUS_INTERFACE SOPB = opb_v20_0
163 END
164
165 BEGIN opb_uart16550
166 PARAMETER INSTANCE = opb_uart16550_0
167 PARAMETER HW_VER = 1.00.d
168 PARAMETER C_BASEADDR = 0xa0000000
169 PARAMETER C_HIGHADDR = 0xa0001FFF
170 BUS_INTERFACE SOPB = opb_v20_0
171 END
172
173 BEGIN plb_v34
174 PARAMETER INSTANCE = plb_v34_0
175 PARAMETER HW_VER = 1.02.a
176 END
177
178 BEGIN plb_bram_if_cntlr
179 PARAMETER INSTANCE = plb_bram_if_cntlr_0
180 PARAMETER HW_VER = 1.00.b
181 PARAMETER C_BASEADDR = 0xFFFF0000
182 PARAMETER C_HIGHADDR = 0xFFFFFFFF
183 BUS_INTERFACE SPLB = plb_v34_0
184 END
185
186 BEGIN plb2opb_bridge
187 PARAMETER INSTANCE = plb2opb_bridge_0
188 PARAMETER HW_VER = 1.01.a
189 PARAMETER C_RNG0_BASEADDR = 0x20000000
190 PARAMETER C_RNG0_HIGHADDR = 0x3FFFFFFF
191 PARAMETER C_RNG1_BASEADDR = 0x60000000
192 PARAMETER C_RNG1_HIGHADDR = 0x7FFFFFFF
193 PARAMETER C_RNG2_BASEADDR = 0x80000000
194 PARAMETER C_RNG2_HIGHADDR = 0xBFFFFFFF
195 PARAMETER C_RNG3_BASEADDR = 0xC0000000
196 PARAMETER C_RNG3_HIGHADDR = 0xDFFFFFFF
197 BUS_INTERFACE SPLB = plb_v34_0
198 BUS_INTERFACE MOPB = opb_v20_0
199 END
200
201 Gives this device tree (some properties removed for clarity):
202
203 plb@0 {
204 #address-cells = <1>;
205 #size-cells = <1>;
206 compatible = "xlnx,plb-v34-1.02.a";
207 device_type = "ibm,plb";
208 ranges; // 1:1 translation
209
210 plb_bram_if_cntrl_0: bram@ffff0000 {
211 reg = <ffff0000 10000>;
212 }
213
214 opb@20000000 {
215 #address-cells = <1>;
216 #size-cells = <1>;
217 ranges = <20000000 20000000 20000000
218 60000000 60000000 20000000
219 80000000 80000000 40000000
220 c0000000 c0000000 20000000>;
221
222 opb_uart16550_0: serial@a0000000 {
223 reg = <a00000000 2000>;
224 };
225
226 opb_intc_0: interrupt-controller@d1000fc0 {
227 reg = <d1000fc0 20>;
228 };
229 };
230 };
231
232 That covers the general approach to binding xilinx IP cores into the
233 device tree. The following are bindings for specific devices:
234
235 i) Xilinx ML300 Framebuffer
236
237 Simple framebuffer device from the ML300 reference design (also on the
238 ML403 reference design as well as others).
239
240 Optional properties:
241 - resolution = <xres yres> : pixel resolution of framebuffer. Some
242 implementations use a different resolution.
243 Default is <d#640 d#480>
244 - virt-resolution = <xvirt yvirt> : Size of framebuffer in memory.
245 Default is <d#1024 d#480>.
246 - rotate-display (empty) : rotate display 180 degrees.
247
248 ii) Xilinx SystemACE
249
250 The Xilinx SystemACE device is used to program FPGAs from an FPGA
251 bitstream stored on a CF card. It can also be used as a generic CF
252 interface device.
253
254 Optional properties:
255 - 8-bit (empty) : Set this property for SystemACE in 8 bit mode
256
257 iii) Xilinx EMAC and Xilinx TEMAC
258
259 Xilinx Ethernet devices. In addition to general xilinx properties
260 listed above, nodes for these devices should include a phy-handle
261 property, and may include other common network device properties
262 like local-mac-address.
263
264 iv) Xilinx Uartlite
265
266 Xilinx uartlite devices are simple fixed speed serial ports.
267
268 Required properties:
269 - current-speed : Baud rate of uartlite
270
271 v) Xilinx hwicap
272
273 Xilinx hwicap devices provide access to the configuration logic
274 of the FPGA through the Internal Configuration Access Port
275 (ICAP). The ICAP enables partial reconfiguration of the FPGA,
276 readback of the configuration information, and some control over
277 'warm boots' of the FPGA fabric.
278
279 Required properties:
280 - xlnx,family : The family of the FPGA, necessary since the
281 capabilities of the underlying ICAP hardware
282 differ between different families. May be
283 'virtex2p', 'virtex4', or 'virtex5'.
284
285 vi) Xilinx Uart 16550
286
287 Xilinx UART 16550 devices are very similar to the NS16550 but with
288 different register spacing and an offset from the base address.
289
290 Required properties:
291 - clock-frequency : Frequency of the clock input
292 - reg-offset : A value of 3 is required
293 - reg-shift : A value of 2 is required
294
295 vii) Xilinx USB Host controller
296
297 The Xilinx USB host controller is EHCI compatible but with a different
298 base address for the EHCI registers, and it is always a big-endian
299 USB Host controller. The hardware can be configured as high speed only,
300 or high speed/full speed hybrid.
301
302 Required properties:
303 - xlnx,support-usb-fs: A value 0 means the core is built as high speed
304 only. A value 1 means the core also supports
305 full speed devices.
306
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
new file mode 100644
index 000000000000..7c1329de0596
--- /dev/null
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -0,0 +1,1450 @@
1 Booting the Linux/ppc kernel without Open Firmware
2 --------------------------------------------------
3
4(c) 2005 Benjamin Herrenschmidt <benh at kernel.crashing.org>,
5 IBM Corp.
6(c) 2005 Becky Bruce <becky.bruce at freescale.com>,
7 Freescale Semiconductor, FSL SOC and 32-bit additions
8(c) 2006 MontaVista Software, Inc.
9 Flash chip node definition
10
11Table of Contents
12=================
13
14 I - Introduction
15 1) Entry point for arch/arm
16 2) Entry point for arch/powerpc
17 3) Entry point for arch/x86
18
19 II - The DT block format
20 1) Header
21 2) Device tree generalities
22 3) Device tree "structure" block
23 4) Device tree "strings" block
24
25 III - Required content of the device tree
26 1) Note about cells and address representation
27 2) Note about "compatible" properties
28 3) Note about "name" properties
29 4) Note about node and property names and character set
30 5) Required nodes and properties
31 a) The root node
32 b) The /cpus node
33 c) The /cpus/* nodes
34 d) the /memory node(s)
35 e) The /chosen node
36 f) the /soc<SOCname> node
37
38 IV - "dtc", the device tree compiler
39
40 V - Recommendations for a bootloader
41
42 VI - System-on-a-chip devices and nodes
43 1) Defining child nodes of an SOC
44 2) Representing devices without a current OF specification
45
46 VII - Specifying interrupt information for devices
47 1) interrupts property
48 2) interrupt-parent property
49 3) OpenPIC Interrupt Controllers
50 4) ISA Interrupt Controllers
51
52 VIII - Specifying device power management information (sleep property)
53
54 Appendix A - Sample SOC node for MPC8540
55
56
57Revision Information
58====================
59
60 May 18, 2005: Rev 0.1 - Initial draft, no chapter III yet.
61
62 May 19, 2005: Rev 0.2 - Add chapter III and bits & pieces here or
63 clarifies the fact that a lot of things are
64 optional, the kernel only requires a very
65 small device tree, though it is encouraged
66 to provide an as complete one as possible.
67
68 May 24, 2005: Rev 0.3 - Precise that DT block has to be in RAM
69 - Misc fixes
70 - Define version 3 and new format version 16
71 for the DT block (version 16 needs kernel
72 patches, will be fwd separately).
73 String block now has a size, and full path
74 is replaced by unit name for more
75 compactness.
76 linux,phandle is made optional, only nodes
77 that are referenced by other nodes need it.
78 "name" property is now automatically
79 deduced from the unit name
80
81 June 1, 2005: Rev 0.4 - Correct confusion between OF_DT_END and
82 OF_DT_END_NODE in structure definition.
83 - Change version 16 format to always align
84 property data to 4 bytes. Since tokens are
85 already aligned, that means no specific
86 required alignment between property size
87 and property data. The old style variable
88 alignment would make it impossible to do
89 "simple" insertion of properties using
90 memmove (thanks Milton for
91 noticing). Updated kernel patch as well
92 - Correct a few more alignment constraints
93 - Add a chapter about the device-tree
94 compiler and the textural representation of
95 the tree that can be "compiled" by dtc.
96
97 November 21, 2005: Rev 0.5
98 - Additions/generalizations for 32-bit
99 - Changed to reflect the new arch/powerpc
100 structure
101 - Added chapter VI
102
103
104 ToDo:
105 - Add some definitions of interrupt tree (simple/complex)
106 - Add some definitions for PCI host bridges
107 - Add some common address format examples
108 - Add definitions for standard properties and "compatible"
109 names for cells that are not already defined by the existing
110 OF spec.
111 - Compare FSL SOC use of PCI to standard and make sure no new
112 node definition required.
113 - Add more information about node definitions for SOC devices
114 that currently have no standard, like the FSL CPM.
115
116
117I - Introduction
118================
119
120During the development of the Linux/ppc64 kernel, and more
121specifically, the addition of new platform types outside of the old
122IBM pSeries/iSeries pair, it was decided to enforce some strict rules
123regarding the kernel entry and bootloader <-> kernel interfaces, in
124order to avoid the degeneration that had become the ppc32 kernel entry
125point and the way a new platform should be added to the kernel. The
126legacy iSeries platform breaks those rules as it predates this scheme,
127but no new board support will be accepted in the main tree that
128doesn't follow them properly. In addition, since the advent of the
129arch/powerpc merged architecture for ppc32 and ppc64, new 32-bit
130platforms and 32-bit platforms which move into arch/powerpc will be
131required to use these rules as well.
132
133The main requirement that will be defined in more detail below is
134the presence of a device-tree whose format is defined after Open
135Firmware specification. However, in order to make life easier
136to embedded board vendors, the kernel doesn't require the device-tree
137to represent every device in the system and only requires some nodes
138and properties to be present. This will be described in detail in
139section III, but, for example, the kernel does not require you to
140create a node for every PCI device in the system. It is a requirement
141to have a node for PCI host bridges in order to provide interrupt
142routing information and memory/IO ranges, among others. It is also
143recommended to define nodes for on chip devices and other buses that
144don't specifically fit in an existing OF specification. This creates a
145great flexibility in the way the kernel can then probe those and match
146drivers to device, without having to hard code all sorts of tables. It
147also makes it more flexible for board vendors to do minor hardware
148upgrades without significantly impacting the kernel code or cluttering
149it with special cases.
150
151
1521) Entry point for arch/arm
153---------------------------
154
155 There is one single entry point to the kernel, at the start
156 of the kernel image. That entry point supports two calling
157 conventions. A summary of the interface is described here. A full
158 description of the boot requirements is documented in
159 Documentation/arm/Booting
160
161 a) ATAGS interface. Minimal information is passed from firmware
162 to the kernel with a tagged list of predefined parameters.
163
164 r0 : 0
165
166 r1 : Machine type number
167
168 r2 : Physical address of tagged list in system RAM
169
170 b) Entry with a flattened device-tree block. Firmware loads the
171 physical address of the flattened device tree block (dtb) into r2,
172 r1 is not used, but it is considered good practise to use a valid
173 machine number as described in Documentation/arm/Booting.
174
175 r0 : 0
176
177 r1 : Valid machine type number. When using a device tree,
178 a single machine type number will often be assigned to
179 represent a class or family of SoCs.
180
181 r2 : physical pointer to the device-tree block
182 (defined in chapter II) in RAM. Device tree can be located
183 anywhere in system RAM, but it should be aligned on a 64 bit
184 boundary.
185
186 The kernel will differentiate between ATAGS and device tree booting by
187 reading the memory pointed to by r2 and looking for either the flattened
188 device tree block magic value (0xd00dfeed) or the ATAG_CORE value at
189 offset 0x4 from r2 (0x54410001).
190
1912) Entry point for arch/powerpc
192-------------------------------
193
194 There is one single entry point to the kernel, at the start
195 of the kernel image. That entry point supports two calling
196 conventions:
197
198 a) Boot from Open Firmware. If your firmware is compatible
199 with Open Firmware (IEEE 1275) or provides an OF compatible
200 client interface API (support for "interpret" callback of
201 forth words isn't required), you can enter the kernel with:
202
203 r5 : OF callback pointer as defined by IEEE 1275
204 bindings to powerpc. Only the 32-bit client interface
205 is currently supported
206
207 r3, r4 : address & length of an initrd if any or 0
208
209 The MMU is either on or off; the kernel will run the
210 trampoline located in arch/powerpc/kernel/prom_init.c to
211 extract the device-tree and other information from open
212 firmware and build a flattened device-tree as described
213 in b). prom_init() will then re-enter the kernel using
214 the second method. This trampoline code runs in the
215 context of the firmware, which is supposed to handle all
216 exceptions during that time.
217
218 b) Direct entry with a flattened device-tree block. This entry
219 point is called by a) after the OF trampoline and can also be
220 called directly by a bootloader that does not support the Open
221 Firmware client interface. It is also used by "kexec" to
222 implement "hot" booting of a new kernel from a previous
223 running one. This method is what I will describe in more
224 details in this document, as method a) is simply standard Open
225 Firmware, and thus should be implemented according to the
226 various standard documents defining it and its binding to the
227 PowerPC platform. The entry point definition then becomes:
228
229 r3 : physical pointer to the device-tree block
230 (defined in chapter II) in RAM
231
232 r4 : physical pointer to the kernel itself. This is
233 used by the assembly code to properly disable the MMU
234 in case you are entering the kernel with MMU enabled
235 and a non-1:1 mapping.
236
237 r5 : NULL (as to differentiate with method a)
238
239 Note about SMP entry: Either your firmware puts your other
240 CPUs in some sleep loop or spin loop in ROM where you can get
241 them out via a soft reset or some other means, in which case
242 you don't need to care, or you'll have to enter the kernel
243 with all CPUs. The way to do that with method b) will be
244 described in a later revision of this document.
245
246 Board supports (platforms) are not exclusive config options. An
247 arbitrary set of board supports can be built in a single kernel
248 image. The kernel will "know" what set of functions to use for a
249 given platform based on the content of the device-tree. Thus, you
250 should:
251
252 a) add your platform support as a _boolean_ option in
253 arch/powerpc/Kconfig, following the example of PPC_PSERIES,
254 PPC_PMAC and PPC_MAPLE. The later is probably a good
255 example of a board support to start from.
256
257 b) create your main platform file as
258 "arch/powerpc/platforms/myplatform/myboard_setup.c" and add it
259 to the Makefile under the condition of your CONFIG_
260 option. This file will define a structure of type "ppc_md"
261 containing the various callbacks that the generic code will
262 use to get to your platform specific code
263
264 A kernel image may support multiple platforms, but only if the
265 platforms feature the same core architecture. A single kernel build
266 cannot support both configurations with Book E and configurations
267 with classic Powerpc architectures.
268
2693) Entry point for arch/x86
270-------------------------------
271
272 There is one single 32bit entry point to the kernel at code32_start,
273 the decompressor (the real mode entry point goes to the same 32bit
274 entry point once it switched into protected mode). That entry point
275 supports one calling convention which is documented in
276 Documentation/x86/boot.txt
277 The physical pointer to the device-tree block (defined in chapter II)
278 is passed via setup_data which requires at least boot protocol 2.09.
279 The type filed is defined as
280
281 #define SETUP_DTB 2
282
283 This device-tree is used as an extension to the "boot page". As such it
284 does not parse / consider data which is already covered by the boot
285 page. This includes memory size, reserved ranges, command line arguments
286 or initrd address. It simply holds information which can not be retrieved
287 otherwise like interrupt routing or a list of devices behind an I2C bus.
288
289II - The DT block format
290========================
291
292
293This chapter defines the actual format of the flattened device-tree
294passed to the kernel. The actual content of it and kernel requirements
295are described later. You can find example of code manipulating that
296format in various places, including arch/powerpc/kernel/prom_init.c
297which will generate a flattened device-tree from the Open Firmware
298representation, or the fs2dt utility which is part of the kexec tools
299which will generate one from a filesystem representation. It is
300expected that a bootloader like uboot provides a bit more support,
301that will be discussed later as well.
302
303Note: The block has to be in main memory. It has to be accessible in
304both real mode and virtual mode with no mapping other than main
305memory. If you are writing a simple flash bootloader, it should copy
306the block to RAM before passing it to the kernel.
307
308
3091) Header
310---------
311
312 The kernel is passed the physical address pointing to an area of memory
313 that is roughly described in include/linux/of_fdt.h by the structure
314 boot_param_header:
315
316struct boot_param_header {
317 u32 magic; /* magic word OF_DT_HEADER */
318 u32 totalsize; /* total size of DT block */
319 u32 off_dt_struct; /* offset to structure */
320 u32 off_dt_strings; /* offset to strings */
321 u32 off_mem_rsvmap; /* offset to memory reserve map
322 */
323 u32 version; /* format version */
324 u32 last_comp_version; /* last compatible version */
325
326 /* version 2 fields below */
327 u32 boot_cpuid_phys; /* Which physical CPU id we're
328 booting on */
329 /* version 3 fields below */
330 u32 size_dt_strings; /* size of the strings block */
331
332 /* version 17 fields below */
333 u32 size_dt_struct; /* size of the DT structure block */
334};
335
336 Along with the constants:
337
338/* Definitions used by the flattened device tree */
339#define OF_DT_HEADER 0xd00dfeed /* 4: version,
340 4: total size */
341#define OF_DT_BEGIN_NODE 0x1 /* Start node: full name
342 */
343#define OF_DT_END_NODE 0x2 /* End node */
344#define OF_DT_PROP 0x3 /* Property: name off,
345 size, content */
346#define OF_DT_END 0x9
347
348 All values in this header are in big endian format, the various
349 fields in this header are defined more precisely below. All
350 "offset" values are in bytes from the start of the header; that is
351 from the physical base address of the device tree block.
352
353 - magic
354
355 This is a magic value that "marks" the beginning of the
356 device-tree block header. It contains the value 0xd00dfeed and is
357 defined by the constant OF_DT_HEADER
358
359 - totalsize
360
361 This is the total size of the DT block including the header. The
362 "DT" block should enclose all data structures defined in this
363 chapter (who are pointed to by offsets in this header). That is,
364 the device-tree structure, strings, and the memory reserve map.
365
366 - off_dt_struct
367
368 This is an offset from the beginning of the header to the start
369 of the "structure" part the device tree. (see 2) device tree)
370
371 - off_dt_strings
372
373 This is an offset from the beginning of the header to the start
374 of the "strings" part of the device-tree
375
376 - off_mem_rsvmap
377
378 This is an offset from the beginning of the header to the start
379 of the reserved memory map. This map is a list of pairs of 64-
380 bit integers. Each pair is a physical address and a size. The
381 list is terminated by an entry of size 0. This map provides the
382 kernel with a list of physical memory areas that are "reserved"
383 and thus not to be used for memory allocations, especially during
384 early initialization. The kernel needs to allocate memory during
385 boot for things like un-flattening the device-tree, allocating an
386 MMU hash table, etc... Those allocations must be done in such a
387 way to avoid overriding critical things like, on Open Firmware
388 capable machines, the RTAS instance, or on some pSeries, the TCE
389 tables used for the iommu. Typically, the reserve map should
390 contain _at least_ this DT block itself (header,total_size). If
391 you are passing an initrd to the kernel, you should reserve it as
392 well. You do not need to reserve the kernel image itself. The map
393 should be 64-bit aligned.
394
395 - version
396
397 This is the version of this structure. Version 1 stops
398 here. Version 2 adds an additional field boot_cpuid_phys.
399 Version 3 adds the size of the strings block, allowing the kernel
400 to reallocate it easily at boot and free up the unused flattened
401 structure after expansion. Version 16 introduces a new more
402 "compact" format for the tree itself that is however not backward
403 compatible. Version 17 adds an additional field, size_dt_struct,
404 allowing it to be reallocated or moved more easily (this is
405 particularly useful for bootloaders which need to make
406 adjustments to a device tree based on probed information). You
407 should always generate a structure of the highest version defined
408 at the time of your implementation. Currently that is version 17,
409 unless you explicitly aim at being backward compatible.
410
411 - last_comp_version
412
413 Last compatible version. This indicates down to what version of
414 the DT block you are backward compatible. For example, version 2
415 is backward compatible with version 1 (that is, a kernel build
416 for version 1 will be able to boot with a version 2 format). You
417 should put a 1 in this field if you generate a device tree of
418 version 1 to 3, or 16 if you generate a tree of version 16 or 17
419 using the new unit name format.
420
421 - boot_cpuid_phys
422
423 This field only exist on version 2 headers. It indicate which
424 physical CPU ID is calling the kernel entry point. This is used,
425 among others, by kexec. If you are on an SMP system, this value
426 should match the content of the "reg" property of the CPU node in
427 the device-tree corresponding to the CPU calling the kernel entry
428 point (see further chapters for more information on the required
429 device-tree contents)
430
431 - size_dt_strings
432
433 This field only exists on version 3 and later headers. It
434 gives the size of the "strings" section of the device tree (which
435 starts at the offset given by off_dt_strings).
436
437 - size_dt_struct
438
439 This field only exists on version 17 and later headers. It gives
440 the size of the "structure" section of the device tree (which
441 starts at the offset given by off_dt_struct).
442
443 So the typical layout of a DT block (though the various parts don't
444 need to be in that order) looks like this (addresses go from top to
445 bottom):
446
447
448 ------------------------------
449 base -> | struct boot_param_header |
450 ------------------------------
451 | (alignment gap) (*) |
452 ------------------------------
453 | memory reserve map |
454 ------------------------------
455 | (alignment gap) |
456 ------------------------------
457 | |
458 | device-tree structure |
459 | |
460 ------------------------------
461 | (alignment gap) |
462 ------------------------------
463 | |
464 | device-tree strings |
465 | |
466 -----> ------------------------------
467 |
468 |
469 --- (base + totalsize)
470
471 (*) The alignment gaps are not necessarily present; their presence
472 and size are dependent on the various alignment requirements of
473 the individual data blocks.
474
475
4762) Device tree generalities
477---------------------------
478
479This device-tree itself is separated in two different blocks, a
480structure block and a strings block. Both need to be aligned to a 4
481byte boundary.
482
483First, let's quickly describe the device-tree concept before detailing
484the storage format. This chapter does _not_ describe the detail of the
485required types of nodes & properties for the kernel, this is done
486later in chapter III.
487
488The device-tree layout is strongly inherited from the definition of
489the Open Firmware IEEE 1275 device-tree. It's basically a tree of
490nodes, each node having two or more named properties. A property can
491have a value or not.
492
493It is a tree, so each node has one and only one parent except for the
494root node who has no parent.
495
496A node has 2 names. The actual node name is generally contained in a
497property of type "name" in the node property list whose value is a
498zero terminated string and is mandatory for version 1 to 3 of the
499format definition (as it is in Open Firmware). Version 16 makes it
500optional as it can generate it from the unit name defined below.
501
502There is also a "unit name" that is used to differentiate nodes with
503the same name at the same level, it is usually made of the node
504names, the "@" sign, and a "unit address", which definition is
505specific to the bus type the node sits on.
506
507The unit name doesn't exist as a property per-se but is included in
508the device-tree structure. It is typically used to represent "path" in
509the device-tree. More details about the actual format of these will be
510below.
511
512The kernel generic code does not make any formal use of the
513unit address (though some board support code may do) so the only real
514requirement here for the unit address is to ensure uniqueness of
515the node unit name at a given level of the tree. Nodes with no notion
516of address and no possible sibling of the same name (like /memory or
517/cpus) may omit the unit address in the context of this specification,
518or use the "@0" default unit address. The unit name is used to define
519a node "full path", which is the concatenation of all parent node
520unit names separated with "/".
521
522The root node doesn't have a defined name, and isn't required to have
523a name property either if you are using version 3 or earlier of the
524format. It also has no unit address (no @ symbol followed by a unit
525address). The root node unit name is thus an empty string. The full
526path to the root node is "/".
527
528Every node which actually represents an actual device (that is, a node
529which isn't only a virtual "container" for more nodes, like "/cpus"
530is) is also required to have a "compatible" property indicating the
531specific hardware and an optional list of devices it is fully
532backwards compatible with.
533
534Finally, every node that can be referenced from a property in another
535node is required to have either a "phandle" or a "linux,phandle"
536property. Real Open Firmware implementations provide a unique
537"phandle" value for every node that the "prom_init()" trampoline code
538turns into "linux,phandle" properties. However, this is made optional
539if the flattened device tree is used directly. An example of a node
540referencing another node via "phandle" is when laying out the
541interrupt tree which will be described in a further version of this
542document.
543
544The "phandle" property is a 32-bit value that uniquely
545identifies a node. You are free to use whatever values or system of
546values, internal pointers, or whatever to generate these, the only
547requirement is that every node for which you provide that property has
548a unique value for it.
549
550Here is an example of a simple device-tree. In this example, an "o"
551designates a node followed by the node unit name. Properties are
552presented with their name followed by their content. "content"
553represents an ASCII string (zero terminated) value, while <content>
554represents a 32-bit hexadecimal value. The various nodes in this
555example will be discussed in a later chapter. At this point, it is
556only meant to give you a idea of what a device-tree looks like. I have
557purposefully kept the "name" and "linux,phandle" properties which
558aren't necessary in order to give you a better idea of what the tree
559looks like in practice.
560
561 / o device-tree
562 |- name = "device-tree"
563 |- model = "MyBoardName"
564 |- compatible = "MyBoardFamilyName"
565 |- #address-cells = <2>
566 |- #size-cells = <2>
567 |- linux,phandle = <0>
568 |
569 o cpus
570 | | - name = "cpus"
571 | | - linux,phandle = <1>
572 | | - #address-cells = <1>
573 | | - #size-cells = <0>
574 | |
575 | o PowerPC,970@0
576 | |- name = "PowerPC,970"
577 | |- device_type = "cpu"
578 | |- reg = <0>
579 | |- clock-frequency = <5f5e1000>
580 | |- 64-bit
581 | |- linux,phandle = <2>
582 |
583 o memory@0
584 | |- name = "memory"
585 | |- device_type = "memory"
586 | |- reg = <00000000 00000000 00000000 20000000>
587 | |- linux,phandle = <3>
588 |
589 o chosen
590 |- name = "chosen"
591 |- bootargs = "root=/dev/sda2"
592 |- linux,phandle = <4>
593
594This tree is almost a minimal tree. It pretty much contains the
595minimal set of required nodes and properties to boot a linux kernel;
596that is, some basic model information at the root, the CPUs, and the
597physical memory layout. It also includes misc information passed
598through /chosen, like in this example, the platform type (mandatory)
599and the kernel command line arguments (optional).
600
601The /cpus/PowerPC,970@0/64-bit property is an example of a
602property without a value. All other properties have a value. The
603significance of the #address-cells and #size-cells properties will be
604explained in chapter IV which defines precisely the required nodes and
605properties and their content.
606
607
6083) Device tree "structure" block
609
610The structure of the device tree is a linearized tree structure. The
611"OF_DT_BEGIN_NODE" token starts a new node, and the "OF_DT_END_NODE"
612ends that node definition. Child nodes are simply defined before
613"OF_DT_END_NODE" (that is nodes within the node). A 'token' is a 32
614bit value. The tree has to be "finished" with a OF_DT_END token
615
616Here's the basic structure of a single node:
617
618 * token OF_DT_BEGIN_NODE (that is 0x00000001)
619 * for version 1 to 3, this is the node full path as a zero
620 terminated string, starting with "/". For version 16 and later,
621 this is the node unit name only (or an empty string for the
622 root node)
623 * [align gap to next 4 bytes boundary]
624 * for each property:
625 * token OF_DT_PROP (that is 0x00000003)
626 * 32-bit value of property value size in bytes (or 0 if no
627 value)
628 * 32-bit value of offset in string block of property name
629 * property value data if any
630 * [align gap to next 4 bytes boundary]
631 * [child nodes if any]
632 * token OF_DT_END_NODE (that is 0x00000002)
633
634So the node content can be summarized as a start token, a full path,
635a list of properties, a list of child nodes, and an end token. Every
636child node is a full node structure itself as defined above.
637
638NOTE: The above definition requires that all property definitions for
639a particular node MUST precede any subnode definitions for that node.
640Although the structure would not be ambiguous if properties and
641subnodes were intermingled, the kernel parser requires that the
642properties come first (up until at least 2.6.22). Any tools
643manipulating a flattened tree must take care to preserve this
644constraint.
645
6464) Device tree "strings" block
647
648In order to save space, property names, which are generally redundant,
649are stored separately in the "strings" block. This block is simply the
650whole bunch of zero terminated strings for all property names
651concatenated together. The device-tree property definitions in the
652structure block will contain offset values from the beginning of the
653strings block.
654
655
656III - Required content of the device tree
657=========================================
658
659WARNING: All "linux,*" properties defined in this document apply only
660to a flattened device-tree. If your platform uses a real
661implementation of Open Firmware or an implementation compatible with
662the Open Firmware client interface, those properties will be created
663by the trampoline code in the kernel's prom_init() file. For example,
664that's where you'll have to add code to detect your board model and
665set the platform number. However, when using the flattened device-tree
666entry point, there is no prom_init() pass, and thus you have to
667provide those properties yourself.
668
669
6701) Note about cells and address representation
671----------------------------------------------
672
673The general rule is documented in the various Open Firmware
674documentations. If you choose to describe a bus with the device-tree
675and there exist an OF bus binding, then you should follow the
676specification. However, the kernel does not require every single
677device or bus to be described by the device tree.
678
679In general, the format of an address for a device is defined by the
680parent bus type, based on the #address-cells and #size-cells
681properties. Note that the parent's parent definitions of #address-cells
682and #size-cells are not inherited so every node with children must specify
683them. The kernel requires the root node to have those properties defining
684addresses format for devices directly mapped on the processor bus.
685
686Those 2 properties define 'cells' for representing an address and a
687size. A "cell" is a 32-bit number. For example, if both contain 2
688like the example tree given above, then an address and a size are both
689composed of 2 cells, and each is a 64-bit number (cells are
690concatenated and expected to be in big endian format). Another example
691is the way Apple firmware defines them, with 2 cells for an address
692and one cell for a size. Most 32-bit implementations should define
693#address-cells and #size-cells to 1, which represents a 32-bit value.
694Some 32-bit processors allow for physical addresses greater than 32
695bits; these processors should define #address-cells as 2.
696
697"reg" properties are always a tuple of the type "address size" where
698the number of cells of address and size is specified by the bus
699#address-cells and #size-cells. When a bus supports various address
700spaces and other flags relative to a given address allocation (like
701prefetchable, etc...) those flags are usually added to the top level
702bits of the physical address. For example, a PCI physical address is
703made of 3 cells, the bottom two containing the actual address itself
704while the top cell contains address space indication, flags, and pci
705bus & device numbers.
706
707For buses that support dynamic allocation, it's the accepted practice
708to then not provide the address in "reg" (keep it 0) though while
709providing a flag indicating the address is dynamically allocated, and
710then, to provide a separate "assigned-addresses" property that
711contains the fully allocated addresses. See the PCI OF bindings for
712details.
713
714In general, a simple bus with no address space bits and no dynamic
715allocation is preferred if it reflects your hardware, as the existing
716kernel address parsing functions will work out of the box. If you
717define a bus type with a more complex address format, including things
718like address space bits, you'll have to add a bus translator to the
719prom_parse.c file of the recent kernels for your bus type.
720
721The "reg" property only defines addresses and sizes (if #size-cells is
722non-0) within a given bus. In order to translate addresses upward
723(that is into parent bus addresses, and possibly into CPU physical
724addresses), all buses must contain a "ranges" property. If the
725"ranges" property is missing at a given level, it's assumed that
726translation isn't possible, i.e., the registers are not visible on the
727parent bus. The format of the "ranges" property for a bus is a list
728of:
729
730 bus address, parent bus address, size
731
732"bus address" is in the format of the bus this bus node is defining,
733that is, for a PCI bridge, it would be a PCI address. Thus, (bus
734address, size) defines a range of addresses for child devices. "parent
735bus address" is in the format of the parent bus of this bus. For
736example, for a PCI host controller, that would be a CPU address. For a
737PCI<->ISA bridge, that would be a PCI address. It defines the base
738address in the parent bus where the beginning of that range is mapped.
739
740For new 64-bit board support, I recommend either the 2/2 format or
741Apple's 2/1 format which is slightly more compact since sizes usually
742fit in a single 32-bit word. New 32-bit board support should use a
7431/1 format, unless the processor supports physical addresses greater
744than 32-bits, in which case a 2/1 format is recommended.
745
746Alternatively, the "ranges" property may be empty, indicating that the
747registers are visible on the parent bus using an identity mapping
748translation. In other words, the parent bus address space is the same
749as the child bus address space.
750
7512) Note about "compatible" properties
752-------------------------------------
753
754These properties are optional, but recommended in devices and the root
755node. The format of a "compatible" property is a list of concatenated
756zero terminated strings. They allow a device to express its
757compatibility with a family of similar devices, in some cases,
758allowing a single driver to match against several devices regardless
759of their actual names.
760
7613) Note about "name" properties
762-------------------------------
763
764While earlier users of Open Firmware like OldWorld macintoshes tended
765to use the actual device name for the "name" property, it's nowadays
766considered a good practice to use a name that is closer to the device
767class (often equal to device_type). For example, nowadays, Ethernet
768controllers are named "ethernet", an additional "model" property
769defining precisely the chip type/model, and "compatible" property
770defining the family in case a single driver can driver more than one
771of these chips. However, the kernel doesn't generally put any
772restriction on the "name" property; it is simply considered good
773practice to follow the standard and its evolutions as closely as
774possible.
775
776Note also that the new format version 16 makes the "name" property
777optional. If it's absent for a node, then the node's unit name is then
778used to reconstruct the name. That is, the part of the unit name
779before the "@" sign is used (or the entire unit name if no "@" sign
780is present).
781
7824) Note about node and property names and character set
783-------------------------------------------------------
784
785While Open Firmware provides more flexible usage of 8859-1, this
786specification enforces more strict rules. Nodes and properties should
787be comprised only of ASCII characters 'a' to 'z', '0' to
788'9', ',', '.', '_', '+', '#', '?', and '-'. Node names additionally
789allow uppercase characters 'A' to 'Z' (property names should be
790lowercase. The fact that vendors like Apple don't respect this rule is
791irrelevant here). Additionally, node and property names should always
792begin with a character in the range 'a' to 'z' (or 'A' to 'Z' for node
793names).
794
795The maximum number of characters for both nodes and property names
796is 31. In the case of node names, this is only the leftmost part of
797a unit name (the pure "name" property), it doesn't include the unit
798address which can extend beyond that limit.
799
800
8015) Required nodes and properties
802--------------------------------
803 These are all that are currently required. However, it is strongly
804 recommended that you expose PCI host bridges as documented in the
805 PCI binding to Open Firmware, and your interrupt tree as documented
806 in OF interrupt tree specification.
807
808 a) The root node
809
810 The root node requires some properties to be present:
811
812 - model : this is your board name/model
813 - #address-cells : address representation for "root" devices
814 - #size-cells: the size representation for "root" devices
815 - compatible : the board "family" generally finds its way here,
816 for example, if you have 2 board models with a similar layout,
817 that typically get driven by the same platform code in the
818 kernel, you would specify the exact board model in the
819 compatible property followed by an entry that represents the SoC
820 model.
821
822 The root node is also generally where you add additional properties
823 specific to your board like the serial number if any, that sort of
824 thing. It is recommended that if you add any "custom" property whose
825 name may clash with standard defined ones, you prefix them with your
826 vendor name and a comma.
827
828 b) The /cpus node
829
830 This node is the parent of all individual CPU nodes. It doesn't
831 have any specific requirements, though it's generally good practice
832 to have at least:
833
834 #address-cells = <00000001>
835 #size-cells = <00000000>
836
837 This defines that the "address" for a CPU is a single cell, and has
838 no meaningful size. This is not necessary but the kernel will assume
839 that format when reading the "reg" properties of a CPU node, see
840 below
841
842 c) The /cpus/* nodes
843
844 So under /cpus, you are supposed to create a node for every CPU on
845 the machine. There is no specific restriction on the name of the
846 CPU, though it's common to call it <architecture>,<core>. For
847 example, Apple uses PowerPC,G5 while IBM uses PowerPC,970FX.
848 However, the Generic Names convention suggests that it would be
849 better to simply use 'cpu' for each cpu node and use the compatible
850 property to identify the specific cpu core.
851
852 Required properties:
853
854 - device_type : has to be "cpu"
855 - reg : This is the physical CPU number, it's a single 32-bit cell
856 and is also used as-is as the unit number for constructing the
857 unit name in the full path. For example, with 2 CPUs, you would
858 have the full path:
859 /cpus/PowerPC,970FX@0
860 /cpus/PowerPC,970FX@1
861 (unit addresses do not require leading zeroes)
862 - d-cache-block-size : one cell, L1 data cache block size in bytes (*)
863 - i-cache-block-size : one cell, L1 instruction cache block size in
864 bytes
865 - d-cache-size : one cell, size of L1 data cache in bytes
866 - i-cache-size : one cell, size of L1 instruction cache in bytes
867
868(*) The cache "block" size is the size on which the cache management
869instructions operate. Historically, this document used the cache
870"line" size here which is incorrect. The kernel will prefer the cache
871block size and will fallback to cache line size for backward
872compatibility.
873
874 Recommended properties:
875
876 - timebase-frequency : a cell indicating the frequency of the
877 timebase in Hz. This is not directly used by the generic code,
878 but you are welcome to copy/paste the pSeries code for setting
879 the kernel timebase/decrementer calibration based on this
880 value.
881 - clock-frequency : a cell indicating the CPU core clock frequency
882 in Hz. A new property will be defined for 64-bit values, but if
883 your frequency is < 4Ghz, one cell is enough. Here as well as
884 for the above, the common code doesn't use that property, but
885 you are welcome to re-use the pSeries or Maple one. A future
886 kernel version might provide a common function for this.
887 - d-cache-line-size : one cell, L1 data cache line size in bytes
888 if different from the block size
889 - i-cache-line-size : one cell, L1 instruction cache line size in
890 bytes if different from the block size
891
892 You are welcome to add any property you find relevant to your board,
893 like some information about the mechanism used to soft-reset the
894 CPUs. For example, Apple puts the GPIO number for CPU soft reset
895 lines in there as a "soft-reset" property since they start secondary
896 CPUs by soft-resetting them.
897
898
899 d) the /memory node(s)
900
901 To define the physical memory layout of your board, you should
902 create one or more memory node(s). You can either create a single
903 node with all memory ranges in its reg property, or you can create
904 several nodes, as you wish. The unit address (@ part) used for the
905 full path is the address of the first range of memory defined by a
906 given node. If you use a single memory node, this will typically be
907 @0.
908
909 Required properties:
910
911 - device_type : has to be "memory"
912 - reg : This property contains all the physical memory ranges of
913 your board. It's a list of addresses/sizes concatenated
914 together, with the number of cells of each defined by the
915 #address-cells and #size-cells of the root node. For example,
916 with both of these properties being 2 like in the example given
917 earlier, a 970 based machine with 6Gb of RAM could typically
918 have a "reg" property here that looks like:
919
920 00000000 00000000 00000000 80000000
921 00000001 00000000 00000001 00000000
922
923 That is a range starting at 0 of 0x80000000 bytes and a range
924 starting at 0x100000000 and of 0x100000000 bytes. You can see
925 that there is no memory covering the IO hole between 2Gb and
926 4Gb. Some vendors prefer splitting those ranges into smaller
927 segments, but the kernel doesn't care.
928
929 e) The /chosen node
930
931 This node is a bit "special". Normally, that's where Open Firmware
932 puts some variable environment information, like the arguments, or
933 the default input/output devices.
934
935 This specification makes a few of these mandatory, but also defines
936 some linux-specific properties that would be normally constructed by
937 the prom_init() trampoline when booting with an OF client interface,
938 but that you have to provide yourself when using the flattened format.
939
940 Recommended properties:
941
942 - bootargs : This zero-terminated string is passed as the kernel
943 command line
944 - linux,stdout-path : This is the full path to your standard
945 console device if any. Typically, if you have serial devices on
946 your board, you may want to put the full path to the one set as
947 the default console in the firmware here, for the kernel to pick
948 it up as its own default console.
949
950 Note that u-boot creates and fills in the chosen node for platforms
951 that use it.
952
953 (Note: a practice that is now obsolete was to include a property
954 under /chosen called interrupt-controller which had a phandle value
955 that pointed to the main interrupt controller)
956
957 f) the /soc<SOCname> node
958
959 This node is used to represent a system-on-a-chip (SoC) and must be
960 present if the processor is a SoC. The top-level soc node contains
961 information that is global to all devices on the SoC. The node name
962 should contain a unit address for the SoC, which is the base address
963 of the memory-mapped register set for the SoC. The name of an SoC
964 node should start with "soc", and the remainder of the name should
965 represent the part number for the soc. For example, the MPC8540's
966 soc node would be called "soc8540".
967
968 Required properties:
969
970 - ranges : Should be defined as specified in 1) to describe the
971 translation of SoC addresses for memory mapped SoC registers.
972 - bus-frequency: Contains the bus frequency for the SoC node.
973 Typically, the value of this field is filled in by the boot
974 loader.
975 - compatible : Exact model of the SoC
976
977
978 Recommended properties:
979
980 - reg : This property defines the address and size of the
981 memory-mapped registers that are used for the SOC node itself.
982 It does not include the child device registers - these will be
983 defined inside each child node. The address specified in the
984 "reg" property should match the unit address of the SOC node.
985 - #address-cells : Address representation for "soc" devices. The
986 format of this field may vary depending on whether or not the
987 device registers are memory mapped. For memory mapped
988 registers, this field represents the number of cells needed to
989 represent the address of the registers. For SOCs that do not
990 use MMIO, a special address format should be defined that
991 contains enough cells to represent the required information.
992 See 1) above for more details on defining #address-cells.
993 - #size-cells : Size representation for "soc" devices
994 - #interrupt-cells : Defines the width of cells used to represent
995 interrupts. Typically this value is <2>, which includes a
996 32-bit number that represents the interrupt number, and a
997 32-bit number that represents the interrupt sense and level.
998 This field is only needed if the SOC contains an interrupt
999 controller.
1000
1001 The SOC node may contain child nodes for each SOC device that the
1002 platform uses. Nodes should not be created for devices which exist
1003 on the SOC but are not used by a particular platform. See chapter VI
1004 for more information on how to specify devices that are part of a SOC.
1005
1006 Example SOC node for the MPC8540:
1007
1008 soc8540@e0000000 {
1009 #address-cells = <1>;
1010 #size-cells = <1>;
1011 #interrupt-cells = <2>;
1012 device_type = "soc";
1013 ranges = <00000000 e0000000 00100000>
1014 reg = <e0000000 00003000>;
1015 bus-frequency = <0>;
1016 }
1017
1018
1019
1020IV - "dtc", the device tree compiler
1021====================================
1022
1023
1024dtc source code can be found at
1025<http://git.jdl.com/gitweb/?p=dtc.git>
1026
1027WARNING: This version is still in early development stage; the
1028resulting device-tree "blobs" have not yet been validated with the
1029kernel. The current generated block lacks a useful reserve map (it will
1030be fixed to generate an empty one, it's up to the bootloader to fill
1031it up) among others. The error handling needs work, bugs are lurking,
1032etc...
1033
1034dtc basically takes a device-tree in a given format and outputs a
1035device-tree in another format. The currently supported formats are:
1036
1037 Input formats:
1038 -------------
1039
1040 - "dtb": "blob" format, that is a flattened device-tree block
1041 with
1042 header all in a binary blob.
1043 - "dts": "source" format. This is a text file containing a
1044 "source" for a device-tree. The format is defined later in this
1045 chapter.
1046 - "fs" format. This is a representation equivalent to the
1047 output of /proc/device-tree, that is nodes are directories and
1048 properties are files
1049
1050 Output formats:
1051 ---------------
1052
1053 - "dtb": "blob" format
1054 - "dts": "source" format
1055 - "asm": assembly language file. This is a file that can be
1056 sourced by gas to generate a device-tree "blob". That file can
1057 then simply be added to your Makefile. Additionally, the
1058 assembly file exports some symbols that can be used.
1059
1060
1061The syntax of the dtc tool is
1062
1063 dtc [-I <input-format>] [-O <output-format>]
1064 [-o output-filename] [-V output_version] input_filename
1065
1066
1067The "output_version" defines what version of the "blob" format will be
1068generated. Supported versions are 1,2,3 and 16. The default is
1069currently version 3 but that may change in the future to version 16.
1070
1071Additionally, dtc performs various sanity checks on the tree, like the
1072uniqueness of linux, phandle properties, validity of strings, etc...
1073
1074The format of the .dts "source" file is "C" like, supports C and C++
1075style comments.
1076
1077/ {
1078}
1079
1080The above is the "device-tree" definition. It's the only statement
1081supported currently at the toplevel.
1082
1083/ {
1084 property1 = "string_value"; /* define a property containing a 0
1085 * terminated string
1086 */
1087
1088 property2 = <1234abcd>; /* define a property containing a
1089 * numerical 32-bit value (hexadecimal)
1090 */
1091
1092 property3 = <12345678 12345678 deadbeef>;
1093 /* define a property containing 3
1094 * numerical 32-bit values (cells) in
1095 * hexadecimal
1096 */
1097 property4 = [0a 0b 0c 0d de ea ad be ef];
1098 /* define a property whose content is
1099 * an arbitrary array of bytes
1100 */
1101
1102 childnode@address { /* define a child node named "childnode"
1103 * whose unit name is "childnode at
1104 * address"
1105 */
1106
1107 childprop = "hello\n"; /* define a property "childprop" of
1108 * childnode (in this case, a string)
1109 */
1110 };
1111};
1112
1113Nodes can contain other nodes etc... thus defining the hierarchical
1114structure of the tree.
1115
1116Strings support common escape sequences from C: "\n", "\t", "\r",
1117"\(octal value)", "\x(hex value)".
1118
1119It is also suggested that you pipe your source file through cpp (gcc
1120preprocessor) so you can use #include's, #define for constants, etc...
1121
1122Finally, various options are planned but not yet implemented, like
1123automatic generation of phandles, labels (exported to the asm file so
1124you can point to a property content and change it easily from whatever
1125you link the device-tree with), label or path instead of numeric value
1126in some cells to "point" to a node (replaced by a phandle at compile
1127time), export of reserve map address to the asm file, ability to
1128specify reserve map content at compile time, etc...
1129
1130We may provide a .h include file with common definitions of that
1131proves useful for some properties (like building PCI properties or
1132interrupt maps) though it may be better to add a notion of struct
1133definitions to the compiler...
1134
1135
1136V - Recommendations for a bootloader
1137====================================
1138
1139
1140Here are some various ideas/recommendations that have been proposed
1141while all this has been defined and implemented.
1142
1143 - The bootloader may want to be able to use the device-tree itself
1144 and may want to manipulate it (to add/edit some properties,
1145 like physical memory size or kernel arguments). At this point, 2
1146 choices can be made. Either the bootloader works directly on the
1147 flattened format, or the bootloader has its own internal tree
1148 representation with pointers (similar to the kernel one) and
1149 re-flattens the tree when booting the kernel. The former is a bit
1150 more difficult to edit/modify, the later requires probably a bit
1151 more code to handle the tree structure. Note that the structure
1152 format has been designed so it's relatively easy to "insert"
1153 properties or nodes or delete them by just memmoving things
1154 around. It contains no internal offsets or pointers for this
1155 purpose.
1156
1157 - An example of code for iterating nodes & retrieving properties
1158 directly from the flattened tree format can be found in the kernel
1159 file drivers/of/fdt.c. Look at the of_scan_flat_dt() function,
1160 its usage in early_init_devtree(), and the corresponding various
1161 early_init_dt_scan_*() callbacks. That code can be re-used in a
1162 GPL bootloader, and as the author of that code, I would be happy
1163 to discuss possible free licensing to any vendor who wishes to
1164 integrate all or part of this code into a non-GPL bootloader.
1165 (reference needed; who is 'I' here? ---gcl Jan 31, 2011)
1166
1167
1168
1169VI - System-on-a-chip devices and nodes
1170=======================================
1171
1172Many companies are now starting to develop system-on-a-chip
1173processors, where the processor core (CPU) and many peripheral devices
1174exist on a single piece of silicon. For these SOCs, an SOC node
1175should be used that defines child nodes for the devices that make
1176up the SOC. While platforms are not required to use this model in
1177order to boot the kernel, it is highly encouraged that all SOC
1178implementations define as complete a flat-device-tree as possible to
1179describe the devices on the SOC. This will allow for the
1180genericization of much of the kernel code.
1181
1182
11831) Defining child nodes of an SOC
1184---------------------------------
1185
1186Each device that is part of an SOC may have its own node entry inside
1187the SOC node. For each device that is included in the SOC, the unit
1188address property represents the address offset for this device's
1189memory-mapped registers in the parent's address space. The parent's
1190address space is defined by the "ranges" property in the top-level soc
1191node. The "reg" property for each node that exists directly under the
1192SOC node should contain the address mapping from the child address space
1193to the parent SOC address space and the size of the device's
1194memory-mapped register file.
1195
1196For many devices that may exist inside an SOC, there are predefined
1197specifications for the format of the device tree node. All SOC child
1198nodes should follow these specifications, except where noted in this
1199document.
1200
1201See appendix A for an example partial SOC node definition for the
1202MPC8540.
1203
1204
12052) Representing devices without a current OF specification
1206----------------------------------------------------------
1207
1208Currently, there are many devices on SoCs that do not have a standard
1209representation defined as part of the Open Firmware specifications,
1210mainly because the boards that contain these SoCs are not currently
1211booted using Open Firmware. Binding documentation for new devices
1212should be added to the Documentation/devicetree/bindings directory.
1213That directory will expand as device tree support is added to more and
1214more SoCs.
1215
1216
1217VII - Specifying interrupt information for devices
1218===================================================
1219
1220The device tree represents the buses and devices of a hardware
1221system in a form similar to the physical bus topology of the
1222hardware.
1223
1224In addition, a logical 'interrupt tree' exists which represents the
1225hierarchy and routing of interrupts in the hardware.
1226
1227The interrupt tree model is fully described in the
1228document "Open Firmware Recommended Practice: Interrupt
1229Mapping Version 0.9". The document is available at:
1230<http://playground.sun.com/1275/practice>.
1231
12321) interrupts property
1233----------------------
1234
1235Devices that generate interrupts to a single interrupt controller
1236should use the conventional OF representation described in the
1237OF interrupt mapping documentation.
1238
1239Each device which generates interrupts must have an 'interrupt'
1240property. The interrupt property value is an arbitrary number of
1241of 'interrupt specifier' values which describe the interrupt or
1242interrupts for the device.
1243
1244The encoding of an interrupt specifier is determined by the
1245interrupt domain in which the device is located in the
1246interrupt tree. The root of an interrupt domain specifies in
1247its #interrupt-cells property the number of 32-bit cells
1248required to encode an interrupt specifier. See the OF interrupt
1249mapping documentation for a detailed description of domains.
1250
1251For example, the binding for the OpenPIC interrupt controller
1252specifies an #interrupt-cells value of 2 to encode the interrupt
1253number and level/sense information. All interrupt children in an
1254OpenPIC interrupt domain use 2 cells per interrupt in their interrupts
1255property.
1256
1257The PCI bus binding specifies a #interrupt-cell value of 1 to encode
1258which interrupt pin (INTA,INTB,INTC,INTD) is used.
1259
12602) interrupt-parent property
1261----------------------------
1262
1263The interrupt-parent property is specified to define an explicit
1264link between a device node and its interrupt parent in
1265the interrupt tree. The value of interrupt-parent is the
1266phandle of the parent node.
1267
1268If the interrupt-parent property is not defined for a node, its
1269interrupt parent is assumed to be an ancestor in the node's
1270_device tree_ hierarchy.
1271
12723) OpenPIC Interrupt Controllers
1273--------------------------------
1274
1275OpenPIC interrupt controllers require 2 cells to encode
1276interrupt information. The first cell defines the interrupt
1277number. The second cell defines the sense and level
1278information.
1279
1280Sense and level information should be encoded as follows:
1281
1282 0 = low to high edge sensitive type enabled
1283 1 = active low level sensitive type enabled
1284 2 = active high level sensitive type enabled
1285 3 = high to low edge sensitive type enabled
1286
12874) ISA Interrupt Controllers
1288----------------------------
1289
1290ISA PIC interrupt controllers require 2 cells to encode
1291interrupt information. The first cell defines the interrupt
1292number. The second cell defines the sense and level
1293information.
1294
1295ISA PIC interrupt controllers should adhere to the ISA PIC
1296encodings listed below:
1297
1298 0 = active low level sensitive type enabled
1299 1 = active high level sensitive type enabled
1300 2 = high to low edge sensitive type enabled
1301 3 = low to high edge sensitive type enabled
1302
1303VIII - Specifying Device Power Management Information (sleep property)
1304===================================================================
1305
1306Devices on SOCs often have mechanisms for placing devices into low-power
1307states that are decoupled from the devices' own register blocks. Sometimes,
1308this information is more complicated than a cell-index property can
1309reasonably describe. Thus, each device controlled in such a manner
1310may contain a "sleep" property which describes these connections.
1311
1312The sleep property consists of one or more sleep resources, each of
1313which consists of a phandle to a sleep controller, followed by a
1314controller-specific sleep specifier of zero or more cells.
1315
1316The semantics of what type of low power modes are possible are defined
1317by the sleep controller. Some examples of the types of low power modes
1318that may be supported are:
1319
1320 - Dynamic: The device may be disabled or enabled at any time.
1321 - System Suspend: The device may request to be disabled or remain
1322 awake during system suspend, but will not be disabled until then.
1323 - Permanent: The device is disabled permanently (until the next hard
1324 reset).
1325
1326Some devices may share a clock domain with each other, such that they should
1327only be suspended when none of the devices are in use. Where reasonable,
1328such nodes should be placed on a virtual bus, where the bus has the sleep
1329property. If the clock domain is shared among devices that cannot be
1330reasonably grouped in this manner, then create a virtual sleep controller
1331(similar to an interrupt nexus, except that defining a standardized
1332sleep-map should wait until its necessity is demonstrated).
1333
1334Appendix A - Sample SOC node for MPC8540
1335========================================
1336
1337 soc@e0000000 {
1338 #address-cells = <1>;
1339 #size-cells = <1>;
1340 compatible = "fsl,mpc8540-ccsr", "simple-bus";
1341 device_type = "soc";
1342 ranges = <0x00000000 0xe0000000 0x00100000>
1343 bus-frequency = <0>;
1344 interrupt-parent = <&pic>;
1345
1346 ethernet@24000 {
1347 #address-cells = <1>;
1348 #size-cells = <1>;
1349 device_type = "network";
1350 model = "TSEC";
1351 compatible = "gianfar", "simple-bus";
1352 reg = <0x24000 0x1000>;
1353 local-mac-address = [ 00 E0 0C 00 73 00 ];
1354 interrupts = <29 2 30 2 34 2>;
1355 phy-handle = <&phy0>;
1356 sleep = <&pmc 00000080>;
1357 ranges;
1358
1359 mdio@24520 {
1360 reg = <0x24520 0x20>;
1361 compatible = "fsl,gianfar-mdio";
1362
1363 phy0: ethernet-phy@0 {
1364 interrupts = <5 1>;
1365 reg = <0>;
1366 device_type = "ethernet-phy";
1367 };
1368
1369 phy1: ethernet-phy@1 {
1370 interrupts = <5 1>;
1371 reg = <1>;
1372 device_type = "ethernet-phy";
1373 };
1374
1375 phy3: ethernet-phy@3 {
1376 interrupts = <7 1>;
1377 reg = <3>;
1378 device_type = "ethernet-phy";
1379 };
1380 };
1381 };
1382
1383 ethernet@25000 {
1384 device_type = "network";
1385 model = "TSEC";
1386 compatible = "gianfar";
1387 reg = <0x25000 0x1000>;
1388 local-mac-address = [ 00 E0 0C 00 73 01 ];
1389 interrupts = <13 2 14 2 18 2>;
1390 phy-handle = <&phy1>;
1391 sleep = <&pmc 00000040>;
1392 };
1393
1394 ethernet@26000 {
1395 device_type = "network";
1396 model = "FEC";
1397 compatible = "gianfar";
1398 reg = <0x26000 0x1000>;
1399 local-mac-address = [ 00 E0 0C 00 73 02 ];
1400 interrupts = <41 2>;
1401 phy-handle = <&phy3>;
1402 sleep = <&pmc 00000020>;
1403 };
1404
1405 serial@4500 {
1406 #address-cells = <1>;
1407 #size-cells = <1>;
1408 compatible = "fsl,mpc8540-duart", "simple-bus";
1409 sleep = <&pmc 00000002>;
1410 ranges;
1411
1412 serial@4500 {
1413 device_type = "serial";
1414 compatible = "ns16550";
1415 reg = <0x4500 0x100>;
1416 clock-frequency = <0>;
1417 interrupts = <42 2>;
1418 };
1419
1420 serial@4600 {
1421 device_type = "serial";
1422 compatible = "ns16550";
1423 reg = <0x4600 0x100>;
1424 clock-frequency = <0>;
1425 interrupts = <42 2>;
1426 };
1427 };
1428
1429 pic: pic@40000 {
1430 interrupt-controller;
1431 #address-cells = <0>;
1432 #interrupt-cells = <2>;
1433 reg = <0x40000 0x40000>;
1434 compatible = "chrp,open-pic";
1435 device_type = "open-pic";
1436 };
1437
1438 i2c@3000 {
1439 interrupts = <43 2>;
1440 reg = <0x3000 0x100>;
1441 compatible = "fsl-i2c";
1442 dfsrr;
1443 sleep = <&pmc 00000004>;
1444 };
1445
1446 pmc: power@e0070 {
1447 compatible = "fsl,mpc8540-pmc", "fsl,mpc8548-pmc";
1448 reg = <0xe0070 0x20>;
1449 };
1450 };