162306a36Sopenharmony_ci* ImgTec Powerdown Controller (PDC) Interrupt Controller Binding 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThis binding specifies what properties must be available in the device tree 462306a36Sopenharmony_cirepresentation of a PDC IRQ controller. This has a number of input interrupt 562306a36Sopenharmony_cilines which can wake the system, and are passed on through output interrupt 662306a36Sopenharmony_cilines. 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciRequired properties: 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci - compatible: Specifies the compatibility list for the interrupt controller. 1162306a36Sopenharmony_ci The type shall be <string> and the value shall include "img,pdc-intc". 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci - reg: Specifies the base PDC physical address(s) and size(s) of the 1462306a36Sopenharmony_ci addressable register space. The type shall be <prop-encoded-array>. 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci - interrupt-controller: The presence of this property identifies the node 1762306a36Sopenharmony_ci as an interrupt controller. No property value shall be defined. 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci - #interrupt-cells: Specifies the number of cells needed to encode an 2062306a36Sopenharmony_ci interrupt source. The type shall be a <u32> and the value shall be 2. 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci - num-perips: Number of waking peripherals. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci - num-syswakes: Number of SysWake inputs. 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci - interrupts: List of interrupt specifiers. The first specifier shall be the 2762306a36Sopenharmony_ci shared SysWake interrupt, and remaining specifies shall be PDC peripheral 2862306a36Sopenharmony_ci interrupts in order. 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci* Interrupt Specifier Definition 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci Interrupt specifiers consists of 2 cells encoded as follows: 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci - <1st-cell>: The interrupt-number that identifies the interrupt source. 3562306a36Sopenharmony_ci 0-7: Peripheral interrupts 3662306a36Sopenharmony_ci 8-15: SysWake interrupts 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci - <2nd-cell>: The level-sense information, encoded using the Linux interrupt 3962306a36Sopenharmony_ci flags as follows (only 4 valid for peripheral interrupts): 4062306a36Sopenharmony_ci 0 = none (decided by software) 4162306a36Sopenharmony_ci 1 = low-to-high edge triggered 4262306a36Sopenharmony_ci 2 = high-to-low edge triggered 4362306a36Sopenharmony_ci 3 = both edge triggered 4462306a36Sopenharmony_ci 4 = active-high level-sensitive (required for perip irqs) 4562306a36Sopenharmony_ci 8 = active-low level-sensitive 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci* Examples 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ciExample 1: 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci /* 5262306a36Sopenharmony_ci * TZ1090 PDC block 5362306a36Sopenharmony_ci */ 5462306a36Sopenharmony_ci pdc: pdc@02006000 { 5562306a36Sopenharmony_ci // This is an interrupt controller node. 5662306a36Sopenharmony_ci interrupt-controller; 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci // Three cells to encode interrupt sources. 5962306a36Sopenharmony_ci #interrupt-cells = <2>; 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci // Offset address of 0x02006000 and size of 0x1000. 6262306a36Sopenharmony_ci reg = <0x02006000 0x1000>; 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci // Compatible with Meta hardware trigger block. 6562306a36Sopenharmony_ci compatible = "img,pdc-intc"; 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci // Three peripherals are connected. 6862306a36Sopenharmony_ci num-perips = <3>; 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci // Four SysWakes are connected. 7162306a36Sopenharmony_ci num-syswakes = <4>; 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci interrupts = <18 4 /* level */>, /* Syswakes */ 7462306a36Sopenharmony_ci <30 4 /* level */>, /* Peripheral 0 (RTC) */ 7562306a36Sopenharmony_ci <29 4 /* level */>, /* Peripheral 1 (IR) */ 7662306a36Sopenharmony_ci <31 4 /* level */>; /* Peripheral 2 (WDT) */ 7762306a36Sopenharmony_ci }; 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ciExample 2: 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci /* 8262306a36Sopenharmony_ci * An SoC peripheral that is wired through the PDC. 8362306a36Sopenharmony_ci */ 8462306a36Sopenharmony_ci rtc0 { 8562306a36Sopenharmony_ci // The interrupt controller that this device is wired to. 8662306a36Sopenharmony_ci interrupt-parent = <&pdc>; 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci // Interrupt source Peripheral 0 8962306a36Sopenharmony_ci interrupts = <0 /* Peripheral 0 (RTC) */ 9062306a36Sopenharmony_ci 4> /* IRQ_TYPE_LEVEL_HIGH */ 9162306a36Sopenharmony_ci }; 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ciExample 3: 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci /* 9662306a36Sopenharmony_ci * An interrupt generating device that is wired to a SysWake pin. 9762306a36Sopenharmony_ci */ 9862306a36Sopenharmony_ci touchscreen0 { 9962306a36Sopenharmony_ci // The interrupt controller that this device is wired to. 10062306a36Sopenharmony_ci interrupt-parent = <&pdc>; 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci // Interrupt source SysWake 0 that is active-low level-sensitive 10362306a36Sopenharmony_ci interrupts = <8 /* SysWake0 */ 10462306a36Sopenharmony_ci 8 /* IRQ_TYPE_LEVEL_LOW */>; 10562306a36Sopenharmony_ci }; 106