arm,arch_timer.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/timer/arm,arch_timer.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: ARM architected timer
  7. maintainers:
  8. - Marc Zyngier <marc.zyngier@arm.com>
  9. - Mark Rutland <mark.rutland@arm.com>
  10. description: |+
  11. ARM cores may have a per-core architected timer, which provides per-cpu timers,
  12. or a memory mapped architected timer, which provides up to 8 frames with a
  13. physical and optional virtual timer per frame.
  14. The per-core architected timer is attached to a GIC to deliver its
  15. per-processor interrupts via PPIs. The memory mapped timer is attached to a GIC
  16. to deliver its interrupts via SPIs.
  17. properties:
  18. compatible:
  19. oneOf:
  20. - items:
  21. - const: arm,cortex-a15-timer
  22. - const: arm,armv7-timer
  23. - items:
  24. - enum:
  25. - arm,armv7-timer
  26. - arm,armv8-timer
  27. - items:
  28. - const: arm,armv8-timer
  29. - const: arm,armv7-timer
  30. interrupts:
  31. minItems: 1
  32. items:
  33. - description: secure timer irq
  34. - description: non-secure timer irq
  35. - description: virtual timer irq
  36. - description: hypervisor timer irq
  37. - description: hypervisor virtual timer irq
  38. interrupt-names:
  39. oneOf:
  40. - minItems: 2
  41. items:
  42. - const: phys
  43. - const: virt
  44. - const: hyp-phys
  45. - const: hyp-virt
  46. - minItems: 3
  47. items:
  48. - const: sec-phys
  49. - const: phys
  50. - const: virt
  51. - const: hyp-phys
  52. - const: hyp-virt
  53. clock-frequency:
  54. description: The frequency of the main counter, in Hz. Should be present
  55. only where necessary to work around broken firmware which does not configure
  56. CNTFRQ on all CPUs to a uniform correct value. Use of this property is
  57. strongly discouraged; fix your firmware unless absolutely impossible.
  58. always-on:
  59. type: boolean
  60. description: If present, the timer is powered through an always-on power
  61. domain, therefore it never loses context.
  62. allwinner,erratum-unknown1:
  63. type: boolean
  64. description: Indicates the presence of an erratum found in Allwinner SoCs,
  65. where reading certain values from the counter is unreliable. This also
  66. affects writes to the tval register, due to the implicit counter read.
  67. fsl,erratum-a008585:
  68. type: boolean
  69. description: Indicates the presence of QorIQ erratum A-008585, which says
  70. that reading the counter is unreliable unless the same value is returned
  71. by back-to-back reads. This also affects writes to the tval register, due
  72. to the implicit counter read.
  73. hisilicon,erratum-161010101:
  74. type: boolean
  75. description: Indicates the presence of Hisilicon erratum 161010101, which
  76. says that reading the counters is unreliable in some cases, and reads may
  77. return a value 32 beyond the correct value. This also affects writes to
  78. the tval registers, due to the implicit counter read.
  79. arm,cpu-registers-not-fw-configured:
  80. type: boolean
  81. description: Firmware does not initialize any of the generic timer CPU
  82. registers, which contain their architecturally-defined reset values. Only
  83. supported for 32-bit systems which follow the ARMv7 architected reset
  84. values.
  85. arm,no-tick-in-suspend:
  86. type: boolean
  87. description: The main counter does not tick when the system is in
  88. low-power system suspend on some SoCs. This behavior does not match the
  89. Architecture Reference Manual's specification that the system counter "must
  90. be implemented in an always-on power domain."
  91. required:
  92. - compatible
  93. additionalProperties: false
  94. oneOf:
  95. - required:
  96. - interrupts
  97. - required:
  98. - interrupts-extended
  99. examples:
  100. - |
  101. timer {
  102. compatible = "arm,cortex-a15-timer",
  103. "arm,armv7-timer";
  104. interrupts = <1 13 0xf08>,
  105. <1 14 0xf08>,
  106. <1 11 0xf08>,
  107. <1 10 0xf08>;
  108. clock-frequency = <100000000>;
  109. };
  110. ...