nvidia,tegra186-timer.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/timer/nvidia,tegra186-timer.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: NVIDIA Tegra186 timer
  7. maintainers:
  8. - Thierry Reding <treding@nvidia.com>
  9. description: >
  10. The Tegra timer provides 29-bit timer counters and a 32-bit timestamp
  11. counter. Each NV timer selects its timing reference signal from the 1 MHz
  12. reference generated by USEC, TSC or either clk_m or OSC. Each TMR can be
  13. programmed to generate one-shot, periodic, or watchdog interrupts.
  14. properties:
  15. compatible:
  16. oneOf:
  17. - const: nvidia,tegra186-timer
  18. description: >
  19. The Tegra186 timer provides ten 29-bit timer counters.
  20. - const: nvidia,tegra234-timer
  21. description: >
  22. The Tegra234 timer provides sixteen 29-bit timer counters.
  23. reg:
  24. maxItems: 1
  25. interrupts: true
  26. allOf:
  27. - if:
  28. properties:
  29. compatible:
  30. contains:
  31. const: nvidia,tegra186-timer
  32. then:
  33. properties:
  34. interrupts:
  35. maxItems: 10
  36. description: >
  37. One per each timer channels 0 through 9.
  38. - if:
  39. properties:
  40. compatible:
  41. contains:
  42. const: nvidia,tegra234-timer
  43. then:
  44. properties:
  45. interrupts:
  46. maxItems: 16
  47. description: >
  48. One per each timer channels 0 through 15.
  49. required:
  50. - compatible
  51. - reg
  52. - interrupts
  53. additionalProperties: false
  54. examples:
  55. - |
  56. #include <dt-bindings/interrupt-controller/arm-gic.h>
  57. #include <dt-bindings/interrupt-controller/irq.h>
  58. timer@3010000 {
  59. compatible = "nvidia,tegra186-timer";
  60. reg = <0x03010000 0x000e0000>;
  61. interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
  62. <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
  63. <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
  64. <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
  65. <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
  66. <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
  67. <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
  68. <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
  69. <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
  70. <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
  71. };
  72. - |
  73. #include <dt-bindings/interrupt-controller/arm-gic.h>
  74. #include <dt-bindings/interrupt-controller/irq.h>
  75. timer@2080000 {
  76. compatible = "nvidia,tegra234-timer";
  77. reg = <0x02080000 0x00121000>;
  78. interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
  79. <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
  80. <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
  81. <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
  82. <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
  83. <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
  84. <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
  85. <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
  86. <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
  87. <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
  88. <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
  89. <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
  90. <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
  91. <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
  92. <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
  93. <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
  94. };