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

Commit 6d100805 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 SM6150"

parents 6f21351d cda951ed
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -43,6 +43,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>;
		};
	};

	/* pm6150 S1 - VDD_CX supply */
@@ -78,6 +86,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>;
		};
	};


+57 −4
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-usr {
		polling-delay-passive = <0>;
@@ -84,7 +137,7 @@
		};
	};

	apc1-cpu0-usr {
	cpu-1-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 5>;
@@ -98,7 +151,7 @@
		};
	};

	apc1-cpu1-usr {
	cpu-1-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 6>;
@@ -112,7 +165,7 @@
		};
	};

	apc1-cpu2-usr {
	cpu-1-2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 7>;
@@ -126,7 +179,7 @@
		};
	};

	apc1-cpu3-usr {
	cpu-1-3-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 8>;
+19 −0
Original line number Diff line number Diff line
@@ -120,6 +120,25 @@ static const struct virtual_sensor_data qti_virtual_sensors[] = {
				"mhm-usr"},
		.logic = VIRT_MAXIMUM,
	},
	{
		.virt_zone_name = "cpuss0-max-step",
		.num_sensors = 4,
		.sensor_names = {"cpuss-0-usr",
				"cpuss-1-usr",
				"cpuss-2-usr",
				"cpuss-3-usr"},
		.logic = VIRT_MAXIMUM,
	},
	{
		.virt_zone_name = "apc1-max-step",
		.num_sensors = 4,
		.sensor_names = {"cpu-1-0-usr",
				"cpu-1-1-usr",
				"cpu-1-2-usr",
				"cpu-1-3-usr"},
		.logic = VIRT_MAXIMUM,
	},

};

int qti_virtual_sensor_register(struct device *dev)