aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 10:42:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 10:42:59 -0400
commitb9b42eeb88d36cc7400925302f1587aaaa348905 (patch)
treef5260ad8013adeca9f86c85c096099844238c725 /Documentation
parent7b7a2f0a31c6c1ff53a3c87c0bca4f8d01471391 (diff)
parent50e66c7ed8a1cd7e933628f9f5cf2617394adf5a (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal management updates from Zhang Rui: "We have a lot of SOC changes and a few thermal core fixes this time. The biggest change is about exynos thermal driver restructure. The patch set adds TMU (Thermal management Unit) driver support for exynos5440 platform. There are 3 instances of the TMU controllers so necessary cleanup/re-structure is done to handle multiple thermal zone. The next biggest change is the introduction of the imx thermal driver. It adds the imx thermal support using Temperature Monitor (TEMPMON) block found on some Freescale i.MX SoCs. The driver uses syscon regmap interface to access TEMPMON control registers and calibration data, and supports cpufreq as the cooling device. Highlights: - restructure exynos thermal driver. - introduce new imx thermal driver. - fix a bug in thermal core, which powers on the fans unexpectedly after resume from suspend" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (46 commits) drivers: thermal: add check when unregistering cpu cooling thermal: thermal_core: allow binding with limits on bind_params drivers: thermal: make usage of CONFIG_THERMAL_HWMON optional drivers: thermal: parent virtual hwmon with thermal zone thermal: hwmon: move hwmon support to single file thermal: exynos: Clean up non-DT remnants thermal: exynos: Fix potential NULL pointer dereference thermal: exynos: Fix typos in Kconfig thermal: ti-soc-thermal: Ensure to compute thermal trend thermal: ti-soc-thermal: Set the bandgap mask counter delay value thermal: ti-soc-thermal: Initialize counter_delay field for TI DRA752 sensors thermal: step_wise: return instance->target by default thermal: step_wise: cdev only needs update on a new target state Thermal/cpu_cooling: Return directly for the cpu out of allowed_cpus in the cpufreq_thermal_notifier() thermal: exynos_tmu: fix wrong error check for mapped memory thermal: imx: implement thermal alarm interrupt handling thermal: imx: dynamic passive and SoC specific critical trip points Documentation: thermal: Explain the exynos thermal driver model ARM: dts: thermal: exynos: Add documentation for Exynos SoC thermal bindings thermal: exynos: Support for TMU regulator defined at device tree ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/thermal/exynos-thermal.txt55
-rw-r--r--Documentation/devicetree/bindings/thermal/imx-thermal.txt17
-rw-r--r--Documentation/thermal/exynos_thermal43
-rw-r--r--Documentation/thermal/sysfs-api.txt12
4 files changed, 118 insertions, 9 deletions
diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
new file mode 100644
index 000000000000..284f5300fd8b
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
@@ -0,0 +1,55 @@
1* Exynos Thermal Management Unit (TMU)
2
3** Required properties:
4
5- compatible : One of the following:
6 "samsung,exynos4412-tmu"
7 "samsung,exynos4210-tmu"
8 "samsung,exynos5250-tmu"
9 "samsung,exynos5440-tmu"
10- interrupt-parent : The phandle for the interrupt controller
11- reg : Address range of the thermal registers. For soc's which has multiple
12 instances of TMU and some registers are shared across all TMU's like
13 interrupt related then 2 set of register has to supplied. First set
14 belongs to each instance of TMU and second set belongs to common TMU
15 registers.
16- interrupts : Should contain interrupt for thermal system
17- clocks : The main clock for TMU device
18- clock-names : Thermal system clock name
19- vtmu-supply: This entry is optional and provides the regulator node supplying
20 voltage to TMU. If needed this entry can be placed inside
21 board/platform specific dts file.
22
23Example 1):
24
25 tmu@100C0000 {
26 compatible = "samsung,exynos4412-tmu";
27 interrupt-parent = <&combiner>;
28 reg = <0x100C0000 0x100>;
29 interrupts = <2 4>;
30 clocks = <&clock 383>;
31 clock-names = "tmu_apbif";
32 status = "disabled";
33 vtmu-supply = <&tmu_regulator_node>;
34 };
35
36Example 2):
37
38 tmuctrl_0: tmuctrl@160118 {
39 compatible = "samsung,exynos5440-tmu";
40 reg = <0x160118 0x230>, <0x160368 0x10>;
41 interrupts = <0 58 0>;
42 clocks = <&clock 21>;
43 clock-names = "tmu_apbif";
44 };
45
46Note: For multi-instance tmu each instance should have an alias correctly
47numbered in "aliases" node.
48
49Example:
50
51aliases {
52 tmuctrl0 = &tmuctrl_0;
53 tmuctrl1 = &tmuctrl_1;
54 tmuctrl2 = &tmuctrl_2;
55};
diff --git a/Documentation/devicetree/bindings/thermal/imx-thermal.txt b/Documentation/devicetree/bindings/thermal/imx-thermal.txt
new file mode 100644
index 000000000000..541c25e49abf
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/imx-thermal.txt
@@ -0,0 +1,17 @@
1* Temperature Monitor (TEMPMON) on Freescale i.MX SoCs
2
3Required properties:
4- compatible : "fsl,imx6q-thermal"
5- fsl,tempmon : phandle pointer to system controller that contains TEMPMON
6 control registers, e.g. ANATOP on imx6q.
7- fsl,tempmon-data : phandle pointer to fuse controller that contains TEMPMON
8 calibration data, e.g. OCOTP on imx6q. The details about calibration data
9 can be found in SoC Reference Manual.
10
11Example:
12
13tempmon {
14 compatible = "fsl,imx6q-tempmon";
15 fsl,tempmon = <&anatop>;
16 fsl,tempmon-data = <&ocotp>;
17};
diff --git a/Documentation/thermal/exynos_thermal b/Documentation/thermal/exynos_thermal
index 2b46f67b1ccb..9010c4416967 100644
--- a/Documentation/thermal/exynos_thermal
+++ b/Documentation/thermal/exynos_thermal
@@ -1,17 +1,17 @@
1Kernel driver exynos4_tmu 1Kernel driver exynos_tmu
2================= 2=================
3 3
4Supported chips: 4Supported chips:
5* ARM SAMSUNG EXYNOS4 series of SoC 5* ARM SAMSUNG EXYNOS4, EXYNOS5 series of SoC
6 Prefix: 'exynos4-tmu'
7 Datasheet: Not publicly available 6 Datasheet: Not publicly available
8 7
9Authors: Donggeun Kim <dg77.kim@samsung.com> 8Authors: Donggeun Kim <dg77.kim@samsung.com>
9Authors: Amit Daniel <amit.daniel@samsung.com>
10 10
11Description 11TMU controller Description:
12----------- 12---------------------------
13 13
14This driver allows to read temperature inside SAMSUNG EXYNOS4 series of SoC. 14This driver allows to read temperature inside SAMSUNG EXYNOS4/5 series of SoC.
15 15
16The chip only exposes the measured 8-bit temperature code value 16The chip only exposes the measured 8-bit temperature code value
17through a register. 17through a register.
@@ -34,9 +34,9 @@ The three equations are:
34 TI2: Trimming info for 85 degree Celsius (stored at TRIMINFO register) 34 TI2: Trimming info for 85 degree Celsius (stored at TRIMINFO register)
35 Temperature code measured at 85 degree Celsius which is unchanged 35 Temperature code measured at 85 degree Celsius which is unchanged
36 36
37TMU(Thermal Management Unit) in EXYNOS4 generates interrupt 37TMU(Thermal Management Unit) in EXYNOS4/5 generates interrupt
38when temperature exceeds pre-defined levels. 38when temperature exceeds pre-defined levels.
39The maximum number of configurable threshold is four. 39The maximum number of configurable threshold is five.
40The threshold levels are defined as follows: 40The threshold levels are defined as follows:
41 Level_0: current temperature > trigger_level_0 + threshold 41 Level_0: current temperature > trigger_level_0 + threshold
42 Level_1: current temperature > trigger_level_1 + threshold 42 Level_1: current temperature > trigger_level_1 + threshold
@@ -47,6 +47,31 @@ The threshold levels are defined as follows:
47 through the corresponding registers. 47 through the corresponding registers.
48 48
49When an interrupt occurs, this driver notify kernel thermal framework 49When an interrupt occurs, this driver notify kernel thermal framework
50with the function exynos4_report_trigger. 50with the function exynos_report_trigger.
51Although an interrupt condition for level_0 can be set, 51Although an interrupt condition for level_0 can be set,
52it can be used to synchronize the cooling action. 52it can be used to synchronize the cooling action.
53
54TMU driver description:
55-----------------------
56
57The exynos thermal driver is structured as,
58
59 Kernel Core thermal framework
60 (thermal_core.c, step_wise.c, cpu_cooling.c)
61 ^
62 |
63 |
64TMU configuration data -------> TMU Driver <------> Exynos Core thermal wrapper
65(exynos_tmu_data.c) (exynos_tmu.c) (exynos_thermal_common.c)
66(exynos_tmu_data.h) (exynos_tmu.h) (exynos_thermal_common.h)
67
68a) TMU configuration data: This consist of TMU register offsets/bitfields
69 described through structure exynos_tmu_registers. Also several
70 other platform data (struct exynos_tmu_platform_data) members
71 are used to configure the TMU.
72b) TMU driver: This component initialises the TMU controller and sets different
73 thresholds. It invokes core thermal implementation with the call
74 exynos_report_trigger.
75c) Exynos Core thermal wrapper: This provides 3 wrapper function to use the
76 Kernel core thermal framework. They are exynos_unregister_thermal,
77 exynos_register_thermal and exynos_report_trigger.
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index a71bd5b90fe8..87519cb379ee 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -134,6 +134,13 @@ temperature) and throttle appropriate devices.
134 this thermal zone and cdev, for a particular trip point. 134 this thermal zone and cdev, for a particular trip point.
135 If nth bit is set, then the cdev and thermal zone are bound 135 If nth bit is set, then the cdev and thermal zone are bound
136 for trip point n. 136 for trip point n.
137 .limits: This is an array of cooling state limits. Must have exactly
138 2 * thermal_zone.number_of_trip_points. It is an array consisting
139 of tuples <lower-state upper-state> of state limits. Each trip
140 will be associated with one state limit tuple when binding.
141 A NULL pointer means <THERMAL_NO_LIMITS THERMAL_NO_LIMITS>
142 on all trips. These limits are used when binding a cdev to a
143 trip point.
137 .match: This call back returns success(0) if the 'tz and cdev' need to 144 .match: This call back returns success(0) if the 'tz and cdev' need to
138 be bound, as per platform data. 145 be bound, as per platform data.
1391.4.2 struct thermal_zone_params 1461.4.2 struct thermal_zone_params
@@ -142,6 +149,11 @@ temperature) and throttle appropriate devices.
142 This is an optional feature where some platforms can choose not to 149 This is an optional feature where some platforms can choose not to
143 provide this data. 150 provide this data.
144 .governor_name: Name of the thermal governor used for this zone 151 .governor_name: Name of the thermal governor used for this zone
152 .no_hwmon: a boolean to indicate if the thermal to hwmon sysfs interface
153 is required. when no_hwmon == false, a hwmon sysfs interface
154 will be created. when no_hwmon == true, nothing will be done.
155 In case the thermal_zone_params is NULL, the hwmon interface
156 will be created (for backward compatibility).
145 .num_tbps: Number of thermal_bind_params entries for this zone 157 .num_tbps: Number of thermal_bind_params entries for this zone
146 .tbp: thermal_bind_params entries 158 .tbp: thermal_bind_params entries
147 159