Skip to content

Commit 601c1aa

Browse files
committed
Merge tag 'thermal-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more thermal control updates from Rafael Wysocki: "These are updates of assorted thermal drivers, mostly for ARM platforms, generally isolated and fairly straightforward, and the recent Intel HFI driver fix for systems without HFI support. Specifics: - Avoid clearing the HFI status bit on systems without HFI support which triggers unchecked MSR access errors (Srinivas Pandruvada) - Add sm8450 and sm8550 QCom compatible string to DT bindings (Luca Weiss, Neil Armstrong) - Use devm_platform_get_and_ioremap_resource on the ST platform to group two calls into a single one (Minghao Chi) - Use GENMASK instead of bitmaps and validate the temperature after reading it in the imx8mm_thermal driver (Marcus Folkesson) - Convert generic-adc-thermal to DT schema (Rob Herring) - Fix debug print message with inverted logic in the k3_j72xx_bandgap driver (Keerthy) - Fix memory leak on thermal_of_zone_register() failure (Ido Schimmel) - Add support for IPQ8074 in the tsens thermal driver along with the DT bindings (Robert Marko) - Fix and rework the debugfs code in the tsens driver (Christian Marangi) - Add calibration and DT documentation for the imx8mm driver (Marek Vasut) - Add DT bindings and compatible for the Mediatek SoCs mt7981 and mt7983 (Daniel Golle) - Don't show an error message if it happens at probe time while it will be deferred on the QCom SPMI ADC driver (Johan Hovold) - Add HWMon support for the imx8mm board (Alexander Stein) - Remove pointless include from the power allocator governor (Christophe JAILLET) - Add interrupt DT bindings for QCom SoCs SC8280XP, SM6350 and SM8450 (Krzysztof Kozlowski) - Fix inaccurate warning message for the QCom tsens gen2 (Luca Weiss) - Demote error log of thermal zone register to debug in the tsens QCom driver (Manivannan Sadhasivam) - Consolidate the the efuse values and the errata handling in the TI Bandgap driver (Bryan Brattlof) - Document Renesas RZ/Five as compatible with RZ/G2UL in the DT bindings (Lad Prabhakar) - Fix the irq handler return value in the LMh driver (Bjorn Andersson) - Delete empty platform remove callback from imx_sc_thermal (Uwe Kleine-König)" * tag 'thermal-6.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (35 commits) thermal/drivers/imx_sc_thermal: Drop empty platform remove function thermal/drivers/qcom/lmh: Fix irq handler return value dt-bindings: thermal: qcom-tsens: Add compatible for sm8550 thermal/drivers/st: Use devm_platform_get_and_ioremap_resource() dt-bindings: thermal: rzg2l-thermal: Document RZ/Five SoC dt-bindings: thermal: k3-j72xx: conditionally require efuse reg range dt-bindings: thermal: k3-j72xx: elaborate on binding description thermal/drivers/k3_j72xx_bandgap: Map fuse_base only for erratum workaround thermal/drivers/k3_j72xx_bandgap: Remove fuse_base from structure thermal/drivers/k3_j72xx_bandgap: Use bool for i2128 erratum flag thermal/drivers/k3_j72xx_bandgap: Simplify k3_thermal_get_temp() function thermal/drivers/qcom: Demote error log of thermal zone register to debug thermal/drivers/qcom/temp-alarm: Fix inaccurate warning for gen2 dt-bindings: thermal: qcom-tsens: narrow interrupts for SC8280XP, SM6350 and SM8450 thermal/core/power allocator: Remove a useless include thermal/drivers/imx8mm: Add hwmon support thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message dt-bindings: thermal: mediatek: add compatible string for MT7986 and MT7981 SoC thermal: ti-soc-thermal: Drop comma after SoC match table sentinel thermal/drivers/imx: Add support for loading calibration data from OCOTP ...
2 parents c0f234f + bd7bcc4 commit 601c1aa

24 files changed

+510
-187
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/thermal/generic-adc-thermal.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: General Purpose Analog To Digital Converter (ADC) based thermal sensor
8+
9+
maintainers:
10+
- Laxman Dewangan <ldewangan@nvidia.com>
11+
12+
description:
13+
On some of platforms, thermal sensor like thermistors are connected to
14+
one of ADC channel and sensor resistance is read via voltage across the
15+
sensor resistor. The voltage read across the sensor is mapped to
16+
temperature using voltage-temperature lookup table.
17+
18+
properties:
19+
compatible:
20+
const: generic-adc-thermal
21+
22+
'#thermal-sensor-cells':
23+
const: 0
24+
25+
io-channels:
26+
maxItems: 1
27+
28+
io-channel-names:
29+
const: sensor-channel
30+
31+
temperature-lookup-table:
32+
description: |
33+
Lookup table to map the relation between ADC value and temperature.
34+
When ADC is read, the value is looked up on the table to get the
35+
equivalent temperature.
36+
37+
If not specified, driver assumes the ADC channel gives milliCelsius
38+
directly.
39+
$ref: /schemas/types.yaml#/definitions/int32-matrix
40+
items:
41+
items:
42+
- description: Temperature in milliCelsius
43+
- description: ADC read value
44+
45+
required:
46+
- compatible
47+
- '#thermal-sensor-cells'
48+
- io-channels
49+
- io-channel-names
50+
51+
additionalProperties: false
52+
53+
examples:
54+
- |
55+
#include <dt-bindings/thermal/thermal.h>
56+
57+
thermal-sensor {
58+
compatible = "generic-adc-thermal";
59+
#thermal-sensor-cells = <0>;
60+
io-channels = <&ads1015 1>;
61+
io-channel-names = "sensor-channel";
62+
temperature-lookup-table = <
63+
(-40000) 2578
64+
(-39000) 2577
65+
(-38000) 2576
66+
(-37000) 2575
67+
(-36000) 2574
68+
(-35000) 2573
69+
(-34000) 2572
70+
(-33000) 2571
71+
(-32000) 2569
72+
(-31000) 2568
73+
(-30000) 2567
74+
/* skip */
75+
118000 254
76+
119000 247
77+
120000 240
78+
121000 233
79+
122000 226
80+
123000 220
81+
124000 214
82+
125000 208>;
83+
};
84+
...

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ properties:
3232
clocks:
3333
maxItems: 1
3434

35+
nvmem-cells:
36+
maxItems: 1
37+
description: Phandle to the calibration data provided by ocotp
38+
39+
nvmem-cell-names:
40+
const: calib
41+
3542
"#thermal-sensor-cells":
3643
description: |
3744
Number of cells required to uniquely identify the thermal

Documentation/devicetree/bindings/thermal/mediatek-thermal.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Required properties:
1313
- "mediatek,mt2701-thermal" : For MT2701 family of SoCs
1414
- "mediatek,mt2712-thermal" : For MT2712 family of SoCs
1515
- "mediatek,mt7622-thermal" : For MT7622 SoC
16+
- "mediatek,mt7981-thermal", "mediatek,mt7986-thermal" : For MT7981 SoC
17+
- "mediatek,mt7986-thermal" : For MT7986 SoC
1618
- "mediatek,mt8183-thermal" : For MT8183 family of SoCs
1719
- "mediatek,mt8516-thermal", "mediatek,mt2701-thermal : For MT8516 family of SoCs
1820
- reg: Address range of the thermal controller

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

Lines changed: 70 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,26 @@ properties:
5858
- qcom,sm8150-tsens
5959
- qcom,sm8250-tsens
6060
- qcom,sm8350-tsens
61+
- qcom,sm8450-tsens
62+
- qcom,sm8550-tsens
6163
- const: qcom,tsens-v2
6264

65+
- description: v2 of TSENS with combined interrupt
66+
enum:
67+
- qcom,ipq8074-tsens
68+
6369
reg:
6470
items:
6571
- description: TM registers
6672
- description: SROT registers
6773

6874
interrupts:
6975
minItems: 1
70-
items:
71-
- description: Combined interrupt if upper or lower threshold crossed
72-
- description: Interrupt if critical threshold crossed
76+
maxItems: 2
7377

7478
interrupt-names:
7579
minItems: 1
76-
items:
77-
- const: uplow
78-
- const: critical
80+
maxItems: 2
7981

8082
nvmem-cells:
8183
minItems: 1
@@ -129,22 +131,64 @@ allOf:
129131
then:
130132
properties:
131133
interrupts:
132-
maxItems: 1
134+
items:
135+
- description: Combined interrupt if upper or lower threshold crossed
133136
interrupt-names:
134-
maxItems: 1
137+
items:
138+
- const: uplow
135139

136-
else:
140+
- if:
141+
properties:
142+
compatible:
143+
contains:
144+
enum:
145+
- qcom,msm8953-tsens
146+
- qcom,msm8996-tsens
147+
- qcom,msm8998-tsens
148+
- qcom,sc7180-tsens
149+
- qcom,sc7280-tsens
150+
- qcom,sc8180x-tsens
151+
- qcom,sc8280xp-tsens
152+
- qcom,sdm630-tsens
153+
- qcom,sdm845-tsens
154+
- qcom,sm6350-tsens
155+
- qcom,sm8150-tsens
156+
- qcom,sm8250-tsens
157+
- qcom,sm8350-tsens
158+
- qcom,sm8450-tsens
159+
- qcom,tsens-v2
160+
then:
137161
properties:
138162
interrupts:
139-
minItems: 2
163+
items:
164+
- description: Combined interrupt if upper or lower threshold crossed
165+
- description: Interrupt if critical threshold crossed
140166
interrupt-names:
141-
minItems: 2
167+
items:
168+
- const: uplow
169+
- const: critical
142170

143171
- if:
144172
properties:
145173
compatible:
146174
contains:
147175
enum:
176+
- qcom,ipq8074-tsens
177+
then:
178+
properties:
179+
interrupts:
180+
items:
181+
- description: Combined interrupt if upper, lower or critical thresholds crossed
182+
interrupt-names:
183+
items:
184+
- const: combined
185+
186+
- if:
187+
properties:
188+
compatible:
189+
contains:
190+
enum:
191+
- qcom,ipq8074-tsens
148192
- qcom,tsens-v0_1
149193
- qcom,tsens-v1
150194
- qcom,tsens-v2
@@ -227,4 +271,19 @@ examples:
227271
#qcom,sensors = <13>;
228272
#thermal-sensor-cells = <1>;
229273
};
274+
275+
- |
276+
#include <dt-bindings/interrupt-controller/arm-gic.h>
277+
// Example 4 (for any IPQ8074 based SoC-s):
278+
tsens4: thermal-sensor@4a9000 {
279+
compatible = "qcom,ipq8074-tsens";
280+
reg = <0x4a9000 0x1000>,
281+
<0x4a8000 0x1000>;
282+
283+
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
284+
interrupt-names = "combined";
285+
286+
#qcom,sensors = <16>;
287+
#thermal-sensor-cells = <1>;
288+
};
230289
...

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ properties:
1717
compatible:
1818
items:
1919
- enum:
20-
- renesas,r9a07g043-tsu # RZ/G2UL
20+
- renesas,r9a07g043-tsu # RZ/G2UL and RZ/Five
2121
- renesas,r9a07g044-tsu # RZ/G2{L,LC}
2222
- renesas,r9a07g054-tsu # RZ/V2L
2323
- const: renesas,rzg2l-tsu

Documentation/devicetree/bindings/thermal/thermal-generic-adc.txt

Lines changed: 0 additions & 95 deletions
This file was deleted.

Documentation/devicetree/bindings/thermal/ti,j72xx-thermal.yaml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ title: Texas Instruments J72XX VTM (DTS) binding
99
maintainers:
1010
- Keerthy <j-keerthy@ti.com>
1111

12+
description: |
13+
The TI K3 family of SoCs typically have a Voltage & Thermal
14+
Management (VTM) device to control up to 8 temperature diode
15+
sensors to measure silicon junction temperatures from different
16+
hotspots of the chip as well as provide temperature, interrupt
17+
and alerting information.
18+
19+
The following polynomial equation can then be used to convert
20+
value returned by this device into a temperature in Celsius
21+
22+
Temp(C) = (-9.2627e-12) * x^4 + (6.0373e-08) * x^3 + \
23+
(-1.7058e-04) * x^2 + (3.2512e-01) * x + (-4.9003e+01)
24+
1225
properties:
1326
compatible:
1427
enum:
@@ -19,14 +32,34 @@ properties:
1932
items:
2033
- description: VTM cfg1 register space
2134
- description: VTM cfg2 register space
22-
- description: VTM efuse register space
35+
- description: |
36+
A software trimming method must be applied to some Jacinto
37+
devices to function properly. This eFuse region provides
38+
the information needed for these SoCs to report
39+
temperatures accurately.
40+
minItems: 2
2341

2442
power-domains:
2543
maxItems: 1
2644

2745
"#thermal-sensor-cells":
2846
const: 1
2947

48+
allOf:
49+
- if:
50+
properties:
51+
compatible:
52+
contains:
53+
const: ti,j721e-vtm
54+
then:
55+
properties:
56+
reg:
57+
minItems: 3
58+
else:
59+
properties:
60+
reg:
61+
maxItems: 2
62+
3063
required:
3164
- compatible
3265
- reg

drivers/thermal/gov_power_allocator.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#define pr_fmt(fmt) "Power allocator: " fmt
1010

11-
#include <linux/rculist.h>
1211
#include <linux/slab.h>
1312
#include <linux/thermal.h>
1413

0 commit comments

Comments
 (0)