Skip to content

Commit f5f633b

Browse files
bchihiBLrafaeljw
authored andcommitted
thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver
The Low Voltage Thermal Sensor (LVTS) is a multiple sensors, multi controllers contained in a thermal domain. A thermal domains can be the MCU or the AP. Each thermal domains contain up to seven controllers, each thermal controller handle up to four thermal sensors. The LVTS has two Finite State Machines (FSM), one to handle the functionin temperatures range like hot or cold temperature and another one to handle monitoring trip point. The FSM notifies via interrupts when a trip point is crossed. The interrupt is managed at the thermal controller level, so when an interrupt occurs, the driver has to find out which sensor triggered such an interrupt. The sampling of the thermal can be filtered or immediate. For the former, the LVTS measures several points and applies a low pass filter. Signed-off-by: Balsam CHIHI <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> On MT8195 Tomato Chromebook: Tested-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 498e2f7 commit f5f633b

File tree

3 files changed

+1241
-0
lines changed

3 files changed

+1241
-0
lines changed

drivers/thermal/mediatek/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,20 @@ config MTK_SOC_THERMAL
1818
This driver configures thermal controllers to collect
1919
temperature via AUXADC interface.
2020

21+
config MTK_LVTS_THERMAL
22+
tristate "LVTS Thermal Driver for MediaTek SoCs"
23+
depends on HAS_IOMEM
24+
help
25+
Enable this option if you want to get SoC temperature
26+
information for supported MediaTek platforms.
27+
This driver configures LVTS (Low Voltage Thermal Sensor)
28+
thermal controllers to collect temperatures via ASIF
29+
(Analog Serial Interface).
30+
31+
config MTK_LVTS_THERMAL_DEBUGFS
32+
bool "LVTS thermal debugfs"
33+
depends on MTK_LVTS_THERMAL && DEBUG_FS
34+
help
35+
Enable this option to debug the internals of the device driver.
36+
2137
endif

drivers/thermal/mediatek/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
obj-$(CONFIG_MTK_SOC_THERMAL) += auxadc_thermal.o
2+
obj-$(CONFIG_MTK_LVTS_THERMAL) += lvts_thermal.o

0 commit comments

Comments
 (0)