0104-dt-bindings-watchdog-Add-watchdog-for-StarFive-JH710.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. From 8559b2db6aecbee62cf9e02c17349379d72edcfb Mon Sep 17 00:00:00 2001
  2. From: Xingyu Wu <[email protected]>
  3. Date: Tue, 14 Mar 2023 21:24:35 +0800
  4. Subject: [PATCH 104/122] dt-bindings: watchdog: Add watchdog for StarFive
  5. JH7100 and JH7110
  6. Add bindings to describe the watchdog for the StarFive JH7100/JH7110 SoC.
  7. And Use JH7100 as first StarFive SoC with watchdog.
  8. Signed-off-by: Xingyu Wu <[email protected]>
  9. Reviewed-by: Krzysztof Kozlowski <[email protected]>
  10. Reviewed-by: Guenter Roeck <[email protected]>
  11. ---
  12. .../watchdog/starfive,jh7100-wdt.yaml | 71 +++++++++++++++++++
  13. 1 file changed, 71 insertions(+)
  14. create mode 100644 Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml
  15. --- /dev/null
  16. +++ b/Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml
  17. @@ -0,0 +1,71 @@
  18. +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  19. +%YAML 1.2
  20. +---
  21. +$id: http://devicetree.org/schemas/watchdog/starfive,jh7100-wdt.yaml#
  22. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  23. +
  24. +title: StarFive Watchdog for JH7100 and JH7110 SoC
  25. +
  26. +maintainers:
  27. + - Xingyu Wu <[email protected]>
  28. + - Samin Guo <[email protected]>
  29. +
  30. +description:
  31. + The JH7100 and JH7110 watchdog both are 32 bit counters. JH7100 watchdog
  32. + has only one timeout phase and reboots. And JH7110 watchdog has two
  33. + timeout phases. At the first phase, the signal of watchdog interrupt
  34. + output(WDOGINT) will rise when counter is 0. The counter will reload
  35. + the timeout value. And then, if counter decreases to 0 again and WDOGINT
  36. + isn't cleared, the watchdog will reset the system unless the watchdog
  37. + reset is disabled.
  38. +
  39. +allOf:
  40. + - $ref: watchdog.yaml#
  41. +
  42. +properties:
  43. + compatible:
  44. + enum:
  45. + - starfive,jh7100-wdt
  46. + - starfive,jh7110-wdt
  47. +
  48. + reg:
  49. + maxItems: 1
  50. +
  51. + interrupts:
  52. + maxItems: 1
  53. +
  54. + clocks:
  55. + items:
  56. + - description: APB clock
  57. + - description: Core clock
  58. +
  59. + clock-names:
  60. + items:
  61. + - const: apb
  62. + - const: core
  63. +
  64. + resets:
  65. + items:
  66. + - description: APB reset
  67. + - description: Core reset
  68. +
  69. +required:
  70. + - compatible
  71. + - reg
  72. + - clocks
  73. + - clock-names
  74. + - resets
  75. +
  76. +unevaluatedProperties: false
  77. +
  78. +examples:
  79. + - |
  80. + watchdog@12480000 {
  81. + compatible = "starfive,jh7100-wdt";
  82. + reg = <0x12480000 0x10000>;
  83. + clocks = <&clk 171>,
  84. + <&clk 172>;
  85. + clock-names = "apb", "core";
  86. + resets = <&rst 99>,
  87. + <&rst 100>;
  88. + };