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