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

Commit ceef8ec8 authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

ARM: dts: msm: Add thermal config for sdxprairie



Add thermal config for sdxprairie. This config can do vdd restriction
and can enable QMI sensors and mitigation devices.

Change-Id: Id62c10792c4af1a861f2dd58280c48bdf3c0425d
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent 92a10f31
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -102,6 +102,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>;
		};
	};

	/* PMXPRAIRIE S5 = VDD_CX supply */
@@ -137,6 +145,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>;
		};
	};

	rpmh-regulator-ldoe1 {
+428 −0
Original line number Diff line number Diff line
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#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>;
			};
		};

	};

	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 {
	aoss0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 0>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
			active-config1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	mdm-q6-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 1>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
			active-config1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	ipa-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
			active-config1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu0-a7-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 3>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
			active-config1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	mdm-5g-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 4>;
		thermal-governor = "user_space";
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
			active-config1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	mdm-vpe-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 5>;
		thermal-governor = "user_space";
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
			active-config1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	mdm-core-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 6>;
		thermal-governor = "user_space";
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
			active-config1 {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	aoss0-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_floor";
		thermal-sensors = <&tsens0 0>;
		tracks-low;
		trips {
			aoss0_trip: active-config0 {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
		cooling-maps {
			cpu0_cdev {
				trip = <&aoss0_trip>;
				cooling-device = <&CPU0 1 1>;
			};
			modem_vdd_cdev {
				trip = <&aoss0_trip>;
				cooling-device = <&modem_vdd 0 0>;
			};
			cx_vdd_cdev {
				trip = <&aoss0_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};
			mx_vdd_cdev {
				trip = <&aoss0_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};
		};
	};

	mdm-q6-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_floor";
		thermal-sensors = <&tsens0 1>;
		tracks-low;
		trips {
			mdm_q6_trip: active-config0 {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
		cooling-maps {
			cpu0_cdev {
				trip = <&mdm_q6_trip>;
				cooling-device = <&CPU0 1 1>;
			};
			modem_vdd_cdev {
				trip = <&mdm_q6_trip>;
				cooling-device = <&modem_vdd 0 0>;
			};
			cx_vdd_cdev {
				trip = <&mdm_q6_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};
			mx_vdd_cdev {
				trip = <&mdm_q6_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};
		};
	};

	ipa-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_floor";
		thermal-sensors = <&tsens0 2>;
		tracks-low;
		trips {
			ipa_trip: active-config0 {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
		cooling-maps {
			cpu0_cdev {
				trip = <&ipa_trip>;
				cooling-device = <&CPU0 1 1>;
			};
			modem_vdd_cdev {
				trip = <&ipa_trip>;
				cooling-device = <&modem_vdd 0 0>;
			};
			cx_vdd_cdev {
				trip = <&ipa_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};
			mx_vdd_cdev {
				trip = <&ipa_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};
		};
	};

	cpu0-a7-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_floor";
		thermal-sensors = <&tsens0 3>;
		tracks-low;
		trips {
			cpu0_trip: active-config0 {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
		cooling-maps {
			cpu0_cdev {
				trip = <&cpu0_trip>;
				cooling-device = <&CPU0 1 1>;
			};
			modem_vdd_cdev {
				trip = <&cpu0_trip>;
				cooling-device = <&modem_vdd 0 0>;
			};
			cx_vdd_cdev {
				trip = <&cpu0_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};
			mx_vdd_cdev {
				trip = <&cpu0_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};
		};
	};

	mdm-5g-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 4>;
		thermal-governor = "low_limits_floor";
		tracks-low;
		trips {
			mdm_5g_trip: active-config0 {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
		cooling-maps {
			cpu0_cdev {
				trip = <&mdm_5g_trip>;
				cooling-device = <&CPU0 1 1>;
			};
			modem_vdd_cdev {
				trip = <&mdm_5g_trip>;
				cooling-device = <&modem_vdd 0 0>;
			};
			cx_vdd_cdev {
				trip = <&mdm_5g_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};
			mx_vdd_cdev {
				trip = <&mdm_5g_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};
		};
	};

	mdm-vpe-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 5>;
		thermal-governor = "low_limits_floor";
		tracks-low;
		trips {
			mdm_vpe_trip: active-config0 {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
		cooling-maps {
			cpu0_cdev {
				trip = <&mdm_vpe_trip>;
				cooling-device = <&CPU0 1 1>;
			};
			modem_vdd_cdev {
				trip = <&mdm_vpe_trip>;
				cooling-device = <&modem_vdd 0 0>;
			};
			cx_vdd_cdev {
				trip = <&mdm_vpe_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};
			mx_vdd_cdev {
				trip = <&mdm_vpe_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};
		};
	};

	mdm-core-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 6>;
		thermal-governor = "low_limits_floor";
		tracks-low;
		trips {
			mdm_core_trip: active-config0 {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
		cooling-maps {
			cpu0_cdev {
				trip = <&mdm_core_trip>;
				cooling-device = <&CPU0 1 1>;
			};
			modem_vdd_cdev {
				trip = <&mdm_core_trip>;
				cooling-device = <&modem_vdd 0 0>;
			};
			cx_vdd_cdev {
				trip = <&mdm_core_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};
			mx_vdd_cdev {
				trip = <&mdm_core_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};
		};
	};
};
+2 −100
Original line number Diff line number Diff line
@@ -131,6 +131,7 @@
			compatible = "arm,cortex-a7";
			reg = <0x0>;
			enable-method = "psci";
			#cooling-cells = <2>;
		};
	};

@@ -1257,6 +1258,7 @@
#include "sdxprairie-pcie.dtsi"
#include "sdxprairie-coresight.dtsi"
#include "sdxprairie-aqc.dtsi"
#include "sdxprairie-thermal.dtsi"

&gdsc_usb30 {
	status = "ok";
@@ -1270,106 +1272,6 @@
	status = "ok";
};

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

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

	ipa-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	cpu0-a7-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 3>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	mdm-5g-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 4>;
		thermal-governor = "user_space";
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	mdm-vpe-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 5>;
		thermal-governor = "user_space";
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	mdm-core-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 6>;
		thermal-governor = "user_space";
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};

&pcie0_rp {
	cnss: qcom,qca6390@0 {
		reg = <0 0 0 0 0>;