1Specifying interrupt information for devices 2============================================ 3 41) Interrupt client nodes 5------------------------- 6 7Nodes that describe devices which generate interrupts must contain an 8"interrupts" property. This property must contain a list of interrupt 9specifiers, one per output interrupt. The format of the interrupt specifier is 10determined by the interrupt controller to which the interrupts are routed; see 11section 2 below for details. 12 13The "interrupt-parent" property is used to specify the controller to which 14interrupts are routed and contains a single phandle referring to the interrupt 15controller node. This property is inherited, so it may be specified in an 16interrupt client node or in any of its parent nodes. 17 182) Interrupt controller nodes 19----------------------------- 20 21A device is marked as an interrupt controller with the "interrupt-controller" 22property. This is a empty, boolean property. An additional "#interrupt-cells" 23property defines the number of cells needed to specify a single interrupt. 24 25It is the responsibility of the interrupt controller's binding to define the 26length and format of the interrupt specifier. The following two variants are 27commonly used: 28 29 a) one cell 30 ----------- 31 The #interrupt-cells property is set to 1 and the single cell defines the 32 index of the interrupt within the controller. 33 34 Example: 35 36 vic: intc@10140000 { 37 compatible = "arm,versatile-vic"; 38 interrupt-controller; 39 #interrupt-cells = <1>; 40 reg = <0x10140000 0x1000>; 41 }; 42 43 sic: intc@10003000 { 44 compatible = "arm,versatile-sic"; 45 interrupt-controller; 46 #interrupt-cells = <1>; 47 reg = <0x10003000 0x1000>; 48 interrupt-parent = <&vic>; 49 interrupts = <31>; /* Cascaded to vic */ 50 }; 51 52 b) two cells 53 ------------ 54 The #interrupt-cells property is set to 2 and the first cell defines the 55 index of the interrupt within the controller, while the second cell is used 56 to specify any of the following flags: 57 - bits[3:0] trigger type and level flags 58 1 = low-to-high edge triggered 59 2 = high-to-low edge triggered 60 4 = active high level-sensitive 61 8 = active low level-sensitive 62 63 Example: 64 65 i2c@7000c000 { 66 gpioext: gpio-adnp@41 { 67 compatible = "ad,gpio-adnp"; 68 reg = <0x41>; 69 70 interrupt-parent = <&gpio>; 71 interrupts = <160 1>; 72 73 gpio-controller; 74 #gpio-cells = <1>; 75 76 interrupt-controller; 77 #interrupt-cells = <2>; 78 79 nr-gpios = <64>; 80 }; 81 82 sx8634@2b { 83 compatible = "smtc,sx8634"; 84 reg = <0x2b>; 85 86 interrupt-parent = <&gpioext>; 87 interrupts = <3 0x8>; 88 89 #address-cells = <1>; 90 #size-cells = <0>; 91 92 threshold = <0x40>; 93 sensitivity = <7>; 94 }; 95 }; 96