xref: /linux/drivers/thermal/Kconfig (revision d22300518d875f78203e9afacb5aa0b0316da523)
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Generic thermal drivers configuration
4#
5
6menuconfig THERMAL
7	bool "Thermal drivers"
8	help
9	  Thermal drivers offer a generic mechanism for
10	  thermal management. Usually it's made up of one or more thermal
11	  zones and cooling devices.
12	  Each thermal zone contains its own temperature, trip points,
13	  and cooling devices.
14	  All platforms with ACPI or Open Firmware thermal support can use
15	  this driver.
16	  If you want this support, you should say Y here.
17
18if THERMAL
19
20config THERMAL_NETLINK
21	bool "Thermal netlink management"
22	depends on NET
23	help
24	  The thermal framework has a netlink interface to do thermal
25	  zones discovery, temperature readings and events such as
26	  trip point crossed, cooling device update or governor
27	  change. It is recommended to enable the feature.
28
29config THERMAL_STATISTICS
30	bool "Thermal state transition statistics"
31	help
32	  Export thermal state transition statistics information through sysfs.
33
34	  If in doubt, say N.
35
36config THERMAL_DEBUGFS
37	bool "Thermal subsystem debug support"
38	depends on DEBUG_FS
39	help
40	  Say Y to allow the thermal subsystem to collect diagnostic
41	  information that can be accessed via debugfs.
42
43config THERMAL_CORE_TESTING
44	tristate "Thermal core testing facility"
45	depends on DEBUG_FS
46	help
47	  Say Y to add a debugfs-based thermal core testing facility.
48	  It allows test thermal zones to be created and populated
49	  with trip points in order to exercise the thermal core
50	  functionality in a controlled way.
51
52config THERMAL_EMERGENCY_POWEROFF_DELAY_MS
53	int "Emergency poweroff delay in milli-seconds"
54	default 0
55	help
56	  Thermal subsystem will issue a graceful shutdown when
57	  critical temperatures are reached using orderly_poweroff(). In
58	  case of failure of an orderly_poweroff(), the thermal emergency
59	  poweroff kicks in after a delay has elapsed and shuts down the system.
60	  This config is number of milliseconds to delay before emergency
61	  poweroff kicks in. Similarly to the critical trip point,
62	  the delay should be carefully profiled so as to give adequate
63	  time for orderly_poweroff() to finish on regular execution.
64	  If set to 0 emergency poweroff will not be supported.
65
66	  In doubt, leave as 0.
67
68config THERMAL_HWMON
69	bool
70	prompt "Expose thermal sensors as hwmon device"
71	depends on HWMON=y || HWMON=THERMAL
72	default y
73	help
74	  In case a sensor is registered with the thermal
75	  framework, this option will also register it
76	  as a hwmon. The sensor will then have the common
77	  hwmon sysfs interface.
78
79	  Say 'Y' here if you want all thermal sensors to
80	  have hwmon sysfs interface too.
81
82config THERMAL_OF
83	bool
84	prompt "APIs to parse thermal data out of device tree"
85	depends on OF
86	default y
87	help
88	  This options provides helpers to add the support to
89	  read and parse thermal data definitions out of the
90	  device tree blob.
91
92	  Say 'Y' here if you need to build thermal infrastructure
93	  based on device tree.
94
95choice
96	prompt "Default Thermal governor"
97	default THERMAL_DEFAULT_GOV_STEP_WISE
98	help
99	  This option sets which thermal governor shall be loaded at
100	  startup. If in doubt, select 'step_wise'.
101
102config THERMAL_DEFAULT_GOV_STEP_WISE
103	bool "step_wise"
104	select THERMAL_GOV_STEP_WISE
105	help
106	  Use the step_wise governor as default. This throttles the
107	  devices one step at a time.
108
109config THERMAL_DEFAULT_GOV_FAIR_SHARE
110	bool "fair_share"
111	select THERMAL_GOV_FAIR_SHARE
112	help
113	  Use the fair_share governor as default. This throttles the
114	  devices based on their 'contribution' to a zone. The
115	  contribution should be provided through platform data.
116
117config THERMAL_DEFAULT_GOV_USER_SPACE
118	bool "user_space"
119	select THERMAL_GOV_USER_SPACE
120	help
121	  The Userspace governor allows to get trip point crossed
122	  notification from the kernel via uevents. It is recommended
123	  to use the netlink interface instead which gives richer
124	  information about the thermal framework events.
125
126config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
127	bool "power_allocator"
128	depends on THERMAL_GOV_POWER_ALLOCATOR
129	help
130	  Select this if you want to control temperature based on
131	  system and device power allocation. This governor can only
132	  operate on cooling devices that implement the power API.
133
134config THERMAL_DEFAULT_GOV_BANG_BANG
135	bool "bang_bang"
136	depends on THERMAL_GOV_BANG_BANG
137	help
138	  Use the bang_bang governor as default. This throttles the
139	  devices one step at the time, taking into account the trip
140	  point hysteresis.
141
142endchoice
143
144config THERMAL_GOV_FAIR_SHARE
145	bool "Fair-share thermal governor"
146	help
147	  Enable this to manage platform thermals using fair-share governor.
148
149config THERMAL_GOV_STEP_WISE
150	bool "Step_wise thermal governor"
151	help
152	  Enable this to manage platform thermals using a simple linear
153	  governor.
154
155config THERMAL_GOV_BANG_BANG
156	bool "Bang Bang thermal governor"
157	default n
158	help
159	  Enable this to manage platform thermals using bang bang governor.
160
161	  Say 'Y' here if you want to use two point temperature regulation
162	  used for fans without throttling.  Some fan drivers depend on this
163	  governor to be enabled (e.g. acerhdf).
164
165config THERMAL_GOV_USER_SPACE
166	bool "User_space thermal governor"
167	help
168	  Enable this to let the user space manage the platform thermals.
169
170config THERMAL_GOV_POWER_ALLOCATOR
171	bool "Power allocator thermal governor"
172	depends on ENERGY_MODEL
173	help
174	  Enable this to manage platform thermals by dynamically
175	  allocating and limiting power to devices.
176
177config CPU_THERMAL
178	bool "Generic cpu cooling support"
179	depends on THERMAL_OF
180	help
181	  Enable the CPU cooling features. If the system has no active
182	  cooling device available, this option allows to use the CPU
183	  as a cooling device.
184
185if CPU_THERMAL
186
187config CPU_FREQ_THERMAL
188	bool "CPU frequency cooling device"
189	depends on CPU_FREQ
190	default y
191	help
192	  This implements the generic cpu cooling mechanism through frequency
193	  reduction. An ACPI version of this already exists
194	  (drivers/acpi/processor_thermal.c).
195	  This will be useful for platforms using the generic thermal interface
196	  and not the ACPI interface.
197
198config CPU_IDLE_THERMAL
199	bool "CPU idle cooling device"
200	depends on IDLE_INJECT
201	help
202	  This implements the CPU cooling mechanism through
203	  idle injection. This will throttle the CPU by injecting
204	  idle cycle.
205endif
206
207config DEVFREQ_THERMAL
208	bool "Generic device cooling support"
209	depends on PM_DEVFREQ
210	depends on PM_OPP
211	help
212	  This implements the generic devfreq cooling mechanism through
213	  frequency reduction for devices using devfreq.
214
215	  This will throttle the device by limiting the maximum allowed DVFS
216	  frequency corresponding to the cooling level.
217
218	  In order to use the power extensions of the cooling device,
219	  devfreq should use the simple_ondemand governor.
220
221	  If you want this support, you should say Y here.
222
223config THERMAL_EMULATION
224	bool "Thermal emulation mode support"
225	help
226	  Enable this option to make a emul_temp sysfs node in thermal zone
227	  directory to support temperature emulation. With emulation sysfs node,
228	  user can manually input temperature and test the different trip
229	  threshold behaviour for simulation purpose.
230
231	  WARNING: Be careful while enabling this option on production systems,
232	  because userland can easily disable the thermal policy by simply
233	  flooding this sysfs node with low temperature values.
234
235config THERMAL_MMIO
236	tristate "Generic Thermal MMIO driver"
237	depends on OF
238	depends on HAS_IOMEM
239	help
240	  This option enables the generic thermal MMIO driver that will use
241	  memory-mapped reads to get the temperature.  Any HW/System that
242	  allows temperature reading by a single memory-mapped reading, be it
243	  register or shared memory, is a potential candidate to work with this
244	  driver.
245
246config HISI_THERMAL
247	tristate "Hisilicon thermal driver"
248	depends on ARCH_HISI || COMPILE_TEST
249	depends on HAS_IOMEM
250	depends on OF
251	default y
252	help
253	  Enable this to plug hisilicon's thermal sensor driver into the Linux
254	  thermal framework. cpufreq is used as the cooling device to throttle
255	  CPUs when the passive trip is crossed.
256
257config IMX_THERMAL
258	tristate "Temperature sensor driver for Freescale i.MX SoCs"
259	depends on ARCH_MXC || COMPILE_TEST
260	depends on NVMEM || !NVMEM
261	depends on MFD_SYSCON
262	depends on OF
263	help
264	  Support for Temperature Monitor (TEMPMON) found on Freescale i.MX SoCs.
265	  It supports one critical trip point and one passive trip point.  The
266	  cpufreq is used as the cooling device to throttle CPUs when the
267	  passive trip is crossed.
268
269config IMX_SC_THERMAL
270	tristate "Temperature sensor driver for NXP i.MX SoCs with System Controller"
271	depends on IMX_SCU
272	depends on OF
273	help
274	  Support for Temperature Monitor (TEMPMON) found on NXP i.MX SoCs with
275	  system controller inside, Linux kernel has to communicate with system
276	  controller via MU (message unit) IPC to get temperature from thermal
277	  sensor. It supports one critical trip point and one
278	  passive trip point for each thermal sensor.
279
280config IMX8MM_THERMAL
281	tristate "Temperature sensor driver for Freescale i.MX8MM SoC"
282	depends on ARCH_MXC || COMPILE_TEST
283	depends on OF
284	help
285	  Support for Thermal Monitoring Unit (TMU) found on Freescale i.MX8MM SoC.
286	  It supports one critical trip point and one passive trip point. The
287	  cpufreq is used as the cooling device to throttle CPUs when the passive
288	  trip is crossed.
289
290config K3_THERMAL
291	tristate "Texas Instruments K3 thermal support"
292	depends on ARCH_K3 || COMPILE_TEST
293	help
294	  If you say yes here you get thermal support for the Texas Instruments
295	  K3 SoC family. The current chip supported is:
296	  - AM654
297
298	  This includes temperature reading functionality.
299
300config MAX77620_THERMAL
301	tristate "Temperature sensor driver for Maxim MAX77620 PMIC"
302	depends on MFD_MAX77620
303	depends on OF
304	help
305	  Support for die junction temperature warning alarm for Maxim
306	  Semiconductor PMIC MAX77620 device. Device generates two alarm
307	  interrupts when PMIC die temperature cross the threshold of
308	  120 degC and 140 degC.
309
310config QORIQ_THERMAL
311	tristate "QorIQ Thermal Monitoring Unit"
312	depends on THERMAL_OF && HAS_IOMEM
313	depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || (ARCH_MXC && ARM64) || COMPILE_TEST
314	select REGMAP_MMIO
315	help
316	  Support for Thermal Monitoring Unit (TMU) found on QorIQ platforms.
317	  It supports one critical trip point and one passive trip point. The
318	  cpufreq is used as the cooling device to throttle CPUs when the
319	  passive trip is crossed.
320
321config SPEAR_THERMAL
322	tristate "SPEAr thermal sensor driver"
323	depends on PLAT_SPEAR || COMPILE_TEST
324	depends on HAS_IOMEM
325	depends on OF
326	help
327	  Enable this to plug the SPEAr thermal sensor driver into the Linux
328	  thermal framework.
329
330config SUN8I_THERMAL
331	tristate "Allwinner sun8i thermal driver"
332	depends on ARCH_SUNXI || COMPILE_TEST
333	depends on HAS_IOMEM
334	depends on NVMEM
335	depends on OF
336	depends on RESET_CONTROLLER
337	help
338	  Support for the sun8i thermal sensor driver into the Linux thermal
339	  framework.
340
341	  To compile this driver as a module, choose M here: the
342	  module will be called sun8i-thermal.
343
344config ROCKCHIP_THERMAL
345	tristate "Rockchip thermal driver"
346	depends on ARCH_ROCKCHIP || COMPILE_TEST
347	depends on RESET_CONTROLLER
348	depends on HAS_IOMEM
349	help
350	  Rockchip thermal driver provides support for Temperature sensor
351	  ADC (TS-ADC) found on Rockchip SoCs. It supports one critical
352	  trip point. Cpufreq is used as the cooling device and will throttle
353	  CPUs when the Temperature crosses the passive trip point.
354
355config KIRKWOOD_THERMAL
356	tristate "Temperature sensor on Marvell Kirkwood SoCs"
357	depends on MACH_KIRKWOOD || COMPILE_TEST
358	depends on HAS_IOMEM
359	depends on OF
360	help
361	  Support for the Kirkwood thermal sensor driver into the Linux thermal
362	  framework. Only kirkwood 88F6282 and 88F6283 have this sensor.
363
364config DOVE_THERMAL
365	tristate "Temperature sensor on Marvell Dove SoCs"
366	depends on ARCH_DOVE || MACH_DOVE || COMPILE_TEST
367	depends on HAS_IOMEM
368	depends on OF
369	help
370	  Support for the Dove thermal sensor driver in the Linux thermal
371	  framework.
372
373config DB8500_THERMAL
374	tristate "DB8500 thermal management"
375	depends on MFD_DB8500_PRCMU && OF
376	default y
377	help
378	  Adds DB8500 thermal management implementation according to the thermal
379	  management framework. A thermal zone with several trip points will be
380	  created. Cooling devices can be bound to the trip points to cool this
381	  thermal zone if trip points reached.
382
383config ARMADA_THERMAL
384	tristate "Marvell EBU Armada SoCs thermal management"
385	depends on ARCH_MVEBU || COMPILE_TEST
386	depends on HAS_IOMEM
387	depends on OF
388	help
389	  Enable this option if you want to have support for thermal management
390	  controller present in Marvell EBU Armada SoCs (370,375,XP,38x,7K,8K).
391
392config DA9062_THERMAL
393	tristate "DA9062/DA9061 Dialog Semiconductor thermal driver"
394	depends on MFD_DA9062 || COMPILE_TEST
395	depends on OF
396	help
397	  Enable this for the Dialog Semiconductor thermal sensor driver.
398	  This will report PMIC junction over-temperature for one thermal trip
399	  zone.
400	  Compatible with the DA9062 and DA9061 PMICs.
401
402menu "Mediatek thermal drivers"
403depends on ARCH_MEDIATEK || COMPILE_TEST
404source "drivers/thermal/mediatek/Kconfig"
405endmenu
406
407config AMLOGIC_THERMAL
408	tristate "Amlogic Thermal Support"
409	default ARCH_MESON
410	depends on OF && ARCH_MESON
411	help
412	  If you say yes here you get support for Amlogic Thermal
413	  for G12 SoC Family.
414
415	  This driver can also be built as a module. If so, the module will
416	  be called amlogic_thermal.
417
418menu "Intel thermal drivers"
419depends on X86 || X86_INTEL_QUARK || COMPILE_TEST
420source "drivers/thermal/intel/Kconfig"
421endmenu
422
423menu "Broadcom thermal drivers"
424depends on ARCH_BCM || ARCH_BRCMSTB || ARCH_BCM2835 || ARCH_BCM_IPROC || \
425		COMPILE_TEST
426source "drivers/thermal/broadcom/Kconfig"
427endmenu
428
429menu "Texas Instruments thermal drivers"
430depends on ARCH_HAS_BANDGAP || COMPILE_TEST
431depends on HAS_IOMEM
432source "drivers/thermal/ti-soc-thermal/Kconfig"
433endmenu
434
435menu "Samsung thermal drivers"
436depends on ARCH_EXYNOS || COMPILE_TEST
437source "drivers/thermal/samsung/Kconfig"
438endmenu
439
440menu "STMicroelectronics thermal drivers"
441depends on (ARCH_STI || ARCH_STM32) && THERMAL_OF
442source "drivers/thermal/st/Kconfig"
443endmenu
444
445source "drivers/thermal/renesas/Kconfig"
446
447source "drivers/thermal/tegra/Kconfig"
448
449config GENERIC_ADC_THERMAL
450	tristate "Generic ADC based thermal sensor"
451	depends on IIO
452	help
453	  This enabled a thermal sysfs driver for the temperature sensor
454	  which is connected to the General Purpose ADC. The ADC channel
455	  is read via IIO framework and the channel information is provided
456	  to this driver. This driver reports the temperature by reading ADC
457	  channel and converts it to temperature based on lookup table.
458
459menu "Qualcomm thermal drivers"
460depends on (ARCH_QCOM && OF) || COMPILE_TEST
461source "drivers/thermal/qcom/Kconfig"
462endmenu
463
464config UNIPHIER_THERMAL
465	tristate "Socionext UniPhier thermal driver"
466	depends on ARCH_UNIPHIER || COMPILE_TEST
467	depends on THERMAL_OF && MFD_SYSCON
468	help
469	  Enable this to plug in UniPhier on-chip PVT thermal driver into the
470	  thermal framework. The driver supports CPU thermal zone temperature
471	  reporting and a couple of trip points.
472
473config SPRD_THERMAL
474	tristate "Temperature sensor on Spreadtrum SoCs"
475	depends on ARCH_SPRD || COMPILE_TEST
476	help
477	  Support for the Spreadtrum thermal sensor driver in the Linux thermal
478	  framework.
479
480config KHADAS_MCU_FAN_THERMAL
481	tristate "Khadas MCU controller FAN cooling support"
482	depends on OF
483	depends on MFD_KHADAS_MCU
484	select MFD_CORE
485	select REGMAP
486	help
487	  If you say yes here you get support for the FAN controlled
488	  by the Microcontroller found on the Khadas VIM boards.
489
490config LOONGSON2_THERMAL
491	tristate "Loongson-2 SoC series thermal driver"
492	depends on LOONGARCH || COMPILE_TEST
493	depends on OF
494	help
495	  Support for Thermal driver found on Loongson-2 SoC series platforms.
496	  The thermal driver realizes get_temp and set_trips function, which
497	  are used to obtain the temperature of the current node and set the
498	  temperature range to trigger the interrupt. When the input temperature
499	  is higher than the high temperature threshold or lower than the low
500	  temperature threshold, the interrupt will occur.
501
502endif
503