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

Commit fc7be8b0 authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

ARM: dts: msm: Add case_therm based thermal zone config for MSM8953



Add case_therm based thermal zone rule for MSM8953 QRD platform.
It includes cpu mitigation, modem mitigation and charger mitigation.
MSM8953 QRD thermal zone rules will be the default thermal zone rules
for MSM8953.

Disable case_therm based thermal zone rule for msm8953 MTP platform.

Change-Id: Ic2fc59c4e56102ce20e85acdf5767a24b3a4c2cf
Signed-off-by: default avatarManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
parent 46d7e4de
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -194,3 +194,9 @@
		};
	};
};

&thermal_zones {
	case-therm-step {
		status = "disabled";
	};
};
+82 −0
Original line number Diff line number Diff line
@@ -1117,4 +1117,86 @@
			};
		};
	};

	case-therm-step {
		polling-delay-passive = <2000>;
		polling-delay = <0>;
		thermal-sensors = <&pm8953_vadc 0x13>;
		thermal-governor = "step_wise";

		trips {
			cpus_trip: cpus-trip {
				temperature = <43000>;
				hysteresis = <0>;
				type = "passive";
			};
			modem_trip0: modem-trip0 {
				temperature = <45000>;
				hysteresis = <2000>;
				type = "passive";
			};
			modem_trip1: modem-trip1 {
				temperature = <48000>;
				hysteresis = <3000>;
				type = "passive";
			};
			modem_trip2: modem-trip2 {
				temperature = <54000>;
				hysteresis = <4000>;
				type = "passive";
			};
		};

		cooling-maps {
			skin_cpu0 {
				trip = <&cpus_trip>;
				/* throttle from fmax to 1689600KHz */
				cooling-device = <&CPU0 THERMAL_NO_LIMIT 3>;
			};
			skin_cpu1 {
				trip = <&cpus_trip>;
				cooling-device = <&CPU1 THERMAL_NO_LIMIT 3>;
			};
			skin_cpu2 {
				trip = <&cpus_trip>;
				cooling-device = <&CPU2 THERMAL_NO_LIMIT 3>;
			};
			skin_cpu3 {
				trip = <&cpus_trip>;
				cooling-device = <&CPU3 THERMAL_NO_LIMIT 3>;
			};
			skin_cpu4 {
				trip = <&cpus_trip>;
				cooling-device = <&CPU4 THERMAL_NO_LIMIT 3>;
			};
			skin_cpu5 {
				trip = <&cpus_trip>;
				cooling-device = <&CPU5 THERMAL_NO_LIMIT 3>;
			};
			skin_cpu6 {
				trip = <&cpus_trip>;
				cooling-device = <&CPU6 THERMAL_NO_LIMIT 3>;
			};
			skin_cpu7 {
				trip = <&cpus_trip>;
				cooling-device = <&CPU7 THERMAL_NO_LIMIT 3>;
			};
			modem_lvl1 {
				trip = <&modem_trip1>;
				cooling-device = <&modem_pa 2 2>;
			};
			modem_lvl2 {
				trip = <&modem_trip2>;
				cooling-device = <&modem_pa 3 3>;
			};
			modem_proc_lvl1 {
				trip = <&modem_trip0>;
				cooling-device = <&modem_proc 1 1>;
			};
			modem_proc_lvl2 {
				trip = <&modem_trip2>;
				cooling-device = <&modem_proc 3 3>;
			};
		};
	};
};
+46 −0
Original line number Diff line number Diff line
@@ -60,3 +60,49 @@
&pm8953_pwm {
	status = "ok";
};

&thermal_zones {
	case-therm-step {
		trips {
			batt_trip1: batt-trip1 {
				temperature = <38000>;
				hysteresis = <3000>;
				type = "passive";
			};
			batt_trip2: batt-trip2 {
				temperature = <40000>;
				hysteresis = <2000>;
				type = "passive";
			};
			batt_trip3: batt-trip3 {
				temperature = <43000>;
				hysteresis = <3000>;
				type = "passive";
			};
			batt_trip4: batt-trip4 {
				temperature = <48000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};

		cooling-maps {
			battery_lvl1 {
				trip = <&batt_trip1>;
				cooling-device = <&pmi632_charger 2 2>;
			};
			battery_lvl2 {
				trip = <&batt_trip2>;
				cooling-device = <&pmi632_charger 3 3>;
			};
			battery_lvl3 {
				trip = <&batt_trip3>;
				cooling-device = <&pmi632_charger 4 4>;
			};
			battery_lvl4 {
				trip = <&batt_trip4>;
				cooling-device = <&pmi632_charger 5 5>;
			};
		};
	};
};