Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d2bc4dd
thermal: imx_sc_thermal: Add hwmon support
Anson-Huang Mar 26, 2020
bceb564
thermal: core: Make thermal_zone_set_trips private
dlezcano Mar 31, 2020
44fc732
thermal: core: Remove pointless debug traces
dlezcano Mar 31, 2020
04fa9c8
thermal: devfreq_cooling: Use PM QoS to set frequency limits
Mar 18, 2020
8097db4
thermal: Move default governor config option to the internal header
dlezcano Apr 2, 2020
c68df44
thermal: Move struct thermal_attr to the private header
dlezcano Apr 2, 2020
33a88af
thermal: Move internal IPA functions
dlezcano Apr 2, 2020
2e7700d
thermal: Move trip point structure definition to private header
dlezcano Apr 2, 2020
f0129c2
thermal: Move get_tz_trend to the internal header
dlezcano Apr 2, 2020
06f1041
thermal: Move get_thermal_instance to the internal header
dlezcano Apr 2, 2020
6051826
thermal: Change IS_ENABLED to IFDEF in the header file
dlezcano Apr 2, 2020
7084185
thermal: Remove stubs for thermal_zone_[un]bind_cooling_device
dlezcano Apr 2, 2020
0145f67
thermal: Remove thermal_zone_device_update() stub
dlezcano Apr 2, 2020
8cb775b
thermal: Delete an error message in four functions
elfring Apr 5, 2020
3dc7487
dt-bindings: thermal: k3: Add VTM bindings documentation
Keerthyj Apr 7, 2020
48b2bce
thermal: k3: Add support for bandgap sensors
Keerthyj Apr 7, 2020
7979956
thermal: int3400_thermal: Statically initialize .get_mode()/.set_mode…
andrzejtp Apr 14, 2020
770ae40
MAINTAINERS: Add entry for Renesas R-Car thermal drivers
Feb 16, 2020
7440f51
thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR
sudipm-mukherjee Apr 24, 2020
333cff6
powercap/drivers/idle_inject: Specify idle state max latency
dlezcano Apr 29, 2020
3b25846
dt-bindings: thermal: Add the idle cooling device
dlezcano Apr 29, 2020
dfd0bda
thermal/drivers/cpuidle_cooling: Change the registration function
dlezcano Apr 29, 2020
fc7a3d9
thermal: cpuidle: Register cpuidle cooling device
dlezcano Apr 29, 2020
c1bba2c
dt-bindings: thermal: Add yaml bindings for thermal sensors
Apr 3, 2020
73c46ac
dt-bindings: thermal: Add yaml bindings for thermal cooling-devices
Apr 3, 2020
1202a44
dt-bindings: thermal: Add yaml bindings for thermal zones
Apr 3, 2020
f740e64
thermal: imx8mm: Replace zero-length array with flexible-array
GustavoARSilva May 7, 2020
869495c
thermal/core: Get rid of MODULE_* tags
May 11, 2020
3f0cfea
thermal/core: Replace module.h with export.h
May 11, 2020
231b98a
thermal/drivers/thermal_helpers: Sort headers alphabetically
May 11, 2020
3a74c88
thermal/drivers/thermal_helpers: Include export.h
May 11, 2020
1330e04
thermal/drivers/thermal_hwmon: Sort headers alphabetically
May 11, 2020
e5ebf35
thermal/drivers/thermal_hwmon: Include export.h
May 11, 2020
d5d1f6e
thermal/drivers/clock_cooling: Sort headers alphabetically
May 11, 2020
1628d4b
thermal/drivers/clock_cooling: Include export.h
May 11, 2020
5ccb451
thermal/drivers/cpufreq_cooling: Sort headers alphabetically
May 11, 2020
c65f83c
thermal/drivers/cpufreq_cooling: Replace module.h with export.h
May 11, 2020
2b61314
thermal/drivers/of-thermal: Sort headers alphabetically
May 11, 2020
6abea5d
thermal/drivers/user_space: Sort headers alphabetically
May 11, 2020
0015d9a
thermal/governors: Prefix all source files with gov_
May 11, 2020
14adf6c
thermal/of: Rename of-thermal.c
May 11, 2020
a7ff829
drivers: thermal: tsens: Merge tsens-common.c into tsens.c
Apr 29, 2020
1ab20c0
thermal: qoriq: Add platform dependencies
geertu May 7, 2020
b03628b
thermal: rcar_thermal: Clean up rcar_thermal_update_temp()
May 14, 2020
47fa116
thermal: qoriq: Update the settings for TMUv2
andynxp May 26, 2020
0ba13c7
thermal/int340x_thermal: Export GDDV
mjg59 Apr 14, 2020
006f006
thermal/int340x_thermal: Export OEM vendor variables
mjg59 Apr 14, 2020
8d485da
thermal/int340x_thermal: Don't require IDSP to exist
mjg59 Apr 14, 2020
df2fbf5
Merge tag 'thermal-v5.8-rc1' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Jun 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# 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 binding

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, 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.
const: 2

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";
next-level-cache = <&L3_0>;
L3_0: l3-cache {
compatible = "cache";
};
};
};

/* ... */

};

/* ... */

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>;
};
};
};

/* ... */
};
...
145 changes: 145 additions & 0 deletions Documentation/devicetree/bindings/thermal/thermal-idle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# 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 binding

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'

examples:
- |
#include <dt-bindings/thermal/thermal.h>

// 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>;
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>;
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 = <&{/cpus/cpu@100/thermal-idle} 0 15 >,
<&{/cpus/cpu@101/thermal-idle} 0 15>;
};

map1 {
trip = <&cpu_alert2>;
cooling-device =
<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
};
};
72 changes: 72 additions & 0 deletions Documentation/devicetree/bindings/thermal/thermal-sensor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# SPDX-License-Identifier: (GPL-2.0)
# Copyright 2020 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/thermal-sensor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Thermal sensor binding

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

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

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

This binding describes the thermal-sensor.

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

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

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

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

/* ... */

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

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