Skip to content

Commit 42de37f

Browse files
Ansueldlezcano
authored andcommitted
thermal/drivers: Add support for Airoha EN7581 thermal sensor
Add support for Airoha EN7581 thermal sensor. This provide support for reading the CPU or SoC Package sensor and to setup trip points for hot and critical condition. An interrupt is fired to react on this and doesn't require passive poll to read the temperature. The thermal regs provide a way to read the ADC value from an external register placed in the Chip SCU regs. Monitor will read this value and fire an interrupt if the trip condition configured is reached. The Thermal Trip and Interrupt logic is conceptually similar to Mediatek LVTS Thermal but differ in register mapping and actual function/bug workaround. The implementation only share some register names but from functionality observation it's very different and used only for the basic function of periodically poll the temp and trip the interrupt. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Link: https://lore.kernel.org/r/20250511185003.3754495-2-ansuelsmth@gmail.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent fd55708 commit 42de37f

File tree

3 files changed

+499
-0
lines changed

3 files changed

+499
-0
lines changed

drivers/thermal/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,15 @@ config QORIQ_THERMAL
327327
cpufreq is used as the cooling device to throttle CPUs when the
328328
passive trip is crossed.
329329

330+
config AIROHA_THERMAL
331+
tristate "Airoha thermal sensor driver"
332+
depends on ARCH_AIROHA || COMPILE_TEST
333+
depends on MFD_SYSCON
334+
depends on OF
335+
help
336+
Enable this to plug the Airoha thermal sensor driver into the Linux
337+
thermal framework.
338+
330339
config SPEAR_THERMAL
331340
tristate "SPEAr thermal sensor driver"
332341
depends on PLAT_SPEAR || COMPILE_TEST

drivers/thermal/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ obj-$(CONFIG_K3_THERMAL) += k3_bandgap.o k3_j72xx_bandgap.o
3838
# platform thermal drivers
3939
obj-y += broadcom/
4040
obj-$(CONFIG_THERMAL_MMIO) += thermal_mmio.o
41+
obj-$(CONFIG_AIROHA_THERMAL) += airoha_thermal.o
4142
obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o
4243
obj-$(CONFIG_SUN8I_THERMAL) += sun8i_thermal.o
4344
obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o

0 commit comments

Comments
 (0)