Skip to content

Commit d01e12d

Browse files
committed
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal
Pull thermal management updates from Eduardo Valentin: - rework tsens driver to add support for tsens-v2 (Amit Kucheria) - rework armada thermal driver to use syscon and multichannel support (Miquel Raynal) - fixes to TI SoC, IMX, Exynos, RCar, and hwmon drivers * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: (34 commits) thermal: armada: fix copy-paste error in armada_thermal_probe() thermal: rcar_thermal: avoid NULL dereference in absence of IRQ resources thermal: samsung: Remove Exynos5440 clock handling left-overs thermal: tsens: Fix negative temperature reporting thermal: tsens: switch from of_iomap() to devm_ioremap_resource() thermal: tsens: Rename variable thermal: tsens: Add generic support for TSENS v2 IP thermal: tsens: Rename tsens-8996 to tsens-v2 for reuse thermal: tsens: Add support to split up register address space into two dt: thermal: tsens: Document the fallback DT property for v2 of TSENS IP thermal: tsens: Get rid of unused fields in structure thermal_hwmon: Pass the originating device down to hwmon_device_register_with_info thermal_hwmon: Sanitize attribute name passed to hwmon dt-bindings: thermal: armada: add reference to new bindings dt-bindings: cp110: add the thermal node in the syscon file dt-bindings: cp110: update documentation since DT de-duplication dt-bindings: ap806: add the thermal node in the syscon file dt-bindings: cp110: prepare the syscon file to list other syscons nodes dt-bindings: ap806: prepare the syscon file to list other syscons nodes dt-bindings: cp110: rename cp110 syscon file ...
2 parents 9502f0d + 84b64de commit d01e12d

24 files changed

+649
-907
lines changed

Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ Marvell Armada AP806 System Controller
22
======================================
33

44
The AP806 is one of the two core HW blocks of the Marvell Armada 7K/8K
5-
SoCs. It contains a system controller, which provides a number
6-
registers giving access to numerous features: clocks, pin-muxing and
7-
many other SoC configuration items. This DT binding allows to describe
8-
this system controller.
5+
SoCs. It contains system controllers, which provide several registers
6+
giving access to numerous features: clocks, pin-muxing and many other
7+
SoC configuration items. This DT binding allows to describe these
8+
system controllers.
99

1010
For the top level node:
1111
- compatible: must be: "syscon", "simple-mfd";
12-
- reg: register area of the AP806 system controller
12+
- reg: register area of the AP806 system controller
13+
14+
SYSTEM CONTROLLER 0
15+
===================
1316

1417
Clocks:
1518
-------
@@ -98,3 +101,38 @@ ap_syscon: system-controller@6f4000 {
98101
gpio-ranges = <&ap_pinctrl 0 0 19>;
99102
};
100103
};
104+
105+
SYSTEM CONTROLLER 1
106+
===================
107+
108+
Thermal:
109+
--------
110+
111+
For common binding part and usage, refer to
112+
Documentation/devicetree/bindings/thermal/thermal.txt
113+
114+
The thermal IP can probe the temperature all around the processor. It
115+
may feature several channels, each of them wired to one sensor.
116+
117+
Required properties:
118+
- compatible: must be one of:
119+
* marvell,armada-ap806-thermal
120+
- reg: register range associated with the thermal functions.
121+
122+
Optional properties:
123+
- #thermal-sensor-cells: shall be <1> when thermal-zones subnodes refer
124+
to this IP and represents the channel ID. There is one sensor per
125+
channel. O refers to the thermal IP internal channel, while positive
126+
IDs refer to each CPU.
127+
128+
Example:
129+
ap_syscon1: system-controller@6f8000 {
130+
compatible = "syscon", "simple-mfd";
131+
reg = <0x6f8000 0x1000>;
132+
133+
ap_thermal: thermal-sensor@80 {
134+
compatible = "marvell,armada-ap806-thermal";
135+
reg = <0x80 0x10>;
136+
#thermal-sensor-cells = <1>;
137+
};
138+
};

Documentation/devicetree/bindings/arm/marvell/cp110-system-controller0.txt renamed to Documentation/devicetree/bindings/arm/marvell/cp110-system-controller.txt

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
Marvell Armada CP110 System Controller 0
2-
========================================
1+
Marvell Armada CP110 System Controller
2+
======================================
33

44
The CP110 is one of the two core HW blocks of the Marvell Armada 7K/8K
5-
SoCs. It contains two sets of system control registers, System
6-
Controller 0 and System Controller 1. This Device Tree binding allows
7-
to describe the first system controller, which provides registers to
8-
configure various aspects of the SoC.
5+
SoCs. It contains system controllers, which provide several registers
6+
giving access to numerous features: clocks, pin-muxing and many other
7+
SoC configuration items. This DT binding allows to describe these
8+
system controllers.
99

1010
For the top level node:
1111
- compatible: must be: "syscon", "simple-mfd";
12-
- reg: register area of the CP110 system controller 0
12+
- reg: register area of the CP110 system controller
13+
14+
SYSTEM CONTROLLER 0
15+
===================
1316

1417
Clocks:
1518
-------
@@ -163,26 +166,60 @@ Required properties:
163166

164167
Example:
165168

166-
cpm_syscon0: system-controller@440000 {
169+
CP110_LABEL(syscon0): system-controller@440000 {
167170
compatible = "syscon", "simple-mfd";
168171
reg = <0x440000 0x1000>;
169172

170-
cpm_clk: clock {
173+
CP110_LABEL(clk): clock {
171174
compatible = "marvell,cp110-clock";
172175
#clock-cells = <2>;
173176
};
174177

175-
cpm_pinctrl: pinctrl {
178+
CP110_LABEL(pinctrl): pinctrl {
176179
compatible = "marvell,armada-8k-cpm-pinctrl";
177180
};
178181

179-
cpm_gpio1: gpio@100 {
182+
CP110_LABEL(gpio1): gpio@100 {
180183
compatible = "marvell,armada-8k-gpio";
181184
offset = <0x100>;
182185
ngpios = <32>;
183186
gpio-controller;
184187
#gpio-cells = <2>;
185-
gpio-ranges = <&cpm_pinctrl 0 0 32>;
188+
gpio-ranges = <&CP110_LABEL(pinctrl) 0 0 32>;
186189
};
187190

188191
};
192+
193+
SYSTEM CONTROLLER 1
194+
===================
195+
196+
Thermal:
197+
--------
198+
199+
The thermal IP can probe the temperature all around the processor. It
200+
may feature several channels, each of them wired to one sensor.
201+
202+
For common binding part and usage, refer to
203+
Documentation/devicetree/bindings/thermal/thermal.txt
204+
205+
Required properties:
206+
- compatible: must be one of:
207+
* marvell,armada-cp110-thermal
208+
- reg: register range associated with the thermal functions.
209+
210+
Optional properties:
211+
- #thermal-sensor-cells: shall be <1> when thermal-zones subnodes refer
212+
to this IP and represents the channel ID. There is one sensor per
213+
channel. O refers to the thermal IP internal channel.
214+
215+
Example:
216+
CP110_LABEL(syscon1): system-controller@6f8000 {
217+
compatible = "syscon", "simple-mfd";
218+
reg = <0x6f8000 0x1000>;
219+
220+
CP110_LABEL(thermal): thermal-sensor@70 {
221+
compatible = "marvell,armada-cp110-thermal";
222+
reg = <0x70 0x10>;
223+
#thermal-sensor-cells = <1>;
224+
};
225+
};

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Required properties:
1010
* marvell,armada-ap806-thermal
1111
* marvell,armada-cp110-thermal
1212

13+
Note: these bindings are deprecated for AP806/CP110 and should instead
14+
follow the rules described in:
15+
Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt
16+
Documentation/devicetree/bindings/arm/marvell/cp110-system-controller.txt
17+
1318
- reg: Device's register space.
1419
Two entries are expected, see the examples below. The first one points
1520
to the status register (4B). The second one points to the control
Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,41 @@
11
* QCOM SoC Temperature Sensor (TSENS)
22

33
Required properties:
4-
- compatible :
5-
- "qcom,msm8916-tsens" : For 8916 Family of SoCs
6-
- "qcom,msm8974-tsens" : For 8974 Family of SoCs
7-
- "qcom,msm8996-tsens" : For 8996 Family of SoCs
4+
- compatible:
5+
Must be one of the following:
6+
- "qcom,msm8916-tsens" (MSM8916)
7+
- "qcom,msm8974-tsens" (MSM8974)
8+
- "qcom,msm8996-tsens" (MSM8996)
9+
- "qcom,msm8998-tsens", "qcom,tsens-v2" (MSM8998)
10+
- "qcom,sdm845-tsens", "qcom,tsens-v2" (SDM845)
11+
The generic "qcom,tsens-v2" property must be used as a fallback for any SoC
12+
with version 2 of the TSENS IP. MSM8996 is the only exception because the
13+
generic property did not exist when support was added.
14+
15+
- reg: Address range of the thermal registers.
16+
New platforms containing v2.x.y of the TSENS IP must specify the SROT and TM
17+
register spaces separately, with order being TM before SROT.
18+
See Example 2, below.
819

9-
- reg: Address range of the thermal registers
1020
- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description.
1121
- #qcom,sensors: Number of sensors in tsens block
1222
- Refer to Documentation/devicetree/bindings/nvmem/nvmem.txt to know how to specify
1323
nvmem cells
1424

15-
Example:
25+
Example 1 (legacy support before a fallback tsens-v2 property was introduced):
1626
tsens: thermal-sensor@900000 {
1727
compatible = "qcom,msm8916-tsens";
1828
reg = <0x4a8000 0x2000>;
1929
nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
2030
nvmem-cell-names = "caldata", "calsel";
2131
#thermal-sensor-cells = <1>;
2232
};
33+
34+
Example 2 (for any platform containing v2 of the TSENS IP):
35+
tsens0: thermal-sensor@c263000 {
36+
compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
37+
reg = <0xc263000 0x1ff>, /* TM */
38+
<0xc222000 0x1ff>; /* SROT */
39+
#qcom,sensors = <13>;
40+
#thermal-sensor-cells = <1>;
41+
};

0 commit comments

Comments
 (0)