0001 # SPDX-License-Identifier: (GPL-2.0)
0002 # Copyright 2020 Linaro Ltd.
0003 %YAML 1.2
0004 ---
0005 $id: http://devicetree.org/schemas/thermal/thermal-sensor.yaml#
0006 $schema: http://devicetree.org/meta-schemas/core.yaml#
0007
0008 title: Thermal sensor binding
0009
0010 maintainers:
0011 - Amit Kucheria <amitk@kernel.org>
0012
0013 description: |
0014 Thermal management is achieved in devicetree by describing the sensor hardware
0015 and the software abstraction of thermal zones required to take appropriate
0016 action to mitigate thermal overloads.
0017
0018 The following node types are used to completely describe a thermal management
0019 system in devicetree:
0020 - thermal-sensor: device that measures temperature, has SoC-specific bindings
0021 - cooling-device: device used to dissipate heat either passively or actively
0022 - thermal-zones: a container of the following node types used to describe all
0023 thermal data for the platform
0024
0025 This binding describes the thermal-sensor.
0026
0027 Thermal sensor devices provide temperature sensing capabilities on thermal
0028 zones. Typical devices are I2C ADC converters and bandgaps. Thermal sensor
0029 devices may control one or more internal sensors.
0030
0031 properties:
0032 "#thermal-sensor-cells":
0033 description:
0034 Used to uniquely identify a thermal sensor instance within an IC. Will be
0035 0 on sensor nodes with only a single sensor and at least 1 on nodes
0036 containing several internal sensors.
0037 enum: [0, 1]
0038
0039 required:
0040 - "#thermal-sensor-cells"
0041
0042 additionalProperties: true
0043
0044 examples:
0045 - |
0046 #include <dt-bindings/interrupt-controller/arm-gic.h>
0047
0048 // Example 1: SDM845 TSENS
0049 soc: soc {
0050 #address-cells = <2>;
0051 #size-cells = <2>;
0052
0053 /* ... */
0054
0055 tsens0: thermal-sensor@c263000 {
0056 compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
0057 reg = <0 0x0c263000 0 0x1ff>, /* TM */
0058 <0 0x0c222000 0 0x1ff>; /* SROT */
0059 #qcom,sensors = <13>;
0060 interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
0061 <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
0062 interrupt-names = "uplow", "critical";
0063 #thermal-sensor-cells = <1>;
0064 };
0065
0066 tsens1: thermal-sensor@c265000 {
0067 compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
0068 reg = <0 0x0c265000 0 0x1ff>, /* TM */
0069 <0 0x0c223000 0 0x1ff>; /* SROT */
0070 #qcom,sensors = <8>;
0071 interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>,
0072 <GIC_SPI 509 IRQ_TYPE_LEVEL_HIGH>;
0073 interrupt-names = "uplow", "critical";
0074 #thermal-sensor-cells = <1>;
0075 };
0076 };
0077 ...