arm,sp804.yaml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/timer/arm,sp804.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: ARM sp804 Dual Timers
  7. maintainers:
  8. - Haojian Zhuang <haojian.zhuang@linaro.org>
  9. description: |+
  10. The Arm SP804 IP implements two independent timers, configurable for
  11. 16 or 32 bit operation and capable of running in one-shot, periodic, or
  12. free-running mode. The input clock is shared, but can be gated and prescaled
  13. independently for each timer.
  14. There is a viriant of Arm SP804: Hisilicon 64-bit SP804 timer. Some Hisilicon
  15. SoCs, such as Hi1212, should use the dedicated compatible: "hisilicon,sp804".
  16. # Need a custom select here or 'arm,primecell' will match on lots of nodes
  17. select:
  18. properties:
  19. compatible:
  20. contains:
  21. enum:
  22. - arm,sp804
  23. - hisilicon,sp804
  24. required:
  25. - compatible
  26. properties:
  27. compatible:
  28. items:
  29. - enum:
  30. - arm,sp804
  31. - hisilicon,sp804
  32. - const: arm,primecell
  33. interrupts:
  34. description: |
  35. If two interrupts are listed, those are the interrupts for timer
  36. 1 and 2, respectively. If there is only a single interrupt, it is
  37. either a combined interrupt or the sole interrupt of one timer, as
  38. specified by the "arm,sp804-has-irq" property.
  39. minItems: 1
  40. maxItems: 2
  41. reg:
  42. description: The physical base address of the SP804 IP.
  43. maxItems: 1
  44. clocks:
  45. description: |
  46. Clocks driving the dual timer hardware. This list should
  47. be 1 or 3 clocks. With 3 clocks, the order is timer0 clock, timer1
  48. clock, apb_pclk. A single clock can also be specified if the same
  49. clock is used for all clock inputs.
  50. oneOf:
  51. - items:
  52. - description: clock for timer 1
  53. - description: clock for timer 2
  54. - description: bus clock
  55. - items:
  56. - description: unified clock for both timers and the bus
  57. clock-names: true
  58. # The original binding did not specify any clock names, and there is no
  59. # consistent naming used in the existing DTs. The primecell binding
  60. # requires the "apb_pclk" name, so we need this property.
  61. # Use "timer0clk", "timer1clk", "apb_pclk" for new DTs.
  62. arm,sp804-has-irq:
  63. description: If only one interrupt line is connected to the interrupt
  64. controller, this property specifies which timer is connected to this
  65. line.
  66. $ref: /schemas/types.yaml#/definitions/uint32
  67. minimum: 1
  68. maximum: 2
  69. required:
  70. - compatible
  71. - interrupts
  72. - reg
  73. - clocks
  74. additionalProperties: false
  75. examples:
  76. - |
  77. timer0: timer@fc800000 {
  78. compatible = "arm,sp804", "arm,primecell";
  79. reg = <0xfc800000 0x1000>;
  80. interrupts = <0 0 4>, <0 1 4>;
  81. clocks = <&timclk1>, <&timclk2>, <&pclk>;
  82. clock-names = "timer1", "timer2", "apb_pclk";
  83. };