18c2ecf20Sopenharmony_ci* ImgTec Powerdown Controller (PDC) Interrupt Controller Binding 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThis binding specifies what properties must be available in the device tree 48c2ecf20Sopenharmony_cirepresentation of a PDC IRQ controller. This has a number of input interrupt 58c2ecf20Sopenharmony_cilines which can wake the system, and are passed on through output interrupt 68c2ecf20Sopenharmony_cilines. 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciRequired properties: 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci - compatible: Specifies the compatibility list for the interrupt controller. 118c2ecf20Sopenharmony_ci The type shall be <string> and the value shall include "img,pdc-intc". 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci - reg: Specifies the base PDC physical address(s) and size(s) of the 148c2ecf20Sopenharmony_ci addressable register space. The type shall be <prop-encoded-array>. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci - interrupt-controller: The presence of this property identifies the node 178c2ecf20Sopenharmony_ci as an interrupt controller. No property value shall be defined. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci - #interrupt-cells: Specifies the number of cells needed to encode an 208c2ecf20Sopenharmony_ci interrupt source. The type shall be a <u32> and the value shall be 2. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci - num-perips: Number of waking peripherals. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci - num-syswakes: Number of SysWake inputs. 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci - interrupts: List of interrupt specifiers. The first specifier shall be the 278c2ecf20Sopenharmony_ci shared SysWake interrupt, and remaining specifies shall be PDC peripheral 288c2ecf20Sopenharmony_ci interrupts in order. 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci* Interrupt Specifier Definition 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci Interrupt specifiers consists of 2 cells encoded as follows: 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci - <1st-cell>: The interrupt-number that identifies the interrupt source. 358c2ecf20Sopenharmony_ci 0-7: Peripheral interrupts 368c2ecf20Sopenharmony_ci 8-15: SysWake interrupts 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci - <2nd-cell>: The level-sense information, encoded using the Linux interrupt 398c2ecf20Sopenharmony_ci flags as follows (only 4 valid for peripheral interrupts): 408c2ecf20Sopenharmony_ci 0 = none (decided by software) 418c2ecf20Sopenharmony_ci 1 = low-to-high edge triggered 428c2ecf20Sopenharmony_ci 2 = high-to-low edge triggered 438c2ecf20Sopenharmony_ci 3 = both edge triggered 448c2ecf20Sopenharmony_ci 4 = active-high level-sensitive (required for perip irqs) 458c2ecf20Sopenharmony_ci 8 = active-low level-sensitive 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci* Examples 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciExample 1: 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci /* 528c2ecf20Sopenharmony_ci * TZ1090 PDC block 538c2ecf20Sopenharmony_ci */ 548c2ecf20Sopenharmony_ci pdc: pdc@02006000 { 558c2ecf20Sopenharmony_ci // This is an interrupt controller node. 568c2ecf20Sopenharmony_ci interrupt-controller; 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci // Three cells to encode interrupt sources. 598c2ecf20Sopenharmony_ci #interrupt-cells = <2>; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci // Offset address of 0x02006000 and size of 0x1000. 628c2ecf20Sopenharmony_ci reg = <0x02006000 0x1000>; 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci // Compatible with Meta hardware trigger block. 658c2ecf20Sopenharmony_ci compatible = "img,pdc-intc"; 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci // Three peripherals are connected. 688c2ecf20Sopenharmony_ci num-perips = <3>; 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci // Four SysWakes are connected. 718c2ecf20Sopenharmony_ci num-syswakes = <4>; 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci interrupts = <18 4 /* level */>, /* Syswakes */ 748c2ecf20Sopenharmony_ci <30 4 /* level */>, /* Peripheral 0 (RTC) */ 758c2ecf20Sopenharmony_ci <29 4 /* level */>, /* Peripheral 1 (IR) */ 768c2ecf20Sopenharmony_ci <31 4 /* level */>; /* Peripheral 2 (WDT) */ 778c2ecf20Sopenharmony_ci }; 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ciExample 2: 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci /* 828c2ecf20Sopenharmony_ci * An SoC peripheral that is wired through the PDC. 838c2ecf20Sopenharmony_ci */ 848c2ecf20Sopenharmony_ci rtc0 { 858c2ecf20Sopenharmony_ci // The interrupt controller that this device is wired to. 868c2ecf20Sopenharmony_ci interrupt-parent = <&pdc>; 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci // Interrupt source Peripheral 0 898c2ecf20Sopenharmony_ci interrupts = <0 /* Peripheral 0 (RTC) */ 908c2ecf20Sopenharmony_ci 4> /* IRQ_TYPE_LEVEL_HIGH */ 918c2ecf20Sopenharmony_ci }; 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ciExample 3: 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci /* 968c2ecf20Sopenharmony_ci * An interrupt generating device that is wired to a SysWake pin. 978c2ecf20Sopenharmony_ci */ 988c2ecf20Sopenharmony_ci touchscreen0 { 998c2ecf20Sopenharmony_ci // The interrupt controller that this device is wired to. 1008c2ecf20Sopenharmony_ci interrupt-parent = <&pdc>; 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci // Interrupt source SysWake 0 that is active-low level-sensitive 1038c2ecf20Sopenharmony_ci interrupts = <8 /* SysWake0 */ 1048c2ecf20Sopenharmony_ci 8 /* IRQ_TYPE_LEVEL_LOW */>; 1058c2ecf20Sopenharmony_ci }; 106