Skip to content

Commit bd7bcc4

Browse files
committed
Pull thermal driver changes for 6.2-rc1 from Daniel Lezcano: "- Add the sm8450 QCom compatible string in the DT bindings (Luca Weiss) - Use devm_platform_get_and_ioremap_resource on the ST platform to group two calls into a single one (Minghao Chi) - Add the sm8550 QCom compatible string in the DT bindings (Neil Armstrong) - Use GENMASK instead of bitmaps and validate the temperature after reading it (Marcus Folkesson) - Convert generic-adc-thermal to DT schema (Rob Herring) - Fix the debug print message where the logic is inverted (Keerthy) - Fix memory leak on thermal_of_zone_register() failure (Ido Schimmel) - Add support for IPQ8074 in the tsens 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 the HWMon support on the imx8mm board (Alexander Stein) - Remove a pointless include in 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 on the tsens QCom driver (Manivannan Sadhasivam) - Consolidate the TI Bandgap driver regarding how is handled the efuse values and the errata handling (Bryan Brattlof) - Document the 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 platform remove callback as it is empty (Uwe Kleine-König)" * tag 'thermal-v6.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (34 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 904f309 + 5011a11 commit bd7bcc4

23 files changed

+506
-186
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 <[email protected]>
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
@@ -57,24 +57,26 @@ properties:
5757
- qcom,sm8150-tsens
5858
- qcom,sm8250-tsens
5959
- qcom,sm8350-tsens
60+
- qcom,sm8450-tsens
61+
- qcom,sm8550-tsens
6062
- const: qcom,tsens-v2
6163

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

6773
interrupts:
6874
minItems: 1
69-
items:
70-
- description: Combined interrupt if upper or lower threshold crossed
71-
- description: Interrupt if critical threshold crossed
75+
maxItems: 2
7276

7377
interrupt-names:
7478
minItems: 1
75-
items:
76-
- const: uplow
77-
- const: critical
79+
maxItems: 2
7880

7981
nvmem-cells:
8082
minItems: 1
@@ -128,22 +130,64 @@ allOf:
128130
then:
129131
properties:
130132
interrupts:
131-
maxItems: 1
133+
items:
134+
- description: Combined interrupt if upper or lower threshold crossed
132135
interrupt-names:
133-
maxItems: 1
136+
items:
137+
- const: uplow
134138

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

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

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 <[email protected]>
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)