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

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

ARM: dts: msm: Add BCL sensors for pm855b



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

Change-Id: Id4943bb580f2ddfa43b498023260b443640c116b
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent d6f945be
Loading
Loading
Loading
Loading
+111 −0
Original line number Diff line number Diff line
@@ -259,6 +259,27 @@
						 <9000 3000>, /* 9V @ 3A */
						 <12000 2250>; /* 12V @ 2.25A */
		};

		pm855b_bcl: bcl@1d00 {
			compatible = "qcom,bcl-v5";
			reg = <0x1d00 0x100>;
			interrupts = <0x2 0x1d 0x0 IRQ_TYPE_NONE>,
					<0x2 0x1d 0x1 IRQ_TYPE_NONE>,
					<0x2 0x1d 0x0 IRQ_TYPE_NONE>,
					<0x2 0x1d 0x1 IRQ_TYPE_NONE>,
					<0x2 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>;
		};
	};

	qcom,pm855b@3 {
@@ -294,4 +315,94 @@
			};
		};
	};

	pm855b-ibat-lvl0 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm855b_bcl 0>;

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

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

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

	pm855b-vbat-lvl0 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm855b_bcl 2>;

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

	pm855b-vbat-lvl1 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm855b_bcl 3>;

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

	pm855b-vbat-lvl2 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm855b_bcl 4>;

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

	soc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&bcl_soc>;

		trips {
			soc_trip:soc-trip {
				temperature = <10>;
				hysteresis = <0>;
				type = "passive";
			};
		};
	};
};