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