1 # SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 # Copyright 2019 Linaro Ltd.
5 $id: http://devicetree.org/schemas/thermal/qcom-tsens.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
8 title: QCOM SoC Temperature Sensor (TSENS)
11 - Amit Kucheria <amitk@kernel.org>
14 QCOM SoCs have TSENS IP to allow temperature measurement. There are currently
15 three distinct major versions of the IP that is supported by a single driver.
16 The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures
17 everything before v1 when there was no versioning information.
22 - description: msm8960 TSENS based
28 - description: v0.1 of TSENS
37 - const: qcom,tsens-v0_1
39 - description: v1 of TSENS
45 - const: qcom,tsens-v1
47 - description: v2 of TSENS
69 - const: qcom,tsens-v2
71 - description: v2 of TSENS with combined interrupt
75 - description: v2 of TSENS with combined interrupt
79 - const: qcom,ipq8074-tsens
83 - description: TM registers
84 - description: SROT registers
99 Reference to an nvmem node for the calibration data
103 Reference to nvmem cells for the calibration mode, two calibration
104 bases and two cells per each sensor
105 # special case for msm8974 / apq8084
108 Reference to nvmem cells for the calibration mode, two calibration
109 bases and two cells per each sensor, main and backup copies, plus use_backup cell
124 - pattern: '^s[0-9]+_p1$'
125 - pattern: '^s[0-9]+_p2$'
126 - pattern: '^s[0-9]+_p1$'
127 - pattern: '^s[0-9]+_p2$'
128 - pattern: '^s[0-9]+_p1$'
129 - pattern: '^s[0-9]+_p2$'
130 - pattern: '^s[0-9]+_p1$'
131 - pattern: '^s[0-9]+_p2$'
132 - pattern: '^s[0-9]+_p1$'
133 - pattern: '^s[0-9]+_p2$'
134 - pattern: '^s[0-9]+_p1$'
135 - pattern: '^s[0-9]+_p2$'
136 - pattern: '^s[0-9]+_p1$'
137 - pattern: '^s[0-9]+_p2$'
138 - pattern: '^s[0-9]+_p1$'
139 - pattern: '^s[0-9]+_p2$'
140 - pattern: '^s[0-9]+_p1$'
141 - pattern: '^s[0-9]+_p2$'
142 - pattern: '^s[0-9]+_p1$'
143 - pattern: '^s[0-9]+_p2$'
144 - pattern: '^s[0-9]+_p1$'
145 - pattern: '^s[0-9]+_p2$'
146 - pattern: '^s[0-9]+_p1$'
147 - pattern: '^s[0-9]+_p2$'
148 - pattern: '^s[0-9]+_p1$'
149 - pattern: '^s[0-9]+_p2$'
150 - pattern: '^s[0-9]+_p1$'
151 - pattern: '^s[0-9]+_p2$'
152 - pattern: '^s[0-9]+_p1$'
153 - pattern: '^s[0-9]+_p2$'
154 - pattern: '^s[0-9]+_p1$'
155 - pattern: '^s[0-9]+_p2$'
156 # special case for msm8974 / apq8084
163 - const: base1_backup
164 - const: base2_backup
187 - const: s0_p1_backup
188 - const: s0_p2_backup
189 - const: s1_p1_backup
190 - const: s1_p2_backup
191 - const: s2_p1_backup
192 - const: s2_p2_backup
193 - const: s3_p1_backup
194 - const: s3_p2_backup
195 - const: s4_p1_backup
196 - const: s4_p2_backup
197 - const: s5_p1_backup
198 - const: s5_p2_backup
199 - const: s6_p1_backup
200 - const: s6_p2_backup
201 - const: s7_p1_backup
202 - const: s7_p2_backup
203 - const: s8_p1_backup
204 - const: s8_p2_backup
205 - const: s9_p1_backup
206 - const: s9_p2_backup
207 - const: s10_p1_backup
208 - const: s10_p2_backup
212 Number of sensors enabled on this platform
213 $ref: /schemas/types.yaml#/definitions/uint32
217 "#thermal-sensor-cells":
220 Number of cells required to uniquely identify the thermal sensors. Since
221 we have multiple sensors this is set to 1
227 - "#thermal-sensor-cells"
244 - description: Combined interrupt if upper or lower threshold crossed
258 - description: Combined interrupt if upper or lower threshold crossed
259 - description: Interrupt if critical threshold crossed
275 - description: Combined interrupt if upper, lower or critical thresholds crossed
294 additionalProperties: false
298 #include <dt-bindings/interrupt-controller/arm-gic.h>
299 // Example msm9860 based SoC (ipq8064):
300 gcc: clock-controller {
304 tsens: thermal-sensor {
305 compatible = "qcom,ipq8064-tsens";
307 nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
308 nvmem-cell-names = "calib", "calib_backup";
309 interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
310 interrupt-names = "uplow";
312 #qcom,sensors = <11>;
313 #thermal-sensor-cells = <1>;
318 #include <dt-bindings/interrupt-controller/arm-gic.h>
319 // Example 1 (new calbiration data: for pre v1 IP):
320 thermal-sensor@4a9000 {
321 compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
322 reg = <0x4a9000 0x1000>, /* TM */
323 <0x4a8000 0x1000>; /* SROT */
325 nvmem-cells = <&tsens_mode>,
326 <&tsens_base1>, <&tsens_base2>,
327 <&tsens_s0_p1>, <&tsens_s0_p2>,
328 <&tsens_s1_p1>, <&tsens_s1_p2>,
329 <&tsens_s2_p1>, <&tsens_s2_p2>,
330 <&tsens_s4_p1>, <&tsens_s4_p2>,
331 <&tsens_s5_p1>, <&tsens_s5_p2>;
332 nvmem-cell-names = "mode",
340 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
341 interrupt-names = "uplow";
344 #thermal-sensor-cells = <1>;
348 #include <dt-bindings/interrupt-controller/arm-gic.h>
349 // Example 1 (legacy: for pre v1 IP):
350 tsens1: thermal-sensor@4a9000 {
351 compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
352 reg = <0x4a9000 0x1000>, /* TM */
353 <0x4a8000 0x1000>; /* SROT */
355 nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
356 nvmem-cell-names = "calib", "calib_sel";
358 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
359 interrupt-names = "uplow";
362 #thermal-sensor-cells = <1>;
366 #include <dt-bindings/interrupt-controller/arm-gic.h>
367 // Example 2 (for any platform containing v1 of the TSENS IP):
368 tsens2: thermal-sensor@4a9000 {
369 compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
370 reg = <0x004a9000 0x1000>, /* TM */
371 <0x004a8000 0x1000>; /* SROT */
373 nvmem-cells = <&tsens_caldata>;
374 nvmem-cell-names = "calib";
376 interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
377 interrupt-names = "uplow";
379 #qcom,sensors = <10>;
380 #thermal-sensor-cells = <1>;
384 #include <dt-bindings/interrupt-controller/arm-gic.h>
385 // Example 3 (for any platform containing v2 of the TSENS IP):
386 tsens3: thermal-sensor@c263000 {
387 compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
388 reg = <0xc263000 0x1ff>,
391 interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
392 <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
393 interrupt-names = "uplow", "critical";
395 #qcom,sensors = <13>;
396 #thermal-sensor-cells = <1>;
400 #include <dt-bindings/interrupt-controller/arm-gic.h>
401 // Example 4 (for any IPQ8074 based SoC-s):
402 tsens4: thermal-sensor@4a9000 {
403 compatible = "qcom,ipq8074-tsens";
404 reg = <0x4a9000 0x1000>,
407 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
408 interrupt-names = "combined";
410 #qcom,sensors = <16>;
411 #thermal-sensor-cells = <1>;