Skip to content

Commit f13ee7c

Browse files
committed
Merge tag 'thermal-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control updates from Rafael Wysocki: "These are mostly thermal driver updates, including new thermal drivers for Renesas RZ/G3S and Renesas RZ/G3E SoCs, a new power slider platform feature support in the Intel int340x thermal driver, a new Tegra114- specific SOCTHERM driver and more. There is also a Step-wise thermal governor update allowing it to start reducing cooling somewhat earlier if the temperature of the given thermal zone is falling down and a thermal testing code cleanup. Specifics: - Add new thermal driver for the Renesas RZ/G3S SoC (Claudiu Beznea) - Add new thermal driver for the Renesas RZ/G3E SoC (John Madieu) - Add support for new platform power slider feature to the Intel int340x driver (Srinivas Pandruvada). - Add new Tegra114-specific SOCTHERM driver and document Tegra114 SOCTHERM Thermal Management System in DT bindings (Svyatoslav Ryhel) - Add temperature sensor channel to thermal-generic-adc (Svyatoslav Ryhel) - Add support for per-SoC default trim values to the Renesas rcar_gen3 thermal driver, use it for adding R-Car V4H default trim values, fix a comment typo in that driver and document Gen4 support in its Kconfig entry (Marek Vasut) - Fix mapping SoCs to generic Gen4 entry in the Renesas rcar_gen3 thermal driver (Wolfram Sang) - Document the TSU unit in the r9a08g045-tsu and r9a09g047-tsu DT bindings (Claudiu Beznea, John Madieu) - Make LMH select QCOM_SCM and add missing IRQ includes to the qcom/lmh thermal driver (Dmitry Baryshkov) - Fix incorrect error message in the qcom/lmh thermal driver (Sumeet Pawnikar) - Add QCS615 compatible to tsens thermal DT bindings (Gaurav Kohli) - Document the Glymur temperature sensor in qcom-tsens thermal DT bindings (Manaf Meethalavalappu Pallikunhi) - Make k3_j72xx_bandgap thermal driver register the thermal sensor with hwmon (Michael Walle) - Tighten GRF requirements in the rockchip thermal DT bindings, silence a GRF warning in the rockchip thermal driver and unify struct rockchip_tsadc_chip format in it (Sebastian Reichel) - Update the Step-wise thermal governor to allow it to reduce the cooling level earlier if thermal zone temperature is dropping and clean it up (Rafael Wysocki) - Clean up the thermal testing code (Rafael Wysocki) - Assorted cleanups of thermal drivers (Jiapeng Chong, Salah Triki, Osama Abdelkader)" * tag 'thermal-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (37 commits) thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC dt-bindings: thermal: qcom-tsens: Document the Glymur temperature Sensor thermal/drivers/renesas/rzg3e: Add thermal driver for the Renesas RZ/G3E SoC dt-bindings: thermal: r9a09g047-tsu: Document the TSU unit thermal/drivers/thermal-generic-adc: Add temperature sensor channel dt-bindings: thermal: rockchip: Tighten grf requirements thermal/drivers/rockchip: Shut up GRF warning thermal/drivers/rockchip: Unify struct rockchip_tsadc_chip format thermal/drivers/renesas/rzg3s: Add thermal driver for the Renesas RZ/G3S SoC dt-bindings: thermal: r9a08g045-tsu: Document the TSU unit thermal/drivers/k3_j72xx_bandgap: Register sensors with hwmon thermal/drivers/rcar_gen3: Fix mapping SoCs to generic Gen4 entry thermal/drivers/tegra: Add Tegra114 specific SOCTHERM driver dt-bindings: thermal: add Tegra114 soctherm header thermal/drivers/tegra/soctherm-fuse: Prepare calibration for Tegra114 support dt-bindings: thermal: Document Tegra114 SOCTHERM Thermal Management System thermal/drivers/rcar_gen3: Document Gen4 support in Kconfig entry thermal/drivers/rcar_gen3: Fix comment typo drivers/thermal/qcom/lmh: Fix incorrect error message thermal/drivers/qcom/lmh: Add missing IRQ includes ...
2 parents 679a163 + 2085f0f commit f13ee7c

37 files changed

Lines changed: 1804 additions & 94 deletions

Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ description: The SOCTHERM IP block contains thermal sensors, support for
1818
properties:
1919
compatible:
2020
enum:
21+
- nvidia,tegra114-soctherm
2122
- nvidia,tegra124-soctherm
2223
- nvidia,tegra132-soctherm
2324
- nvidia,tegra210-soctherm
@@ -206,6 +207,7 @@ allOf:
206207
compatible:
207208
contains:
208209
enum:
210+
- nvidia,tegra114-soctherm
209211
- nvidia,tegra124-soctherm
210212
- nvidia,tegra210-soctherm
211213
- nvidia,tegra210b01-soctherm

Documentation/devicetree/bindings/thermal/qcom-tsens.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ properties:
4949
- description: v2 of TSENS
5050
items:
5151
- enum:
52+
- qcom,glymur-tsens
5253
- qcom,milos-tsens
5354
- qcom,msm8953-tsens
5455
- qcom,msm8996-tsens
5556
- qcom,msm8998-tsens
5657
- qcom,qcm2290-tsens
58+
- qcom,qcs615-tsens
5759
- qcom,sa8255p-tsens
5860
- qcom,sa8775p-tsens
5961
- qcom,sar2130p-tsens
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/thermal/renesas,r9a08g045-tsu.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Renesas RZ/G3S Thermal Sensor Unit
8+
9+
description:
10+
The thermal sensor unit (TSU) measures the temperature(Tj) inside
11+
the LSI.
12+
13+
maintainers:
14+
- Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
15+
16+
$ref: thermal-sensor.yaml#
17+
18+
properties:
19+
compatible:
20+
const: renesas,r9a08g045-tsu
21+
22+
reg:
23+
maxItems: 1
24+
25+
clocks:
26+
items:
27+
- description: TSU module clock
28+
29+
power-domains:
30+
maxItems: 1
31+
32+
resets:
33+
items:
34+
- description: TSU module reset
35+
36+
io-channels:
37+
items:
38+
- description: ADC channel which reports the TSU temperature
39+
40+
io-channel-names:
41+
items:
42+
- const: tsu
43+
44+
"#thermal-sensor-cells":
45+
const: 0
46+
47+
required:
48+
- compatible
49+
- reg
50+
- clocks
51+
- power-domains
52+
- resets
53+
- io-channels
54+
- io-channel-names
55+
- '#thermal-sensor-cells'
56+
57+
additionalProperties: false
58+
59+
examples:
60+
- |
61+
#include <dt-bindings/clock/r9a08g045-cpg.h>
62+
63+
tsu: thermal@10059000 {
64+
compatible = "renesas,r9a08g045-tsu";
65+
reg = <0x10059000 0x1000>;
66+
clocks = <&cpg CPG_MOD R9A08G045_TSU_PCLK>;
67+
resets = <&cpg R9A08G045_TSU_PRESETN>;
68+
power-domains = <&cpg>;
69+
#thermal-sensor-cells = <0>;
70+
io-channels = <&adc 8>;
71+
io-channel-names = "tsu";
72+
};
73+
74+
thermal-zones {
75+
cpu-thermal {
76+
polling-delay-passive = <250>;
77+
polling-delay = <1000>;
78+
thermal-sensors = <&tsu>;
79+
80+
trips {
81+
sensor_crit: sensor-crit {
82+
temperature = <125000>;
83+
hysteresis = <1000>;
84+
type = "critical";
85+
};
86+
target: trip-point {
87+
temperature = <100000>;
88+
hysteresis = <1000>;
89+
type = "passive";
90+
};
91+
};
92+
};
93+
};
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/thermal/renesas,r9a09g047-tsu.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Renesas RZ/G3E Temperature Sensor Unit (TSU)
8+
9+
maintainers:
10+
- John Madieu <john.madieu.xa@bp.renesas.com>
11+
12+
description:
13+
The Temperature Sensor Unit (TSU) is an integrated thermal sensor that
14+
monitors the chip temperature on the Renesas RZ/G3E SoC. The TSU provides
15+
real-time temperature measurements for thermal management.
16+
17+
properties:
18+
compatible:
19+
const: renesas,r9a09g047-tsu
20+
21+
reg:
22+
maxItems: 1
23+
24+
clocks:
25+
maxItems: 1
26+
27+
resets:
28+
maxItems: 1
29+
30+
power-domains:
31+
maxItems: 1
32+
33+
interrupts:
34+
items:
35+
- description: Conversion complete interrupt signal (pulse)
36+
- description: Comparison result interrupt signal (level)
37+
38+
interrupt-names:
39+
items:
40+
- const: adi
41+
- const: adcmpi
42+
43+
"#thermal-sensor-cells":
44+
const: 0
45+
46+
renesas,tsu-trim:
47+
$ref: /schemas/types.yaml#/definitions/phandle-array
48+
items:
49+
- items:
50+
- description: phandle to system controller
51+
- description: offset of trim registers
52+
description:
53+
Phandle and offset to the system controller containing the TSU
54+
calibration trim values. The offset points to the first trim register
55+
(OTPTSU1TRMVAL0), with the second trim register (OTPTSU1TRMVAL1) located
56+
at offset + 4.
57+
58+
required:
59+
- compatible
60+
- reg
61+
- clocks
62+
- resets
63+
- power-domains
64+
- interrupts
65+
- interrupt-names
66+
- "#thermal-sensor-cells"
67+
- renesas,tsu-trim
68+
69+
additionalProperties: false
70+
71+
examples:
72+
- |
73+
#include <dt-bindings/clock/renesas,r9a09g047-cpg.h>
74+
#include <dt-bindings/interrupt-controller/arm-gic.h>
75+
76+
thermal-sensor@14002000 {
77+
compatible = "renesas,r9a09g047-tsu";
78+
reg = <0x14002000 0x1000>;
79+
clocks = <&cpg CPG_MOD 0x10a>;
80+
resets = <&cpg 0xf8>;
81+
power-domains = <&cpg>;
82+
interrupts = <GIC_SPI 250 IRQ_TYPE_EDGE_RISING>,
83+
<GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>;
84+
interrupt-names = "adi", "adcmpi";
85+
#thermal-sensor-cells = <0>;
86+
renesas,tsu-trim = <&sys 0x330>;
87+
};

Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,21 @@ required:
119119
- resets
120120

121121
allOf:
122+
- if:
123+
properties:
124+
compatible:
125+
contains:
126+
enum:
127+
- rockchip,px30-tsadc
128+
- rockchip,rk3366-tsadc
129+
- rockchip,rk3399-tsadc
130+
- rockchip,rk3568-tsadc
131+
then:
132+
required:
133+
- rockchip,grf
134+
else:
135+
properties:
136+
rockchip,grf: false
122137
- if:
123138
not:
124139
properties:

MAINTAINERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21701,6 +21701,20 @@ S: Maintained
2170121701
F: Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml
2170221702
F: drivers/iio/potentiometer/x9250.c
2170321703

21704+
RENESAS RZ/G3S THERMAL SENSOR UNIT DRIVER
21705+
M: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
21706+
L: linux-pm@vger.kernel.org
21707+
S: Maintained
21708+
F: Documentation/devicetree/bindings/thermal/renesas,r9a08g045-tsu.yaml
21709+
F: drivers/thermal/renesas/rzg3s_thermal.c
21710+
21711+
RENESAS RZ/G3E THERMAL SENSOR UNIT DRIVER
21712+
M: John Madieu <john.madieu.xa@bp.renesas.com>
21713+
L: linux-pm@vger.kernel.org
21714+
S: Maintained
21715+
F: Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
21716+
F: drivers/thermal/renesas/rzg3e_thermal.c
21717+
2170421718
RESET CONTROLLER FRAMEWORK
2170521719
M: Philipp Zabel <p.zabel@pengutronix.de>
2170621720
S: Maintained

drivers/thermal/gov_step_wise.c

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
* If the temperature is higher than a trip point,
2121
* a. if the trend is THERMAL_TREND_RAISING, use higher cooling
2222
* state for this trip point
23-
* b. if the trend is THERMAL_TREND_DROPPING, do nothing
23+
* b. if the trend is THERMAL_TREND_DROPPING, use a lower cooling state
24+
* for this trip point, but keep the cooling state above the applicable
25+
* minimum
2426
* If the temperature is lower than a trip point,
2527
* a. if the trend is THERMAL_TREND_RAISING, do nothing
26-
* b. if the trend is THERMAL_TREND_DROPPING, use lower cooling
27-
* state for this trip point, if the cooling state already
28+
* b. if the trend is THERMAL_TREND_DROPPING, use the minimum applicable
29+
* cooling state for this trip point, or if the cooling state already
2830
* equals lower limit, deactivate the thermal instance
2931
*/
3032
static unsigned long get_target_state(struct thermal_instance *instance,
@@ -51,6 +53,17 @@ static unsigned long get_target_state(struct thermal_instance *instance,
5153
if (throttle) {
5254
if (trend == THERMAL_TREND_RAISING)
5355
return clamp(cur_state + 1, instance->lower, instance->upper);
56+
57+
/*
58+
* If the zone temperature is falling, the cooling level can
59+
* be reduced, but it should still be above the lower state of
60+
* the given thermal instance to pull the temperature further
61+
* down.
62+
*/
63+
if (trend == THERMAL_TREND_DROPPING)
64+
return clamp(cur_state - 1,
65+
min(instance->lower + 1, instance->upper),
66+
instance->upper);
5467
} else if (trend == THERMAL_TREND_DROPPING) {
5568
if (cur_state <= instance->lower)
5669
return THERMAL_NO_TARGET;
@@ -69,16 +82,14 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz,
6982
const struct thermal_trip_desc *td,
7083
int trip_threshold)
7184
{
85+
bool throttle = tz->temperature >= trip_threshold;
7286
const struct thermal_trip *trip = &td->trip;
7387
enum thermal_trend trend = get_tz_trend(tz, trip);
7488
int trip_id = thermal_zone_trip_id(tz, trip);
7589
struct thermal_instance *instance;
76-
bool throttle = false;
7790

78-
if (tz->temperature >= trip_threshold) {
79-
throttle = true;
91+
if (throttle)
8092
trace_thermal_zone_trip(tz, trip_id, trip->type);
81-
}
8293

8394
dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n",
8495
trip_id, trip->type, trip_threshold, trend, throttle);

drivers/thermal/intel/int340x_thermal/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ config INT340X_THERMAL
1212
select ACPI_THERMAL_LIB
1313
select INTEL_SOC_DTS_IOSF_CORE
1414
select INTEL_TCC
15+
select ACPI_PLATFORM_PROFILE
1516
select PROC_THERMAL_MMIO_RAPL if POWERCAP
1617
help
1718
Newer laptops and tablets that use ACPI may have thermal sensors and

drivers/thermal/intel/int340x_thermal/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_mbox.o
1414
obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_wt_req.o
1515
obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_wt_hint.o
1616
obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_power_floor.o
17+
obj-$(CONFIG_INT340X_THERMAL) += processor_thermal_soc_slider.o
1718
obj-$(CONFIG_INT3406_THERMAL) += int3406_thermal.o
1819
obj-$(CONFIG_ACPI_THERMAL_REL) += acpi_thermal_rel.o

drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,6 @@ static int acpi_parse_psvt(acpi_handle handle, int *psvt_count, struct psvt **ps
220220
int i, result = 0;
221221
struct psvt *psvts;
222222

223-
if (!acpi_has_method(handle, "PSVT"))
224-
return -ENODEV;
225-
226223
status = acpi_evaluate_object(handle, "PSVT", NULL, &buffer);
227224
if (ACPI_FAILURE(status))
228225
return -ENODEV;

0 commit comments

Comments
 (0)