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

Commit 5f8a7264 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add modem thermal sensors for SM8150 fusion"

parents 845ed8ba 12b219b4
Loading
Loading
Loading
Loading
+52 −0
Original line number Diff line number Diff line
QMI thermal mitigation(TS) sensor.

The QMI TS Sensor driver can list the sensors that are available in the
remote subsystem. This driver can read the temperature, set threshold and
get threshold notification.

Each child node of the QMI TS devicetree node represents a remote
subsystem and it can have more than one remote sensor names.

Properties:

- compatible:
	Usage: required
	Value type: <string>
	Definition: should be "qcom,qmi-sensors"

- #thermal-sensor-cells:
	Usage: required
	Value type: <integer>
	Definition: Must be 1. See thermal.txt for description.

Subsystem properties:
- qcom,instance-id:
	Usage: required
	Value type: <integer>
	Definition: Remote subsystem QMI server instance id to be used for
			communicating with QMI.

- qcom,qmi-sensor-names:
	Usage: required
	Value type: <array of string>
	Definition: Remote sensor names. Below strings
		are the only acceptable sensor names,
		1. pa
		2. pa1
		3. qfe_pa0
		4. qfe_wtr0

Example:

qmi_sensor: qmi-ts-sensors {
	compatible = "qcom,qmi-sensors";
	#thermal-sensor-cells = <1>;

	modem {
		qcom,instance-id = <0x0>;
		qcom,qmi-sensor-names = "pa",
					"pa_1",
					"qfe_pa0",
					"qfe_wtr0";
	};
};
+74 −0
Original line number Diff line number Diff line
@@ -167,6 +167,80 @@
		qcom,mhi-chdb-base = <0x40300300>;
		qcom,mhi-erdb-base = <0x40300700>;
	};

	qmi-tmd-devices {
		modem1 {
			qcom,instance-id = <0x64>;

			modem1_pa: modem1_pa {
				qcom,qmi-dev-name = "pa";
				#cooling-cells = <2>;
			};

			modem1_proc: modem1_proc {
				qcom,qmi-dev-name = "modem";
				#cooling-cells = <2>;
			};

			modem1_current: modem1_current {
				qcom,qmi-dev-name = "modem_current";
				#cooling-cells = <2>;
			};

			modem1_skin: modem1_skin {
				qcom,qmi-dev-name = "modem_skin";
				#cooling-cells = <2>;
			};

			modem1_vdd: modem1_vdd {
				qcom,qmi-dev-name = "cpuv_restriction_cold";
				#cooling-cells = <2>;
			};
		};
	};

	qmi_sensor: qmi-ts-sensors {
		compatible = "qcom,qmi-sensors";
		#thermal-sensor-cells = <1>;

		modem {
			qcom,instance-id = <0x0>;
			qcom,qmi-sensor-names = "pa",
						"pa_1",
						"qfe_pa0",
						"qfe_wtr0";
		};
	};
};

&thermal_zones {
	modem0-pa0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&qmi_sensor 0>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	modem0-pa1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&qmi_sensor 1>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};

&reserved_memory {
+1 −0
Original line number Diff line number Diff line
@@ -359,6 +359,7 @@ CONFIG_QTI_THERMAL_LIMITS_DCVS=y
CONFIG_QTI_VIRTUAL_SENSOR=y
CONFIG_QTI_AOP_REG_COOLING_DEVICE=y
CONFIG_QTI_QMI_COOLING_DEVICE=y
CONFIG_QTI_QMI_SENSOR=y
CONFIG_REGULATOR_COOLING_DEVICE=y
CONFIG_QTI_BCL_PMIC5=y
CONFIG_QTI_BCL_SOC_DRIVER=y
+1 −0
Original line number Diff line number Diff line
@@ -373,6 +373,7 @@ CONFIG_QTI_THERMAL_LIMITS_DCVS=y
CONFIG_QTI_VIRTUAL_SENSOR=y
CONFIG_QTI_AOP_REG_COOLING_DEVICE=y
CONFIG_QTI_QMI_COOLING_DEVICE=y
CONFIG_QTI_QMI_SENSOR=y
CONFIG_REGULATOR_COOLING_DEVICE=y
CONFIG_QTI_BCL_PMIC5=y
CONFIG_QTI_BCL_SOC_DRIVER=y
+9 −0
Original line number Diff line number Diff line
@@ -51,6 +51,15 @@ config QTI_QMI_COOLING_DEVICE
	   The QMI cooling device will interface with remote subsystem
	   using QTI QMI interface.

config QTI_QMI_SENSOR
	bool "QTI QMI sensor driver"
	depends on QCOM_QMI_HELPERS && THERMAL_OF
	help
	   This enables to list the QTI remote subsystem temperature sensors.
	   This driver can read the temperature of the remote sensor.
	   These sensors can take thresholds and notify the thermal
	   framework when the threshold is reached.

config REGULATOR_COOLING_DEVICE
	bool "Regulator voltage floor cooling device"
	depends on REGULATOR && THERMAL_OF
Loading