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

Commit 40465f0a authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

ARM: dts: qcom: Add die temperature zone config for PM6125 and PMI632

Add thermal zone config rules and mitigation config like battery
charging and CPU for PM6125 and PMI632 die temperature alarms
respectively.

Change-Id: I0d1a62653e63277e20b7972ef45979b796cdaee5
parent e0a127f7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/input/input.h>
#include "bengal-audio-overlay.dtsi"
#include "bengal-thermal-overlay.dtsi"

&soc {
	mtp_batterydata: qcom,battery-data {
+1 −0
Original line number Diff line number Diff line
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/input/input.h>
#include "bengal-thermal-overlay.dtsi"

&soc {
	qrd_batterydata: qcom,battery-data {
+74 −0
Original line number Diff line number Diff line
#include <dt-bindings/thermal/thermal.h>

&thermal_zones {
	pmi632-tz {
		cooling-maps {
			trip0_bat {
				trip = <&pmi632_trip0>;
				cooling-device =
					<&pmi632_charger (THERMAL_MAX_LIMIT-1)
						(THERMAL_MAX_LIMIT-1)>;
			};

			trip1_bat {
				trip = <&pmi632_trip1>;
				cooling-device =
					<&pmi632_charger THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
		};
	};

	pm6125-tz {
		cooling-maps {
			trip0_cpu0 {
				trip = <&pm6125_trip0>;
				cooling-device =
					<&CPU0 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};

			trip0_cpu4 {
				trip = <&pm6125_trip0>;
				cooling-device =
					<&CPU4 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};

			trip1_cpu1 {
				trip = <&pm6125_trip1>;
				cooling-device = <&cpu1_isolate 1 1>;
			};

			trip1_cpu2 {
				trip = <&pm6125_trip1>;
				cooling-device = <&cpu2_isolate 1 1>;
			};

			trip1_cpu3 {
				trip = <&pm6125_trip1>;
				cooling-device = <&cpu3_isolate 1 1>;
			};

			trip1_cpu4 {
				trip = <&pm6125_trip1>;
				cooling-device = <&cpu4_isolate 1 1>;
			};

			trip1_cpu5 {
				trip = <&pm6125_trip1>;
				cooling-device = <&cpu5_isolate 1 1>;
			};

			trip1_cpu6 {
				trip = <&pm6125_trip1>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			trip1_cpu7 {
				trip = <&pm6125_trip1>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};
};
+30 −0
Original line number Diff line number Diff line
@@ -164,3 +164,33 @@
		};
	};
};

&thermal_zones {
	pm6125-tz {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm6125_tz>;
		wake-capable-sensor;

		trips {
			pm6125_trip0: trip0 {
				temperature = <95000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm6125_trip1: trip1 {
				temperature = <115000>;
				hysteresis = <0>;
				type = "passive";
			};

			trip2 {
				temperature = <145000>;
				hysteresis = <0>;
				type = "passive";
			};
		};
	};
};
+30 −0
Original line number Diff line number Diff line
@@ -587,3 +587,33 @@

	};
};

&thermal_zones {
	pmi632-tz {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pmi632_tz>;
		wake-capable-sensor;

		trips {
			pmi632_trip0: trip0 {
				temperature = <95000>;
				hysteresis = <0>;
				type = "passive";
			};

			pmi632_trip1: trip1 {
				temperature = <115000>;
				hysteresis = <0>;
				type = "passive";
			};

			trip2 {
				temperature = <145000>;
				hysteresis = <0>;
				type = "passive";
			};
		};
	};
};