rcar-gen3-thermal.yaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. # Copyright (C) 2020 Renesas Electronics Corp.
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/thermal/rcar-gen3-thermal.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: Renesas R-Car Gen3 Thermal Sensor
  8. description:
  9. On most R-Car Gen3 and later SoCs, the thermal sensor controllers (TSC)
  10. control the thermal sensors (THS) which are the analog circuits for
  11. measuring temperature (Tj) inside the LSI.
  12. maintainers:
  13. - Niklas Söderlund <niklas.soderlund@ragnatech.se>
  14. $ref: thermal-sensor.yaml#
  15. properties:
  16. compatible:
  17. enum:
  18. - renesas,r8a774a1-thermal # RZ/G2M
  19. - renesas,r8a774b1-thermal # RZ/G2N
  20. - renesas,r8a774e1-thermal # RZ/G2H
  21. - renesas,r8a7795-thermal # R-Car H3
  22. - renesas,r8a7796-thermal # R-Car M3-W
  23. - renesas,r8a77961-thermal # R-Car M3-W+
  24. - renesas,r8a77965-thermal # R-Car M3-N
  25. - renesas,r8a77980-thermal # R-Car V3H
  26. - renesas,r8a779a0-thermal # R-Car V3U
  27. - renesas,r8a779f0-thermal # R-Car S4-8
  28. - renesas,r8a779g0-thermal # R-Car V4H
  29. - renesas,r8a779h0-thermal # R-Car V4M
  30. reg: true
  31. interrupts:
  32. items:
  33. - description: TEMP1 interrupt
  34. - description: TEMP2 interrupt
  35. - description: TEMP3 interrupt
  36. clocks:
  37. maxItems: 1
  38. power-domains:
  39. maxItems: 1
  40. resets:
  41. maxItems: 1
  42. "#thermal-sensor-cells":
  43. const: 1
  44. required:
  45. - compatible
  46. - reg
  47. - clocks
  48. - power-domains
  49. - resets
  50. if:
  51. properties:
  52. compatible:
  53. contains:
  54. enum:
  55. - renesas,r8a779a0-thermal
  56. then:
  57. properties:
  58. reg:
  59. items:
  60. - description: TSC0 registers
  61. - description: TSC1 registers
  62. - description: TSC2 registers
  63. - description: TSC3 registers
  64. - description: TSC4 registers
  65. else:
  66. properties:
  67. reg:
  68. minItems: 2
  69. items:
  70. - description: TSC1 registers
  71. - description: TSC2 registers
  72. - description: TSC3 registers
  73. - description: TSC4 registers
  74. if:
  75. not:
  76. properties:
  77. compatible:
  78. contains:
  79. enum:
  80. - renesas,r8a779f0-thermal
  81. - renesas,r8a779g0-thermal
  82. - renesas,r8a779h0-thermal
  83. then:
  84. required:
  85. - interrupts
  86. unevaluatedProperties: false
  87. examples:
  88. - |
  89. #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
  90. #include <dt-bindings/interrupt-controller/arm-gic.h>
  91. #include <dt-bindings/power/r8a7795-sysc.h>
  92. tsc: thermal@e6198000 {
  93. compatible = "renesas,r8a7795-thermal";
  94. reg = <0xe6198000 0x100>,
  95. <0xe61a0000 0x100>,
  96. <0xe61a8000 0x100>;
  97. interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
  98. <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
  99. <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
  100. clocks = <&cpg CPG_MOD 522>;
  101. power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
  102. resets = <&cpg 522>;
  103. #thermal-sensor-cells = <1>;
  104. };
  105. thermal-zones {
  106. sensor_thermal: sensor-thermal {
  107. polling-delay-passive = <250>;
  108. polling-delay = <1000>;
  109. thermal-sensors = <&tsc 0>;
  110. trips {
  111. sensor1_crit: sensor1-crit {
  112. temperature = <90000>;
  113. hysteresis = <2000>;
  114. type = "critical";
  115. };
  116. };
  117. };
  118. };
  119. - |
  120. #include <dt-bindings/clock/r8a779a0-cpg-mssr.h>
  121. #include <dt-bindings/interrupt-controller/arm-gic.h>
  122. #include <dt-bindings/power/r8a779a0-sysc.h>
  123. tsc_r8a779a0: thermal@e6190000 {
  124. compatible = "renesas,r8a779a0-thermal";
  125. reg = <0xe6190000 0x200>,
  126. <0xe6198000 0x200>,
  127. <0xe61a0000 0x200>,
  128. <0xe61a8000 0x200>,
  129. <0xe61b0000 0x200>;
  130. clocks = <&cpg CPG_MOD 919>;
  131. power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
  132. resets = <&cpg 919>;
  133. #thermal-sensor-cells = <1>;
  134. };