linux/drivers/thermal/qcom/Kconfig
Jishnu Prakash 948ee3a74f
thermal/drivers/qcom: add support for PMIC5 Gen3 ADC thermal monitoring
Add support for ADC_TM part of PMIC5 Gen3 in an auxiliary driver
under the Gen3 ADC driver. Its functionality is similar to that of
PMIC5 Gen2 ADC_TM, which implements the threshold setting and
interrupt generating functions, used to support thermal trip points.

In Gen3 ADC, the register interface is implemented on one or more SDAM
(Shared Direct Access Memory) peripherals instead of dedicated ADC
peripherals. Each ADC SDAM has eight channels which can be configured
for either immediate reads (main ADC driver's functionality) or ADC_TM
reads. By convention, the first channel of the first ADC SDAM is reserved
for all immediate reads and remaining channels across all SDAMs are used
for ADC_TM functionality.

On the first SDAM, the interrupt line and configuration registers are
shared between the main ADC and auxiliary ADC_TM drivers. Access to the
registers is protected through a mutex shared between the drivers. The
ADC_TM driver accesses this mutex and some other functions shared from
the main driver (like adc5_gen3_get_scaled_reading() for immediate channel
reads in the .get_temp() callback) through APIs exported into a shared
namespace.

Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/20260722-gen3_adc_tm-v4-3-011981f756c8@oss.qualcomm.com
2026-08-07 17:18:45 +02:00

68 lines
2.8 KiB
Plaintext

# SPDX-License-Identifier: GPL-2.0-only
config QCOM_TSENS
tristate "Qualcomm TSENS Temperature Alarm"
depends on NVMEM_QCOM_QFPROM
depends on ARCH_QCOM || COMPILE_TEST
help
This enables the thermal sysfs driver for the TSENS device. It shows
up in Sysfs as a thermal zone with multiple trip points. Disabling the
thermal zone device via the mode file results in disabling the sensor.
Also able to set threshold temperature for both hot and cold and update
when a threshold is reached.
config QCOM_SPMI_ADC_TM5
tristate "Qualcomm SPMI PMIC Thermal Monitor ADC5"
depends on OF && SPMI && IIO
select REGMAP_SPMI
select QCOM_VADC_COMMON
help
This enables the thermal driver for the ADC thermal monitoring
device. It shows up as a thermal zone with multiple trip points.
Thermal client sets threshold temperature for both warm and cool and
gets updated when a threshold is reached.
config QCOM_SPMI_MBG_TM
tristate "Qualcomm SPMI PMIC MBG Temperature monitor"
depends on QCOM_SPMI_ADC5_GEN3
select REGMAP_SPMI
help
This enables Qualcomm PMIC MBG (Master Bandgap) thermal monitor.
The MBG block monitors PMIC die temperature in hardware and raises an
interrupt when the programmed threshold is crossed.
Temperature is read from the associated ADC channel, and threshold
interrupts are forwarded to the thermal framework as trip-violation
events. Current support handles a single LVL1 upper (hot) trip.
config QCOM_SPMI_ADC_TM5_GEN3
tristate "Qualcomm SPMI PMIC Thermal Monitor ADC5 Gen3"
depends on QCOM_SPMI_ADC5_GEN3
help
This enables the auxiliary thermal driver for the ADC5 Gen3 thermal
monitoring device. It shows up as a thermal zone with multiple trip points.
Thermal client sets threshold temperature for both warm and cool and
gets updated when a threshold is reached.
config QCOM_SPMI_TEMP_ALARM
tristate "Qualcomm SPMI PMIC Temperature Alarm"
depends on OF && SPMI && IIO
select REGMAP_SPMI
help
This enables a thermal sysfs driver for Qualcomm plug-and-play (QPNP)
PMIC devices. It shows up in sysfs as a thermal sensor with multiple
trip points. The temperature reported by the thermal sensor reflects the
real time die temperature if an ADC is present or an estimate of the
temperature based upon the over temperature stage value.
config QCOM_LMH
tristate "Qualcomm Limits Management Hardware"
depends on ARCH_QCOM || COMPILE_TEST
select QCOM_SCM
help
This enables initialization of Qualcomm limits management
hardware(LMh). LMh allows for hardware-enforced mitigation for cpus based on
input from temperature and current sensors. On many newer Qualcomm SoCs
LMh is configured in the firmware and this feature need not be enabled.
However, on certain SoCs like sdm845 LMh has to be configured from kernel.