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

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

Merge "drivers: thermal: virtual-sensor: Add new virtual sensors for SDMMAGPIE"

parents b49748ed 0a56f56a
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -61,6 +61,14 @@
			qcom,init-voltage-level =
					<RPMH_REGULATOR_LEVEL_RETENTION>;
		};

		mx_cdev: mx-cdev-lvl {
			compatible = "qcom,regulator-cooling-device";
			regulator-cdev-supply = <&VDD_MX_LEVEL>;
			regulator-levels = <RPMH_REGULATOR_LEVEL_NOM
					RPMH_REGULATOR_LEVEL_OFF>;
			#cooling-cells = <2>;
		};
	};

	rpmh-regulator-smpc1 {
@@ -109,6 +117,13 @@
					<RPMH_REGULATOR_LEVEL_RETENTION>;
			qcom,min-dropout-voltage-level = <(-1)>;
		};

		cx_cdev: regulator-cdev {
			compatible = "qcom,rpmh-reg-cdev";
			mboxes = <&qmp_aop 0>;
			qcom,reg-resource-name = "cx";
			#cooling-cells = <2>;
		};
	};

	/* pm6150l S7 = VDD_MSS supply */
+205 −13
Original line number Diff line number Diff line
@@ -13,6 +13,59 @@

#include <dt-bindings/thermal/thermal.h>

&soc {
	qmi-tmd-devices {
		compatible = "qcom,qmi-cooling-devices";

		modem {
			qcom,instance-id = <0x0>;

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

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

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

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

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

		adsp {
			qcom,instance-id = <0x1>;

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

		cdsp {
			qcom,instance-id = <0x43>;

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

&thermal_zones {
	aoss-0-usr {
		polling-delay-passive = <0>;
@@ -25,10 +78,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc0-cpu0-usr {
	cpu-0-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
@@ -39,10 +97,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc0-cpu1-usr {
	cpu-0-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
@@ -53,10 +116,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc0-cpu2-usr {
	cpu-0-2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
@@ -67,10 +135,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc0-cpu3-usr {
	cpu-0-3-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 4>;
@@ -81,10 +154,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc0-cpu4-usr {
	cpu-0-4-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 5>;
@@ -95,10 +173,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc0-cpu5-usr {
	cpu-0-5-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 6>;
@@ -109,6 +192,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -123,6 +211,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -137,10 +230,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc1-cpu0-usr {
	cpu-1-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 9>;
@@ -151,10 +249,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc1-cpu1-usr {
	cpu-1-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 10>;
@@ -165,10 +268,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc1-cpu2-usr {
	cpu-1-2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 11>;
@@ -179,10 +287,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	apc1-cpu3-usr {
	cpu-1-3-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 12>;
@@ -193,6 +306,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -207,6 +325,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -221,6 +344,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -235,6 +363,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -249,10 +382,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	video-usr {
	audio-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens1 2>;
@@ -263,6 +401,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -277,6 +420,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -291,6 +439,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -305,10 +458,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cmpss-usr {
	mdm-core-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens1 6>;
@@ -319,10 +477,15 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	mdm-core-usr {
	mdm-dsp-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens1 7>;
@@ -333,6 +496,11 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

@@ -347,6 +515,30 @@
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	video-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens1 9>;
		thermal-governor = "user_space";
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

+22 −0
Original line number Diff line number Diff line
@@ -138,6 +138,28 @@ static const struct virtual_sensor_data qti_virtual_sensors[] = {
				"cpu-1-3-usr"},
		.logic = VIRT_MAXIMUM,
	},
	{
		.virt_zone_name = "cpu-0-max-step",
		.num_sensors = 7,
		.sensor_names = {"cpu-0-0-usr",
				"cpu-0-1-usr",
				"cpu-0-2-usr",
				"cpu-0-3-usr",
				"cpu-0-4-usr",
				"cpu-0-5-usr",
				"cpuss-0-usr"},
		.logic = VIRT_MAXIMUM,
	},
	{
		.virt_zone_name = "cpu-1-max-step",
		.num_sensors = 5,
		.sensor_names = {"cpu-1-0-usr",
				"cpu-1-1-usr",
				"cpu-1-2-usr",
				"cpu-1-3-usr",
				"cpuss-1-usr"},
		.logic = VIRT_MAXIMUM,
	},

};