img,pdc-intc.txt 3.2 KB

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