1eb3fcf00SRob Herring* ImgTec Powerdown Controller (PDC) Interrupt Controller Binding 2eb3fcf00SRob Herring 3eb3fcf00SRob HerringThis binding specifies what properties must be available in the device tree 4eb3fcf00SRob Herringrepresentation of a PDC IRQ controller. This has a number of input interrupt 5eb3fcf00SRob Herringlines which can wake the system, and are passed on through output interrupt 6eb3fcf00SRob Herringlines. 7eb3fcf00SRob Herring 8eb3fcf00SRob HerringRequired properties: 9eb3fcf00SRob Herring 10eb3fcf00SRob Herring - compatible: Specifies the compatibility list for the interrupt controller. 11eb3fcf00SRob Herring The type shall be <string> and the value shall include "img,pdc-intc". 12eb3fcf00SRob Herring 13eb3fcf00SRob Herring - reg: Specifies the base PDC physical address(s) and size(s) of the 14eb3fcf00SRob Herring addressable register space. The type shall be <prop-encoded-array>. 15eb3fcf00SRob Herring 16eb3fcf00SRob Herring - interrupt-controller: The presence of this property identifies the node 17eb3fcf00SRob Herring as an interrupt controller. No property value shall be defined. 18eb3fcf00SRob Herring 19eb3fcf00SRob Herring - #interrupt-cells: Specifies the number of cells needed to encode an 20eb3fcf00SRob Herring interrupt source. The type shall be a <u32> and the value shall be 2. 21eb3fcf00SRob Herring 22eb3fcf00SRob Herring - num-perips: Number of waking peripherals. 23eb3fcf00SRob Herring 24eb3fcf00SRob Herring - num-syswakes: Number of SysWake inputs. 25eb3fcf00SRob Herring 26eb3fcf00SRob Herring - interrupts: List of interrupt specifiers. The first specifier shall be the 27eb3fcf00SRob Herring shared SysWake interrupt, and remaining specifies shall be PDC peripheral 28eb3fcf00SRob Herring interrupts in order. 29eb3fcf00SRob Herring 30eb3fcf00SRob Herring* Interrupt Specifier Definition 31eb3fcf00SRob Herring 32eb3fcf00SRob Herring Interrupt specifiers consists of 2 cells encoded as follows: 33eb3fcf00SRob Herring 34eb3fcf00SRob Herring - <1st-cell>: The interrupt-number that identifies the interrupt source. 35eb3fcf00SRob Herring 0-7: Peripheral interrupts 36eb3fcf00SRob Herring 8-15: SysWake interrupts 37eb3fcf00SRob Herring 38eb3fcf00SRob Herring - <2nd-cell>: The level-sense information, encoded using the Linux interrupt 39eb3fcf00SRob Herring flags as follows (only 4 valid for peripheral interrupts): 40eb3fcf00SRob Herring 0 = none (decided by software) 41eb3fcf00SRob Herring 1 = low-to-high edge triggered 42eb3fcf00SRob Herring 2 = high-to-low edge triggered 43eb3fcf00SRob Herring 3 = both edge triggered 44eb3fcf00SRob Herring 4 = active-high level-sensitive (required for perip irqs) 45eb3fcf00SRob Herring 8 = active-low level-sensitive 46eb3fcf00SRob Herring 47eb3fcf00SRob Herring* Examples 48eb3fcf00SRob Herring 49eb3fcf00SRob HerringExample 1: 50eb3fcf00SRob Herring 51eb3fcf00SRob Herring /* 52eb3fcf00SRob Herring * TZ1090 PDC block 53eb3fcf00SRob Herring */ 54*4c9847b7SMathieu Malaterre pdc: pdc@02006000 { 55eb3fcf00SRob Herring // This is an interrupt controller node. 56eb3fcf00SRob Herring interrupt-controller; 57eb3fcf00SRob Herring 58eb3fcf00SRob Herring // Three cells to encode interrupt sources. 59eb3fcf00SRob Herring #interrupt-cells = <2>; 60eb3fcf00SRob Herring 61eb3fcf00SRob Herring // Offset address of 0x02006000 and size of 0x1000. 62eb3fcf00SRob Herring reg = <0x02006000 0x1000>; 63eb3fcf00SRob Herring 64eb3fcf00SRob Herring // Compatible with Meta hardware trigger block. 65eb3fcf00SRob Herring compatible = "img,pdc-intc"; 66eb3fcf00SRob Herring 67eb3fcf00SRob Herring // Three peripherals are connected. 68eb3fcf00SRob Herring num-perips = <3>; 69eb3fcf00SRob Herring 70eb3fcf00SRob Herring // Four SysWakes are connected. 71eb3fcf00SRob Herring num-syswakes = <4>; 72eb3fcf00SRob Herring 73eb3fcf00SRob Herring interrupts = <18 4 /* level */>, /* Syswakes */ 74eb3fcf00SRob Herring <30 4 /* level */>, /* Peripheral 0 (RTC) */ 75eb3fcf00SRob Herring <29 4 /* level */>, /* Peripheral 1 (IR) */ 76eb3fcf00SRob Herring <31 4 /* level */>; /* Peripheral 2 (WDT) */ 77eb3fcf00SRob Herring }; 78eb3fcf00SRob Herring 79eb3fcf00SRob HerringExample 2: 80eb3fcf00SRob Herring 81eb3fcf00SRob Herring /* 82eb3fcf00SRob Herring * An SoC peripheral that is wired through the PDC. 83eb3fcf00SRob Herring */ 84eb3fcf00SRob Herring rtc0 { 85eb3fcf00SRob Herring // The interrupt controller that this device is wired to. 86eb3fcf00SRob Herring interrupt-parent = <&pdc>; 87eb3fcf00SRob Herring 88eb3fcf00SRob Herring // Interrupt source Peripheral 0 89eb3fcf00SRob Herring interrupts = <0 /* Peripheral 0 (RTC) */ 90eb3fcf00SRob Herring 4> /* IRQ_TYPE_LEVEL_HIGH */ 91eb3fcf00SRob Herring }; 92eb3fcf00SRob Herring 93eb3fcf00SRob HerringExample 3: 94eb3fcf00SRob Herring 95eb3fcf00SRob Herring /* 96eb3fcf00SRob Herring * An interrupt generating device that is wired to a SysWake pin. 97eb3fcf00SRob Herring */ 98eb3fcf00SRob Herring touchscreen0 { 99eb3fcf00SRob Herring // The interrupt controller that this device is wired to. 100eb3fcf00SRob Herring interrupt-parent = <&pdc>; 101eb3fcf00SRob Herring 102eb3fcf00SRob Herring // Interrupt source SysWake 0 that is active-low level-sensitive 103eb3fcf00SRob Herring interrupts = <8 /* SysWake0 */ 104eb3fcf00SRob Herring 8 /* IRQ_TYPE_LEVEL_LOW */>; 105eb3fcf00SRob Herring }; 106