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

Commit 5c4c527a authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

ARM: dts: msm: Add BCL configuration for LITO

Add BCL configuration to monitor battery voltage, battery current
and state of charge for lito. When the thresholds are reached,
the configuration is defined to mitigate CPUs.

Change-Id: I6f51d8eaca359494a8c139b0554048b941cdecc3
parent 9a343da2
Loading
Loading
Loading
Loading
+129 −0
Original line number Diff line number Diff line
@@ -113,4 +113,133 @@
			};
		};
	};

	soc {
		cooling-maps {
			soc_cpu6 {
				trip = <&soc_trip>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			soc_cpu7 {
				trip = <&soc_trip>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	pm7250b-vbat-lvl0 {
		cooling-maps {
			vbat_cpu6 {
				trip = <&vbat_lvl0>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			vbat_cpu7 {
				trip = <&vbat_lvl0>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	pm7250b-vbat-lvl1 {
		cooling-maps {
			vbat_cpu6 {
				trip = <&vbat_lvl1>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			vbat_cpu7 {
				trip = <&vbat_lvl1>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	pm7250b-vbat-lvl2 {
		cooling-maps {
			vbat_cpu6 {
				trip = <&vbat_lvl2>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			vbat_cpu7 {
				trip = <&vbat_lvl2>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	pm7250b-ibat-lvl0 {
		cooling-maps {
			ibat_cpu6 {
				trip = <&ibat_lvl0>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			ibat_cpu7 {
				trip = <&ibat_lvl0>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	pm7250b-ibat-lvl1 {
		cooling-maps {
			ibat_cpu6 {
				trip = <&ibat_lvl1>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			ibat_cpu7 {
				trip = <&ibat_lvl1>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	pm8150l-vph-lvl0 {
		disable-thermal-zone;
		cooling-maps {
			vph_cpu6 {
				trip = <&vph_lvl0>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			vph_cpu7 {
				trip = <&vph_lvl0>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	pm8150l-vph-lvl1 {
		disable-thermal-zone;
		cooling-maps {
			vph_cpu6 {
				trip = <&vph_lvl1>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			vph_cpu7 {
				trip = <&vph_lvl1>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	pm8150l-vph-lvl2 {
		disable-thermal-zone;
		cooling-maps {
			vph_cpu6 {
				trip = <&vph_lvl2>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			vph_cpu7 {
				trip = <&vph_lvl2>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};
};
+121 −0
Original line number Diff line number Diff line
@@ -420,6 +420,27 @@
			#size-cells = <0>;
			#thermal-sensor-cells = <1>;
		};

		pm7250b_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,pm7250b@3 {
@@ -465,4 +486,104 @@
			};
		};
	};

	pm7250b-ibat-lvl0 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm7250b_bcl 0>;
		wake-capable-sensor;

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

	pm7250b-ibat-lvl1 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm7250b_bcl 1>;
		wake-capable-sensor;

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

	pm7250b-vbat-lvl0 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm7250b_bcl 2>;
		wake-capable-sensor;
		tracks-low;

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

	pm7250b-vbat-lvl1 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm7250b_bcl 3>;
		wake-capable-sensor;
		tracks-low;

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

	pm7250b-vbat-lvl2 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm7250b_bcl 4>;
		wake-capable-sensor;
		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>;
		wake-capable-sensor;
		tracks-low;

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