summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/thermal/thermal-sensor.yaml
blob: fcd25a0af38c93fed51926389cf419b56ab9eb93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# SPDX-License-Identifier: (GPL-2.0)
# Copyright 2020 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/thermal-sensor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Thermal sensor binding

maintainers:
  - Amit Kucheria <amitk@kernel.org>

description: |
  Thermal management is achieved in devicetree by describing the sensor hardware
  and the software abstraction of thermal zones required to take appropriate
  action to mitigate thermal overloads.

  The following node types are used to completely describe a thermal management
  system in devicetree:
   - thermal-sensor: device that measures temperature, has SoC-specific bindings
   - cooling-device: device used to dissipate heat either passively or actively
   - thermal-zones: a container of the following node types used to describe all
     thermal data for the platform

  This binding describes the thermal-sensor.

  Thermal sensor devices provide temperature sensing capabilities on thermal
  zones. Typical devices are I2C ADC converters and bandgaps. Thermal sensor
  devices may control one or more internal sensors.

properties:
  "#thermal-sensor-cells":
    description:
      Used to uniquely identify a thermal sensor instance within an IC. Will be
      0 on sensor nodes with only a single sensor and at least 1 on nodes
      containing several internal sensors.
    enum: [0, 1]

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    // Example 1: SDM845 TSENS
    soc: soc@0 {
            #address-cells = <2>;
            #size-cells = <2>;

            /* ... */

            tsens0: thermal-sensor@c263000 {
                    compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
                    reg = <0 0x0c263000 0 0x1ff>, /* TM */
                          <0 0x0c222000 0 0x1ff>; /* SROT */
                    #qcom,sensors = <13>;
                    interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
                                 <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
                    interrupt-names = "uplow", "critical";
                    #thermal-sensor-cells = <1>;
            };

            tsens1: thermal-sensor@c265000 {
                    compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
                    reg = <0 0x0c265000 0 0x1ff>, /* TM */
                          <0 0x0c223000 0 0x1ff>; /* SROT */
                    #qcom,sensors = <8>;
                    interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>,
                                 <GIC_SPI 509 IRQ_TYPE_LEVEL_HIGH>;
                    interrupt-names = "uplow", "critical";
                    #thermal-sensor-cells = <1>;
            };
    };
...