162306a36Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0) 262306a36Sopenharmony_ci# Copyright 2020 Linaro Ltd. 362306a36Sopenharmony_ci%YAML 1.2 462306a36Sopenharmony_ci--- 562306a36Sopenharmony_ci$id: http://devicetree.org/schemas/thermal/thermal-sensor.yaml# 662306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 762306a36Sopenharmony_ci 862306a36Sopenharmony_cititle: Thermal sensor 962306a36Sopenharmony_ci 1062306a36Sopenharmony_cimaintainers: 1162306a36Sopenharmony_ci - Amit Kucheria <amitk@kernel.org> 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_cidescription: | 1462306a36Sopenharmony_ci Thermal management is achieved in devicetree by describing the sensor hardware 1562306a36Sopenharmony_ci and the software abstraction of thermal zones required to take appropriate 1662306a36Sopenharmony_ci action to mitigate thermal overloads. 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci The following node types are used to completely describe a thermal management 1962306a36Sopenharmony_ci system in devicetree: 2062306a36Sopenharmony_ci - thermal-sensor: device that measures temperature, has SoC-specific bindings 2162306a36Sopenharmony_ci - cooling-device: device used to dissipate heat either passively or actively 2262306a36Sopenharmony_ci - thermal-zones: a container of the following node types used to describe all 2362306a36Sopenharmony_ci thermal data for the platform 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci This binding describes the thermal-sensor. 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci Thermal sensor devices provide temperature sensing capabilities on thermal 2862306a36Sopenharmony_ci zones. Typical devices are I2C ADC converters and bandgaps. Thermal sensor 2962306a36Sopenharmony_ci devices may control one or more internal sensors. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciproperties: 3262306a36Sopenharmony_ci "#thermal-sensor-cells": 3362306a36Sopenharmony_ci description: 3462306a36Sopenharmony_ci Used to uniquely identify a thermal sensor instance within an IC. Will be 3562306a36Sopenharmony_ci 0 on sensor nodes with only a single sensor and at least 1 on nodes 3662306a36Sopenharmony_ci containing several internal sensors. 3762306a36Sopenharmony_ci enum: [0, 1] 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_cirequired: 4062306a36Sopenharmony_ci - "#thermal-sensor-cells" 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciadditionalProperties: true 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ciexamples: 4562306a36Sopenharmony_ci - | 4662306a36Sopenharmony_ci #include <dt-bindings/interrupt-controller/arm-gic.h> 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci // Example 1: SDM845 TSENS 4962306a36Sopenharmony_ci soc: soc { 5062306a36Sopenharmony_ci #address-cells = <2>; 5162306a36Sopenharmony_ci #size-cells = <2>; 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci /* ... */ 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci tsens0: thermal-sensor@c263000 { 5662306a36Sopenharmony_ci compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; 5762306a36Sopenharmony_ci reg = <0 0x0c263000 0 0x1ff>, /* TM */ 5862306a36Sopenharmony_ci <0 0x0c222000 0 0x1ff>; /* SROT */ 5962306a36Sopenharmony_ci #qcom,sensors = <13>; 6062306a36Sopenharmony_ci interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>, 6162306a36Sopenharmony_ci <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>; 6262306a36Sopenharmony_ci interrupt-names = "uplow", "critical"; 6362306a36Sopenharmony_ci #thermal-sensor-cells = <1>; 6462306a36Sopenharmony_ci }; 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci tsens1: thermal-sensor@c265000 { 6762306a36Sopenharmony_ci compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; 6862306a36Sopenharmony_ci reg = <0 0x0c265000 0 0x1ff>, /* TM */ 6962306a36Sopenharmony_ci <0 0x0c223000 0 0x1ff>; /* SROT */ 7062306a36Sopenharmony_ci #qcom,sensors = <8>; 7162306a36Sopenharmony_ci interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>, 7262306a36Sopenharmony_ci <GIC_SPI 509 IRQ_TYPE_LEVEL_HIGH>; 7362306a36Sopenharmony_ci interrupt-names = "uplow", "critical"; 7462306a36Sopenharmony_ci #thermal-sensor-cells = <1>; 7562306a36Sopenharmony_ci }; 7662306a36Sopenharmony_ci }; 7762306a36Sopenharmony_ci... 78