Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,48 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/airoha,en7581-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Airoha EN7581 Thermal Sensor and Monitor
maintainers:
- Christian Marangi <ansuelsmth@gmail.com>
properties:
compatible:
const: airoha,en7581-thermal
reg:
maxItems: 1
interrupts:
maxItems: 1
airoha,chip-scu:
description: phandle to the chip SCU syscon
$ref: /schemas/types.yaml#/definitions/phandle
'#thermal-sensor-cells':
const: 0
required:
- compatible
- reg
- interrupts
- airoha,chip-scu
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
thermal-sensor@1efbd800 {
compatible = "airoha,en7581-thermal";
reg = <0x1efbd000 0xd5c>;
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
airoha,chip-scu = <&chip_scu>;
#thermal-sensor-cells = <0>;
};
@@ -0,0 +1,179 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner SUN8I Thermal Controller
maintainers:
- Vasily Khoruzhick <anarsoul@gmail.com>
- Yangtao Li <tiny.windzz@gmail.com>
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- allwinner,sun8i-a83t-ths
- allwinner,sun8i-h3-ths
- allwinner,sun8i-r40-ths
- allwinner,sun20i-d1-ths
- allwinner,sun50i-a64-ths
- allwinner,sun50i-a100-ths
- allwinner,sun50i-h5-ths
- allwinner,sun50i-h6-ths
- allwinner,sun50i-h616-ths
clocks:
minItems: 1
items:
- description: Bus Clock
- description: Module Clock
clock-names:
minItems: 1
items:
- const: bus
- const: mod
reg:
maxItems: 1
interrupts:
maxItems: 1
resets:
maxItems: 1
nvmem-cells:
maxItems: 1
description: Calibration data for thermal sensors
nvmem-cell-names:
const: calibration
allwinner,sram:
maxItems: 1
description: phandle to device controlling temperate offset SYS_CFG register
"#thermal-sensor-cells":
enum:
- 0
- 1
allOf:
- if:
properties:
compatible:
contains:
enum:
- allwinner,sun20i-d1-ths
- allwinner,sun50i-a100-ths
- allwinner,sun50i-h6-ths
- allwinner,sun50i-h616-ths
then:
properties:
clocks:
maxItems: 1
clock-names:
maxItems: 1
else:
properties:
clocks:
minItems: 2
clock-names:
minItems: 2
- if:
not:
properties:
compatible:
contains:
const: allwinner,sun50i-h616-ths
then:
properties:
allwinner,sram: false
- if:
properties:
compatible:
contains:
enum:
- allwinner,sun8i-h3-ths
- allwinner,sun20i-d1-ths
then:
properties:
"#thermal-sensor-cells":
const: 0
else:
properties:
"#thermal-sensor-cells":
const: 1
- if:
not:
properties:
compatible:
contains:
enum:
- allwinner,sun8i-a83t-ths
then:
required:
- clocks
- clock-names
- resets
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
thermal-sensor@1f04000 {
compatible = "allwinner,sun8i-a83t-ths";
reg = <0x01f04000 0x100>;
interrupts = <0 31 0>;
nvmem-cells = <&ths_calibration>;
nvmem-cell-names = "calibration";
#thermal-sensor-cells = <1>;
};
- |
thermal-sensor@1c25000 {
compatible = "allwinner,sun8i-h3-ths";
reg = <0x01c25000 0x400>;
clocks = <&ccu 0>, <&ccu 1>;
clock-names = "bus", "mod";
resets = <&ccu 2>;
interrupts = <0 31 0>;
nvmem-cells = <&ths_calibration>;
nvmem-cell-names = "calibration";
#thermal-sensor-cells = <0>;
};
- |
thermal-sensor@5070400 {
compatible = "allwinner,sun50i-h6-ths";
reg = <0x05070400 0x100>;
clocks = <&ccu 0>;
clock-names = "bus";
resets = <&ccu 2>;
interrupts = <0 15 0>;
nvmem-cells = <&ths_calibration>;
nvmem-cell-names = "calibration";
#thermal-sensor-cells = <1>;
};
...
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/amazon,al-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amazon Annapurna Labs Thermal Sensor
maintainers:
- Talel Shenhar <talel@amazon.com>
description:
Simple thermal device that allows temperature reading by a single MMIO
transaction.
properties:
compatible:
items:
- const: amazon,al-thermal
reg:
maxItems: 1
'#thermal-sensor-cells':
const: 1
additionalProperties: false
examples:
- |
thermal: thermal@5002860 {
compatible = "amazon,al-thermal";
reg = <0x05002860 0x1>;
#thermal-sensor-cells = <0x1>;
};
thermal-zones {
z0-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&thermal 0>;
trips {
critical {
temperature = <105000>;
hysteresis = <2000>;
type = "critical";
};
};
};
};
@@ -0,0 +1,101 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/amlogic,thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Thermal
maintainers:
- Guillaume La Roque <glaroque@baylibre.com>
description: Binding for Amlogic Thermal
$ref: thermal-sensor.yaml#
properties:
compatible:
oneOf:
- items:
- enum:
- amlogic,g12a-cpu-thermal
- amlogic,g12a-ddr-thermal
- const: amlogic,g12a-thermal
- enum:
- amlogic,a1-cpu-thermal
- amlogic,t7-thermal
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
power-domains:
maxItems: 1
amlogic,ao-secure:
description: phandle to the ao-secure syscon
$ref: /schemas/types.yaml#/definitions/phandle
'#thermal-sensor-cells':
const: 0
amlogic,secure-monitor:
description: phandle to the secure monitor
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: phandle to the secure monitor
- description: sensor index to get specific calibration data
required:
- compatible
- reg
- interrupts
- clocks
allOf:
- if:
properties:
compatible:
contains:
enum:
- amlogic,a1-cpu-thermal
- amlogic,g12a-thermal
then:
required:
- amlogic,ao-secure
else:
required:
- amlogic,secure-monitor
unevaluatedProperties: false
examples:
- |
temperature-sensor@ff634800 {
compatible = "amlogic,g12a-cpu-thermal",
"amlogic,g12a-thermal";
reg = <0xff634800 0x50>;
interrupts = <0x0 0x24 0x0>;
clocks = <&clk 164>;
#thermal-sensor-cells = <0>;
amlogic,ao-secure = <&sec_AO>;
};
- |
#include <dt-bindings/clock/amlogic,t7-peripherals-clkc.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
temperature-sensor@20000 {
compatible = "amlogic,t7-thermal";
reg = <0x20000 0x50>;
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkc_periphs CLKID_TS>;
#thermal-sensor-cells = <0>;
amlogic,secure-monitor = <&sm 1>;
};
...
@@ -0,0 +1,48 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/brcm,avs-ro-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom AVS ring oscillator thermal
maintainers:
- Stefan Wahren <wahrenst@gmx.net>
description: |+
The thermal node should be the child of a syscon node with the
required property:
- compatible: Should be one of the following:
"brcm,bcm2711-avs-monitor", "syscon", "simple-mfd"
Refer to the bindings described in
Documentation/devicetree/bindings/mfd/syscon.yaml
$ref: thermal-sensor.yaml#
properties:
compatible:
const: brcm,bcm2711-thermal
"#thermal-sensor-cells":
const: 0
required:
- compatible
unevaluatedProperties: false
examples:
- |
avs-monitor@7d5d2000 {
compatible = "brcm,bcm2711-avs-monitor",
"syscon", "simple-mfd";
reg = <0x7d5d2000 0xf00>;
thermal: thermal {
compatible = "brcm,bcm2711-thermal";
#thermal-sensor-cells = <0>;
};
};
...
@@ -0,0 +1,56 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/brcm,avs-tmon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom STB thermal management
description: Thermal management core, provided by the AVS TMON hardware block.
maintainers:
- Florian Fainelli <f.fainelli@gmail.com>
allOf:
- $ref: thermal-sensor.yaml#
properties:
compatible:
items:
- enum:
- brcm,avs-tmon-bcm74110
- brcm,avs-tmon-bcm7216
- brcm,avs-tmon-bcm7445
- const: brcm,avs-tmon
reg:
maxItems: 1
description: >
Address range for the AVS TMON registers
interrupts:
maxItems: 1
interrupt-names:
items:
- const: tmon
"#thermal-sensor-cells":
const: 0
additionalProperties: false
required:
- compatible
- reg
examples:
- |
thermal@f04d1500 {
compatible = "brcm,avs-tmon-bcm7445", "brcm,avs-tmon";
reg = <0xf04d1500 0x28>;
interrupts = <0x6>;
interrupt-names = "tmon";
interrupt-parent = <&avs_host_l2_intc>;
#thermal-sensor-cells = <0>;
};
@@ -0,0 +1,47 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/brcm,bcm2835-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom BCM2835 thermal sensor
maintainers:
- Stefan Wahren <stefan.wahren@i2se.com>
allOf:
- $ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- brcm,bcm2835-thermal
- brcm,bcm2836-thermal
- brcm,bcm2837-thermal
reg:
maxItems: 1
clocks:
maxItems: 1
"#thermal-sensor-cells":
const: 0
unevaluatedProperties: false
required:
- compatible
- reg
- clocks
examples:
- |
#include <dt-bindings/clock/bcm2835.h>
thermal@7e212000 {
compatible = "brcm,bcm2835-thermal";
reg = <0x7e212000 0x8>;
clocks = <&clocks BCM2835_CLOCK_TSENS>;
#thermal-sensor-cells = <0>;
};
@@ -0,0 +1,60 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/brcm,ns-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom Northstar Thermal
maintainers:
- Rafał Miłecki <rafal@milecki.pl>
description:
Thermal sensor that is part of Northstar's DMU (Device Management Unit).
allOf:
- $ref: thermal-sensor.yaml#
properties:
compatible:
const: brcm,ns-thermal
reg:
description: PVTMON registers range
maxItems: 1
"#thermal-sensor-cells":
const: 0
unevaluatedProperties: false
required:
- reg
examples:
- |
thermal: thermal@1800c2c0 {
compatible = "brcm,ns-thermal";
reg = <0x1800c2c0 0x10>;
#thermal-sensor-cells = <0>;
};
thermal-zones {
cpu-thermal {
polling-delay-passive = <0>;
polling-delay = <1000>;
coefficients = <(-556) 418000>;
thermal-sensors = <&thermal>;
trips {
cpu-crit {
temperature = <125000>;
hysteresis = <0>;
type = "critical";
};
};
cooling-maps {
};
};
};
@@ -0,0 +1,121 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/brcm,sr-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom Stingray Thermal Sensors
maintainers:
- Ray Jui <rjui@broadcom.com>
- Scott Branden <sbranden@broadcom.com>
allOf:
- $ref: thermal-sensor.yaml#
properties:
compatible:
const: brcm,sr-thermal
reg:
maxItems: 1
brcm,tmon-mask:
description:
A one-cell bit mask of valid TMON sources. Each bit represents a single
TMON source.
$ref: /schemas/types.yaml#/definitions/uint32
'#thermal-sensor-cells':
const: 1
required:
- compatible
- reg
- brcm,tmon-mask
additionalProperties: false
examples:
- |
tmon: thermal-sensor@0 {
compatible = "brcm,sr-thermal";
reg = <0x0 0x40>;
brcm,tmon-mask = <0x3f>;
#thermal-sensor-cells = <1>;
};
thermal-zones {
ihost0_thermal: ihost0-thermal {
polling-delay-passive = <0>;
polling-delay = <1000>;
thermal-sensors = <&tmon 0>;
trips {
cpu-crit {
temperature = <105000>;
hysteresis = <0>;
type = "critical";
};
};
};
ihost1_thermal: ihost1-thermal {
polling-delay-passive = <0>;
polling-delay = <1000>;
thermal-sensors = <&tmon 1>;
trips {
cpu-crit {
temperature = <105000>;
hysteresis = <0>;
type = "critical";
};
};
};
ihost2_thermal: ihost2-thermal {
polling-delay-passive = <0>;
polling-delay = <1000>;
thermal-sensors = <&tmon 2>;
trips {
cpu-crit {
temperature = <105000>;
hysteresis = <0>;
type = "critical";
};
};
};
ihost3_thermal: ihost3-thermal {
polling-delay-passive = <0>;
polling-delay = <1000>;
thermal-sensors = <&tmon 3>;
trips {
cpu-crit {
temperature = <105000>;
hysteresis = <0>;
type = "critical";
};
};
};
crmu_thermal: crmu-thermal {
polling-delay-passive = <0>;
polling-delay = <1000>;
thermal-sensors = <&tmon 4>;
trips {
cpu-crit {
temperature = <105000>;
hysteresis = <0>;
type = "critical";
};
};
};
nitro_thermal: nitro-thermal {
polling-delay-passive = <0>;
polling-delay = <1000>;
thermal-sensors = <&tmon 5>;
trips {
cpu-crit {
temperature = <105000>;
hysteresis = <0>;
type = "critical";
};
};
};
};
@@ -0,0 +1,35 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/dlg,da9062-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Dialog DA9062/61 TJUNC Thermal Module
maintainers:
- Biju Das <biju.das.jz@bp.renesas.com>
description: |
This module is part of the DA9061/DA9062. For more details about entire
DA906{1,2} chips see Documentation/devicetree/bindings/mfd/dlg,da9063.yaml
Junction temperature thermal module uses an interrupt signal to identify
high THERMAL_TRIP_HOT temperatures for the PMIC device.
properties:
compatible:
oneOf:
- const: dlg,da9062-thermal
- items:
- const: dlg,da9061-thermal
- const: dlg,da9062-thermal
polling-delay-passive:
description:
Specify the polling period, measured in milliseconds, between
thermal zone device update checks.
required:
- compatible
additionalProperties: false
@@ -0,0 +1,18 @@
* Dove Thermal
This driver is for Dove SoCs which contain a thermal sensor.
Required properties:
- compatible : "marvell,dove-thermal"
- reg : Address range of the thermal registers
The reg properties should contain two ranges. The first is for the
three Thermal Manager registers, while the second range contains the
Thermal Diode Control Registers.
Example:
thermal@10078 {
compatible = "marvell,dove-thermal";
reg = <0xd001c 0x0c>, <0xd005c 0x08>;
};
@@ -0,0 +1,87 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/fsl,imx91-tmu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP i.MX91 Thermal
maintainers:
- Pengfei Li <pengfei.li_1@nxp.com>
description:
i.MX91 features a new temperature sensor. It includes programmable
temperature threshold comparators for both normal and privileged
accesses and allows a programmable measurement frequency for the
Periodic One-Shot Measurement mode. Additionally, it provides
status registers for indicating the end of measurement and threshold
violation events.
properties:
compatible:
items:
- const: fsl,imx91-tmu
reg:
maxItems: 1
clocks:
maxItems: 1
interrupts:
items:
- description: Comparator 1 irq
- description: Comparator 2 irq
- description: Data ready irq
interrupt-names:
items:
- const: thr1
- const: thr2
- const: ready
nvmem-cells:
items:
- description: Phandle to the trim control 1 provided by ocotp
- description: Phandle to the trim control 2 provided by ocotp
nvmem-cell-names:
items:
- const: trim1
- const: trim2
"#thermal-sensor-cells":
const: 0
required:
- compatible
- reg
- clocks
- interrupts
- interrupt-names
allOf:
- $ref: thermal-sensor.yaml
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/imx93-clock.h>
thermal-sensor@44482000 {
compatible = "fsl,imx91-tmu";
reg = <0x44482000 0x1000>;
#thermal-sensor-cells = <0>;
clocks = <&clk IMX93_CLK_TMC_GATE>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "thr1", "thr2", "ready";
nvmem-cells = <&tmu_trim1>, <&tmu_trim2>;
nvmem-cell-names = "trim1", "trim2";
};
...
@@ -0,0 +1,39 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/fsl,scu-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: i.MX SCU Client Device Node - Thermal Based on SCU Message Protocol
maintainers:
- Dong Aisheng <aisheng.dong@nxp.com>
description: i.MX SCU Client Device Node
Client nodes are maintained as children of the relevant IMX-SCU device node.
allOf:
- $ref: thermal-sensor.yaml#
properties:
compatible:
items:
- enum:
- fsl,imx8dxl-sc-thermal
- fsl,imx8qxp-sc-thermal
- const: fsl,imx-sc-thermal
'#thermal-sensor-cells':
const: 1
required:
- compatible
additionalProperties: false
examples:
- |
thermal-sensor {
compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal";
#thermal-sensor-cells = <1>;
};
@@ -0,0 +1,85 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/generic-adc-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: General Purpose Analog To Digital Converter (ADC) based thermal sensor
maintainers:
- Laxman Dewangan <ldewangan@nvidia.com>
description:
On some of platforms, thermal sensor like thermistors are connected to
one of ADC channel and sensor resistance is read via voltage across the
sensor resistor. The voltage read across the sensor is mapped to
temperature using voltage-temperature lookup table.
$ref: thermal-sensor.yaml#
properties:
compatible:
const: generic-adc-thermal
'#thermal-sensor-cells':
const: 0
io-channels:
maxItems: 1
io-channel-names:
const: sensor-channel
temperature-lookup-table:
description: |
Lookup table to map the relation between ADC value and temperature.
When ADC is read, the value is looked up on the table to get the
equivalent temperature.
If not specified, driver assumes the ADC channel gives milliCelsius
directly.
$ref: /schemas/types.yaml#/definitions/int32-matrix
items:
items:
- description: Temperature in milliCelsius
- description: ADC read value
required:
- compatible
- io-channels
- io-channel-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/thermal/thermal.h>
thermal-sensor {
compatible = "generic-adc-thermal";
#thermal-sensor-cells = <0>;
io-channels = <&ads1015 1>;
io-channel-names = "sensor-channel";
temperature-lookup-table = <
(-40000) 2578
(-39000) 2577
(-38000) 2576
(-37000) 2575
(-36000) 2574
(-35000) 2573
(-34000) 2572
(-33000) 2571
(-32000) 2569
(-31000) 2568
(-30000) 2567
/* skip */
118000 254
119000 247
120000 240
121000 233
122000 226
123000 220
124000 214
125000 208>;
};
...
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/hisilicon,tsensor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Temperature Sensor on HiSilicon SoCs
maintainers:
- Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
allOf:
- $ref: thermal-sensor.yaml
properties:
compatible:
enum:
- hisilicon,tsensor
- hisilicon,hi3660-tsensor
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: thermal_clk
interrupts:
maxItems: 1
'#thermal-sensor-cells':
const: 1
required:
- compatible
- reg
- interrupts
- '#thermal-sensor-cells'
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/hi6220-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
temperature-sensor@f7030700 {
compatible = "hisilicon,tsensor";
reg = <0xf7030700 0x1000>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&sys_ctrl HI6220_TSENSOR_CLK>;
clock-names = "thermal_clk";
#thermal-sensor-cells = <1>;
};
@@ -0,0 +1,114 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/imx-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP i.MX Thermal
maintainers:
- Shawn Guo <shawnguo@kernel.org>
properties:
compatible:
oneOf:
- enum:
- fsl,imx6q-tempmon
- fsl,imx6sx-tempmon
- fsl,imx7d-tempmon
- items:
- enum:
- fsl,imx6sll-tempmon
- fsl,imx6ul-tempmon
- const: fsl,imx6sx-tempmon
interrupts:
description: |
The interrupt output of the controller, i.MX6Q has IRQ_HIGH which
will be triggered when temperature is higher than high threshold,
i.MX6SX and i.MX7S/D have two more IRQs than i.MX6Q, one is IRQ_LOW
and the other is IRQ_PANIC, when temperature is lower than low
threshold, IRQ_LOW will be triggered, when temperature is higher
than panic threshold, IRQ_PANIC will be triggered, and system can
be configured to auto reboot by SRC module for IRQ_PANIC. IRQ_HIGH,
IRQ_LOW and IRQ_PANIC share same interrupt output of controller.
maxItems: 1
nvmem-cells:
items:
- description: Phandle to the calibration data provided by ocotp
- description: Phandle to the temperature grade provided by ocotp
nvmem-cell-names:
items:
- const: calib
- const: temp_grade
fsl,tempmon:
$ref: /schemas/types.yaml#/definitions/phandle
description: Phandle to anatop system controller node.
fsl,tempmon-data:
$ref: /schemas/types.yaml#/definitions/phandle
description: |
Deprecated property, phandle pointer to fuse controller that contains
TEMPMON calibration data, e.g. OCOTP on imx6q. The details about
calibration data can be found in SoC Reference Manual.
deprecated: true
clocks:
maxItems: 1
"#thermal-sensor-cells":
const: 0
required:
- compatible
- interrupts
- fsl,tempmon
- nvmem-cells
- nvmem-cell-names
allOf:
- $ref: thermal-sensor.yaml#
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/imx6sx-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
efuse@21bc000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,imx6sx-ocotp", "syscon";
reg = <0x021bc000 0x4000>;
clocks = <&clks IMX6SX_CLK_OCOTP>;
tempmon_calib: calib@38 {
reg = <0x38 4>;
};
tempmon_temp_grade: temp-grade@20 {
reg = <0x20 4>;
};
};
anatop@20c8000 {
compatible = "fsl,imx6q-anatop", "syscon", "simple-mfd";
reg = <0x020c8000 0x1000>;
interrupts = <0 49 IRQ_TYPE_LEVEL_HIGH>,
<0 54 IRQ_TYPE_LEVEL_HIGH>,
<0 127 IRQ_TYPE_LEVEL_HIGH>;
tempmon {
compatible = "fsl,imx6sx-tempmon";
interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
fsl,tempmon = <&anatop>;
nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>;
nvmem-cell-names = "calib", "temp_grade";
clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
#thermal-sensor-cells = <0>;
};
};
@@ -0,0 +1,72 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/imx8mm-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP i.MX8M Mini Thermal
maintainers:
- Shawn Guo <shawnguo@kernel.org>
- Sascha Hauer <s.hauer@pengutronix.de>
- Fabio Estevam <festevam@gmail.com>
description: |
i.MX8MM has TMU IP to allow temperature measurement, there are
currently two distinct major versions of the IP that is supported
by a single driver. The IP versions are named v1 and v2, v1 is
for i.MX8MM which has ONLY 1 sensor, v2 is for i.MX8MP which has
2 sensors.
$ref: thermal-sensor.yaml#
properties:
compatible:
oneOf:
- enum:
- fsl,imx8mm-tmu
- fsl,imx8mp-tmu
- items:
- const: fsl,imx8mn-tmu
- const: fsl,imx8mm-tmu
reg:
maxItems: 1
clocks:
maxItems: 1
nvmem-cells:
maxItems: 1
description: Phandle to the calibration data provided by ocotp
nvmem-cell-names:
const: calib
"#thermal-sensor-cells":
description: |
Number of cells required to uniquely identify the thermal
sensors, 0 for ONLY one sensor and 1 for multiple sensors.
enum:
- 0
- 1
required:
- compatible
- reg
- clocks
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/imx8mm-clock.h>
thermal-sensor@30260000 {
compatible = "fsl,imx8mm-tmu";
reg = <0x30260000 0x10000>;
clocks = <&clk IMX8MM_CLK_TMU_ROOT>;
#thermal-sensor-cells = <0>;
};
...
@@ -0,0 +1,15 @@
* Kirkwood Thermal
This version is for Kirkwood 88F8262 & 88F6283 SoCs. Other kirkwoods
don't contain a thermal sensor.
Required properties:
- compatible : "marvell,kirkwood-thermal"
- reg : Address range of the thermal registers
Example:
thermal@10078 {
compatible = "marvell,kirkwood-thermal";
reg = <0x10078 0x4>;
};
@@ -0,0 +1,71 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/loongson,ls2k-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Thermal sensors on Loongson-2 SoCs
maintainers:
- zhanghongchen <zhanghongchen@loongson.cn>
- Yinbo Zhu <zhuyinbo@loongson.cn>
allOf:
- $ref: /schemas/thermal/thermal-sensor.yaml#
properties:
compatible:
oneOf:
- enum:
- loongson,ls2k1000-thermal
- loongson,ls2k2000-thermal
- items:
- enum:
- loongson,ls2k0500-thermal
- const: loongson,ls2k1000-thermal
reg:
minItems: 1
maxItems: 2
interrupts:
maxItems: 1
'#thermal-sensor-cells':
const: 1
required:
- compatible
- reg
- interrupts
if:
properties:
compatible:
contains:
enum:
- loongson,ls2k2000-thermal
then:
properties:
reg:
minItems: 2
maxItems: 2
else:
properties:
reg:
maxItems: 1
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
thermal: thermal-sensor@1fe01500 {
compatible = "loongson,ls2k1000-thermal";
reg = <0x1fe01500 0x30>;
interrupt-parent = <&liointc0>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
#thermal-sensor-cells = <1>;
};
@@ -0,0 +1,46 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/marvell,armada-ap806-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Marvell Armada AP80x/CP110 thermal management
maintainers:
- Miquel Raynal <miquel.raynal@bootlin.com>
properties:
compatible:
enum:
- marvell,armada-ap806-thermal
- marvell,armada-ap807-thermal
- marvell,armada-cp110-thermal
reg:
maxItems: 1
interrupts:
description:
Overheat interrupt. The interrupt is connected thru a System Error
Interrupt (SEI) controller.
maxItems: 1
'#thermal-sensor-cells':
description: Cell represents the channel ID. There is one sensor per
channel. O refers to the thermal IP internal channel.
const: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
thermal-sensor@80 {
compatible = "marvell,armada-ap806-thermal";
reg = <0x80 0x10>;
interrupts = <18>;
#thermal-sensor-cells = <1>;
};
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/marvell,armada370-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Marvell Armada 3xx/XP thermal management
maintainers:
- Miquel Raynal <miquel.raynal@bootlin.com>
properties:
compatible:
enum:
- marvell,armada370-thermal
- marvell,armada375-thermal
- marvell,armada380-thermal
- marvell,armadaxp-thermal
reg:
items:
- description: status register (4B)
- description: control register (8B)
required:
- compatible
- reg
additionalProperties: false
examples:
- |
thermal@d0018300 {
compatible = "marvell,armada370-thermal";
reg = <0xd0018300 0x4>,
<0xd0018304 0x8>;
};
@@ -0,0 +1,151 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/mediatek,lvts-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek SoC Low Voltage Thermal Sensor (LVTS)
maintainers:
- Balsam CHIHI <bchihi@baylibre.com>
description: |
LVTS is a thermal management architecture composed of three subsystems,
a Sensing device - Thermal Sensing Micro Circuit Unit (TSMCU),
a Converter - Low Voltage Thermal Sensor converter (LVTS), and
a Digital controller (LVTS_CTRL).
properties:
compatible:
enum:
- mediatek,mt7987-lvts-ap
- mediatek,mt7988-lvts-ap
- mediatek,mt8186-lvts
- mediatek,mt8188-lvts-ap
- mediatek,mt8188-lvts-mcu
- mediatek,mt8192-lvts-ap
- mediatek,mt8192-lvts-mcu
- mediatek,mt8195-lvts-ap
- mediatek,mt8195-lvts-mcu
- mediatek,mt8196-lvts-ap
- mediatek,mt8196-lvts-mcu
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
resets:
maxItems: 1
description: LVTS reset for clearing temporary data on AP/MCU.
nvmem-cells:
minItems: 1
items:
- description: Calibration eFuse data 1 for LVTS
- description: Calibration eFuse data 2 for LVTS
nvmem-cell-names:
minItems: 1
items:
- const: lvts-calib-data-1
- const: lvts-calib-data-2
"#thermal-sensor-cells":
const: 1
allOf:
- $ref: thermal-sensor.yaml#
- if:
properties:
compatible:
contains:
enum:
- mediatek,mt8188-lvts-ap
- mediatek,mt8188-lvts-mcu
- mediatek,mt8192-lvts-ap
- mediatek,mt8192-lvts-mcu
then:
properties:
nvmem-cells:
maxItems: 1
nvmem-cell-names:
maxItems: 1
- if:
properties:
compatible:
contains:
enum:
- mediatek,mt8186-lvts
- mediatek,mt8195-lvts-ap
- mediatek,mt8195-lvts-mcu
then:
properties:
nvmem-cells:
minItems: 2
nvmem-cell-names:
minItems: 2
required:
- compatible
- reg
- interrupts
- clocks
- resets
- nvmem-cells
- nvmem-cell-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/mt8195-clk.h>
#include <dt-bindings/reset/mt8195-resets.h>
#include <dt-bindings/thermal/mediatek,lvts-thermal.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
lvts_mcu: thermal-sensor@11278000 {
compatible = "mediatek,mt8195-lvts-mcu";
reg = <0 0x11278000 0 0x1000>;
interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&infracfg_ao CLK_INFRA_AO_THERM>;
resets = <&infracfg_ao MT8195_INFRA_RST4_THERM_CTRL_MCU_SWRST>;
nvmem-cells = <&lvts_efuse_data1 &lvts_efuse_data2>;
nvmem-cell-names = "lvts-calib-data-1", "lvts-calib-data-2";
#thermal-sensor-cells = <1>;
};
};
thermal_zones: thermal-zones {
cpu0-thermal {
polling-delay = <1000>;
polling-delay-passive = <250>;
thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU0>;
trips {
cpu0_alert: trip-alert {
temperature = <85000>;
hysteresis = <2000>;
type = "passive";
};
cpu0_crit: trip-crit {
temperature = <100000>;
hysteresis = <2000>;
type = "critical";
};
};
};
};
@@ -0,0 +1,106 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/mediatek,thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mediatek thermal controller for on-SoC temperatures
maintainers:
- Sascha Hauer <s.hauer@pengutronix.de>
description:
This device does not have its own ADC, instead it directly controls the AUXADC
via AHB bus accesses. For this reason it needs phandles to the AUXADC. Also it
controls a mux in the apmixedsys register space via AHB bus accesses, so a
phandle to the APMIXEDSYS is also needed.
allOf:
- $ref: thermal-sensor.yaml#
properties:
compatible:
oneOf:
- enum:
- mediatek,mt2701-thermal
- mediatek,mt2712-thermal
- mediatek,mt7622-thermal
- mediatek,mt7986-thermal
- mediatek,mt8173-thermal
- mediatek,mt8183-thermal
- mediatek,mt8365-thermal
- items:
- enum:
- mediatek,mt8516-thermal
- const: mediatek,mt2701-thermal
- items:
- enum:
- mediatek,mt7981-thermal
- const: mediatek,mt7986-thermal
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
items:
- description: Main clock needed for register access
- description: The AUXADC clock
clock-names:
items:
- const: therm
- const: auxadc
mediatek,auxadc:
$ref: /schemas/types.yaml#/definitions/phandle
description: A phandle to the AUXADC which the thermal controller uses
mediatek,apmixedsys:
$ref: /schemas/types.yaml#/definitions/phandle
description: A phandle to the APMIXEDSYS controller
resets:
description: Reset controller controlling the thermal controller
nvmem-cells:
items:
- description:
NVMEM cell with EEPROMA phandle to the calibration data provided by an
NVMEM device. If unspecified default values shall be used.
nvmem-cell-names:
items:
- const: calibration-data
required:
- reg
- interrupts
- clocks
- clock-names
- mediatek,auxadc
- mediatek,apmixedsys
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/mt8173-clk.h>
#include <dt-bindings/reset/mt8173-resets.h>
thermal@1100b000 {
compatible = "mediatek,mt8173-thermal";
reg = <0x1100b000 0x1000>;
interrupts = <0 70 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_THERM>, <&pericfg CLK_PERI_AUXADC>;
clock-names = "therm", "auxadc";
resets = <&pericfg MT8173_PERI_THERM_SW_RST>;
mediatek,auxadc = <&auxadc>;
mediatek,apmixedsys = <&apmixedsys>;
nvmem-cells = <&thermal_calibration_data>;
nvmem-cell-names = "calibration-data";
#thermal-sensor-cells = <1>;
};
@@ -0,0 +1,388 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/nvidia,tegra124-soctherm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra124 SOCTHERM Thermal Management System
maintainers:
- Thierry Reding <thierry.reding@gmail.com>
- Jon Hunter <jonathanh@nvidia.com>
description: The SOCTHERM IP block contains thermal sensors, support for
polled or interrupt-based thermal monitoring, CPU and GPU throttling based
on temperature trip points, and handling external overcurrent notifications.
It is also used to manage emergency shutdown in an overheating situation.
properties:
compatible:
enum:
- nvidia,tegra114-soctherm
- nvidia,tegra124-soctherm
- nvidia,tegra132-soctherm
- nvidia,tegra210-soctherm
- nvidia,tegra210b01-soctherm
reg:
maxItems: 2
reg-names:
maxItems: 2
interrupts:
items:
- description: module interrupt
- description: EDP interrupt
interrupt-names:
items:
- const: thermal
- const: edp
clocks:
items:
- description: thermal sensor clock
- description: module clock
clock-names:
items:
- const: tsensor
- const: soctherm
resets:
items:
- description: module reset
reset-names:
items:
- const: soctherm
"#thermal-sensor-cells":
const: 1
throttle-cfgs:
$ref: thermal-cooling-devices.yaml
description: A sub-node which is a container of configuration for each
hardware throttle events. These events can be set as cooling devices.
Throttle event sub-nodes must be named as "light" or "heavy".
unevaluatedProperties: false
patternProperties:
"^(light|heavy|oc1)$":
type: object
additionalProperties: false
properties:
"#cooling-cells":
const: 2
nvidia,priority:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 100
description: Each throttles has its own throttle settings, so the
SW need to set priorities for various throttle, the HW arbiter
can select the final throttle settings. Bigger value indicates
higher priority, In general, higher priority translates to lower
target frequency. SW needs to ensure that critical thermal
alarms are given higher priority, and ensure that there is no
race if priority of two vectors is set to the same value.
nvidia,cpu-throt-percent:
description: This property is for Tegra124 and Tegra210. It is the
throttling depth of pulse skippers, it's the percentage
throttling.
minimum: 0
maximum: 100
nvidia,cpu-throt-level:
$ref: /schemas/types.yaml#/definitions/uint32
description: This property is only for Tegra132, it is the level
of pulse skippers, which used to throttle clock frequencies. It
indicates cpu clock throttling depth, and the depth can be
programmed.
enum:
# none (TEGRA_SOCTHERM_THROT_LEVEL_NONE)
- 0
# low (TEGRA_SOCTHERM_THROT_LEVEL_LOW)
- 1
# medium (TEGRA_SOCTHERM_THROT_LEVEL_MED)
- 2
# high (TEGRA_SOCTHERM_THROT_LEVEL_HIGH)
- 3
nvidia,gpu-throt-level:
$ref: /schemas/types.yaml#/definitions/uint32
description: This property is for Tegra124 and Tegra210. It is the
level of pulse skippers, which used to throttle clock
frequencies. It indicates gpu clock throttling depth and can be
programmed to any of the following values which represent a
throttling percentage.
enum:
# none (0%, TEGRA_SOCTHERM_THROT_LEVEL_NONE)
- 0
# low (50%, TEGRA_SOCTHERM_THROT_LEVEL_LOW)
- 1
# medium (75%, TEGRA_SOCTHERM_THROT_LEVEL_MED)
- 2
# high (85%, TEGRA_SOCTHERM_THROT_LEVEL_HIGH)
- 3
# optional
# Tegra210 specific and valid only for OCx throttle events
nvidia,count-threshold:
$ref: /schemas/types.yaml#/definitions/uint32
description: Specifies the number of OC events that are required
for triggering an interrupt. Interrupts are not triggered if the
property is missing. A value of 0 will interrupt on every OC
alarm.
nvidia,polarity-active-low:
$ref: /schemas/types.yaml#/definitions/flag
description: Configures the polarity of the OC alaram signal. If
present, this means assert low, otherwise assert high.
nvidia,alarm-filter:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of clocks to filter event. When the filter
expires (which means the OC event has not occurred for a long
time), the counter is cleared and filter is rearmed.
default: 0
nvidia,throttle-period-us:
description: Specifies the number of microseconds for which
throttling is engaged after the OC event is deasserted.
default: 0
# optional
nvidia,thermtrips:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
description: |
When present, this property specifies the temperature at which the
SOCTHERM hardware will assert the thermal trigger signal to the Power
Management IC, which can be configured to reset or shutdown the device.
It is an array of pairs where each pair represents a tsensor ID followed
by a temperature in milli Celcius. In the absence of this property the
critical trip point will be used for thermtrip temperature.
Note:
- the "critical" type trip points will be used to set the temperature at
which the SOCTHERM hardware will assert a thermal trigger if the
"nvidia,thermtrips" property is missing. When the thermtrips property
is present, the breach of a critical trip point is reported back to
the thermal framework to implement software shutdown.
- the "hot" type trip points will be set to SOCTHERM hardware as the
throttle temperature. Once the temperature of this thermal zone is
higher than it, it will trigger the HW throttle event.
items:
items:
- description: sensor ID
oneOf:
- description: CPU sensor
const: 0
- description: MEM sensor
const: 1
- description: GPU sensor
const: 2
- description: PLLX sensor
const: 3
- description: temperature threshold (in millidegree Celsius)
required:
- compatible
- reg
- reg-names
- interrupts
- interrupt-names
- clocks
- clock-names
- resets
- reset-names
allOf:
- $ref: thermal-sensor.yaml
- if:
properties:
compatible:
contains:
enum:
- nvidia,tegra114-soctherm
- nvidia,tegra124-soctherm
- nvidia,tegra210-soctherm
- nvidia,tegra210b01-soctherm
then:
properties:
reg:
items:
- description: SOCTHERM register set
- description: clock and reset controller registers
reg-names:
items:
- const: soctherm-reg
- const: car-reg
else:
properties:
reg:
items:
- description: SOCTHERM register set
- description: CCROC registers
reg-names:
items:
- const: soctherm-reg
- const: ccroc-reg
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/tegra124-car.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/thermal/tegra124-soctherm.h>
soctherm@700e2000 {
compatible = "nvidia,tegra124-soctherm";
reg = <0x700e2000 0x600>, /* SOC_THERM reg_base */
<0x60006000 0x400>; /* CAR reg_base */
reg-names = "soctherm-reg", "car-reg";
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "thermal", "edp";
clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
<&tegra_car TEGRA124_CLK_SOC_THERM>;
clock-names = "tsensor", "soctherm";
resets = <&tegra_car 78>;
reset-names = "soctherm";
#thermal-sensor-cells = <1>;
nvidia,thermtrips = <TEGRA124_SOCTHERM_SENSOR_CPU 102500>,
<TEGRA124_SOCTHERM_SENSOR_GPU 103000>;
throttle-cfgs {
/*
* When the "heavy" cooling device triggered,
* the HW will skip cpu clock's pulse in 85% depth,
* skip gpu clock's pulse in 85% level
*/
heavy {
nvidia,priority = <100>;
nvidia,cpu-throt-percent = <85>;
nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
#cooling-cells = <2>;
};
/*
* When the "light" cooling device triggered,
* the HW will skip cpu clock's pulse in 50% depth,
* skip gpu clock's pulse in 50% level
*/
light {
nvidia,priority = <80>;
nvidia,cpu-throt-percent = <50>;
nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_LOW>;
#cooling-cells = <2>;
};
/*
* If these two devices are triggered in same time, the HW throttle
* arbiter will select the highest priority as the final throttle
* settings to skip cpu pulse.
*/
oc1 {
nvidia,priority = <50>;
nvidia,polarity-active-low;
nvidia,count-threshold = <100>;
nvidia,alarm-filter = <5100000>;
nvidia,throttle-period-us = <0>;
nvidia,cpu-throt-percent = <75>;
nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_MED>;
};
};
};
# referring to Tegra132's "reg", "reg-names" and "throttle-cfgs"
- |
thermal-sensor@700e2000 {
compatible = "nvidia,tegra132-soctherm";
reg = <0x700e2000 0x600>, /* SOC_THERM reg_base */
<0x70040000 0x200>; /* CCROC reg_base */
reg-names = "soctherm-reg", "ccroc-reg";
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "thermal", "edp";
clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
<&tegra_car TEGRA124_CLK_SOC_THERM>;
clock-names = "tsensor", "soctherm";
resets = <&tegra_car 78>;
reset-names = "soctherm";
#thermal-sensor-cells = <1>;
throttle-cfgs {
/*
* When the "heavy" cooling device triggered,
* the HW will skip cpu clock's pulse in HIGH level
*/
heavy {
nvidia,priority = <100>;
nvidia,cpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
#cooling-cells = <2>;
};
/*
* When the "light" cooling device triggered,
* the HW will skip cpu clock's pulse in MED level
*/
light {
nvidia,priority = <80>;
nvidia,cpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_MED>;
#cooling-cells = <2>;
};
/*
* If these two devices are triggered in same time, the HW throttle
* arbiter will select the highest priority as the final throttle
* settings to skip cpu pulse.
*/
};
};
# referring to thermal sensors
- |
thermal-zones {
cpu-thermal {
polling-delay-passive = <1000>;
polling-delay = <1000>;
thermal-sensors = <&soctherm TEGRA124_SOCTHERM_SENSOR_CPU>;
trips {
cpu_shutdown_trip: shutdown-trip {
temperature = <102500>;
hysteresis = <1000>;
type = "critical";
};
cpu_throttle_trip: throttle-trip {
temperature = <100000>;
hysteresis = <1000>;
type = "hot";
};
};
cooling-maps {
map0 {
trip = <&cpu_throttle_trip>;
cooling-device = <&throttle_heavy 1 1>;
};
};
};
};
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/nvidia,tegra186-bpmp-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra186 (and later) BPMP thermal sensor
maintainers:
- Thierry Reding <thierry.reding@gmail.com>
- Jon Hunter <jonathanh@nvidia.com>
description: |
In Tegra186, the BPMP (Boot and Power Management Processor) implements
an interface that is used to read system temperatures, including CPU
cluster and GPU temperatures. This binding describes the thermal
sensor that is exposed by BPMP.
The BPMP thermal node must be located directly inside the main BPMP
node. See ../firmware/nvidia,tegra186-bpmp.yaml for details of the
BPMP binding.
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- nvidia,tegra186-bpmp-thermal
- nvidia,tegra194-bpmp-thermal
'#thermal-sensor-cells':
const: 1
unevaluatedProperties: false
@@ -0,0 +1,70 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/nvidia,tegra30-tsensor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra30 Thermal Sensor
maintainers:
- Dmitry Osipenko <digetx@gmail.com>
- Jon Hunter <jonathanh@nvidia.com>
- Thierry Reding <thierry.reding@gmail.com>
description: |
TSENSOR provides thermal and voltage sensors which monitor temperature
and voltage of the chip. Sensors are placed across the die to gauge the
temperature of the whole chip. The TSENSOR module:
Generates an interrupt to SW to lower temperature via DVFS on reaching
a certain thermal/voltage threshold.
Generates a signal to the CAR to reduce CPU frequency by half on reaching
a certain thermal/voltage threshold.
Generates a signal to the PMC when the temperature reaches dangerously high
levels to reset the chip and sets a flag in the PMC.
TSENSOR has two channels which monitor two different spots of the SoC.
$ref: thermal-sensor.yaml#
properties:
compatible:
const: nvidia,tegra30-tsensor
reg:
maxItems: 1
clocks:
maxItems: 1
resets:
maxItems: 1
interrupts:
maxItems: 1
"#thermal-sensor-cells":
const: 1
required:
- compatible
- reg
- clocks
- resets
- interrupts
unevaluatedProperties: false
examples:
- |
thermal-sensor@70014000 {
compatible = "nvidia,tegra30-tsensor";
reg = <0x70014000 0x500>;
interrupts = <0 102 4>;
clocks = <&clk 100>;
resets = <&rst 100>;
#thermal-sensor-cells = <1>;
};
@@ -0,0 +1,84 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/qcom,spmi-temp-alarm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm QPNP PMIC Temperature Alarm
maintainers:
- Bjorn Andersson <bjorn.andersson@linaro.org>
description:
QPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips
that utilize the Qualcomm SPMI implementation. These peripherals provide an
interrupt signal and status register to identify high PMIC die temperature.
allOf:
- $ref: thermal-sensor.yaml#
properties:
compatible:
const: qcom,spmi-temp-alarm
reg:
maxItems: 1
interrupts:
maxItems: 1
io-channels:
items:
- description: ADC channel, which reports chip die temperature
io-channel-names:
items:
- const: thermal
'#thermal-sensor-cells':
const: 0
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
pm8350_temp_alarm: temperature-sensor@a00 {
compatible = "qcom,spmi-temp-alarm";
reg = <0xa00>;
interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
#thermal-sensor-cells = <0>;
};
};
thermal-zones {
pm8350_thermal: pm8350c-thermal {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-sensors = <&pm8350_temp_alarm>;
trips {
pm8350_trip0: trip0 {
temperature = <95000>;
hysteresis = <0>;
type = "passive";
};
pm8350_crit: pm8350c-crit {
temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
};
};
};
@@ -0,0 +1,91 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2021 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/qcom-lmh.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Limits Management Hardware(LMh)
maintainers:
- Thara Gopinath <thara.gopinath@gmail.com>
description:
Limits Management Hardware(LMh) is a hardware infrastructure on some
Qualcomm SoCs that can enforce temperature and current limits as
programmed by software for certain IPs like CPU.
properties:
compatible:
oneOf:
- enum:
- qcom,sc8180x-lmh
- qcom,sdm845-lmh
- qcom,sm8150-lmh
- items:
- const: qcom,sdm670-lmh
- const: qcom,sdm845-lmh
- items:
- const: qcom,qcm2290-lmh
- const: qcom,sm8150-lmh
reg:
items:
- description: core registers
interrupts:
maxItems: 1
'#interrupt-cells':
const: 1
interrupt-controller: true
cpus:
description:
phandle of the first cpu in the LMh cluster
maxItems: 1
qcom,lmh-temp-arm-millicelsius:
description:
An integer expressing temperature threshold at which the LMh thermal
FSM is engaged.
qcom,lmh-temp-low-millicelsius:
description:
An integer expressing temperature threshold at which the state machine
will attempt to remove frequency throttling.
qcom,lmh-temp-high-millicelsius:
description:
An integer expressing temperature threshold at which the state machine
will attempt to throttle the frequency.
required:
- compatible
- reg
- interrupts
- '#interrupt-cells'
- interrupt-controller
- cpus
- qcom,lmh-temp-arm-millicelsius
- qcom,lmh-temp-low-millicelsius
- qcom,lmh-temp-high-millicelsius
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
lmh@17d70800 {
compatible = "qcom,sdm845-lmh";
reg = <0x17d70800 0x400>;
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
cpus = <&CPU4>;
qcom,lmh-temp-arm-millicelsius = <65000>;
qcom,lmh-temp-low-millicelsius = <94500>;
qcom,lmh-temp-high-millicelsius = <95000>;
interrupt-controller;
#interrupt-cells = <1>;
};
@@ -0,0 +1,149 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/qcom-spmi-adc-tm-hc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm's SPMI PMIC ADC HC Thermal Monitoring
maintainers:
- Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
$ref: thermal-sensor.yaml#
properties:
compatible:
const: qcom,spmi-adc-tm-hc
reg:
maxItems: 1
interrupts:
maxItems: 1
"#thermal-sensor-cells":
const: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
qcom,avg-samples:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of samples to be used for measurement.
enum:
- 1
- 2
- 4
- 8
- 16
default: 1
qcom,decimation:
$ref: /schemas/types.yaml#/definitions/uint32
description: This parameter is used to decrease ADC sampling rate.
Quicker measurements can be made by reducing decimation ratio.
enum:
- 256
- 512
- 1024
default: 1024
patternProperties:
"^([-a-z0-9]*)@[0-7]$":
type: object
description:
Represent one thermal sensor.
properties:
reg:
description: Specify the sensor channel. There are 8 channels in PMIC5's ADC TM
minimum: 0
maximum: 7
io-channels:
description:
From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor
qcom,ratiometric:
$ref: /schemas/types.yaml#/definitions/flag
description:
Channel calibration type.
If this property is specified VADC will use the VDD reference
(1.875V) and GND for channel calibration. If property is not found,
channel will be calibrated with 0V and 1.25V reference channels,
also known as absolute calibration.
qcom,hw-settle-time-us:
description: Time between AMUX getting configured and the ADC starting conversion.
enum: [0, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 6000, 8000, 10000]
qcom,pre-scaling:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Used for scaling the channel input signal before the
signal is fed to VADC. The configuration for this node is to know the
pre-determined ratio and use it for post scaling. It is a pair of
integers, denoting the numerator and denominator of the fraction by
which input signal is multiplied. For example, <1 3> indicates the
signal is scaled down to 1/3 of its value before ADC measurement. If
property is not found default value depending on chip will be used.
items:
- const: 1
- enum: [ 1, 3, 4, 6, 20, 8, 10 ]
required:
- reg
- io-channels
additionalProperties:
false
required:
- compatible
- reg
- interrupts
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
pm8998_adc: adc@3100 {
compatible = "qcom,spmi-adc-rev2";
reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
/* Other properties are omitted */
channel@4c {
reg = <ADC5_XO_THERM_100K_PU>;
};
};
adc-tm@3400 {
compatible = "qcom,spmi-adc-tm-hc";
reg = <0x3400>;
interrupts = <0x2 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
thermistor@1 {
reg = <1>;
io-channels = <&pm8998_adc ADC5_XO_THERM_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
};
};
...
@@ -0,0 +1,263 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/qcom-spmi-adc-tm5.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm's SPMI PMIC ADC Thermal Monitoring
maintainers:
- Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- qcom,spmi-adc-tm5
- qcom,spmi-adc-tm5-gen2
- qcom,adc-tm7 # Incomplete / subject to change
reg:
maxItems: 1
interrupts:
maxItems: 1
"#thermal-sensor-cells":
const: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
qcom,avg-samples:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of samples to be used for measurement.
Not applicable for Gen2 ADC_TM peripheral.
enum:
- 1
- 2
- 4
- 8
- 16
default: 1
qcom,decimation:
$ref: /schemas/types.yaml#/definitions/uint32
description: This parameter is used to decrease ADC sampling rate.
Quicker measurements can be made by reducing decimation ratio.
Not applicable for Gen2 ADC_TM peripheral.
enum:
- 250
- 420
- 840
default: 840
patternProperties:
"^([-a-z0-9]*)@[0-7]$":
type: object
description:
Represent one thermal sensor.
properties:
reg:
description: Specify the sensor channel. There are 8 channels in PMIC5's ADC TM
minimum: 0
maximum: 7
io-channels:
description:
From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor
qcom,ratiometric:
$ref: /schemas/types.yaml#/definitions/flag
description:
Channel calibration type.
If this property is specified VADC will use the VDD reference
(1.875V) and GND for channel calibration. If property is not found,
channel will be calibrated with 0V and 1.25V reference channels,
also known as absolute calibration.
qcom,hw-settle-time-us:
description: Time between AMUX getting configured and the ADC starting conversion.
enum: [15, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000]
qcom,pre-scaling:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Used for scaling the channel input signal before the
signal is fed to VADC. The configuration for this node is to know the
pre-determined ratio and use it for post scaling. It is a pair of
integers, denoting the numerator and denominator of the fraction by
which input signal is multiplied. For example, <1 3> indicates the
signal is scaled down to 1/3 of its value before ADC measurement. If
property is not found default value depending on chip will be used.
items:
- const: 1
- enum: [ 1, 3, 4, 6, 20, 8, 10 ]
qcom,avg-samples:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of samples to be used for measurement.
This property in child node is applicable only for Gen2 ADC_TM peripheral.
enum:
- 1
- 2
- 4
- 8
- 16
default: 1
qcom,decimation:
$ref: /schemas/types.yaml#/definitions/uint32
description: This parameter is used to decrease ADC sampling rate.
Quicker measurements can be made by reducing decimation ratio.
This property in child node is applicable only for Gen2 ADC_TM peripheral.
enum:
- 85
- 340
- 1360
default: 1360
required:
- reg
- io-channels
additionalProperties:
false
allOf:
- if:
properties:
compatible:
contains:
const: qcom,spmi-adc-tm5
then:
patternProperties:
"^([-a-z0-9]*)@[0-7]$":
properties:
qcom,decimation: false
qcom,avg-samples: false
- if:
properties:
compatible:
contains:
const: qcom,spmi-adc-tm5-gen2
then:
properties:
qcom,avg-samples: false
qcom,decimation: false
required:
- compatible
- reg
- interrupts
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
pm8150b_adc: adc@3100 {
compatible = "qcom,spmi-adc5";
reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
/* Other properties are omitted */
channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
label = "conn_therm";
};
};
adc-tm@3500 {
compatible = "qcom,spmi-adc-tm5";
reg = <0x3500>;
interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
conn-therm@0 {
reg = <0>;
io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
};
};
- |
#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
pmk8350_vadc: adc@3100 {
compatible = "qcom,spmi-adc7";
reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
/* Other properties are omitted */
channel@44 {
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
label = "xo_therm";
};
channel@147 {
reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
label = "conn_therm";
};
};
adc-tm@3400 {
compatible = "qcom,spmi-adc-tm5-gen2";
reg = <0x3400>;
interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
pmk8350-xo-therm@0 {
reg = <0>;
io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,decimation = <340>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
conn-therm@1 {
reg = <1>;
io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
qcom,avg-samples = <2>;
qcom,ratiometric;
qcom,hw-settle-time-us = <200>;
};
};
};
...
@@ -0,0 +1,447 @@
# SPDX-License-Identifier: (GPL-2.0 OR MIT)
# Copyright 2019 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/qcom-tsens.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: QCOM SoC Temperature Sensor (TSENS)
maintainers:
- Amit Kucheria <amitk@kernel.org>
description: |
QCOM SoCs have TSENS IP to allow temperature measurement. There are currently
three distinct major versions of the IP that is supported by a single driver.
The IP versions are named v0.1, v1 and v2 in the driver, where v0.1 captures
everything before v1 when there was no versioning information.
properties:
compatible:
oneOf:
- description: msm8960 TSENS based
items:
- enum:
- qcom,ipq8064-tsens
- qcom,msm8960-tsens
- description: v0.1 of TSENS
items:
- enum:
- qcom,mdm9607-tsens
- qcom,msm8226-tsens
- qcom,msm8909-tsens
- qcom,msm8916-tsens
- qcom,msm8939-tsens
- qcom,msm8974-tsens
- const: qcom,tsens-v0_1
- description:
v1 of TSENS without RPM which requires to be explicitly reset
and enabled in the driver.
enum:
- qcom,ipq5018-tsens
- description: v1 of TSENS
items:
- enum:
- qcom,msm8937-tsens
- qcom,msm8956-tsens
- qcom,msm8976-tsens
- qcom,qcs404-tsens
- const: qcom,tsens-v1
- description: v2 of TSENS
items:
- enum:
- qcom,eliza-tsens
- qcom,glymur-tsens
- qcom,hawi-tsens
- qcom,kaanapali-tsens
- qcom,milos-tsens
- qcom,nord-tsens
- qcom,msm8953-tsens
- qcom,msm8996-tsens
- qcom,msm8998-tsens
- qcom,qcm2290-tsens
- qcom,qcs8300-tsens
- qcom,qcs615-tsens
- qcom,sa8255p-tsens
- qcom,sa8775p-tsens
- qcom,sar2130p-tsens
- qcom,sc7180-tsens
- qcom,sc7280-tsens
- qcom,sc8180x-tsens
- qcom,sc8280xp-tsens
- qcom,sdm630-tsens
- qcom,sdm670-tsens
- qcom,sdm845-tsens
- qcom,shikra-tsens
- qcom,sm6115-tsens
- qcom,sm6350-tsens
- qcom,sm6375-tsens
- qcom,sm8150-tsens
- qcom,sm8250-tsens
- qcom,sm8350-tsens
- qcom,sm8450-tsens
- qcom,sm8550-tsens
- qcom,sm8650-tsens
- qcom,sm8750-tsens
- qcom,x1e80100-tsens
- const: qcom,tsens-v2
- description: v2 of TSENS with combined interrupt
enum:
- qcom,ipq5332-tsens
- qcom,ipq5424-tsens
- qcom,ipq8074-tsens
- description: v2 of TSENS with combined interrupt
items:
- enum:
- qcom,ipq6018-tsens
- qcom,ipq9574-tsens
- const: qcom,ipq8074-tsens
reg:
items:
- description: TM registers
- description: SROT registers
interrupts:
minItems: 1
maxItems: 2
interrupt-names:
minItems: 1
maxItems: 2
nvmem-cells:
oneOf:
- minItems: 1
maxItems: 2
description:
Reference to an nvmem node for the calibration data
- minItems: 5
maxItems: 35
description: |
Reference to nvmem cells for the calibration mode, two calibration
bases and two cells per each sensor
# special case for msm8974 / apq8084
- maxItems: 51
description: |
Reference to nvmem cells for the calibration mode, two calibration
bases and two cells per each sensor, main and backup copies, plus use_backup cell
nvmem-cell-names:
oneOf:
- minItems: 1
items:
- const: calib
- enum:
- calib_backup
- calib_sel
- minItems: 5
items:
- const: mode
- const: base1
- const: base2
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
- pattern: '^s[0-9]+_p1$'
- pattern: '^s[0-9]+_p2$'
# special case for msm8974 / apq8084
- items:
- const: mode
- const: base1
- const: base2
- const: use_backup
- const: mode_backup
- const: base1_backup
- const: base2_backup
- const: s0_p1
- const: s0_p2
- const: s1_p1
- const: s1_p2
- const: s2_p1
- const: s2_p2
- const: s3_p1
- const: s3_p2
- const: s4_p1
- const: s4_p2
- const: s5_p1
- const: s5_p2
- const: s6_p1
- const: s6_p2
- const: s7_p1
- const: s7_p2
- const: s8_p1
- const: s8_p2
- const: s9_p1
- const: s9_p2
- const: s10_p1
- const: s10_p2
- const: s0_p1_backup
- const: s0_p2_backup
- const: s1_p1_backup
- const: s1_p2_backup
- const: s2_p1_backup
- const: s2_p2_backup
- const: s3_p1_backup
- const: s3_p2_backup
- const: s4_p1_backup
- const: s4_p2_backup
- const: s5_p1_backup
- const: s5_p2_backup
- const: s6_p1_backup
- const: s6_p2_backup
- const: s7_p1_backup
- const: s7_p2_backup
- const: s8_p1_backup
- const: s8_p2_backup
- const: s9_p1_backup
- const: s9_p2_backup
- const: s10_p1_backup
- const: s10_p2_backup
- minItems: 8
items:
- const: mode
- const: base0
- const: base1
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
- pattern: '^tsens_sens[0-9]+_off$'
"#qcom,sensors":
description:
Number of sensors enabled on this platform
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 16
"#thermal-sensor-cells":
const: 1
required:
- compatible
- interrupts
- interrupt-names
- "#qcom,sensors"
allOf:
- $ref: thermal-sensor.yaml#
- if:
properties:
compatible:
contains:
enum:
- qcom,ipq5018-tsens
- qcom,ipq8064-tsens
- qcom,msm8960-tsens
- qcom,tsens-v0_1
- qcom,tsens-v1
then:
properties:
interrupts:
items:
- description: Combined interrupt if upper or lower threshold crossed
interrupt-names:
items:
- const: uplow
- if:
properties:
compatible:
contains:
const: qcom,tsens-v2
then:
properties:
interrupts:
items:
- description: Combined interrupt if upper or lower threshold crossed
- description: Interrupt if critical threshold crossed
interrupt-names:
items:
- const: uplow
- const: critical
- if:
properties:
compatible:
contains:
enum:
- qcom,ipq5332-tsens
- qcom,ipq5424-tsens
- qcom,ipq8074-tsens
then:
properties:
interrupts:
items:
- description: Combined interrupt if upper, lower or critical thresholds crossed
interrupt-names:
items:
- const: combined
- if:
properties:
compatible:
contains:
enum:
- qcom,ipq5332-tsens
- qcom,ipq5424-tsens
- qcom,ipq8074-tsens
- qcom,tsens-v0_1
- qcom,tsens-v1
- qcom,tsens-v2
then:
required:
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
thermal-sensor {
compatible = "qcom,ipq8064-tsens";
nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
nvmem-cell-names = "calib", "calib_backup";
interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <11>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 1 (new calibration data: for pre v1 IP):
thermal-sensor@4a9000 {
compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
reg = <0x4a9000 0x1000>, /* TM */
<0x4a8000 0x1000>; /* SROT */
nvmem-cells = <&tsens_mode>,
<&tsens_base1>, <&tsens_base2>,
<&tsens_s0_p1>, <&tsens_s0_p2>,
<&tsens_s1_p1>, <&tsens_s1_p2>,
<&tsens_s2_p1>, <&tsens_s2_p2>,
<&tsens_s4_p1>, <&tsens_s4_p2>,
<&tsens_s5_p1>, <&tsens_s5_p2>;
nvmem-cell-names = "mode",
"base1", "base2",
"s0_p1", "s0_p2",
"s1_p1", "s1_p2",
"s2_p1", "s2_p2",
"s4_p1", "s4_p2",
"s5_p1", "s5_p2";
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <5>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 1 (legacy: for pre v1 IP):
tsens1: thermal-sensor@4a9000 {
compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";
reg = <0x4a9000 0x1000>, /* TM */
<0x4a8000 0x1000>; /* SROT */
nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
nvmem-cell-names = "calib", "calib_sel";
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <5>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 2 (for any platform containing v1 of the TSENS IP):
tsens2: thermal-sensor@4a9000 {
compatible = "qcom,qcs404-tsens", "qcom,tsens-v1";
reg = <0x004a9000 0x1000>, /* TM */
<0x004a8000 0x1000>; /* SROT */
nvmem-cells = <&tsens_caldata>;
nvmem-cell-names = "calib";
interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow";
#qcom,sensors = <10>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 3 (for any platform containing v2 of the TSENS IP):
tsens3: thermal-sensor@c263000 {
compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
reg = <0xc263000 0x1ff>,
<0xc222000 0x1ff>;
interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uplow", "critical";
#qcom,sensors = <13>;
#thermal-sensor-cells = <1>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 4 (for any IPQ8074 based SoC-s):
tsens4: thermal-sensor@4a9000 {
compatible = "qcom,ipq8074-tsens";
reg = <0x4a9000 0x1000>,
<0x4a8000 0x1000>;
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "combined";
#qcom,sensors = <16>;
#thermal-sensor-cells = <1>;
};
...
@@ -0,0 +1,119 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/qoriq-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Thermal Monitoring Unit (TMU) on Freescale QorIQ SoCs
maintainers:
- Shawn Guo <shawnguo@kernel.org>
- Sascha Hauer <s.hauer@pengutronix.de>
- Fabio Estevam <festevam@gmail.com>
$ref: thermal-sensor.yaml#
properties:
compatible:
description: |
The version of the device is determined by the TMU IP Block Revision
Register (IPBRR0) at offset 0x0BF8.
Table of correspondences between IPBRR0 values and example chips:
Value Device
---------- -----
0x01900102 T1040
enum:
- fsl,qoriq-tmu
- fsl,imx8mq-tmu
- fsl,imx93-tmu
reg:
maxItems: 1
interrupts:
maxItems: 1
fsl,tmu-range:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: |
The values to be programmed into TTRnCR, as specified by the SoC
reference manual. The first cell is TTR0CR, the second is TTR1CR, etc.
minItems: 2
maxItems: 7
fsl,tmu-calibration:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
description: |
A list of cell pairs containing temperature calibration data, as
specified by the SoC reference manual. The first cell of each pair
is the value to be written to TTCFGR, and the second is the value
to be written to TSCFGR.
items:
items:
- description: value for TTCFGR
- description: value for TSCFGR
minItems: 1
maxItems: 64
little-endian:
description: |
boolean, if present, the TMU registers are little endian. If absent,
the default is big endian.
type: boolean
clocks:
maxItems: 1
"#thermal-sensor-cells":
const: 1
required:
- compatible
- reg
- interrupts
- fsl,tmu-range
- fsl,tmu-calibration
unevaluatedProperties: false
examples:
- |
tmu@f0000 {
compatible = "fsl,qoriq-tmu";
reg = <0xf0000 0x1000>;
interrupts = <18 2 0 0>;
fsl,tmu-range = <0x000a0000 0x00090026 0x0008004a 0x0001006a>;
fsl,tmu-calibration = <0x00000000 0x00000025>,
<0x00000001 0x00000028>,
<0x00000002 0x0000002d>,
<0x00000003 0x00000031>,
<0x00000004 0x00000036>,
<0x00000005 0x0000003a>,
<0x00000006 0x00000040>,
<0x00000007 0x00000044>,
<0x00000008 0x0000004a>,
<0x00000009 0x0000004f>,
<0x0000000a 0x00000054>,
<0x00010000 0x0000000d>,
<0x00010001 0x00000013>,
<0x00010002 0x00000019>,
<0x00010003 0x0000001f>,
<0x00010004 0x00000025>,
<0x00010005 0x0000002d>,
<0x00010006 0x00000033>,
<0x00010007 0x00000043>,
<0x00010008 0x0000004b>,
<0x00010009 0x00000053>,
<0x00020000 0x00000010>,
<0x00020001 0x00000017>,
<0x00020002 0x0000001f>,
<0x00020003 0x00000029>,
<0x00020004 0x00000031>,
<0x00020005 0x0000003c>,
<0x00020006 0x00000042>,
<0x00020007 0x0000004d>,
<0x00020008 0x00000056>,
<0x00030000 0x00000012>,
<0x00030001 0x0000001d>;
#thermal-sensor-cells = <1>;
};
@@ -0,0 +1,153 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2020 Renesas Electronics Corp.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/rcar-gen3-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas R-Car Gen3 Thermal Sensor
description:
On most R-Car Gen3 and later SoCs, the thermal sensor controllers (TSC)
control the thermal sensors (THS) which are the analog circuits for
measuring temperature (Tj) inside the LSI.
maintainers:
- Niklas Söderlund <niklas.soderlund@ragnatech.se>
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- renesas,r8a774a1-thermal # RZ/G2M
- renesas,r8a774b1-thermal # RZ/G2N
- renesas,r8a774e1-thermal # RZ/G2H
- renesas,r8a7795-thermal # R-Car H3
- renesas,r8a7796-thermal # R-Car M3-W
- renesas,r8a77961-thermal # R-Car M3-W+
- renesas,r8a77965-thermal # R-Car M3-N
- renesas,r8a77980-thermal # R-Car V3H
- renesas,r8a779a0-thermal # R-Car V3U
- renesas,r8a779f0-thermal # R-Car S4-8
- renesas,r8a779g0-thermal # R-Car V4H
- renesas,r8a779h0-thermal # R-Car V4M
reg: true
interrupts:
items:
- description: TEMP1 interrupt
- description: TEMP2 interrupt
- description: TEMP3 interrupt
clocks:
maxItems: 1
power-domains:
maxItems: 1
resets:
maxItems: 1
"#thermal-sensor-cells":
const: 1
required:
- compatible
- reg
- clocks
- power-domains
- resets
if:
properties:
compatible:
contains:
enum:
- renesas,r8a779a0-thermal
then:
properties:
reg:
items:
- description: TSC0 registers
- description: TSC1 registers
- description: TSC2 registers
- description: TSC3 registers
- description: TSC4 registers
else:
properties:
reg:
minItems: 2
items:
- description: TSC1 registers
- description: TSC2 registers
- description: TSC3 registers
- description: TSC4 registers
if:
not:
properties:
compatible:
contains:
enum:
- renesas,r8a779f0-thermal
- renesas,r8a779g0-thermal
- renesas,r8a779h0-thermal
then:
required:
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/r8a7795-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7795-sysc.h>
tsc: thermal@e6198000 {
compatible = "renesas,r8a7795-thermal";
reg = <0xe6198000 0x100>,
<0xe61a0000 0x100>,
<0xe61a8000 0x100>;
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 522>;
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
resets = <&cpg 522>;
#thermal-sensor-cells = <1>;
};
thermal-zones {
sensor_thermal: sensor-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsc 0>;
trips {
sensor1_crit: sensor1-crit {
temperature = <90000>;
hysteresis = <2000>;
type = "critical";
};
};
};
};
- |
#include <dt-bindings/clock/r8a779a0-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a779a0-sysc.h>
tsc_r8a779a0: thermal@e6190000 {
compatible = "renesas,r8a779a0-thermal";
reg = <0xe6190000 0x200>,
<0xe6198000 0x200>,
<0xe61a0000 0x200>,
<0xe61a8000 0x200>,
<0xe61b0000 0x200>;
clocks = <&cpg CPG_MOD 919>;
power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
resets = <&cpg 919>;
#thermal-sensor-cells = <1>;
};
@@ -0,0 +1,155 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2020 Renesas Electronics Corp.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/rcar-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas R-Car Thermal
maintainers:
- Niklas Söderlund <niklas.soderlund@ragnatech.se>
properties:
compatible:
oneOf:
- items:
- enum:
- renesas,thermal-r8a73a4 # R-Mobile APE6
- renesas,thermal-r8a7779 # R-Car H1
- const: renesas,rcar-thermal # Generic without thermal-zone
- items:
- enum:
- renesas,thermal-r8a7742 # RZ/G1H
- renesas,thermal-r8a7743 # RZ/G1M
- renesas,thermal-r8a7744 # RZ/G1N
- const: renesas,rcar-gen2-thermal # Generic thermal-zone
- items:
- enum:
- renesas,thermal-r8a7790 # R-Car H2
- renesas,thermal-r8a7791 # R-Car M2-W
- renesas,thermal-r8a7792 # R-Car V2H
- renesas,thermal-r8a7793 # R-Car M2-N
- const: renesas,rcar-gen2-thermal # Generic thermal-zone
- const: renesas,rcar-thermal # Generic without thermal-zone
- items:
- enum:
- renesas,thermal-r8a774c0 # RZ/G2E
- renesas,thermal-r8a77970 # R-Car V3M
- renesas,thermal-r8a77990 # R-Car E3
- renesas,thermal-r8a77995 # R-Car D3
reg:
description:
Address ranges of the thermal registers. If more then one range is given
the first one must be the common registers followed by each sensor
according to the datasheet.
minItems: 1
maxItems: 4
interrupts:
minItems: 1
maxItems: 3
clocks:
maxItems: 1
power-domains:
maxItems: 1
resets:
maxItems: 1
"#thermal-sensor-cells":
const: 0
required:
- compatible
- reg
allOf:
- if:
not:
properties:
compatible:
contains:
enum:
- renesas,thermal-r8a73a4 # R-Mobile APE6
- renesas,thermal-r8a7779 # R-Car H1
then:
required:
- resets
- '#thermal-sensor-cells'
- if:
not:
properties:
compatible:
contains:
const: renesas,thermal-r8a7779 # R-Car H1
then:
required:
- interrupts
- clocks
- power-domains
additionalProperties: false
examples:
# Example (non interrupt support)
- |
thermal@ffc48000 {
compatible = "renesas,thermal-r8a7779", "renesas,rcar-thermal";
reg = <0xffc48000 0x38>;
};
# Example (interrupt support)
- |
#include <dt-bindings/clock/r8a73a4-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
thermal@e61f0000 {
compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal";
reg = <0xe61f0000 0x14>, <0xe61f0100 0x38>,
<0xe61f0200 0x38>, <0xe61f0300 0x38>;
interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp5_clks R8A73A4_CLK_THERMAL>;
power-domains = <&pd_c5>;
};
# Example (with thermal-zone)
- |
#include <dt-bindings/clock/r8a7790-cpg-mssr.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/r8a7790-sysc.h>
thermal: thermal@e61f0000 {
compatible = "renesas,thermal-r8a7790",
"renesas,rcar-gen2-thermal",
"renesas,rcar-thermal";
reg = <0xe61f0000 0x10>, <0xe61f0100 0x38>;
interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 522>;
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
resets = <&cpg 522>;
#thermal-sensor-cells = <0>;
};
thermal-zones {
cpu_thermal: cpu-thermal {
polling-delay-passive = <1000>;
polling-delay = <5000>;
thermal-sensors = <&thermal>;
trips {
cpu-crit {
temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
};
cooling-maps {
};
};
};
@@ -0,0 +1,93 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/renesas,r9a08g045-tsu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas RZ/G3S Thermal Sensor Unit
description:
The thermal sensor unit (TSU) measures the temperature(Tj) inside
the LSI.
maintainers:
- Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
$ref: thermal-sensor.yaml#
properties:
compatible:
const: renesas,r9a08g045-tsu
reg:
maxItems: 1
clocks:
items:
- description: TSU module clock
power-domains:
maxItems: 1
resets:
items:
- description: TSU module reset
io-channels:
items:
- description: ADC channel which reports the TSU temperature
io-channel-names:
items:
- const: tsu
"#thermal-sensor-cells":
const: 0
required:
- compatible
- reg
- clocks
- power-domains
- resets
- io-channels
- io-channel-names
- '#thermal-sensor-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/r9a08g045-cpg.h>
tsu: thermal@10059000 {
compatible = "renesas,r9a08g045-tsu";
reg = <0x10059000 0x1000>;
clocks = <&cpg CPG_MOD R9A08G045_TSU_PCLK>;
resets = <&cpg R9A08G045_TSU_PRESETN>;
power-domains = <&cpg>;
#thermal-sensor-cells = <0>;
io-channels = <&adc 8>;
io-channel-names = "tsu";
};
thermal-zones {
cpu-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsu>;
trips {
sensor_crit: sensor-crit {
temperature = <125000>;
hysteresis = <1000>;
type = "critical";
};
target: trip-point {
temperature = <100000>;
hysteresis = <1000>;
type = "passive";
};
};
};
};
@@ -0,0 +1,117 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/renesas,r9a09g047-tsu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas RZ/G3E Temperature Sensor Unit (TSU)
maintainers:
- John Madieu <john.madieu.xa@bp.renesas.com>
description:
The Temperature Sensor Unit (TSU) is an integrated thermal sensor that
monitors the chip temperature on the Renesas RZ/G3E SoC. The TSU provides
real-time temperature measurements for thermal management.
properties:
compatible:
oneOf:
- enum:
- renesas,r9a09g047-tsu # RZ/G3E
- renesas,r9a09g077-tsu # RZ/T2H
- items:
- enum:
- renesas,r9a09g056-tsu # RZ/V2N
- renesas,r9a09g057-tsu # RZ/V2H
- const: renesas,r9a09g047-tsu # RZ/G3E
- items:
- const: renesas,r9a09g087-tsu # RZ/N2H
- const: renesas,r9a09g077-tsu # RZ/T2H
reg:
maxItems: 1
clocks:
maxItems: 1
resets:
maxItems: 1
power-domains:
maxItems: 1
interrupts:
items:
- description: Conversion complete interrupt signal (pulse)
- description: Comparison result interrupt signal (level)
interrupt-names:
items:
- const: adi
- const: adcmpi
"#thermal-sensor-cells":
const: 0
renesas,tsu-trim:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: phandle to system controller
- description: offset of trim registers
description:
Phandle and offset to the system controller containing the TSU
calibration trim values. The offset points to the first trim register
(OTPTSU1TRMVAL0), with the second trim register (OTPTSU1TRMVAL1) located
at offset + 4.
required:
- compatible
- reg
- clocks
- power-domains
- interrupts
- interrupt-names
- "#thermal-sensor-cells"
allOf:
- if:
properties:
compatible:
contains:
const: renesas,r9a09g047-tsu
then:
required:
- resets
- renesas,tsu-trim
- if:
properties:
compatible:
contains:
const: renesas,r9a09g077-tsu
then:
properties:
resets: false
renesas,tsu-trim: false
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/renesas,r9a09g047-cpg.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
thermal-sensor@14002000 {
compatible = "renesas,r9a09g047-tsu";
reg = <0x14002000 0x1000>;
clocks = <&cpg CPG_MOD 0x10a>;
resets = <&cpg 0xf8>;
power-domains = <&cpg>;
interrupts = <GIC_SPI 250 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "adi", "adcmpi";
#thermal-sensor-cells = <0>;
renesas,tsu-trim = <&sys 0x330>;
};
@@ -0,0 +1,178 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/rockchip-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Temperature Sensor ADC (TSADC) on Rockchip SoCs
maintainers:
- Heiko Stuebner <heiko@sntech.de>
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- rockchip,px30-tsadc
- rockchip,rk3228-tsadc
- rockchip,rk3288-tsadc
- rockchip,rk3328-tsadc
- rockchip,rk3368-tsadc
- rockchip,rk3399-tsadc
- rockchip,rk3568-tsadc
- rockchip,rk3576-tsadc
- rockchip,rk3588-tsadc
- rockchip,rv1108-tsadc
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
minItems: 2
maxItems: 2
clock-names:
items:
- const: tsadc
- const: apb_pclk
nvmem-cells:
items:
- description: cell handle to where the trim's base temperature is stored
- description:
cell handle to where the trim's tenths of Celsius base value is stored
nvmem-cell-names:
items:
- const: trim_base
- const: trim_base_frac
resets:
minItems: 1
maxItems: 3
reset-names:
minItems: 1
items:
- const: tsadc-apb
- const: tsadc
- const: tsadc-phy
"#address-cells":
const: 1
"#size-cells":
const: 0
"#thermal-sensor-cells":
const: 1
rockchip,grf:
description: The phandle of the syscon node for the general register file.
$ref: /schemas/types.yaml#/definitions/phandle
rockchip,hw-tshut-temp:
description: The hardware-controlled shutdown temperature value.
$ref: /schemas/types.yaml#/definitions/uint32
rockchip,hw-tshut-mode:
description: The hardware-controlled shutdown mode 0:CRU 1:GPIO.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
rockchip,hw-tshut-polarity:
description: The hardware-controlled active polarity 0:LOW 1:HIGH.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
patternProperties:
"@[0-9a-f]+$":
type: object
properties:
reg:
maxItems: 1
description: sensor ID, a.k.a. channel number
nvmem-cells:
items:
- description: handle of cell containing calibration data
nvmem-cell-names:
items:
- const: trim
required:
- reg
unevaluatedProperties: false
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- resets
allOf:
- if:
properties:
compatible:
contains:
enum:
- rockchip,px30-tsadc
- rockchip,rk3366-tsadc
- rockchip,rk3399-tsadc
- rockchip,rk3568-tsadc
then:
required:
- rockchip,grf
else:
properties:
rockchip,grf: false
- if:
not:
properties:
compatible:
contains:
const: rockchip,rk3568-tsadc
then:
properties:
nvmem-cells: false
nvmem-cell-names: false
- if:
not:
properties:
compatible:
contains:
enum:
- rockchip,rk3568-tsadc
- rockchip,rk3576-tsadc
then:
patternProperties:
"@[0-9a-f]+$": false
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/rk3288-cru.h>
tsadc: tsadc@ff280000 {
compatible = "rockchip,rk3288-tsadc";
reg = <0xff280000 0x100>;
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
clock-names = "tsadc", "apb_pclk";
resets = <&cru SRST_TSADC>;
reset-names = "tsadc-apb";
#thermal-sensor-cells = <1>;
rockchip,hw-tshut-temp = <95000>;
rockchip,hw-tshut-mode = <0>;
rockchip,hw-tshut-polarity = <0>;
};
@@ -0,0 +1,79 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/rzg2l-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas RZ/G2L Thermal Sensor Unit
description:
On RZ/G2L SoCs, the thermal sensor unit (TSU) measures the
temperature(Tj) inside the LSI.
maintainers:
- Biju Das <biju.das.jz@bp.renesas.com>
$ref: thermal-sensor.yaml#
properties:
compatible:
items:
- enum:
- renesas,r9a07g043-tsu # RZ/G2UL and RZ/Five
- renesas,r9a07g044-tsu # RZ/G2{L,LC}
- renesas,r9a07g054-tsu # RZ/V2L
- const: renesas,rzg2l-tsu
reg:
maxItems: 1
clocks:
maxItems: 1
power-domains:
maxItems: 1
resets:
maxItems: 1
"#thermal-sensor-cells":
const: 1
required:
- compatible
- reg
- clocks
- power-domains
- resets
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/r9a07g044-cpg.h>
tsu: thermal@10059400 {
compatible = "renesas,r9a07g044-tsu",
"renesas,rzg2l-tsu";
reg = <0x10059400 0x400>;
clocks = <&cpg CPG_MOD R9A07G044_TSU_PCLK>;
resets = <&cpg R9A07G044_TSU_PRESETN>;
power-domains = <&cpg>;
#thermal-sensor-cells = <1>;
};
thermal-zones {
cpu-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsu 0>;
trips {
sensor_crit: sensor-crit {
temperature = <125000>;
hysteresis = <1000>;
type = "critical";
};
};
};
};
@@ -0,0 +1,185 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/samsung,exynos-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung Exynos SoC Thermal Management Unit (TMU)
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
description: |
For multi-instance tmu each instance should have an alias correctly numbered
in "aliases" node.
properties:
compatible:
enum:
- samsung,exynos3250-tmu
- samsung,exynos4412-tmu
- samsung,exynos4210-tmu
- samsung,exynos5250-tmu
- samsung,exynos5260-tmu
# For TMU channel 0, 1 on Exynos5420:
- samsung,exynos5420-tmu
# For TMU channels 2, 3 and 4 of Exynos5420:
- samsung,exynos5420-tmu-ext-triminfo
- samsung,exynos5433-tmu
- samsung,exynos7-tmu
clocks:
minItems: 1
maxItems: 3
clock-names:
minItems: 1
maxItems: 3
interrupts:
description: |
The Exynos TMU supports generating interrupts when reaching given
temperature thresholds. Number of supported thermal trip points depends
on the SoC (only first trip points defined in DT will be configured)::
- most of SoC: 4
- samsung,exynos5433-tmu: 8
- samsung,exynos7-tmu: 8
maxItems: 1
reg:
items:
- description: TMU instance registers.
- description: |
Shared TMU registers.
Note:: On Exynos5420, the TRIMINFO register is misplaced for TMU
channels 2, 3 and 4 Use "samsung,exynos5420-tmu-ext-triminfo" in
cases, there is a misplaced register, also provide clock to access
that base.
TRIMINFO at 0x1006c000 contains data for TMU channel 3
TRIMINFO at 0x100a0000 contains data for TMU channel 4
TRIMINFO at 0x10068000 contains data for TMU channel 2
minItems: 1
'#thermal-sensor-cells':
const: 0
vtmu-supply:
description: The regulator node supplying voltage to TMU.
required:
- compatible
- clocks
- clock-names
- interrupts
- reg
allOf:
- $ref: /schemas/thermal/thermal-sensor.yaml
- if:
properties:
compatible:
contains:
const: samsung,exynos5420-tmu-ext-triminfo
then:
properties:
clocks:
items:
- description:
Operational clock for TMU channel.
- description:
Optional clock to access the shared registers (e.g. TRIMINFO) of TMU
channel.
clock-names:
items:
- const: tmu_apbif
- const: tmu_triminfo_apbif
reg:
minItems: 2
maxItems: 2
- if:
properties:
compatible:
contains:
enum:
- samsung,exynos5433-tmu
- samsung,exynos7-tmu
then:
properties:
clocks:
items:
- description:
Operational clock for TMU channel.
- description:
Optional special clock for functional operation of TMU channel.
clock-names:
items:
- const: tmu_apbif
- const: tmu_sclk
reg:
minItems: 1
maxItems: 1
- if:
properties:
compatible:
contains:
enum:
- samsung,exynos3250-tmu
- samsung,exynos4412-tmu
- samsung,exynos4210-tmu
- samsung,exynos5250-tmu
- samsung,exynos5260-tmu
- samsung,exynos5420-tmu
then:
properties:
clocks:
minItems: 1
maxItems: 1
reg:
minItems: 1
maxItems: 1
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/exynos4.h>
tmu@100c0000 {
compatible = "samsung,exynos4412-tmu";
reg = <0x100C0000 0x100>;
interrupt-parent = <&combiner>;
interrupts = <2 4>;
#thermal-sensor-cells = <0>;
clocks = <&clock CLK_TMU_APBIF>;
clock-names = "tmu_apbif";
vtmu-supply = <&ldo10_reg>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
tmu@10068000 {
compatible = "samsung,exynos5420-tmu-ext-triminfo";
reg = <0x10068000 0x100>, <0x1006c000 0x4>;
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
#thermal-sensor-cells = <0>;
clocks = <&clock 318>, <&clock 318>; /* CLK_TMU */
clock-names = "tmu_apbif", "tmu_triminfo_apbif";
vtmu-supply = <&ldo7_reg>;
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
tmu@10060000 {
compatible = "samsung,exynos5433-tmu";
reg = <0x10060000 0x200>;
interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
#thermal-sensor-cells = <0>;
clocks = <&cmu_peris 3>, /* CLK_PCLK_TMU0_APBIF */
<&cmu_peris 35>; /* CLK_SCLK_TMU0 */
clock-names = "tmu_apbif", "tmu_sclk";
vtmu-supply = <&ldo3_reg>;
};
@@ -0,0 +1,55 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/socionext,uniphier-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Socionext UniPhier thermal monitor
description: |
This describes the devicetree bindings for thermal monitor supported by
PVT(Process, Voltage and Temperature) monitoring unit implemented on
Socionext UniPhier SoCs.
maintainers:
- Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- socionext,uniphier-pxs2-thermal
- socionext,uniphier-ld20-thermal
- socionext,uniphier-pxs3-thermal
- socionext,uniphier-nx1-thermal
interrupts:
maxItems: 1
"#thermal-sensor-cells":
const: 0
socionext,tmod-calibration:
$ref: /schemas/types.yaml#/definitions/uint32-array
maxItems: 2
description:
A pair of calibrated values referred from PVT, in case that the values
aren't set on SoC, like a reference board.
required:
- compatible
- interrupts
unevaluatedProperties: false
examples:
- |
// The UniPhier thermal should be a subnode of a "syscon" compatible node.
#include <dt-bindings/interrupt-controller/arm-gic.h>
pvtctl: thermal-sensor {
compatible = "socionext,uniphier-ld20-thermal";
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
#thermal-sensor-cells = <0>;
};
@@ -0,0 +1,76 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/spacemit,k1-tsensor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SpacemiT K1 Thermal Sensor
description:
The SpacemiT K1 Thermal Sensor monitors the temperature of the SoC
using multiple internal sensors (e.g., soc, package, gpu, clusters).
maintainers:
- Shuwei Wu <shuwei.wu@mailbox.org>
$ref: thermal-sensor.yaml#
properties:
compatible:
const: spacemit,k1-tsensor
reg:
maxItems: 1
clocks:
items:
- description: Core clock for thermal sensor
- description: Bus clock for thermal sensor
clock-names:
items:
- const: core
- const: bus
interrupts:
maxItems: 1
resets:
items:
- description: Reset for the thermal sensor
"#thermal-sensor-cells":
const: 1
description:
The first cell indicates the sensor ID.
0 = soc
1 = package
2 = gpu
3 = cluster0
4 = cluster1
required:
- compatible
- reg
- clocks
- clock-names
- interrupts
- resets
- "#thermal-sensor-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/spacemit,k1-syscon.h>
thermal@d4018000 {
compatible = "spacemit,k1-tsensor";
reg = <0xd4018000 0x100>;
clocks = <&syscon_apbc CLK_TSEN>,
<&syscon_apbc CLK_TSEN_BUS>;
clock-names = "core", "bus";
interrupts = <61>;
resets = <&syscon_apbc RESET_TSEN>;
#thermal-sensor-cells = <1>;
};
@@ -0,0 +1,112 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/sprd-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Spreadtrum thermal sensor controller
maintainers:
- Orson Zhai <orsonzhai@gmail.com>
- Baolin Wang <baolin.wang7@gmail.com>
- Chunyan Zhang <zhang.lyra@gmail.com>
$ref: thermal-sensor.yaml#
properties:
compatible:
const: sprd,ums512-thermal
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: enable
nvmem-cells:
maxItems: 2
description:
Reference to nvmem nodes for the calibration data.
nvmem-cell-names:
items:
- const: thm_sign_cal
- const: thm_ratio_cal
"#thermal-sensor-cells":
const: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^([a-z]*-)?sensor(-section)?@[0-9]+$":
type: object
description:
Represent one thermal sensor.
properties:
reg:
description: Specify the sensor id.
maxItems: 1
nvmem-cells:
maxItems: 1
description:
Reference to an nvmem node for the calibration data.
nvmem-cell-names:
const: sen_delta_cal
required:
- reg
- nvmem-cells
- nvmem-cell-names
additionalProperties: false
required:
- compatible
- reg
- clocks
- clock-names
- nvmem-cells
- nvmem-cell-names
- "#address-cells"
- "#size-cells"
unevaluatedProperties: false
examples:
- |
thermal@32200000 {
compatible = "sprd,ums512-thermal";
reg = <0x32200000 0x10000>;
clock-names = "enable";
clocks = <&aonapb_gate 32>;
#thermal-sensor-cells = <1>;
nvmem-cells = <&thm0_sign>, <&thm0_ratio>;
nvmem-cell-names = "thm_sign_cal", "thm_ratio_cal";
#address-cells = <1>;
#size-cells = <0>;
prometheus-sensor@0 {
reg = <0>;
nvmem-cells = <&thm0_sen0>;
nvmem-cell-names = "sen_delta_cal";
};
ank-sensor@1 {
reg = <1>;
nvmem-cells = <&thm0_sen1>;
nvmem-cell-names = "sen_delta_cal";
};
};
...
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/st,stih407-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STi digital thermal sensor (DTS)
maintainers:
- Patrice Chotard <patrice.chotard@foss.st.com>
- Lee Jones <lee@kernel.org>
allOf:
- $ref: thermal-sensor.yaml
properties:
compatible:
const: st,stih407-thermal
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: thermal
interrupts:
description:
For thermal sensors for which no interrupt has been defined, a polling
delay of 1000ms will be used to read the temperature from device.
maxItems: 1
'#thermal-sensor-cells':
const: 0
required:
- compatible
- reg
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
temperature-sensor@91a0000 {
compatible = "st,stih407-thermal";
reg = <0x91a0000 0x28>;
clock-names = "thermal";
clocks = <&CLK_SYSIN>;
interrupts = <GIC_SPI 205 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <0>;
};
...
@@ -0,0 +1,80 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/st,stm32-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STM32 digital thermal sensor (DTS)
maintainers:
- Pascal Paillet <p.paillet@foss.st.com>
$ref: thermal-sensor.yaml#
properties:
compatible:
const: st,stm32-thermal
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: pclk
"#thermal-sensor-cells":
const: 0
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
dts: thermal@50028000 {
compatible = "st,stm32-thermal";
reg = <0x50028000 0x100>;
clocks = <&rcc TMPSENS>;
clock-names = "pclk";
#thermal-sensor-cells = <0>;
interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
};
thermal-zones {
cpu_thermal: cpu-thermal {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&dts>;
trips {
cpu_alert1: cpu-alert1 {
temperature = <85000>;
hysteresis = <0>;
type = "passive";
};
cpu_crit: cpu-crit {
temperature = <120000>;
hysteresis = <0>;
type = "critical";
};
};
cooling-maps {
};
};
};
...
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SPEAr Thermal Sensor
maintainers:
- Viresh Kumar <vireshk@kernel.org>
properties:
compatible:
const: st,thermal-spear1340
reg:
maxItems: 1
st,thermal-flags:
description: flags used to enable thermal sensor
$ref: /schemas/types.yaml#/definitions/uint32
required:
- compatible
- reg
- st,thermal-flags
additionalProperties: false
examples:
- |
thermal@fc000000 {
compatible = "st,thermal-spear1340";
reg = <0xfc000000 0x1000>;
st,thermal-flags = <0x7000>;
};
@@ -0,0 +1,126 @@
# SPDX-License-Identifier: (GPL-2.0)
# Copyright 2020 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/thermal-cooling-devices.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Thermal cooling device
maintainers:
- Amit Kucheria <amitk@kernel.org>
description: |
Thermal management is achieved in devicetree by describing the sensor hardware
and the software abstraction of cooling devices and thermal zones required to
take appropriate action to mitigate thermal overload.
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 cooling devices.
There are essentially two ways to provide control on power dissipation:
- Passive cooling: by means of regulating device performance. A typical
passive cooling mechanism is a CPU that has dynamic voltage and frequency
scaling (DVFS), and uses lower frequencies as cooling states.
- Active cooling: by means of activating devices in order to remove the
dissipated heat, e.g. regulating fan speeds.
Any cooling device has a range of cooling states (i.e. different levels of
heat dissipation). They also have a way to determine the state of cooling in
which the device is. For example, a fan's cooling states correspond to the
different fan speeds possible. Cooling states are referred to by single
unsigned integers, where larger numbers mean greater heat dissipation. The
precise set of cooling states associated with a device should be defined in
a particular device's binding.
select: true
properties:
"#cooling-cells":
description:
Must be 2 or 3. If 2, specifies minimum and maximum cooling state used in
the cooling-maps reference. The first cell is the minimum cooling state
and the second cell is the maximum cooling state requested.
If 3, the first cell specifies the thermal mitigation device specifier
index for devices that support multiple thermal mitigation mechanisms.
The two other cells are respectively the minimum cooling state and the
maximum cooling state.
enum: [2, 3]
additionalProperties: true
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/thermal/thermal.h>
// Example 1: Cpufreq cooling device on CPU0
cpus {
#address-cells = <2>;
#size-cells = <0>;
CPU0: cpu@0 {
device_type = "cpu";
compatible = "qcom,kryo385";
reg = <0x0 0x0>;
enable-method = "psci";
cpu-idle-states = <&LITTLE_CPU_SLEEP_0>,
<&LITTLE_CPU_SLEEP_1>,
<&CLUSTER_SLEEP_0>;
capacity-dmips-mhz = <607>;
dynamic-power-coefficient = <100>;
qcom,freq-domain = <&cpufreq_hw 0>;
#cooling-cells = <2>;
next-level-cache = <&L2_0>;
L2_0: l2-cache {
compatible = "cache";
cache-unified;
cache-level = <2>;
next-level-cache = <&L3_0>;
L3_0: l3-cache {
compatible = "cache";
cache-unified;
cache-level = <3>;
};
};
};
/* ... */
};
/* ... */
thermal-zones {
cpu0-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsens0 1>;
trips {
cpu0_alert0: trip-point0 {
temperature = <90000>;
hysteresis = <2000>;
type = "passive";
};
};
cooling-maps {
map0 {
trip = <&cpu0_alert0>;
/* Corresponds to 1000MHz in OPP table */
cooling-device = <&CPU0 5 5>;
};
};
};
/* ... */
};
...
@@ -0,0 +1,152 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2020 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/thermal-idle.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Thermal idle cooling device
maintainers:
- Daniel Lezcano <daniel.lezcano@linaro.org>
description: |
The thermal idle cooling device allows the system to passively
mitigate the temperature on the device by injecting idle cycles,
forcing it to cool down.
This binding describes the thermal idle node.
properties:
$nodename:
const: thermal-idle
description: |
A thermal-idle node describes the idle cooling device properties to
cool down efficiently the attached thermal zone.
'#cooling-cells':
const: 2
description: |
Must be 2, in order to specify minimum and maximum cooling state used in
the cooling-maps reference. The first cell is the minimum cooling state
and the second cell is the maximum cooling state requested.
duration-us:
description: |
The idle duration in microsecond the device should cool down.
exit-latency-us:
description: |
The exit latency constraint in microsecond for the injected idle state
for the device. It is the latency constraint to apply when selecting an
idle state from among all the present ones.
required:
- '#cooling-cells'
additionalProperties: false
examples:
- |
/{
#include <dt-bindings/thermal/thermal.h>
compatible = "foo";
model = "foo";
#address-cells = <1>;
#size-cells = <1>;
// Example: Combining idle cooling device on big CPUs with cpufreq cooling device
cpus {
#address-cells = <2>;
#size-cells = <0>;
/* ... */
cpu_b0: cpu@100 {
device_type = "cpu";
compatible = "arm,cortex-a72";
reg = <0x0 0x100>;
enable-method = "psci";
capacity-dmips-mhz = <1024>;
dynamic-power-coefficient = <436>;
#cooling-cells = <2>; /* min followed by max */
cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>;
cpu_b0_therm: thermal-idle {
#cooling-cells = <2>;
duration-us = <10000>;
exit-latency-us = <500>;
};
};
cpu_b1: cpu@101 {
device_type = "cpu";
compatible = "arm,cortex-a72";
reg = <0x0 0x101>;
enable-method = "psci";
capacity-dmips-mhz = <1024>;
dynamic-power-coefficient = <436>;
#cooling-cells = <2>; /* min followed by max */
cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>;
cpu_b1_therm: thermal-idle {
#cooling-cells = <2>;
duration-us = <10000>;
exit-latency-us = <500>;
};
};
/* ... */
};
/* ... */
thermal_zones {
cpu_thermal: cpu {
polling-delay-passive = <100>;
polling-delay = <1000>;
/* ... */
trips {
cpu_alert0: cpu_alert0 {
temperature = <65000>;
hysteresis = <2000>;
type = "passive";
};
cpu_alert1: cpu_alert1 {
temperature = <70000>;
hysteresis = <2000>;
type = "passive";
};
cpu_alert2: cpu_alert2 {
temperature = <75000>;
hysteresis = <2000>;
type = "passive";
};
cpu_crit: cpu_crit {
temperature = <95000>;
hysteresis = <2000>;
type = "critical";
};
};
cooling-maps {
map0 {
trip = <&cpu_alert1>;
cooling-device = <&cpu_b0_therm 0 15 >,
<&cpu_b1_therm 0 15>;
};
map1 {
trip = <&cpu_alert2>;
cooling-device = <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
};
};
};
@@ -0,0 +1,77 @@
# 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
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]
required:
- "#thermal-sensor-cells"
additionalProperties: true
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
// Example 1: SDM845 TSENS
soc: soc {
#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>;
};
};
...
@@ -0,0 +1,357 @@
# SPDX-License-Identifier: (GPL-2.0)
# Copyright 2020 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/thermal-zones.yaml#
$schema: http://devicetree.org/meta-schemas/base.yaml#
title: Thermal zone
maintainers:
- Daniel Lezcano <daniel.lezcano@linaro.org>
description: |
Thermal management is achieved in devicetree by describing the sensor hardware
and the software abstraction of cooling devices and 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-zones.
The polling-delay properties of a thermal-zone are bound to the maximum dT/dt
(temperature derivative over time) in two situations for a thermal zone:
1. when passive cooling is activated (polling-delay-passive)
2. when the zone just needs to be monitored (polling-delay) or when
active cooling is activated.
The maximum dT/dt is highly bound to hardware power consumption and
dissipation capability. The delays should be chosen to account for said
max dT/dt, such that a device does not cross several trip boundaries
unexpectedly between polls. Choosing the right polling delays shall avoid
having the device in temperature ranges that may damage the silicon structures
and reduce silicon lifetime.
properties:
$nodename:
const: thermal-zones
description:
A /thermal-zones node is required in order to use the thermal framework to
manage input from the various thermal zones in the system in order to
mitigate thermal overload conditions. It does not represent a real device
in the system, but acts as a container to link a thermal sensor device,
platform-data regarding temperature thresholds and the mitigation actions
to take when the temperature crosses those thresholds.
patternProperties:
# Node name is limited in size due to Linux kernel requirements - 19
# characters in total (see THERMAL_NAME_LENGTH, including terminating NUL
# byte):
"^[a-zA-Z][a-zA-Z0-9\\-]{1,10}-thermal$":
type: object
description:
Each thermal zone node contains information about how frequently it
must be checked, the sensor responsible for reporting temperature for
this zone, one sub-node containing the various trip points for this
zone and one sub-node containing all the zone cooling-maps.
properties:
polling-delay:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The maximum number of milliseconds to wait between polls when
checking this thermal zone. Setting this to 0 disables the polling
timers setup by the thermal framework and assumes that the thermal
sensors in this zone support interrupts.
polling-delay-passive:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The maximum number of milliseconds to wait between polls when
checking this thermal zone while doing passive cooling. Setting
this to 0 disables the polling timers setup by the thermal
framework and assumes that the thermal sensors in this zone
support interrupts.
critical-action:
$ref: /schemas/types.yaml#/definitions/string
description: |
The action the OS should perform after the critical temperature is reached.
If the property is not set, it is up to the system to select the correct
action. The recommended and preferred default is shutdown.
Choose 'reboot' with care, as the hardware may be in thermal stress,
thus leading to infinite reboots that may cause damage to the hardware.
Make sure the firmware/bootloader will act as the last resort and take
over the thermal control.
enum:
- shutdown
- reboot
thermal-sensors:
$ref: /schemas/types.yaml#/definitions/phandle-array
maxItems: 1
description:
The thermal sensor phandle and sensor specifier used to monitor this
thermal zone.
coefficients:
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
An array of integers containing the coefficients of a linear equation
that binds all the sensors listed in this thermal zone.
The linear equation used is as follows,
z = c0 * x0 + c1 * x1 + ... + c(n-1) * x(n-1) + cn
where c0, c1, .., cn are the coefficients.
Coefficients default to 1 in case this property is not specified. The
coefficients are ordered and are matched with sensors by means of the
sensor ID. Additional coefficients are interpreted as constant offset.
sustainable-power:
$ref: /schemas/types.yaml#/definitions/uint32
description:
An estimate of the sustainable power (in mW) that this thermal zone
can dissipate at the desired control temperature. For reference, the
sustainable power of a 4-inch phone is typically 2000mW, while on a
10-inch tablet is around 4500mW.
trips:
type: object
description:
This node describes a set of points in the temperature domain at
which the thermal framework needs to take action. The actions to
be taken are defined in another node called cooling-maps.
additionalProperties:
type: object
additionalProperties: false
properties:
temperature:
$ref: /schemas/types.yaml#/definitions/int32
minimum: -273000
maximum: 200000
description:
An integer expressing the trip temperature in millicelsius.
hysteresis:
$ref: /schemas/types.yaml#/definitions/uint32
description:
An unsigned integer expressing the hysteresis delta with
respect to the trip temperature property above, also in
millicelsius. Any cooling action initiated by the framework is
maintained until the temperature falls below
(trip temperature - hysteresis). This potentially prevents a
situation where the trip gets constantly triggered soon after
cooling action is removed.
type:
$ref: /schemas/types.yaml#/definitions/string
enum:
- active # enable active cooling e.g. fans
- passive # enable passive cooling e.g. throttling cpu
- hot # send notification to driver
- critical # send notification to driver, trigger shutdown
description: |
There are four valid trip types: active, passive, hot,
critical.
The critical trip type is used to set the maximum
temperature threshold above which the HW becomes
unstable and underlying firmware might even trigger a
reboot. Hitting the critical threshold triggers a system
shutdown.
The hot trip type can be used to send a notification to
the thermal driver (if a .notify callback is registered).
The action to be taken is left to the driver.
The passive trip type can be used to slow down HW e.g. run
the CPU, GPU, bus at a lower frequency.
The active trip type can be used to control other HW to
help in cooling e.g. fans can be sped up or slowed down
required:
- temperature
- hysteresis
- type
cooling-maps:
type: object
additionalProperties: false
description:
This node describes the action to be taken when a thermal zone
crosses one of the temperature thresholds described in the trips
node. The action takes the form of a mapping relation between a
trip and the target cooling device state.
patternProperties:
"^map[-a-zA-Z0-9]*$":
type: object
properties:
trip:
$ref: /schemas/types.yaml#/definitions/phandle
description:
A phandle of a trip point node within this thermal zone.
cooling-device:
$ref: /schemas/types.yaml#/definitions/phandle-array
description:
A list of cooling device phandles along with the minimum
and maximum cooling state specifiers for each cooling
device. Using the THERMAL_NO_LIMIT (-1UL) constant in the
cooling-device phandle limit specifier lets the framework
use the minimum and maximum cooling state for that cooling
device automatically. If three arguments are specified,
the first argument is the cooling device specifier.
contribution:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The cooling contribution to the thermal zone of the referred
cooling device at the referred trip point. The contribution is
a ratio of the sum of all cooling contributions within a
thermal zone.
required:
- trip
- cooling-device
additionalProperties: false
required:
- thermal-sensors
additionalProperties: false
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/thermal/thermal.h>
// Example 1: SDM845 TSENS
soc {
#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>;
};
};
/* ... */
thermal-zones {
cpu0-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsens0 1>;
trips {
cpu0_alert0: trip-point0 {
temperature = <90000>;
hysteresis = <2000>;
type = "passive";
};
cpu0_alert1: trip-point1 {
temperature = <95000>;
hysteresis = <2000>;
type = "passive";
};
cpu0_crit: cpu_crit {
temperature = <110000>;
hysteresis = <1000>;
type = "critical";
};
};
cooling-maps {
map0 {
trip = <&cpu0_alert0>;
/* Corresponds to 1400MHz in OPP table */
cooling-device = <&CPU0 3 3>, <&CPU1 3 3>,
<&CPU2 3 3>, <&CPU3 3 3>;
};
map1 {
trip = <&cpu0_alert1>;
/* Corresponds to 1000MHz in OPP table */
cooling-device = <&CPU0 5 5>, <&CPU1 5 5>,
<&CPU2 5 5>, <&CPU3 5 5>;
};
};
};
/* ... */
cluster0-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsens0 5>;
trips {
cluster0_alert0: trip-point0 {
temperature = <90000>;
hysteresis = <2000>;
type = "hot";
};
cluster0_crit: cluster0_crit {
temperature = <110000>;
hysteresis = <2000>;
type = "critical";
};
};
};
/* ... */
gpu-top-thermal {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&tsens0 11>;
trips {
gpu1_alert0: trip-point0 {
temperature = <90000>;
hysteresis = <2000>;
type = "hot";
};
};
};
};
...
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/ti,am654-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments AM654 VTM (DTS)
maintainers:
- Keerthy <j-keerthy@ti.com>
$ref: thermal-sensor.yaml#
properties:
compatible:
const: ti,am654-vtm
reg:
maxItems: 1
power-domains:
maxItems: 1
"#thermal-sensor-cells":
const: 1
required:
- compatible
- reg
- power-domains
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/soc/ti,sci_pm_domain.h>
vtm: thermal@42050000 {
compatible = "ti,am654-vtm";
reg = <0x42050000 0x25c>;
power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>;
#thermal-sensor-cells = <1>;
};
mpu0_thermal: mpu0_thermal {
polling-delay-passive = <250>; /* milliseconds */
polling-delay = <500>; /* milliseconds */
thermal-sensors = <&vtm0 0>;
trips {
mpu0_crit: mpu0_crit {
temperature = <125000>; /* milliCelsius */
hysteresis = <2000>; /* milliCelsius */
type = "critical";
};
};
};
...
@@ -0,0 +1,97 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/ti,j72xx-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments J72XX VTM (DTS)
maintainers:
- Keerthy <j-keerthy@ti.com>
description: |
The TI K3 family of SoCs typically have a Voltage & Thermal
Management (VTM) device to control up to 8 temperature diode
sensors to measure silicon junction temperatures from different
hotspots of the chip as well as provide temperature, interrupt
and alerting information.
The following polynomial equation can then be used to convert
value returned by this device into a temperature in Celsius
Temp(C) = (-9.2627e-12) * x^4 + (6.0373e-08) * x^3 + \
(-1.7058e-04) * x^2 + (3.2512e-01) * x + (-4.9003e+01)
$ref: thermal-sensor.yaml#
properties:
compatible:
enum:
- ti,j721e-vtm
- ti,j7200-vtm
reg:
items:
- description: VTM cfg1 register space
- description: VTM cfg2 register space
- description: |
A software trimming method must be applied to some Jacinto
devices to function properly. This eFuse region provides
the information needed for these SoCs to report
temperatures accurately.
minItems: 2
power-domains:
maxItems: 1
"#thermal-sensor-cells":
const: 1
allOf:
- if:
properties:
compatible:
contains:
const: ti,j721e-vtm
then:
properties:
reg:
minItems: 3
else:
properties:
reg:
maxItems: 2
required:
- compatible
- reg
- power-domains
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/soc/ti,sci_pm_domain.h>
wkup_vtm0: thermal-sensor@42040000 {
compatible = "ti,j721e-vtm";
reg = <0x42040000 0x350>,
<0x42050000 0x350>,
<0x43000300 0x10>;
power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>;
#thermal-sensor-cells = <1>;
};
mpu_thermal: mpu-thermal {
polling-delay-passive = <250>; /* milliseconds */
polling-delay = <500>; /* milliseconds */
thermal-sensors = <&wkup_vtm0 0>;
trips {
mpu_crit: mpu-crit {
temperature = <125000>; /* milliCelsius */
hysteresis = <2000>; /* milliCelsius */
type = "critical";
};
};
};
...
@@ -0,0 +1,88 @@
* Texas Instrument OMAP SCM bandgap bindings
In the System Control Module, OMAP supplies a voltage reference
and a temperature sensor feature that are gathered in the band
gap voltage and temperature sensor (VBGAPTS) module. The band
gap provides current and voltage reference for its internal
circuits and other analog IP blocks. The analog-to-digital
converter (ADC) produces an output value that is proportional
to the silicon temperature.
Required properties:
- compatible : Should be:
- "ti,omap34xx-bandgap" : for OMAP34xx bandgap
- "ti,omap36xx-bandgap" : for OMAP36xx bandgap
- "ti,omap4430-bandgap" : for OMAP4430 bandgap
- "ti,omap4460-bandgap" : for OMAP4460 bandgap
- "ti,omap4470-bandgap" : for OMAP4470 bandgap
- "ti,omap5430-bandgap" : for OMAP5430 bandgap
- interrupts : this entry should indicate which interrupt line
the talert signal is routed to;
Specific:
- gpios : this entry should be used to inform which GPIO
line the tshut signal is routed to. The informed GPIO will
be treated as an IRQ;
- regs : this entry must also be specified and it is specific
to each bandgap version, because the mapping may change from
soc to soc, apart of depending on available features.
Example:
OMAP34xx:
bandgap {
reg = <0x48002524 0x4>;
compatible = "ti,omap34xx-bandgap";
};
OMAP36xx:
bandgap {
reg = <0x48002524 0x4>;
compatible = "ti,omap36xx-bandgap";
};
OMAP4430:
bandgap {
reg = <0x4a002260 0x4 0x4a00232C 0x4>;
compatible = "ti,omap4430-bandgap";
};
OMAP4460:
bandgap {
reg = <0x4a002260 0x4
0x4a00232C 0x4
0x4a002378 0x18>;
compatible = "ti,omap4460-bandgap";
interrupts = <0 126 4>; /* talert */
gpios = <&gpio3 22 0>; /* tshut */
};
OMAP4470:
bandgap {
reg = <0x4a002260 0x4
0x4a00232C 0x4
0x4a002378 0x18>;
compatible = "ti,omap4470-bandgap";
interrupts = <0 126 4>; /* talert */
gpios = <&gpio3 22 0>; /* tshut */
};
OMAP5430:
bandgap {
reg = <0x4a0021e0 0xc
0x4a00232c 0xc
0x4a002380 0x2c
0x4a0023C0 0x3c>;
compatible = "ti,omap5430-bandgap";
interrupts = <0 126 4>; /* talert */
};
DRA752:
bandgap {
reg = <0x4a0021e0 0xc
0x4a00232c 0xc
0x4a002380 0x2c
0x4a0023C0 0x3c
0x4a002564 0x8
0x4a002574 0x50>;
compatible = "ti,dra752-bandgap";
interrupts = <0 126 4>; /* talert */
};