xref: /freebsd-src/sys/contrib/device-tree/Bindings/thermal/qcom-tsens.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR MIT)
2c66ec88fSEmmanuel Vadot# Copyright 2019 Linaro Ltd.
3c66ec88fSEmmanuel Vadot%YAML 1.2
4c66ec88fSEmmanuel Vadot---
5c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/thermal/qcom-tsens.yaml#
6c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7c66ec88fSEmmanuel Vadot
8c66ec88fSEmmanuel Vadottitle: QCOM SoC Temperature Sensor (TSENS)
9c66ec88fSEmmanuel Vadot
10c66ec88fSEmmanuel Vadotmaintainers:
11c66ec88fSEmmanuel Vadot  - Amit Kucheria <amitk@kernel.org>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotdescription: |
14c66ec88fSEmmanuel Vadot  QCOM SoCs have TSENS IP to allow temperature measurement. There are currently
15c66ec88fSEmmanuel Vadot  three distinct major versions of the IP that is supported by a single driver.
16c66ec88fSEmmanuel Vadot  The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures
17c66ec88fSEmmanuel Vadot  everything before v1 when there was no versioning information.
18c66ec88fSEmmanuel Vadot
19c66ec88fSEmmanuel Vadotproperties:
20c66ec88fSEmmanuel Vadot  compatible:
21c66ec88fSEmmanuel Vadot    oneOf:
22d5b0e70fSEmmanuel Vadot      - description: msm8960 TSENS based
232eb4d8dcSEmmanuel Vadot        items:
242eb4d8dcSEmmanuel Vadot          - enum:
252eb4d8dcSEmmanuel Vadot              - qcom,ipq8064-tsens
26d5b0e70fSEmmanuel Vadot              - qcom,msm8960-tsens
272eb4d8dcSEmmanuel Vadot
28c66ec88fSEmmanuel Vadot      - description: v0.1 of TSENS
29c66ec88fSEmmanuel Vadot        items:
30c66ec88fSEmmanuel Vadot          - enum:
312eb4d8dcSEmmanuel Vadot              - qcom,mdm9607-tsens
32f126890aSEmmanuel Vadot              - qcom,msm8226-tsens
33f126890aSEmmanuel Vadot              - qcom,msm8909-tsens
34c66ec88fSEmmanuel Vadot              - qcom,msm8916-tsens
35c66ec88fSEmmanuel Vadot              - qcom,msm8939-tsens
36c66ec88fSEmmanuel Vadot              - qcom,msm8974-tsens
37c66ec88fSEmmanuel Vadot          - const: qcom,tsens-v0_1
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot      - description: v1 of TSENS
40c66ec88fSEmmanuel Vadot        items:
41c66ec88fSEmmanuel Vadot          - enum:
42cb7aa33aSEmmanuel Vadot              - qcom,msm8956-tsens
43c66ec88fSEmmanuel Vadot              - qcom,msm8976-tsens
44c66ec88fSEmmanuel Vadot              - qcom,qcs404-tsens
45c66ec88fSEmmanuel Vadot          - const: qcom,tsens-v1
46c66ec88fSEmmanuel Vadot
47c66ec88fSEmmanuel Vadot      - description: v2 of TSENS
48c66ec88fSEmmanuel Vadot        items:
49c66ec88fSEmmanuel Vadot          - enum:
50c9ccf3a3SEmmanuel Vadot              - qcom,msm8953-tsens
51c66ec88fSEmmanuel Vadot              - qcom,msm8996-tsens
52c66ec88fSEmmanuel Vadot              - qcom,msm8998-tsens
53f126890aSEmmanuel Vadot              - qcom,qcm2290-tsens
54*b2d2a78aSEmmanuel Vadot              - qcom,sa8255p-tsens
5584943d6fSEmmanuel Vadot              - qcom,sa8775p-tsens
56c66ec88fSEmmanuel Vadot              - qcom,sc7180-tsens
575956d97fSEmmanuel Vadot              - qcom,sc7280-tsens
585956d97fSEmmanuel Vadot              - qcom,sc8180x-tsens
59d5b0e70fSEmmanuel Vadot              - qcom,sc8280xp-tsens
60354d7675SEmmanuel Vadot              - qcom,sdm630-tsens
61c66ec88fSEmmanuel Vadot              - qcom,sdm845-tsens
628bab661aSEmmanuel Vadot              - qcom,sm6115-tsens
63d5b0e70fSEmmanuel Vadot              - qcom,sm6350-tsens
64f126890aSEmmanuel Vadot              - qcom,sm6375-tsens
65c66ec88fSEmmanuel Vadot              - qcom,sm8150-tsens
66c66ec88fSEmmanuel Vadot              - qcom,sm8250-tsens
672eb4d8dcSEmmanuel Vadot              - qcom,sm8350-tsens
688bab661aSEmmanuel Vadot              - qcom,sm8450-tsens
698bab661aSEmmanuel Vadot              - qcom,sm8550-tsens
708d13bc63SEmmanuel Vadot              - qcom,sm8650-tsens
710e8011faSEmmanuel Vadot              - qcom,x1e80100-tsens
72c66ec88fSEmmanuel Vadot          - const: qcom,tsens-v2
73c66ec88fSEmmanuel Vadot
748bab661aSEmmanuel Vadot      - description: v2 of TSENS with combined interrupt
758bab661aSEmmanuel Vadot        enum:
768bab661aSEmmanuel Vadot          - qcom,ipq8074-tsens
778bab661aSEmmanuel Vadot
78f126890aSEmmanuel Vadot      - description: v2 of TSENS with combined interrupt
79f126890aSEmmanuel Vadot        items:
80f126890aSEmmanuel Vadot          - enum:
81f126890aSEmmanuel Vadot              - qcom,ipq9574-tsens
82f126890aSEmmanuel Vadot          - const: qcom,ipq8074-tsens
83f126890aSEmmanuel Vadot
84c66ec88fSEmmanuel Vadot  reg:
85c66ec88fSEmmanuel Vadot    items:
86c66ec88fSEmmanuel Vadot      - description: TM registers
87c66ec88fSEmmanuel Vadot      - description: SROT registers
88c66ec88fSEmmanuel Vadot
89c66ec88fSEmmanuel Vadot  interrupts:
90c66ec88fSEmmanuel Vadot    minItems: 1
918bab661aSEmmanuel Vadot    maxItems: 2
92c66ec88fSEmmanuel Vadot
93c66ec88fSEmmanuel Vadot  interrupt-names:
94c66ec88fSEmmanuel Vadot    minItems: 1
958bab661aSEmmanuel Vadot    maxItems: 2
96c66ec88fSEmmanuel Vadot
97c66ec88fSEmmanuel Vadot  nvmem-cells:
98cb7aa33aSEmmanuel Vadot    oneOf:
99cb7aa33aSEmmanuel Vadot      - minItems: 1
100c66ec88fSEmmanuel Vadot        maxItems: 2
101c66ec88fSEmmanuel Vadot        description:
102c66ec88fSEmmanuel Vadot          Reference to an nvmem node for the calibration data
103cb7aa33aSEmmanuel Vadot      - minItems: 5
104cb7aa33aSEmmanuel Vadot        maxItems: 35
105cb7aa33aSEmmanuel Vadot        description: |
106cb7aa33aSEmmanuel Vadot          Reference to nvmem cells for the calibration mode, two calibration
107cb7aa33aSEmmanuel Vadot          bases and two cells per each sensor
108cb7aa33aSEmmanuel Vadot        # special case for msm8974 / apq8084
109cb7aa33aSEmmanuel Vadot      - maxItems: 51
110cb7aa33aSEmmanuel Vadot        description: |
111cb7aa33aSEmmanuel Vadot          Reference to nvmem cells for the calibration mode, two calibration
112cb7aa33aSEmmanuel Vadot          bases and two cells per each sensor, main and backup copies, plus use_backup cell
113c66ec88fSEmmanuel Vadot
114c66ec88fSEmmanuel Vadot  nvmem-cell-names:
115cb7aa33aSEmmanuel Vadot    oneOf:
116cb7aa33aSEmmanuel Vadot      - minItems: 1
117c66ec88fSEmmanuel Vadot        items:
118c66ec88fSEmmanuel Vadot          - const: calib
1192eb4d8dcSEmmanuel Vadot          - enum:
1202eb4d8dcSEmmanuel Vadot              - calib_backup
1212eb4d8dcSEmmanuel Vadot              - calib_sel
122cb7aa33aSEmmanuel Vadot      - minItems: 5
123cb7aa33aSEmmanuel Vadot        items:
124cb7aa33aSEmmanuel Vadot          - const: mode
125cb7aa33aSEmmanuel Vadot          - const: base1
126cb7aa33aSEmmanuel Vadot          - const: base2
127cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
128cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
129cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
130cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
131cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
132cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
133cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
134cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
135cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
136cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
137cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
138cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
139cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
140cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
141cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
142cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
143cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
144cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
145cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
146cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
147cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
148cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
149cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
150cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
151cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
152cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
153cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
154cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
155cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
156cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
157cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p1$'
158cb7aa33aSEmmanuel Vadot          - pattern: '^s[0-9]+_p2$'
159cb7aa33aSEmmanuel Vadot        # special case for msm8974 / apq8084
160cb7aa33aSEmmanuel Vadot      - items:
161cb7aa33aSEmmanuel Vadot          - const: mode
162cb7aa33aSEmmanuel Vadot          - const: base1
163cb7aa33aSEmmanuel Vadot          - const: base2
164cb7aa33aSEmmanuel Vadot          - const: use_backup
165cb7aa33aSEmmanuel Vadot          - const: mode_backup
166cb7aa33aSEmmanuel Vadot          - const: base1_backup
167cb7aa33aSEmmanuel Vadot          - const: base2_backup
168cb7aa33aSEmmanuel Vadot          - const: s0_p1
169cb7aa33aSEmmanuel Vadot          - const: s0_p2
170cb7aa33aSEmmanuel Vadot          - const: s1_p1
171cb7aa33aSEmmanuel Vadot          - const: s1_p2
172cb7aa33aSEmmanuel Vadot          - const: s2_p1
173cb7aa33aSEmmanuel Vadot          - const: s2_p2
174cb7aa33aSEmmanuel Vadot          - const: s3_p1
175cb7aa33aSEmmanuel Vadot          - const: s3_p2
176cb7aa33aSEmmanuel Vadot          - const: s4_p1
177cb7aa33aSEmmanuel Vadot          - const: s4_p2
178cb7aa33aSEmmanuel Vadot          - const: s5_p1
179cb7aa33aSEmmanuel Vadot          - const: s5_p2
180cb7aa33aSEmmanuel Vadot          - const: s6_p1
181cb7aa33aSEmmanuel Vadot          - const: s6_p2
182cb7aa33aSEmmanuel Vadot          - const: s7_p1
183cb7aa33aSEmmanuel Vadot          - const: s7_p2
184cb7aa33aSEmmanuel Vadot          - const: s8_p1
185cb7aa33aSEmmanuel Vadot          - const: s8_p2
186cb7aa33aSEmmanuel Vadot          - const: s9_p1
187cb7aa33aSEmmanuel Vadot          - const: s9_p2
188cb7aa33aSEmmanuel Vadot          - const: s10_p1
189cb7aa33aSEmmanuel Vadot          - const: s10_p2
190cb7aa33aSEmmanuel Vadot          - const: s0_p1_backup
191cb7aa33aSEmmanuel Vadot          - const: s0_p2_backup
192cb7aa33aSEmmanuel Vadot          - const: s1_p1_backup
193cb7aa33aSEmmanuel Vadot          - const: s1_p2_backup
194cb7aa33aSEmmanuel Vadot          - const: s2_p1_backup
195cb7aa33aSEmmanuel Vadot          - const: s2_p2_backup
196cb7aa33aSEmmanuel Vadot          - const: s3_p1_backup
197cb7aa33aSEmmanuel Vadot          - const: s3_p2_backup
198cb7aa33aSEmmanuel Vadot          - const: s4_p1_backup
199cb7aa33aSEmmanuel Vadot          - const: s4_p2_backup
200cb7aa33aSEmmanuel Vadot          - const: s5_p1_backup
201cb7aa33aSEmmanuel Vadot          - const: s5_p2_backup
202cb7aa33aSEmmanuel Vadot          - const: s6_p1_backup
203cb7aa33aSEmmanuel Vadot          - const: s6_p2_backup
204cb7aa33aSEmmanuel Vadot          - const: s7_p1_backup
205cb7aa33aSEmmanuel Vadot          - const: s7_p2_backup
206cb7aa33aSEmmanuel Vadot          - const: s8_p1_backup
207cb7aa33aSEmmanuel Vadot          - const: s8_p2_backup
208cb7aa33aSEmmanuel Vadot          - const: s9_p1_backup
209cb7aa33aSEmmanuel Vadot          - const: s9_p2_backup
210cb7aa33aSEmmanuel Vadot          - const: s10_p1_backup
211cb7aa33aSEmmanuel Vadot          - const: s10_p2_backup
212c66ec88fSEmmanuel Vadot
213c66ec88fSEmmanuel Vadot  "#qcom,sensors":
214c66ec88fSEmmanuel Vadot    description:
215c66ec88fSEmmanuel Vadot      Number of sensors enabled on this platform
216c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
217c66ec88fSEmmanuel Vadot    minimum: 1
218c66ec88fSEmmanuel Vadot    maximum: 16
219c66ec88fSEmmanuel Vadot
220c66ec88fSEmmanuel Vadot  "#thermal-sensor-cells":
221c66ec88fSEmmanuel Vadot    const: 1
222c66ec88fSEmmanuel Vadot
2232eb4d8dcSEmmanuel Vadotrequired:
2242eb4d8dcSEmmanuel Vadot  - compatible
2252eb4d8dcSEmmanuel Vadot  - interrupts
2262eb4d8dcSEmmanuel Vadot  - interrupt-names
2272eb4d8dcSEmmanuel Vadot  - "#qcom,sensors"
2282eb4d8dcSEmmanuel Vadot
229c66ec88fSEmmanuel VadotallOf:
2300e8011faSEmmanuel Vadot  - $ref: thermal-sensor.yaml#
2310e8011faSEmmanuel Vadot
232c66ec88fSEmmanuel Vadot  - if:
233c66ec88fSEmmanuel Vadot      properties:
234c66ec88fSEmmanuel Vadot        compatible:
235c66ec88fSEmmanuel Vadot          contains:
236c66ec88fSEmmanuel Vadot            enum:
2372eb4d8dcSEmmanuel Vadot              - qcom,ipq8064-tsens
238d5b0e70fSEmmanuel Vadot              - qcom,msm8960-tsens
239c66ec88fSEmmanuel Vadot              - qcom,tsens-v0_1
240c66ec88fSEmmanuel Vadot              - qcom,tsens-v1
241c66ec88fSEmmanuel Vadot    then:
242c66ec88fSEmmanuel Vadot      properties:
243c66ec88fSEmmanuel Vadot        interrupts:
2448bab661aSEmmanuel Vadot          items:
2458bab661aSEmmanuel Vadot            - description: Combined interrupt if upper or lower threshold crossed
246c66ec88fSEmmanuel Vadot        interrupt-names:
2478bab661aSEmmanuel Vadot          items:
2488bab661aSEmmanuel Vadot            - const: uplow
249c66ec88fSEmmanuel Vadot
2502eb4d8dcSEmmanuel Vadot  - if:
2512eb4d8dcSEmmanuel Vadot      properties:
2522eb4d8dcSEmmanuel Vadot        compatible:
2532eb4d8dcSEmmanuel Vadot          contains:
254f126890aSEmmanuel Vadot            const: qcom,tsens-v2
2558bab661aSEmmanuel Vadot    then:
2568bab661aSEmmanuel Vadot      properties:
2578bab661aSEmmanuel Vadot        interrupts:
2588bab661aSEmmanuel Vadot          items:
2598bab661aSEmmanuel Vadot            - description: Combined interrupt if upper or lower threshold crossed
2608bab661aSEmmanuel Vadot            - description: Interrupt if critical threshold crossed
2618bab661aSEmmanuel Vadot        interrupt-names:
2628bab661aSEmmanuel Vadot          items:
2638bab661aSEmmanuel Vadot            - const: uplow
2648bab661aSEmmanuel Vadot            - const: critical
2658bab661aSEmmanuel Vadot
2668bab661aSEmmanuel Vadot  - if:
2678bab661aSEmmanuel Vadot      properties:
2688bab661aSEmmanuel Vadot        compatible:
2698bab661aSEmmanuel Vadot          contains:
2708bab661aSEmmanuel Vadot            enum:
2718bab661aSEmmanuel Vadot              - qcom,ipq8074-tsens
2728bab661aSEmmanuel Vadot    then:
2738bab661aSEmmanuel Vadot      properties:
2748bab661aSEmmanuel Vadot        interrupts:
2758bab661aSEmmanuel Vadot          items:
2768bab661aSEmmanuel Vadot            - description: Combined interrupt if upper, lower or critical thresholds crossed
2778bab661aSEmmanuel Vadot        interrupt-names:
2788bab661aSEmmanuel Vadot          items:
2798bab661aSEmmanuel Vadot            - const: combined
2808bab661aSEmmanuel Vadot
2818bab661aSEmmanuel Vadot  - if:
2828bab661aSEmmanuel Vadot      properties:
2838bab661aSEmmanuel Vadot        compatible:
2848bab661aSEmmanuel Vadot          contains:
2858bab661aSEmmanuel Vadot            enum:
2868bab661aSEmmanuel Vadot              - qcom,ipq8074-tsens
2872eb4d8dcSEmmanuel Vadot              - qcom,tsens-v0_1
2882eb4d8dcSEmmanuel Vadot              - qcom,tsens-v1
2892eb4d8dcSEmmanuel Vadot              - qcom,tsens-v2
2902eb4d8dcSEmmanuel Vadot
2912eb4d8dcSEmmanuel Vadot    then:
292c66ec88fSEmmanuel Vadot      required:
293c66ec88fSEmmanuel Vadot        - reg
294c66ec88fSEmmanuel Vadot
2950e8011faSEmmanuel VadotunevaluatedProperties: false
296c66ec88fSEmmanuel Vadot
297c66ec88fSEmmanuel Vadotexamples:
298c66ec88fSEmmanuel Vadot  - |
299c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
3000e8011faSEmmanuel Vadot    thermal-sensor {
3012eb4d8dcSEmmanuel Vadot        compatible = "qcom,ipq8064-tsens";
3022eb4d8dcSEmmanuel Vadot
3032eb4d8dcSEmmanuel Vadot        nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
3042eb4d8dcSEmmanuel Vadot        nvmem-cell-names = "calib", "calib_backup";
3052eb4d8dcSEmmanuel Vadot        interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
3062eb4d8dcSEmmanuel Vadot        interrupt-names = "uplow";
3072eb4d8dcSEmmanuel Vadot
3082eb4d8dcSEmmanuel Vadot        #qcom,sensors = <11>;
3092eb4d8dcSEmmanuel Vadot        #thermal-sensor-cells = <1>;
3102eb4d8dcSEmmanuel Vadot    };
3112eb4d8dcSEmmanuel Vadot
3122eb4d8dcSEmmanuel Vadot  - |
3132eb4d8dcSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
314*b2d2a78aSEmmanuel Vadot    // Example 1 (new calibration data: for pre v1 IP):
315fac71e4eSEmmanuel Vadot    thermal-sensor@4a9000 {
316cb7aa33aSEmmanuel Vadot        compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
317cb7aa33aSEmmanuel Vadot        reg = <0x4a9000 0x1000>, /* TM */
318cb7aa33aSEmmanuel Vadot              <0x4a8000 0x1000>; /* SROT */
319cb7aa33aSEmmanuel Vadot
320cb7aa33aSEmmanuel Vadot        nvmem-cells = <&tsens_mode>,
321cb7aa33aSEmmanuel Vadot                      <&tsens_base1>, <&tsens_base2>,
322cb7aa33aSEmmanuel Vadot                      <&tsens_s0_p1>, <&tsens_s0_p2>,
323cb7aa33aSEmmanuel Vadot                      <&tsens_s1_p1>, <&tsens_s1_p2>,
324cb7aa33aSEmmanuel Vadot                      <&tsens_s2_p1>, <&tsens_s2_p2>,
325cb7aa33aSEmmanuel Vadot                      <&tsens_s4_p1>, <&tsens_s4_p2>,
326cb7aa33aSEmmanuel Vadot                      <&tsens_s5_p1>, <&tsens_s5_p2>;
327cb7aa33aSEmmanuel Vadot        nvmem-cell-names = "mode",
328cb7aa33aSEmmanuel Vadot                           "base1", "base2",
329cb7aa33aSEmmanuel Vadot                           "s0_p1", "s0_p2",
330cb7aa33aSEmmanuel Vadot                           "s1_p1", "s1_p2",
331cb7aa33aSEmmanuel Vadot                           "s2_p1", "s2_p2",
332cb7aa33aSEmmanuel Vadot                           "s4_p1", "s4_p2",
333cb7aa33aSEmmanuel Vadot                           "s5_p1", "s5_p2";
334cb7aa33aSEmmanuel Vadot
335cb7aa33aSEmmanuel Vadot        interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
336cb7aa33aSEmmanuel Vadot        interrupt-names = "uplow";
337cb7aa33aSEmmanuel Vadot
338cb7aa33aSEmmanuel Vadot        #qcom,sensors = <5>;
339cb7aa33aSEmmanuel Vadot        #thermal-sensor-cells = <1>;
340cb7aa33aSEmmanuel Vadot    };
341cb7aa33aSEmmanuel Vadot
342cb7aa33aSEmmanuel Vadot  - |
343cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
344c66ec88fSEmmanuel Vadot    // Example 1 (legacy: for pre v1 IP):
345fac71e4eSEmmanuel Vadot    tsens1: thermal-sensor@4a9000 {
346c66ec88fSEmmanuel Vadot        compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
347c66ec88fSEmmanuel Vadot        reg = <0x4a9000 0x1000>, /* TM */
348c66ec88fSEmmanuel Vadot              <0x4a8000 0x1000>; /* SROT */
349c66ec88fSEmmanuel Vadot
350c66ec88fSEmmanuel Vadot        nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
351c66ec88fSEmmanuel Vadot        nvmem-cell-names = "calib", "calib_sel";
352c66ec88fSEmmanuel Vadot
353c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
354c66ec88fSEmmanuel Vadot        interrupt-names = "uplow";
355c66ec88fSEmmanuel Vadot
356c66ec88fSEmmanuel Vadot        #qcom,sensors = <5>;
357c66ec88fSEmmanuel Vadot        #thermal-sensor-cells = <1>;
358c66ec88fSEmmanuel Vadot    };
359c66ec88fSEmmanuel Vadot
360c66ec88fSEmmanuel Vadot  - |
361c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
362c66ec88fSEmmanuel Vadot    // Example 2 (for any platform containing v1 of the TSENS IP):
363c66ec88fSEmmanuel Vadot    tsens2: thermal-sensor@4a9000 {
364c66ec88fSEmmanuel Vadot        compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
365c66ec88fSEmmanuel Vadot        reg = <0x004a9000 0x1000>, /* TM */
366c66ec88fSEmmanuel Vadot              <0x004a8000 0x1000>; /* SROT */
367c66ec88fSEmmanuel Vadot
368c66ec88fSEmmanuel Vadot        nvmem-cells = <&tsens_caldata>;
369c66ec88fSEmmanuel Vadot        nvmem-cell-names = "calib";
370c66ec88fSEmmanuel Vadot
371c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
372c66ec88fSEmmanuel Vadot        interrupt-names = "uplow";
373c66ec88fSEmmanuel Vadot
374c66ec88fSEmmanuel Vadot        #qcom,sensors = <10>;
375c66ec88fSEmmanuel Vadot        #thermal-sensor-cells = <1>;
376c66ec88fSEmmanuel Vadot    };
377c66ec88fSEmmanuel Vadot
378c66ec88fSEmmanuel Vadot  - |
379c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
380c66ec88fSEmmanuel Vadot    // Example 3 (for any platform containing v2 of the TSENS IP):
381c66ec88fSEmmanuel Vadot    tsens3: thermal-sensor@c263000 {
382c66ec88fSEmmanuel Vadot        compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
383c66ec88fSEmmanuel Vadot        reg = <0xc263000 0x1ff>,
384c66ec88fSEmmanuel Vadot              <0xc222000 0x1ff>;
385c66ec88fSEmmanuel Vadot
386c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
387c66ec88fSEmmanuel Vadot                     <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
388c66ec88fSEmmanuel Vadot        interrupt-names = "uplow", "critical";
389c66ec88fSEmmanuel Vadot
390c66ec88fSEmmanuel Vadot        #qcom,sensors = <13>;
391c66ec88fSEmmanuel Vadot        #thermal-sensor-cells = <1>;
392c66ec88fSEmmanuel Vadot    };
3938bab661aSEmmanuel Vadot
3948bab661aSEmmanuel Vadot  - |
3958bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
3968bab661aSEmmanuel Vadot    // Example 4 (for any IPQ8074 based SoC-s):
3978bab661aSEmmanuel Vadot    tsens4: thermal-sensor@4a9000 {
3988bab661aSEmmanuel Vadot        compatible = "qcom,ipq8074-tsens";
3998bab661aSEmmanuel Vadot        reg = <0x4a9000 0x1000>,
4008bab661aSEmmanuel Vadot              <0x4a8000 0x1000>;
4018bab661aSEmmanuel Vadot
4028bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
4038bab661aSEmmanuel Vadot        interrupt-names = "combined";
4048bab661aSEmmanuel Vadot
4058bab661aSEmmanuel Vadot        #qcom,sensors = <16>;
4068bab661aSEmmanuel Vadot        #thermal-sensor-cells = <1>;
4078bab661aSEmmanuel Vadot    };
408c66ec88fSEmmanuel Vadot...
409