Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0135bfa8 authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

msm: limits: lmh_lite: Add limits management hardware driver



Add a driver to interact with the limits management hardware
lite (LMH-lite).

This driver provides API, which will interact with the trustzone
for getting details like the,
1. sensors supported by the LMH
2. sensors throttling intensity
3. various operating profiles

The driver also provides API for changing the LMH operating profile
and to enable or disable hardware event logs.

The driver handles the interrupt from the LMH-Lite hardware and
notifies the LMH ISR framework. The LMH ISR framework monitors the
throttling intensity of the sensors and then re-arms the interrupt
when the throttling intensities of all the sensors are zero.

CRs-Fixed: 704088
CRs-Fixed: 698387
Change-Id: I9eafb572c4a2a2d89ea55baa4eef23d592d32170
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent d77da280
Loading
Loading
Loading
Loading
+25 −0
Original line number Original line Diff line number Diff line
Limits Mangement Hardware driver
================================
LMH driver provides API to interact with the LMH hardware. All the calls to
the LMH hardware are routed via secure space.

The device tree parameters for LMH driver are:

Required parameters:
- compatible:	Must be "qcom,lmh"

- interrupts : LMH Lite hardware interrupt details.
- reg : Base address of the LMH Lite hardwares interrupt status register
		and its size in bytes.
- qcom,lmh-trim-err-offset : This property defines the bit in the LMH
		interrupt status register, which shows whether there is a
		trim error in LMH hardware.

Example:

qcom,lmh {
	compatible = "qcom,lmh";
	interrupts = <0 332 4>;
	reg = <0xF9117000 0x4>;
	qcom,lmh-trim-err-offset = <18>;
};
+9 −0
Original line number Original line Diff line number Diff line
@@ -109,6 +109,15 @@ config LIMITS_MONITOR
	  Limits hardware's monitoring entities as sensors with the thermal
	  Limits hardware's monitoring entities as sensors with the thermal
	  framework.
	  framework.


config LIMITS_LITE_HW
	bool "LMH Lite hardware driver"
	depends on LIMITS_MONITOR
	help
	 Enable this option for interacting with LMH Lite hardware. This
	 implements the APIs required for getting the details about sensors
	 supported by LMH Lite, their throttling intensity and the operating
	 profiles.

config THERMAL_MONITOR
config THERMAL_MONITOR
	bool "Monitor thermal state and limit CPU Frequency"
	bool "Monitor thermal state and limit CPU Frequency"
	depends on THERMAL_TSENS8960 || THERMAL_TSENS8974
	depends on THERMAL_TSENS8960 || THERMAL_TSENS8974
+1 −0
Original line number Original line Diff line number Diff line
@@ -28,3 +28,4 @@ obj-$(CONFIG_THERMAL_QPNP) += qpnp-temp-alarm.o
obj-$(CONFIG_THERMAL_QPNP_ADC_TM)	+= qpnp-adc-tm.o
obj-$(CONFIG_THERMAL_QPNP_ADC_TM)	+= qpnp-adc-tm.o
obj-$(CONFIG_THERMAL_MONITOR)	+= msm_thermal.o msm_thermal-dev.o
obj-$(CONFIG_THERMAL_MONITOR)	+= msm_thermal.o msm_thermal-dev.o
obj-$(CONFIG_LIMITS_MONITOR)	+= lmh_interface.o
obj-$(CONFIG_LIMITS_MONITOR)	+= lmh_interface.o
obj-$(CONFIG_LIMITS_LITE_HW)	+= lmh_lite.o
+844 −0

File added.

Preview size limit exceeded, changes collapsed.