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
35 - const: qcom,tsens-v0_1
37 - description: v1 of TSENS
42 - const: qcom,tsens-v1
44 - description: v2 of TSENS
60 - const: qcom,tsens-v2
64 - description: TM registers
65 - description: SROT registers
70 - description: Combined interrupt if upper or lower threshold crossed
71 - description: Interrupt if critical threshold crossed
83 Reference to an nvmem node for the calibration data
95 Number of sensors enabled on this platform
96 $ref: /schemas/types.yaml#/definitions/uint32
100 "#thermal-sensor-cells":
103 Number of cells required to uniquely identify the thermal sensors. Since
104 we have multiple sensors this is set to 1
110 - "#thermal-sensor-cells"
155 additionalProperties: false
159 #include <dt-bindings/interrupt-controller/arm-gic.h>
160 // Example msm9860 based SoC (ipq8064):
161 gcc: clock-controller {
165 tsens: thermal-sensor {
166 compatible = "qcom,ipq8064-tsens";
168 nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
169 nvmem-cell-names = "calib", "calib_backup";
170 interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
171 interrupt-names = "uplow";
173 #qcom,sensors = <11>;
174 #thermal-sensor-cells = <1>;
179 #include <dt-bindings/interrupt-controller/arm-gic.h>
180 // Example 1 (legacy: for pre v1 IP):
181 tsens1: thermal-sensor@900000 {
182 compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
183 reg = <0x4a9000 0x1000>, /* TM */
184 <0x4a8000 0x1000>; /* SROT */
186 nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
187 nvmem-cell-names = "calib", "calib_sel";
189 interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
190 interrupt-names = "uplow";
193 #thermal-sensor-cells = <1>;
197 #include <dt-bindings/interrupt-controller/arm-gic.h>
198 // Example 2 (for any platform containing v1 of the TSENS IP):
199 tsens2: thermal-sensor@4a9000 {
200 compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
201 reg = <0x004a9000 0x1000>, /* TM */
202 <0x004a8000 0x1000>; /* SROT */
204 nvmem-cells = <&tsens_caldata>;
205 nvmem-cell-names = "calib";
207 interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
208 interrupt-names = "uplow";
210 #qcom,sensors = <10>;
211 #thermal-sensor-cells = <1>;
215 #include <dt-bindings/interrupt-controller/arm-gic.h>
216 // Example 3 (for any platform containing v2 of the TSENS IP):
217 tsens3: thermal-sensor@c263000 {
218 compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
219 reg = <0xc263000 0x1ff>,
222 interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
223 <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
224 interrupt-names = "uplow", "critical";
226 #qcom,sensors = <13>;
227 #thermal-sensor-cells = <1>;