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