aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-30 11:10:12 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-30 11:10:12 -0400
commit24a77daf3d80bddcece044e6dc3675e427eef3f3 (patch)
tree2c5e0b0bea394d6fe62c5d5857c252e83e48ac48 /Documentation
parente389f9aec689209724105ae80a6c91fd2e747bc9 (diff)
parentf900e9777fc9b65140cb9570438597bc8fae56ab (diff)
Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits) [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c [POWERPC] remove kernel module option for booke wdt [POWERPC] Avoid putting cpu node twice [POWERPC] Spinlock initializer cleanup [POWERPC] ppc4xx_sgdma needs dma-mapping.h [POWERPC] arch/powerpc/sysdev/timer.c build fix [POWERPC] get_property cleanups [POWERPC] Remove the unused HTDMSOUND driver [POWERPC] cell: cbe_cpufreq cleanup and crash fix [POWERPC] Declare enable_kernel_spe in a header [POWERPC] Add dt_xlate_addr() to bootwrapper [POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE [POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards. [POWERPC] Add sane defaults for Xilinx EDK generated xparameters files [POWERPC] Add uartlite boot console driver for the zImage wrapper [POWERPC] Stop using ppc_sys for Xilinx Virtex boards [POWERPC] New registration for common Xilinx Virtex ppc405 platform devices [POWERPC] Merge common virtex header files [POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform [POWERPC] Clean up cpufreq Kconfig dependencies ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/powerpc/booting-without-of.txt256
1 files changed, 167 insertions, 89 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index b41397d6430a..033a3f3b3ab7 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -39,7 +39,7 @@
39 and property data. The old style variable 39 and property data. The old style variable
40 alignment would make it impossible to do 40 alignment would make it impossible to do
41 "simple" insertion of properties using 41 "simple" insertion of properties using
42 memove (thanks Milton for 42 memmove (thanks Milton for
43 noticing). Updated kernel patch as well 43 noticing). Updated kernel patch as well
44 - Correct a few more alignment constraints 44 - Correct a few more alignment constraints
45 - Add a chapter about the device-tree 45 - Add a chapter about the device-tree
@@ -55,7 +55,7 @@
55 55
56 ToDo: 56 ToDo:
57 - Add some definitions of interrupt tree (simple/complex) 57 - Add some definitions of interrupt tree (simple/complex)
58 - Add some definitions for pci host bridges 58 - Add some definitions for PCI host bridges
59 - Add some common address format examples 59 - Add some common address format examples
60 - Add definitions for standard properties and "compatible" 60 - Add definitions for standard properties and "compatible"
61 names for cells that are not already defined by the existing 61 names for cells that are not already defined by the existing
@@ -114,7 +114,7 @@ it with special cases.
114 forth words isn't required), you can enter the kernel with: 114 forth words isn't required), you can enter the kernel with:
115 115
116 r5 : OF callback pointer as defined by IEEE 1275 116 r5 : OF callback pointer as defined by IEEE 1275
117 bindings to powerpc. Only the 32 bit client interface 117 bindings to powerpc. Only the 32-bit client interface
118 is currently supported 118 is currently supported
119 119
120 r3, r4 : address & length of an initrd if any or 0 120 r3, r4 : address & length of an initrd if any or 0
@@ -194,7 +194,7 @@ it with special cases.
194 for this is to keep kernels on embedded systems small and efficient; 194 for this is to keep kernels on embedded systems small and efficient;
195 part of this is due to the fact the code is already that way. In the 195 part of this is due to the fact the code is already that way. In the
196 future, a kernel may support multiple platforms, but only if the 196 future, a kernel may support multiple platforms, but only if the
197 platforms feature the same core architectire. A single kernel build 197 platforms feature the same core architecture. A single kernel build
198 cannot support both configurations with Book E and configurations 198 cannot support both configurations with Book E and configurations
199 with classic Powerpc architectures. 199 with classic Powerpc architectures.
200 200
@@ -215,7 +215,7 @@ of the boot sequences.... someone speak up if this is wrong!
215 enable another config option to select the specific board 215 enable another config option to select the specific board
216 supported. 216 supported.
217 217
218NOTE: If ben doesn't merge the setup files, may need to change this to 218NOTE: If Ben doesn't merge the setup files, may need to change this to
219point to setup_32.c 219point to setup_32.c
220 220
221 221
@@ -256,7 +256,7 @@ struct boot_param_header {
256 u32 off_dt_struct; /* offset to structure */ 256 u32 off_dt_struct; /* offset to structure */
257 u32 off_dt_strings; /* offset to strings */ 257 u32 off_dt_strings; /* offset to strings */
258 u32 off_mem_rsvmap; /* offset to memory reserve map 258 u32 off_mem_rsvmap; /* offset to memory reserve map
259*/ 259 */
260 u32 version; /* format version */ 260 u32 version; /* format version */
261 u32 last_comp_version; /* last compatible version */ 261 u32 last_comp_version; /* last compatible version */
262 262
@@ -265,6 +265,9 @@ struct boot_param_header {
265 booting on */ 265 booting on */
266 /* version 3 fields below */ 266 /* version 3 fields below */
267 u32 size_dt_strings; /* size of the strings block */ 267 u32 size_dt_strings; /* size of the strings block */
268
269 /* version 17 fields below */
270 u32 size_dt_struct; /* size of the DT structure block */
268}; 271};
269 272
270 Along with the constants: 273 Along with the constants:
@@ -273,7 +276,7 @@ struct boot_param_header {
273#define OF_DT_HEADER 0xd00dfeed /* 4: version, 276#define OF_DT_HEADER 0xd00dfeed /* 4: version,
274 4: total size */ 277 4: total size */
275#define OF_DT_BEGIN_NODE 0x1 /* Start node: full name 278#define OF_DT_BEGIN_NODE 0x1 /* Start node: full name
276*/ 279 */
277#define OF_DT_END_NODE 0x2 /* End node */ 280#define OF_DT_END_NODE 0x2 /* End node */
278#define OF_DT_PROP 0x3 /* Property: name off, 281#define OF_DT_PROP 0x3 /* Property: name off,
279 size, content */ 282 size, content */
@@ -310,9 +313,8 @@ struct boot_param_header {
310 - off_mem_rsvmap 313 - off_mem_rsvmap
311 314
312 This is an offset from the beginning of the header to the start 315 This is an offset from the beginning of the header to the start
313 of the reserved memory map. This map is a list of pairs of 64 316 of the reserved memory map. This map is a list of pairs of 64-
314 bit integers. Each pair is a physical address and a size. The 317 bit integers. Each pair is a physical address and a size. The
315
316 list is terminated by an entry of size 0. This map provides the 318 list is terminated by an entry of size 0. This map provides the
317 kernel with a list of physical memory areas that are "reserved" 319 kernel with a list of physical memory areas that are "reserved"
318 and thus not to be used for memory allocations, especially during 320 and thus not to be used for memory allocations, especially during
@@ -325,7 +327,7 @@ struct boot_param_header {
325 contain _at least_ this DT block itself (header,total_size). If 327 contain _at least_ this DT block itself (header,total_size). If
326 you are passing an initrd to the kernel, you should reserve it as 328 you are passing an initrd to the kernel, you should reserve it as
327 well. You do not need to reserve the kernel image itself. The map 329 well. You do not need to reserve the kernel image itself. The map
328 should be 64 bit aligned. 330 should be 64-bit aligned.
329 331
330 - version 332 - version
331 333
@@ -335,10 +337,13 @@ struct boot_param_header {
335 to reallocate it easily at boot and free up the unused flattened 337 to reallocate it easily at boot and free up the unused flattened
336 structure after expansion. Version 16 introduces a new more 338 structure after expansion. Version 16 introduces a new more
337 "compact" format for the tree itself that is however not backward 339 "compact" format for the tree itself that is however not backward
338 compatible. You should always generate a structure of the highest 340 compatible. Version 17 adds an additional field, size_dt_struct,
339 version defined at the time of your implementation. Currently 341 allowing it to be reallocated or moved more easily (this is
340 that is version 16, unless you explicitly aim at being backward 342 particularly useful for bootloaders which need to make
341 compatible. 343 adjustments to a device tree based on probed information). You
344 should always generate a structure of the highest version defined
345 at the time of your implementation. Currently that is version 17,
346 unless you explicitly aim at being backward compatible.
342 347
343 - last_comp_version 348 - last_comp_version
344 349
@@ -347,7 +352,7 @@ struct boot_param_header {
347 is backward compatible with version 1 (that is, a kernel build 352 is backward compatible with version 1 (that is, a kernel build
348 for version 1 will be able to boot with a version 2 format). You 353 for version 1 will be able to boot with a version 2 format). You
349 should put a 1 in this field if you generate a device tree of 354 should put a 1 in this field if you generate a device tree of
350 version 1 to 3, or 0x10 if you generate a tree of version 0x10 355 version 1 to 3, or 16 if you generate a tree of version 16 or 17
351 using the new unit name format. 356 using the new unit name format.
352 357
353 - boot_cpuid_phys 358 - boot_cpuid_phys
@@ -360,6 +365,17 @@ struct boot_param_header {
360 point (see further chapters for more informations on the required 365 point (see further chapters for more informations on the required
361 device-tree contents) 366 device-tree contents)
362 367
368 - size_dt_strings
369
370 This field only exists on version 3 and later headers. It
371 gives the size of the "strings" section of the device tree (which
372 starts at the offset given by off_dt_strings).
373
374 - size_dt_struct
375
376 This field only exists on version 17 and later headers. It gives
377 the size of the "structure" section of the device tree (which
378 starts at the offset given by off_dt_struct).
363 379
364 So the typical layout of a DT block (though the various parts don't 380 So the typical layout of a DT block (though the various parts don't
365 need to be in that order) looks like this (addresses go from top to 381 need to be in that order) looks like this (addresses go from top to
@@ -417,7 +433,7 @@ root node who has no parent.
417A node has 2 names. The actual node name is generally contained in a 433A node has 2 names. The actual node name is generally contained in a
418property of type "name" in the node property list whose value is a 434property of type "name" in the node property list whose value is a
419zero terminated string and is mandatory for version 1 to 3 of the 435zero terminated string and is mandatory for version 1 to 3 of the
420format definition (as it is in Open Firmware). Version 0x10 makes it 436format definition (as it is in Open Firmware). Version 16 makes it
421optional as it can generate it from the unit name defined below. 437optional as it can generate it from the unit name defined below.
422 438
423There is also a "unit name" that is used to differentiate nodes with 439There is also a "unit name" that is used to differentiate nodes with
@@ -461,7 +477,7 @@ referencing another node via "phandle" is when laying out the
461interrupt tree which will be described in a further version of this 477interrupt tree which will be described in a further version of this
462document. 478document.
463 479
464This "linux, phandle" property is a 32 bit value that uniquely 480This "linux, phandle" property is a 32-bit value that uniquely
465identifies a node. You are free to use whatever values or system of 481identifies a node. You are free to use whatever values or system of
466values, internal pointers, or whatever to generate these, the only 482values, internal pointers, or whatever to generate these, the only
467requirement is that every node for which you provide that property has 483requirement is that every node for which you provide that property has
@@ -471,7 +487,7 @@ Here is an example of a simple device-tree. In this example, an "o"
471designates a node followed by the node unit name. Properties are 487designates a node followed by the node unit name. Properties are
472presented with their name followed by their content. "content" 488presented with their name followed by their content. "content"
473represents an ASCII string (zero terminated) value, while <content> 489represents an ASCII string (zero terminated) value, while <content>
474represents a 32 bit hexadecimal value. The various nodes in this 490represents a 32-bit hexadecimal value. The various nodes in this
475example will be discussed in a later chapter. At this point, it is 491example will be discussed in a later chapter. At this point, it is
476only meant to give you a idea of what a device-tree looks like. I have 492only meant to give you a idea of what a device-tree looks like. I have
477purposefully kept the "name" and "linux,phandle" properties which 493purposefully kept the "name" and "linux,phandle" properties which
@@ -543,15 +559,15 @@ Here's the basic structure of a single node:
543 * [align gap to next 4 bytes boundary] 559 * [align gap to next 4 bytes boundary]
544 * for each property: 560 * for each property:
545 * token OF_DT_PROP (that is 0x00000003) 561 * token OF_DT_PROP (that is 0x00000003)
546 * 32 bit value of property value size in bytes (or 0 of no 562 * 32-bit value of property value size in bytes (or 0 if no
547 * value) 563 value)
548 * 32 bit value of offset in string block of property name 564 * 32-bit value of offset in string block of property name
549 * property value data if any 565 * property value data if any
550 * [align gap to next 4 bytes boundary] 566 * [align gap to next 4 bytes boundary]
551 * [child nodes if any] 567 * [child nodes if any]
552 * token OF_DT_END_NODE (that is 0x00000002) 568 * token OF_DT_END_NODE (that is 0x00000002)
553 569
554So the node content can be summarised as a start token, a full path, 570So the node content can be summarized as a start token, a full path,
555a list of properties, a list of child nodes, and an end token. Every 571a list of properties, a list of child nodes, and an end token. Every
556child node is a full node structure itself as defined above. 572child node is a full node structure itself as defined above.
557 573
@@ -583,7 +599,7 @@ provide those properties yourself.
583---------------------------------------------- 599----------------------------------------------
584 600
585The general rule is documented in the various Open Firmware 601The general rule is documented in the various Open Firmware
586documentations. If you chose to describe a bus with the device-tree 602documentations. If you choose to describe a bus with the device-tree
587and there exist an OF bus binding, then you should follow the 603and there exist an OF bus binding, then you should follow the
588specification. However, the kernel does not require every single 604specification. However, the kernel does not require every single
589device or bus to be described by the device tree. 605device or bus to be described by the device tree.
@@ -596,9 +612,9 @@ those properties defining addresses format for devices directly mapped
596on the processor bus. 612on the processor bus.
597 613
598Those 2 properties define 'cells' for representing an address and a 614Those 2 properties define 'cells' for representing an address and a
599size. A "cell" is a 32 bit number. For example, if both contain 2 615size. A "cell" is a 32-bit number. For example, if both contain 2
600like the example tree given above, then an address and a size are both 616like the example tree given above, then an address and a size are both
601composed of 2 cells, and each is a 64 bit number (cells are 617composed of 2 cells, and each is a 64-bit number (cells are
602concatenated and expected to be in big endian format). Another example 618concatenated and expected to be in big endian format). Another example
603is the way Apple firmware defines them, with 2 cells for an address 619is the way Apple firmware defines them, with 2 cells for an address
604and one cell for a size. Most 32-bit implementations should define 620and one cell for a size. Most 32-bit implementations should define
@@ -632,7 +648,7 @@ prom_parse.c file of the recent kernels for your bus type.
632 648
633The "reg" property only defines addresses and sizes (if #size-cells 649The "reg" property only defines addresses and sizes (if #size-cells
634is non-0) within a given bus. In order to translate addresses upward 650is non-0) within a given bus. In order to translate addresses upward
635(that is into parent bus addresses, and possibly into cpu physical 651(that is into parent bus addresses, and possibly into CPU physical
636addresses), all busses must contain a "ranges" property. If the 652addresses), all busses must contain a "ranges" property. If the
637"ranges" property is missing at a given level, it's assumed that 653"ranges" property is missing at a given level, it's assumed that
638translation isn't possible. The format of the "ranges" property for a 654translation isn't possible. The format of the "ranges" property for a
@@ -648,9 +664,9 @@ example, for a PCI host controller, that would be a CPU address. For a
648PCI<->ISA bridge, that would be a PCI address. It defines the base 664PCI<->ISA bridge, that would be a PCI address. It defines the base
649address in the parent bus where the beginning of that range is mapped. 665address in the parent bus where the beginning of that range is mapped.
650 666
651For a new 64 bit powerpc board, I recommend either the 2/2 format or 667For a new 64-bit powerpc board, I recommend either the 2/2 format or
652Apple's 2/1 format which is slightly more compact since sizes usually 668Apple's 2/1 format which is slightly more compact since sizes usually
653fit in a single 32 bit word. New 32 bit powerpc boards should use a 669fit in a single 32-bit word. New 32-bit powerpc boards should use a
6541/1 format, unless the processor supports physical addresses greater 6701/1 format, unless the processor supports physical addresses greater
655than 32-bits, in which case a 2/1 format is recommended. 671than 32-bits, in which case a 2/1 format is recommended.
656 672
@@ -764,7 +780,7 @@ address which can extend beyond that limit.
764 Required properties: 780 Required properties:
765 781
766 - device_type : has to be "cpu" 782 - device_type : has to be "cpu"
767 - reg : This is the physical cpu number, it's a single 32 bit cell 783 - reg : This is the physical CPU number, it's a single 32-bit cell
768 and is also used as-is as the unit number for constructing the 784 and is also used as-is as the unit number for constructing the
769 unit name in the full path. For example, with 2 CPUs, you would 785 unit name in the full path. For example, with 2 CPUs, you would
770 have the full path: 786 have the full path:
@@ -785,7 +801,7 @@ address which can extend beyond that limit.
785 the kernel timebase/decrementer calibration based on this 801 the kernel timebase/decrementer calibration based on this
786 value. 802 value.
787 - clock-frequency : a cell indicating the CPU core clock frequency 803 - clock-frequency : a cell indicating the CPU core clock frequency
788 in Hz. A new property will be defined for 64 bit values, but if 804 in Hz. A new property will be defined for 64-bit values, but if
789 your frequency is < 4Ghz, one cell is enough. Here as well as 805 your frequency is < 4Ghz, one cell is enough. Here as well as
790 for the above, the common code doesn't use that property, but 806 for the above, the common code doesn't use that property, but
791 you are welcome to re-use the pSeries or Maple one. A future 807 you are welcome to re-use the pSeries or Maple one. A future
@@ -832,8 +848,7 @@ address which can extend beyond that limit.
832 848
833 This node is a bit "special". Normally, that's where open firmware 849 This node is a bit "special". Normally, that's where open firmware
834 puts some variable environment information, like the arguments, or 850 puts some variable environment information, like the arguments, or
835 phandle pointers to nodes like the main interrupt controller, or the 851 the default input/output devices.
836 default input/output devices.
837 852
838 This specification makes a few of these mandatory, but also defines 853 This specification makes a few of these mandatory, but also defines
839 some linux-specific properties that would be normally constructed by 854 some linux-specific properties that would be normally constructed by
@@ -853,14 +868,14 @@ address which can extend beyond that limit.
853 that the kernel tries to find out the default console and has 868 that the kernel tries to find out the default console and has
854 knowledge of various types like 8250 serial ports. You may want 869 knowledge of various types like 8250 serial ports. You may want
855 to extend this function to add your own. 870 to extend this function to add your own.
856 - interrupt-controller : This is one cell containing a phandle
857 value that matches the "linux,phandle" property of your main
858 interrupt controller node. May be used for interrupt routing.
859
860 871
861 Note that u-boot creates and fills in the chosen node for platforms 872 Note that u-boot creates and fills in the chosen node for platforms
862 that use it. 873 that use it.
863 874
875 (Note: a practice that is now obsolete was to include a property
876 under /chosen called interrupt-controller which had a phandle value
877 that pointed to the main interrupt controller)
878
864 f) the /soc<SOCname> node 879 f) the /soc<SOCname> node
865 880
866 This node is used to represent a system-on-a-chip (SOC) and must be 881 This node is used to represent a system-on-a-chip (SOC) and must be
@@ -908,8 +923,7 @@ address which can extend beyond that limit.
908 The SOC node may contain child nodes for each SOC device that the 923 The SOC node may contain child nodes for each SOC device that the
909 platform uses. Nodes should not be created for devices which exist 924 platform uses. Nodes should not be created for devices which exist
910 on the SOC but are not used by a particular platform. See chapter VI 925 on the SOC but are not used by a particular platform. See chapter VI
911 for more information on how to specify devices that are part of an 926 for more information on how to specify devices that are part of a SOC.
912SOC.
913 927
914 Example SOC node for the MPC8540: 928 Example SOC node for the MPC8540:
915 929
@@ -972,7 +986,7 @@ The syntax of the dtc tool is
972 [-o output-filename] [-V output_version] input_filename 986 [-o output-filename] [-V output_version] input_filename
973 987
974 988
975The "output_version" defines what versio of the "blob" format will be 989The "output_version" defines what version of the "blob" format will be
976generated. Supported versions are 1,2,3 and 16. The default is 990generated. Supported versions are 1,2,3 and 16. The default is
977currently version 3 but that may change in the future to version 16. 991currently version 3 but that may change in the future to version 16.
978 992
@@ -994,12 +1008,12 @@ supported currently at the toplevel.
994 */ 1008 */
995 1009
996 property2 = <1234abcd>; /* define a property containing a 1010 property2 = <1234abcd>; /* define a property containing a
997 * numerical 32 bits value (hexadecimal) 1011 * numerical 32-bit value (hexadecimal)
998 */ 1012 */
999 1013
1000 property3 = <12345678 12345678 deadbeef>; 1014 property3 = <12345678 12345678 deadbeef>;
1001 /* define a property containing 3 1015 /* define a property containing 3
1002 * numerical 32 bits values (cells) in 1016 * numerical 32-bit values (cells) in
1003 * hexadecimal 1017 * hexadecimal
1004 */ 1018 */
1005 property4 = [0a 0b 0c 0d de ea ad be ef]; 1019 property4 = [0a 0b 0c 0d de ea ad be ef];
@@ -1068,7 +1082,7 @@ while all this has been defined and implemented.
1068 its usage in early_init_devtree(), and the corresponding various 1082 its usage in early_init_devtree(), and the corresponding various
1069 early_init_dt_scan_*() callbacks. That code can be re-used in a 1083 early_init_dt_scan_*() callbacks. That code can be re-used in a
1070 GPL bootloader, and as the author of that code, I would be happy 1084 GPL bootloader, and as the author of that code, I would be happy
1071 to discuss possible free licencing to any vendor who wishes to 1085 to discuss possible free licensing to any vendor who wishes to
1072 integrate all or part of this code into a non-GPL bootloader. 1086 integrate all or part of this code into a non-GPL bootloader.
1073 1087
1074 1088
@@ -1077,7 +1091,7 @@ VI - System-on-a-chip devices and nodes
1077======================================= 1091=======================================
1078 1092
1079Many companies are now starting to develop system-on-a-chip 1093Many companies are now starting to develop system-on-a-chip
1080processors, where the processor core (cpu) and many peripheral devices 1094processors, where the processor core (CPU) and many peripheral devices
1081exist on a single piece of silicon. For these SOCs, an SOC node 1095exist on a single piece of silicon. For these SOCs, an SOC node
1082should be used that defines child nodes for the devices that make 1096should be used that defines child nodes for the devices that make
1083up the SOC. While platforms are not required to use this model in 1097up the SOC. While platforms are not required to use this model in
@@ -1109,42 +1123,7 @@ See appendix A for an example partial SOC node definition for the
1109MPC8540. 1123MPC8540.
1110 1124
1111 1125
11122) Specifying interrupt information for SOC devices 11262) Representing devices without a current OF specification
1113---------------------------------------------------
1114
1115Each device that is part of an SOC and which generates interrupts
1116should have the following properties:
1117
1118 - interrupt-parent : contains the phandle of the interrupt
1119 controller which handles interrupts for this device
1120 - interrupts : a list of tuples representing the interrupt
1121 number and the interrupt sense and level for each interrupt
1122 for this device.
1123
1124This information is used by the kernel to build the interrupt table
1125for the interrupt controllers in the system.
1126
1127Sense and level information should be encoded as follows:
1128
1129 Devices connected to openPIC-compatible controllers should encode
1130 sense and polarity as follows:
1131
1132 0 = low to high edge sensitive type enabled
1133 1 = active low level sensitive type enabled
1134 2 = active high level sensitive type enabled
1135 3 = high to low edge sensitive type enabled
1136
1137 ISA PIC interrupt controllers should adhere to the ISA PIC
1138 encodings listed below:
1139
1140 0 = active low level sensitive type enabled
1141 1 = active high level sensitive type enabled
1142 2 = high to low edge sensitive type enabled
1143 3 = low to high edge sensitive type enabled
1144
1145
1146
11473) Representing devices without a current OF specification
1148---------------------------------------------------------- 1127----------------------------------------------------------
1149 1128
1150Currently, there are many devices on SOCs that do not have a standard 1129Currently, there are many devices on SOCs that do not have a standard
@@ -1201,6 +1180,13 @@ platforms are moved over to use the flattened-device-tree model.
1201 - phy-handle : The phandle for the PHY connected to this ethernet 1180 - phy-handle : The phandle for the PHY connected to this ethernet
1202 controller. 1181 controller.
1203 1182
1183 Recommended properties:
1184
1185 - linux,network-index : This is the intended "index" of this
1186 network device. This is used by the bootwrapper to interpret
1187 MAC addresses passed by the firmware when no information other
1188 than indices is available to associate an address with a device.
1189
1204 Example: 1190 Example:
1205 1191
1206 ethernet@24000 { 1192 ethernet@24000 {
@@ -1312,10 +1298,10 @@ platforms are moved over to use the flattened-device-tree model.
1312 and additions : 1298 and additions :
1313 1299
1314 Required properties : 1300 Required properties :
1315 - compatible : Should be "fsl-usb2-mph" for multi port host usb 1301 - compatible : Should be "fsl-usb2-mph" for multi port host USB
1316 controllers, or "fsl-usb2-dr" for dual role usb controllers 1302 controllers, or "fsl-usb2-dr" for dual role USB controllers
1317 - phy_type : For multi port host usb controllers, should be one of 1303 - phy_type : For multi port host USB controllers, should be one of
1318 "ulpi", or "serial". For dual role usb controllers, should be 1304 "ulpi", or "serial". For dual role USB controllers, should be
1319 one of "ulpi", "utmi", "utmi_wide", or "serial". 1305 one of "ulpi", "utmi", "utmi_wide", or "serial".
1320 - reg : Offset and length of the register set for the device 1306 - reg : Offset and length of the register set for the device
1321 - port0 : boolean; if defined, indicates port0 is connected for 1307 - port0 : boolean; if defined, indicates port0 is connected for
@@ -1339,7 +1325,7 @@ platforms are moved over to use the flattened-device-tree model.
1339 - interrupt-parent : the phandle for the interrupt controller that 1325 - interrupt-parent : the phandle for the interrupt controller that
1340 services interrupts for this device. 1326 services interrupts for this device.
1341 1327
1342 Example multi port host usb controller device node : 1328 Example multi port host USB controller device node :
1343 usb@22000 { 1329 usb@22000 {
1344 device_type = "usb"; 1330 device_type = "usb";
1345 compatible = "fsl-usb2-mph"; 1331 compatible = "fsl-usb2-mph";
@@ -1353,7 +1339,7 @@ platforms are moved over to use the flattened-device-tree model.
1353 port1; 1339 port1;
1354 }; 1340 };
1355 1341
1356 Example dual role usb controller device node : 1342 Example dual role USB controller device node :
1357 usb@23000 { 1343 usb@23000 {
1358 device_type = "usb"; 1344 device_type = "usb";
1359 compatible = "fsl-usb2-dr"; 1345 compatible = "fsl-usb2-dr";
@@ -1387,7 +1373,7 @@ platforms are moved over to use the flattened-device-tree model.
1387 - channel-fifo-len : An integer representing the number of 1373 - channel-fifo-len : An integer representing the number of
1388 descriptor pointers each channel fetch fifo can hold. 1374 descriptor pointers each channel fetch fifo can hold.
1389 - exec-units-mask : The bitmask representing what execution units 1375 - exec-units-mask : The bitmask representing what execution units
1390 (EUs) are available. It's a single 32 bit cell. EU information 1376 (EUs) are available. It's a single 32-bit cell. EU information
1391 should be encoded following the SEC's Descriptor Header Dword 1377 should be encoded following the SEC's Descriptor Header Dword
1392 EU_SEL0 field documentation, i.e. as follows: 1378 EU_SEL0 field documentation, i.e. as follows:
1393 1379
@@ -1403,7 +1389,7 @@ platforms are moved over to use the flattened-device-tree model.
1403 bits 8 through 31 are reserved for future SEC EUs. 1389 bits 8 through 31 are reserved for future SEC EUs.
1404 1390
1405 - descriptor-types-mask : The bitmask representing what descriptors 1391 - descriptor-types-mask : The bitmask representing what descriptors
1406 are available. It's a single 32 bit cell. Descriptor type 1392 are available. It's a single 32-bit cell. Descriptor type
1407 information should be encoded following the SEC's Descriptor 1393 information should be encoded following the SEC's Descriptor
1408 Header Dword DESC_TYPE field documentation, i.e. as follows: 1394 Header Dword DESC_TYPE field documentation, i.e. as follows:
1409 1395
@@ -1492,7 +1478,7 @@ platforms are moved over to use the flattened-device-tree model.
1492 Required properties: 1478 Required properties:
1493 - device_type : should be "spi". 1479 - device_type : should be "spi".
1494 - compatible : should be "fsl_spi". 1480 - compatible : should be "fsl_spi".
1495 - mode : the spi operation mode, it can be "cpu" or "qe". 1481 - mode : the SPI operation mode, it can be "cpu" or "qe".
1496 - reg : Offset and length of the register set for the device 1482 - reg : Offset and length of the register set for the device
1497 - interrupts : <a b> where a is the interrupt number and b is a 1483 - interrupts : <a b> where a is the interrupt number and b is a
1498 field that represents an encoding of the sense and level 1484 field that represents an encoding of the sense and level
@@ -1569,6 +1555,12 @@ platforms are moved over to use the flattened-device-tree model.
1569 - mac-address : list of bytes representing the ethernet address. 1555 - mac-address : list of bytes representing the ethernet address.
1570 - phy-handle : The phandle for the PHY connected to this controller. 1556 - phy-handle : The phandle for the PHY connected to this controller.
1571 1557
1558 Recommended properties:
1559 - linux,network-index : This is the intended "index" of this
1560 network device. This is used by the bootwrapper to interpret
1561 MAC addresses passed by the firmware when no information other
1562 than indices is available to associate an address with a device.
1563
1572 Example: 1564 Example:
1573 ucc@2000 { 1565 ucc@2000 {
1574 device_type = "network"; 1566 device_type = "network";
@@ -1712,7 +1704,7 @@ platforms are moved over to use the flattened-device-tree model.
1712 - partitions : Several pairs of 32-bit values where the first value is 1704 - partitions : Several pairs of 32-bit values where the first value is
1713 partition's offset from the start of the device and the second one is 1705 partition's offset from the start of the device and the second one is
1714 partition size in bytes with LSB used to signify a read only 1706 partition size in bytes with LSB used to signify a read only
1715 partition (so, the parition size should always be an even number). 1707 partition (so, the partition size should always be an even number).
1716 - partition-names : The list of concatenated zero terminated strings 1708 - partition-names : The list of concatenated zero terminated strings
1717 representing the partition names. 1709 representing the partition names.
1718 - probe-type : The type of probe which should be done for the chip 1710 - probe-type : The type of probe which should be done for the chip
@@ -1733,6 +1725,92 @@ platforms are moved over to use the flattened-device-tree model.
1733 1725
1734 More devices will be defined as this spec matures. 1726 More devices will be defined as this spec matures.
1735 1727
1728VII - Specifying interrupt information for devices
1729===================================================
1730
1731The device tree represents the busses and devices of a hardware
1732system in a form similar to the physical bus topology of the
1733hardware.
1734
1735In addition, a logical 'interrupt tree' exists which represents the
1736hierarchy and routing of interrupts in the hardware.
1737
1738The interrupt tree model is fully described in the
1739document "Open Firmware Recommended Practice: Interrupt
1740Mapping Version 0.9". The document is available at:
1741<http://playground.sun.com/1275/practice>.
1742
17431) interrupts property
1744----------------------
1745
1746Devices that generate interrupts to a single interrupt controller
1747should use the conventional OF representation described in the
1748OF interrupt mapping documentation.
1749
1750Each device which generates interrupts must have an 'interrupt'
1751property. The interrupt property value is an arbitrary number of
1752of 'interrupt specifier' values which describe the interrupt or
1753interrupts for the device.
1754
1755The encoding of an interrupt specifier is determined by the
1756interrupt domain in which the device is located in the
1757interrupt tree. The root of an interrupt domain specifies in
1758its #interrupt-cells property the number of 32-bit cells
1759required to encode an interrupt specifier. See the OF interrupt
1760mapping documentation for a detailed description of domains.
1761
1762For example, the binding for the OpenPIC interrupt controller
1763specifies an #interrupt-cells value of 2 to encode the interrupt
1764number and level/sense information. All interrupt children in an
1765OpenPIC interrupt domain use 2 cells per interrupt in their interrupts
1766property.
1767
1768The PCI bus binding specifies a #interrupt-cell value of 1 to encode
1769which interrupt pin (INTA,INTB,INTC,INTD) is used.
1770
17712) interrupt-parent property
1772----------------------------
1773
1774The interrupt-parent property is specified to define an explicit
1775link between a device node and its interrupt parent in
1776the interrupt tree. The value of interrupt-parent is the
1777phandle of the parent node.
1778
1779If the interrupt-parent property is not defined for a node, it's
1780interrupt parent is assumed to be an ancestor in the node's
1781_device tree_ hierarchy.
1782
17833) OpenPIC Interrupt Controllers
1784--------------------------------
1785
1786OpenPIC interrupt controllers require 2 cells to encode
1787interrupt information. The first cell defines the interrupt
1788number. The second cell defines the sense and level
1789information.
1790
1791Sense and level information should be encoded as follows:
1792
1793 0 = low to high edge sensitive type enabled
1794 1 = active low level sensitive type enabled
1795 2 = active high level sensitive type enabled
1796 3 = high to low edge sensitive type enabled
1797
17984) ISA Interrupt Controllers
1799----------------------------
1800
1801ISA PIC interrupt controllers require 2 cells to encode
1802interrupt information. The first cell defines the interrupt
1803number. The second cell defines the sense and level
1804information.
1805
1806ISA PIC interrupt controllers should adhere to the ISA PIC
1807encodings listed below:
1808
1809 0 = active low level sensitive type enabled
1810 1 = active high level sensitive type enabled
1811 2 = high to low edge sensitive type enabled
1812 3 = low to high edge sensitive type enabled
1813
1736 1814
1737Appendix A - Sample SOC node for MPC8540 1815Appendix A - Sample SOC node for MPC8540
1738======================================== 1816========================================