152052875SStuart Yoder===================================================================== 252052875SStuart YoderFreescale MPIC Interrupt Controller Node 352052875SStuart YoderCopyright (C) 2010,2011 Freescale Semiconductor Inc. 452052875SStuart Yoder===================================================================== 5d524dac9SGrant Likely 652052875SStuart YoderThe Freescale MPIC interrupt controller is found on all PowerQUICC 752052875SStuart Yoderand QorIQ processors and is compatible with the Open PIC. The 852052875SStuart Yodernotable difference from Open PIC binding is the addition of 2 952052875SStuart Yoderadditional cells in the interrupt specifier defining interrupt type 1052052875SStuart Yoderinformation. 11d524dac9SGrant Likely 1252052875SStuart YoderPROPERTIES 13d524dac9SGrant Likely 1452052875SStuart Yoder - compatible 1552052875SStuart Yoder Usage: required 1652052875SStuart Yoder Value type: <string> 1752052875SStuart Yoder Definition: Shall include "fsl,mpic". Freescale MPIC 1852052875SStuart Yoder controllers compatible with this binding have Block 1952052875SStuart Yoder Revision Registers BRR1 and BRR2 at offset 0x0 and 2052052875SStuart Yoder 0x10 in the MPIC. 21d524dac9SGrant Likely 2252052875SStuart Yoder - reg 2352052875SStuart Yoder Usage: required 2452052875SStuart Yoder Value type: <prop-encoded-array> 2552052875SStuart Yoder Definition: A standard property. Specifies the physical 2652052875SStuart Yoder offset and length of the device's registers within the 2752052875SStuart Yoder CCSR address space. 28d524dac9SGrant Likely 2952052875SStuart Yoder - interrupt-controller 3052052875SStuart Yoder Usage: required 3152052875SStuart Yoder Value type: <empty> 3252052875SStuart Yoder Definition: Specifies that this node is an interrupt 3352052875SStuart Yoder controller 34d524dac9SGrant Likely 3552052875SStuart Yoder - #interrupt-cells 3652052875SStuart Yoder Usage: required 3752052875SStuart Yoder Value type: <u32> 3852052875SStuart Yoder Definition: Shall be 2 or 4. A value of 2 means that interrupt 3952052875SStuart Yoder specifiers do not contain the interrupt-type or type-specific 4052052875SStuart Yoder information cells. 4152052875SStuart Yoder 4252052875SStuart Yoder - #address-cells 4352052875SStuart Yoder Usage: required 4452052875SStuart Yoder Value type: <u32> 4552052875SStuart Yoder Definition: Shall be 0. 4652052875SStuart Yoder 4752052875SStuart Yoder - pic-no-reset 4852052875SStuart Yoder Usage: optional 4952052875SStuart Yoder Value type: <empty> 5052052875SStuart Yoder Definition: The presence of this property specifies that the 5152052875SStuart Yoder MPIC must not be reset by the client program, and that 5252052875SStuart Yoder the boot program has initialized all interrupt source 5352052875SStuart Yoder configuration registers to a sane state-- masked or 5452052875SStuart Yoder directed at other cores. This ensures that the client 5552052875SStuart Yoder program will not receive interrupts for sources not belonging 5652052875SStuart Yoder to the client. The presence of this property also mandates 5752052875SStuart Yoder that any initialization related to interrupt sources shall 5852052875SStuart Yoder be limited to sources explicitly referenced in the device tree. 5952052875SStuart Yoder 6098cca250SKyle Moffett - big-endian 6198cca250SKyle Moffett Usage: optional 6298cca250SKyle Moffett Value type: <empty> 6398cca250SKyle Moffett If present the MPIC will be assumed to be big-endian. Some 6498cca250SKyle Moffett device-trees omit this property on MPIC nodes even when the MPIC is 6598cca250SKyle Moffett in fact big-endian, so certain boards override this property. 6698cca250SKyle Moffett 679ca163c8SKyle Moffett - single-cpu-affinity 689ca163c8SKyle Moffett Usage: optional 699ca163c8SKyle Moffett Value type: <empty> 709ca163c8SKyle Moffett If present the MPIC will be assumed to only be able to route 719ca163c8SKyle Moffett non-IPI interrupts to a single CPU at a time (EG: Freescale MPIC). 729ca163c8SKyle Moffett 73*c1b8d45dSKyle Moffett - last-interrupt-source 74*c1b8d45dSKyle Moffett Usage: optional 75*c1b8d45dSKyle Moffett Value type: <u32> 76*c1b8d45dSKyle Moffett Some MPICs do not correctly report the number of hardware sources 77*c1b8d45dSKyle Moffett in the global feature registers. If specified, this field will 78*c1b8d45dSKyle Moffett override the value read from MPIC_GREG_FEATURE_LAST_SRC. 79*c1b8d45dSKyle Moffett 8052052875SStuart YoderINTERRUPT SPECIFIER DEFINITION 8152052875SStuart Yoder 8252052875SStuart Yoder Interrupt specifiers consists of 4 cells encoded as 8352052875SStuart Yoder follows: 8452052875SStuart Yoder 8552052875SStuart Yoder <1st-cell> interrupt-number 8652052875SStuart Yoder 8752052875SStuart Yoder Identifies the interrupt source. The meaning 8852052875SStuart Yoder depends on the type of interrupt. 8952052875SStuart Yoder 9052052875SStuart Yoder Note: If the interrupt-type cell is undefined 9152052875SStuart Yoder (i.e. #interrupt-cells = 2), this cell 9252052875SStuart Yoder should be interpreted the same as for 9352052875SStuart Yoder interrupt-type 0-- i.e. an external or 9452052875SStuart Yoder normal SoC device interrupt. 9552052875SStuart Yoder 9652052875SStuart Yoder <2nd-cell> level-sense information, encoded as follows: 9752052875SStuart Yoder 0 = low-to-high edge triggered 9852052875SStuart Yoder 1 = active low level-sensitive 9952052875SStuart Yoder 2 = active high level-sensitive 10052052875SStuart Yoder 3 = high-to-low edge triggered 10152052875SStuart Yoder 10252052875SStuart Yoder <3rd-cell> interrupt-type 10352052875SStuart Yoder 10452052875SStuart Yoder The following types are supported: 10552052875SStuart Yoder 10652052875SStuart Yoder 0 = external or normal SoC device interrupt 10752052875SStuart Yoder 10852052875SStuart Yoder The interrupt-number cell contains 10952052875SStuart Yoder the SoC device interrupt number. The 11052052875SStuart Yoder type-specific cell is undefined. The 11152052875SStuart Yoder interrupt-number is derived from the 11252052875SStuart Yoder MPIC a block of registers referred to as 11352052875SStuart Yoder the "Interrupt Source Configuration Registers". 11452052875SStuart Yoder Each source has 32-bytes of registers 11552052875SStuart Yoder (vector/priority and destination) in this 11652052875SStuart Yoder region. So interrupt 0 is at offset 0x0, 11752052875SStuart Yoder interrupt 1 is at offset 0x20, and so on. 11852052875SStuart Yoder 11952052875SStuart Yoder 1 = error interrupt 12052052875SStuart Yoder 12152052875SStuart Yoder The interrupt-number cell contains 12252052875SStuart Yoder the SoC device interrupt number for 12352052875SStuart Yoder the error interrupt. The type-specific 12452052875SStuart Yoder cell identifies the specific error 12552052875SStuart Yoder interrupt number. 12652052875SStuart Yoder 12752052875SStuart Yoder 2 = MPIC inter-processor interrupt (IPI) 12852052875SStuart Yoder 12952052875SStuart Yoder The interrupt-number cell identifies 13052052875SStuart Yoder the MPIC IPI number. The type-specific 13152052875SStuart Yoder cell is undefined. 13252052875SStuart Yoder 13352052875SStuart Yoder 3 = MPIC timer interrupt 13452052875SStuart Yoder 13552052875SStuart Yoder The interrupt-number cell identifies 13652052875SStuart Yoder the MPIC timer number. The type-specific 13752052875SStuart Yoder cell is undefined. 13852052875SStuart Yoder 13952052875SStuart Yoder <4th-cell> type-specific information 14052052875SStuart Yoder 14152052875SStuart Yoder The type-specific cell is encoded as follows: 14252052875SStuart Yoder 14352052875SStuart Yoder - For interrupt-type 1 (error interrupt), 14452052875SStuart Yoder the type-specific cell contains the 14552052875SStuart Yoder bit number of the error interrupt in the 14652052875SStuart Yoder Error Interrupt Summary Register. 14752052875SStuart Yoder 14852052875SStuart YoderEXAMPLE 1 14952052875SStuart Yoder /* 15052052875SStuart Yoder * mpic interrupt controller with 4 cells per specifier 15152052875SStuart Yoder */ 15252052875SStuart Yoder mpic: pic@40000 { 15352052875SStuart Yoder compatible = "fsl,mpic"; 15452052875SStuart Yoder interrupt-controller; 15552052875SStuart Yoder #interrupt-cells = <4>; 15652052875SStuart Yoder #address-cells = <0>; 15752052875SStuart Yoder reg = <0x40000 0x40000>; 15852052875SStuart Yoder }; 15952052875SStuart Yoder 16052052875SStuart YoderEXAMPLE 2 16152052875SStuart Yoder /* 16252052875SStuart Yoder * The MPC8544 I2C controller node has an internal 16352052875SStuart Yoder * interrupt number of 27. As per the reference manual 16452052875SStuart Yoder * this corresponds to interrupt source configuration 16552052875SStuart Yoder * registers at 0x5_0560. 16652052875SStuart Yoder * 16752052875SStuart Yoder * The interrupt source configuration registers begin 16852052875SStuart Yoder * at 0x5_0000. 16952052875SStuart Yoder * 17052052875SStuart Yoder * To compute the interrupt specifier interrupt number 17152052875SStuart Yoder * 17252052875SStuart Yoder * 0x560 >> 5 = 43 17352052875SStuart Yoder * 17452052875SStuart Yoder * The interrupt source configuration registers begin 17552052875SStuart Yoder * at 0x5_0000, and so the i2c vector/priority registers 17652052875SStuart Yoder * are at 0x5_0560. 17752052875SStuart Yoder */ 17852052875SStuart Yoder i2c@3000 { 17952052875SStuart Yoder #address-cells = <1>; 18052052875SStuart Yoder #size-cells = <0>; 18152052875SStuart Yoder cell-index = <0>; 18252052875SStuart Yoder compatible = "fsl-i2c"; 18352052875SStuart Yoder reg = <0x3000 0x100>; 18452052875SStuart Yoder interrupts = <43 2>; 18552052875SStuart Yoder interrupt-parent = <&mpic>; 18652052875SStuart Yoder dfsrr; 18752052875SStuart Yoder }; 18852052875SStuart Yoder 18952052875SStuart Yoder 19052052875SStuart YoderEXAMPLE 3 19152052875SStuart Yoder /* 19252052875SStuart Yoder * Definition of a node defining the 4 19352052875SStuart Yoder * MPIC IPI interrupts. Note the interrupt 19452052875SStuart Yoder * type of 2. 19552052875SStuart Yoder */ 19652052875SStuart Yoder ipi@410a0 { 19752052875SStuart Yoder compatible = "fsl,mpic-ipi"; 19852052875SStuart Yoder reg = <0x40040 0x10>; 19952052875SStuart Yoder interrupts = <0 0 2 0 20052052875SStuart Yoder 1 0 2 0 20152052875SStuart Yoder 2 0 2 0 20252052875SStuart Yoder 3 0 2 0>; 20352052875SStuart Yoder }; 20452052875SStuart Yoder 20552052875SStuart YoderEXAMPLE 4 20652052875SStuart Yoder /* 20752052875SStuart Yoder * Definition of a node defining the MPIC 20852052875SStuart Yoder * global timers. Note the interrupt 20952052875SStuart Yoder * type of 3. 21052052875SStuart Yoder */ 21152052875SStuart Yoder timer0: timer@41100 { 21252052875SStuart Yoder compatible = "fsl,mpic-global-timer"; 213180076cbSScott Wood reg = <0x41100 0x100 0x41300 4>; 21452052875SStuart Yoder interrupts = <0 0 3 0 21552052875SStuart Yoder 1 0 3 0 21652052875SStuart Yoder 2 0 3 0 21752052875SStuart Yoder 3 0 3 0>; 21852052875SStuart Yoder }; 21952052875SStuart Yoder 22052052875SStuart YoderEXAMPLE 5 22152052875SStuart Yoder /* 22225985edcSLucas De Marchi * Definition of an error interrupt (interrupt type 1). 22352052875SStuart Yoder * SoC interrupt number is 16 and the specific error 22452052875SStuart Yoder * interrupt bit in the error interrupt summary register 22552052875SStuart Yoder * is 23. 22652052875SStuart Yoder */ 22752052875SStuart Yoder memory-controller@8000 { 22852052875SStuart Yoder compatible = "fsl,p4080-memory-controller"; 22952052875SStuart Yoder reg = <0x8000 0x1000>; 23052052875SStuart Yoder interrupts = <16 2 1 23>; 23152052875SStuart Yoder }; 232