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

Commit 0ec57226 authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

ARM: dts: msm: Add BCL sensors and default thermal zone rules for PM6150



Add BCL sensors like ibat, vbat and soc for PM6150. These sensors will be
used by thermal framework to monitor and mitigate for over current or
lower battery voltage.

Change-Id: I880fd30d1df9f0bcabdf6da08f56885967cfb4af
Signed-off-by: default avatarManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
parent 689a8b1f
Loading
Loading
Loading
Loading
+115 −0
Original line number Diff line number Diff line
@@ -228,6 +228,27 @@
			};
		};

		pm6150_bcl: bcl@1d00 {
			compatible = "qcom,bcl-v5";
			reg = <0x1d00 0x100>;
			interrupts = <0x0 0x1d 0x0 IRQ_TYPE_NONE>,
					<0x0 0x1d 0x1 IRQ_TYPE_NONE>,
					<0x0 0x1d 0x0 IRQ_TYPE_NONE>,
					<0x0 0x1d 0x1 IRQ_TYPE_NONE>,
					<0x0 0x1d 0x2 IRQ_TYPE_NONE>;
			interrupt-names = "bcl-ibat-lvl0",
						"bcl-ibat-lvl1",
						"bcl-vbat-lvl0",
						"bcl-vbat-lvl1",
						"bcl-vbat-lvl2";
			#thermal-sensor-cells = <1>;
		};

		bcl_soc:bcl-soc {
			compatible = "qcom,msm-bcl-soc";
			#thermal-sensor-cells = <0>;
		};

		pm6150_tz: qcom,temp-alarm@2400 {
			compatible = "qcom,spmi-temp-alarm";
			reg = <0x2400 0x100>;
@@ -304,4 +325,98 @@
			};
		};
	};

	pm6150-ibat-lvl0 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm6150_bcl 0>;

		trips {
			ibat_lvl0:ibat-lvl0 {
				temperature = <5500>;
				hysteresis = <200>;
				type = "passive";
			};
		};
	};

	pm6150-ibat-lvl1 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm6150_bcl 1>;

		trips {
			ibat_lvl1:ibat-lvl1 {
				temperature = <6000>;
				hysteresis = <200>;
				type = "passive";
			};
		};
	};

	pm6150-vbat-lvl0 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm6150_bcl 2>;
		tracks-low;

		trips {
			vbat_lvl0: vbat-lvl0 {
				temperature = <3000>;
				hysteresis = <200>;
				type = "passive";
			};
		};
	};

	pm6150-vbat-lvl1 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm6150_bcl 3>;
		tracks-low;

		trips {
			vbat_lvl1:vbat-lvl1 {
				temperature = <2800>;
				hysteresis = <200>;
				type = "passive";
			};
		};
	};

	pm6150-vbat-lvl2 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm6150_bcl 4>;
		tracks-low;

		trips {
			vbat_lvl2:vbat-lvl2 {
				temperature = <2600>;
				hysteresis = <200>;
				type = "passive";
			};
		};
	};

	soc {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&bcl_soc>;
		tracks-low;

		trips {
			soc_trip:soc-trip {
				temperature = <10>;
				hysteresis = <0>;
				type = "passive";
			};
		};
	};
};
+51 −0
Original line number Diff line number Diff line
@@ -124,4 +124,55 @@
			};
		};
	};

	pm6150-vbat-lvl0 {
		cooling-maps {
			vbat_cpu6 {
				trip = <&vbat_lvl0>;
				cooling-device =
					<&CPU6 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			vbat_cpu7 {
				trip = <&vbat_lvl0>;
				cooling-device =
					<&CPU7 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
		};
	};

	pm6150-ibat-lvl0 {
		cooling-maps {
			ibat_cpu6 {
				trip = <&ibat_lvl0>;
				cooling-device =
					<&CPU6 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			ibat_cpu7 {
				trip = <&ibat_lvl0>;
				cooling-device =
					<&CPU7 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
		};
	};

	soc {
		cooling-maps {
			soc_cpu6 {
				trip = <&soc_trip>;
				cooling-device =
					<&CPU6 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			soc_cpu7 {
				trip = <&soc_trip>;
				cooling-device =
					<&CPU7 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
		};
	};
};