0059-dt-bindings-timer-Add-timer-for-StarFive-JH7110-SoC.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. From 944b96d734199642e2ede978c48d754109ca334c Mon Sep 17 00:00:00 2001
  2. From: Xingyu Wu <[email protected]>
  3. Date: Mon, 20 Mar 2023 21:54:31 +0800
  4. Subject: [PATCH 059/122] dt-bindings: timer: Add timer for StarFive JH7110 SoC
  5. Add bindings for the timer on the JH7110 RISC-V SoC
  6. by StarFive Technology Ltd.
  7. Signed-off-by: Xingyu Wu <[email protected]>
  8. Reviewed-by: Krzysztof Kozlowski <[email protected]>
  9. ---
  10. .../bindings/timer/starfive,jh7110-timer.yaml | 95 +++++++++++++++++++
  11. 1 file changed, 95 insertions(+)
  12. create mode 100644 Documentation/devicetree/bindings/timer/starfive,jh7110-timer.yaml
  13. --- /dev/null
  14. +++ b/Documentation/devicetree/bindings/timer/starfive,jh7110-timer.yaml
  15. @@ -0,0 +1,95 @@
  16. +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  17. +%YAML 1.2
  18. +---
  19. +$id: http://devicetree.org/schemas/timer/starfive,jh7110-timer.yaml#
  20. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  21. +
  22. +title: StarFive JH7110 Timer
  23. +maintainers:
  24. + - Xingyu Wu <[email protected]>
  25. + - Samin Guo <[email protected]>
  26. +
  27. +description:
  28. + This timer has four free-running 32 bit counters in StarFive JH7110 SoC.
  29. + And each channel(counter) triggers an interrupt when timeout. They support
  30. + one-shot mode and continuous-run mode.
  31. +
  32. +properties:
  33. + compatible:
  34. + const: starfive,jh7110-timer
  35. +
  36. + reg:
  37. + maxItems: 1
  38. +
  39. + interrupts:
  40. + items:
  41. + - description: channel 0
  42. + - description: channel 1
  43. + - description: channel 2
  44. + - description: channel 3
  45. +
  46. + clocks:
  47. + items:
  48. + - description: timer APB
  49. + - description: channel 0
  50. + - description: channel 1
  51. + - description: channel 2
  52. + - description: channel 3
  53. +
  54. + clock-names:
  55. + items:
  56. + - const: apb
  57. + - const: ch0
  58. + - const: ch1
  59. + - const: ch2
  60. + - const: ch3
  61. +
  62. + resets:
  63. + items:
  64. + - description: timer APB
  65. + - description: channel 0
  66. + - description: channel 1
  67. + - description: channel 2
  68. + - description: channel 3
  69. +
  70. + reset-names:
  71. + items:
  72. + - const: apb
  73. + - const: ch0
  74. + - const: ch1
  75. + - const: ch2
  76. + - const: ch3
  77. +
  78. +required:
  79. + - compatible
  80. + - reg
  81. + - interrupts
  82. + - clocks
  83. + - clock-names
  84. + - resets
  85. + - reset-names
  86. +
  87. +additionalProperties: false
  88. +
  89. +examples:
  90. + - |
  91. + timer@13050000 {
  92. + compatible = "starfive,jh7110-timer";
  93. + reg = <0x13050000 0x10000>;
  94. + interrupts = <69>, <70>, <71> ,<72>;
  95. + clocks = <&clk 124>,
  96. + <&clk 125>,
  97. + <&clk 126>,
  98. + <&clk 127>,
  99. + <&clk 128>;
  100. + clock-names = "apb", "ch0", "ch1",
  101. + "ch2", "ch3";
  102. + resets = <&rst 117>,
  103. + <&rst 118>,
  104. + <&rst 119>,
  105. + <&rst 120>,
  106. + <&rst 121>;
  107. + reset-names = "apb", "ch0", "ch1",
  108. + "ch2", "ch3";
  109. + };
  110. +