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

Commit 0c5f0169 authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Add BCL configuration for pmi632



Enable BCL driver and add BCL related thermal zone
configuration for pmi632.

Change-Id: If5a94ab85c13d8865dc9305d53f081579a94c44a
Signed-off-by: default avatarManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
parent b66c9ba7
Loading
Loading
Loading
Loading
+117 −0
Original line number Diff line number Diff line
@@ -407,6 +407,21 @@
				reg = <0xb100 0x100>;
			};
		};

		bcl_sensor: bcl@3d00 {
			compatible = "qcom,msm-bcl-pmic5";
			reg = <0x3d00 0xff>;
			interrupts = <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
					<0x2 0x3d 0x1 IRQ_TYPE_NONE>;
			interrupt-names = "bcl-high-ibat",
						"bcl-low-vbat";
			#thermal-sensor-cells = <1>;
		};

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

	pmi632_3: qcom,pmi632@3 {
@@ -571,3 +586,105 @@
		qcom,switch-source = <&pmi632_switch0>;
	};
};

&thermal_zones {
	ibat-high {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&bcl_sensor 0>;

		trips {
			pmi632_ibat:ibat-high {
				temperature = <3500>;
				hysteresis = <200>;
				type = "passive";
			};
		};
	};

	vbat_low {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&bcl_sensor 2>;
		tracks-low;

		trips {
			pmi632_vbat_low: vbat-low {
				temperature = <3000>;
				hysteresis = <100>;
				type = "passive";
			};
		};

		cooling-maps {
			vbat_map4 {
				trip = <&pmi632_vbat_low>;
				cooling-device =
					<&CPU4 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			vbat_map5 {
				trip = <&pmi632_vbat_low>;
				cooling-device =
					<&CPU5 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			vbat_map6 {
				trip = <&pmi632_vbat_low>;
				cooling-device =
					<&CPU6 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			vbat_map7 {
				trip = <&pmi632_vbat_low>;
				cooling-device =
					<&CPU7 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
		};
	};

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

		trips {
			pmi632_low_soc: low-soc {
				temperature = <10>;
				hysteresis = <0>;
				type = "passive";
			};
		};
		cooling-maps {
			soc_map4 {
				trip = <&pmi632_low_soc>;
				cooling-device =
					<&CPU4 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			soc_map5 {
				trip = <&pmi632_low_soc>;
				cooling-device =
					<&CPU5 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			soc_map6 {
				trip = <&pmi632_low_soc>;
				cooling-device =
					<&CPU6 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			soc_map7 {
				trip = <&pmi632_low_soc>;
				cooling-device =
					<&CPU7 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
		};
	};
};