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
70 - const: qcom,tsens-v2
72 - description: v2 of TSENS with combined interrupt
76 - description: v2 of TSENS with combined interrupt
80 - const: qcom,ipq8074-tsens
84 - description: TM registers
85 - description: SROT registers
100 Reference to an nvmem node for the calibration data
104 Reference to nvmem cells for the calibration mode, two calibration
105 bases and two cells per each sensor
106 # special case for msm8974 / apq8084
109 Reference to nvmem cells for the calibration mode, two calibration
110 bases and two cells per each sensor, main and backup copies, plus use_backup cell
125 - pattern: '^s[0-9]+_p1$'
126 - pattern: '^s[0-9]+_p2$'
127 - pattern: '^s[0-9]+_p1$'
128 - pattern: '^s[0-9]+_p2$'
129 - pattern: '^s[0-9]+_p1$'
130 - pattern: '^s[0-9]+_p2$'
131 - pattern: '^s[0-9]+_p1$'
132 - pattern: '^s[0-9]+_p2$'
133 - pattern: '^s[0-9]+_p1$'
134 - pattern: '^s[0-9]+_p2$'
135 - pattern: '^s[0-9]+_p1$'
136 - pattern: '^s[0-9]+_p2$'
137 - pattern: '^s[0-9]+_p1$'
138 - pattern: '^s[0-9]+_p2$'
139 - pattern: '^s[0-9]+_p1$'
140 - pattern: '^s[0-9]+_p2$'
141 - pattern: '^s[0-9]+_p1$'
142 - pattern: '^s[0-9]+_p2$'
143 - pattern: '^s[0-9]+_p1$'
144 - pattern: '^s[0-9]+_p2$'
145 - pattern: '^s[0-9]+_p1$'
146 - pattern: '^s[0-9]+_p2$'
147 - pattern: '^s[0-9]+_p1$'
148 - pattern: '^s[0-9]+_p2$'
149 - pattern: '^s[0-9]+_p1$'
150 - pattern: '^s[0-9]+_p2$'
151 - pattern: '^s[0-9]+_p1$'
152 - pattern: '^s[0-9]+_p2$'
153 - pattern: '^s[0-9]+_p1$'
154 - pattern: '^s[0-9]+_p2$'
155 - pattern: '^s[0-9]+_p1$'
156 - pattern: '^s[0-9]+_p2$'
157 # special case for msm8974 / apq8084
164 - const: base1_backup
165 - const: base2_backup
188 - const: s0_p1_backup
189 - const: s0_p2_backup
190 - const: s1_p1_backup
191 - const: s1_p2_backup
192 - const: s2_p1_backup
193 - const: s2_p2_backup
194 - const: s3_p1_backup
195 - const: s3_p2_backup
196 - const: s4_p1_backup
197 - const: s4_p2_backup
198 - const: s5_p1_backup
199 - const: s5_p2_backup
200 - const: s6_p1_backup
201 - const: s6_p2_backup
202 - const: s7_p1_backup
203 - const: s7_p2_backup
204 - const: s8_p1_backup
205 - const: s8_p2_backup
206 - const: s9_p1_backup
207 - const: s9_p2_backup
208 - const: s10_p1_backup
209 - const: s10_p2_backup
213 Number of sensors enabled on this platform
214 $ref: /schemas/types.yaml#/definitions/uint32
218 "#thermal-sensor-cells":
221 Number of cells required to uniquely identify the thermal sensors. Since
222 we have multiple sensors this is set to 1
228 - "#thermal-sensor-cells"
245 - description: Combined interrupt if upper or lower threshold crossed
259 - description: Combined interrupt if upper or lower threshold crossed
260 - description: Interrupt if critical threshold crossed
276 - description: Combined interrupt if upper, lower or critical thresholds crossed
295 additionalProperties: false
299 #include <dt-bindings/interrupt-controller/arm-gic.h>
300 // Example msm9860 based SoC (ipq8064):
301 gcc: clock-controller {
305 tsens: thermal-sensor {
306 compatible = "qcom,ipq8064-tsens";
308 nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
309 nvmem-cell-names = "calib", "calib_backup";
310 interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
311 interrupt-names = "uplow";
313 #qcom,sensors = <11>;
314 #thermal-sensor-cells = <1>;
319 #include <dt-bindings/interrupt-controller/arm-gic.h>
320 // Example 1 (new calbiration data: for pre v1 IP):
321 thermal-sensor@4a9000 {
322 compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
323 reg = <0x4a9000 0x1000>, /* TM */
324 <0x4a8000 0x1000>; /* SROT */
326 nvmem-cells = <&tsens_mode>,
327 <&tsens_base1>, <&tsens_base2>,
328 <&tsens_s0_p1>, <&tsens_s0_p2>,
329 <&tsens_s1_p1>, <&tsens_s1_p2>,
330 <&tsens_s2_p1>, <&tsens_s2_p2>,
331 <&tsens_s4_p1>, <&tsens_s4_p2>,
332 <&tsens_s5_p1>, <&tsens_s5_p2>;
333 nvmem-cell-names = "mode",
341 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
342 interrupt-names = "uplow";
345 #thermal-sensor-cells = <1>;
349 #include <dt-bindings/interrupt-controller/arm-gic.h>
350 // Example 1 (legacy: for pre v1 IP):
351 tsens1: thermal-sensor@4a9000 {
352 compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
353 reg = <0x4a9000 0x1000>, /* TM */
354 <0x4a8000 0x1000>; /* SROT */
356 nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
357 nvmem-cell-names = "calib", "calib_sel";
359 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
360 interrupt-names = "uplow";
363 #thermal-sensor-cells = <1>;
367 #include <dt-bindings/interrupt-controller/arm-gic.h>
368 // Example 2 (for any platform containing v1 of the TSENS IP):
369 tsens2: thermal-sensor@4a9000 {
370 compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
371 reg = <0x004a9000 0x1000>, /* TM */
372 <0x004a8000 0x1000>; /* SROT */
374 nvmem-cells = <&tsens_caldata>;
375 nvmem-cell-names = "calib";
377 interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
378 interrupt-names = "uplow";
380 #qcom,sensors = <10>;
381 #thermal-sensor-cells = <1>;
385 #include <dt-bindings/interrupt-controller/arm-gic.h>
386 // Example 3 (for any platform containing v2 of the TSENS IP):
387 tsens3: thermal-sensor@c263000 {
388 compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
389 reg = <0xc263000 0x1ff>,
392 interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
393 <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
394 interrupt-names = "uplow", "critical";
396 #qcom,sensors = <13>;
397 #thermal-sensor-cells = <1>;
401 #include <dt-bindings/interrupt-controller/arm-gic.h>
402 // Example 4 (for any IPQ8074 based SoC-s):
403 tsens4: thermal-sensor@4a9000 {
404 compatible = "qcom,ipq8074-tsens";
405 reg = <0x4a9000 0x1000>,
408 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
409 interrupt-names = "combined";
411 #qcom,sensors = <16>;
412 #thermal-sensor-cells = <1>;