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

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

ARM: dts: qcom: Add BCL mitigation level config for kona

Add BCL mitigation level thermal zone config for kona. This config will
have the devices to be mitigated when any of the BCL mitigation level
interrupt fires.

Change-Id: Iec0925d455e852bc26129b2f42975e9f326c9e9a
parent 4dee983e
Loading
Loading
Loading
Loading
+20 −58
Original line number Diff line number Diff line
@@ -29,137 +29,99 @@
		};
	};

	pm8150b-vbat-lvl0 {
	pm8150b-bcl-lvl0 {
		cooling-maps {
			vbat_cpu4 {
				trip = <&vbat_lvl0>;
				trip = <&b_bcl_lvl0>;
				cooling-device = <&cpu4_isolate 1 1>;
			};

			vbat_cpu5 {
				trip = <&vbat_lvl0>;
				trip = <&b_bcl_lvl0>;
				cooling-device = <&cpu5_isolate 1 1>;
			};

			vbat_gpu0 {
				trip = <&vbat_lvl0>;
				trip = <&b_bcl_lvl0>;
				cooling-device = <&msm_gpu 2 2>;
			};
		};
	};

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

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

			vbat_gpu1 {
				trip = <&vbat_lvl1>;
				trip = <&b_bcl_lvl1>;
				cooling-device = <&msm_gpu 4 4>;
			};
		};
	};

	pm8150b-vbat-lvl2 {
	pm8150b-bcl-lvl2 {
		cooling-maps {
			vbat_gpu2 {
				trip = <&vbat_lvl2>;
				trip = <&b_bcl_lvl2>;
				cooling-device = <&msm_gpu THERMAL_MAX_LIMIT
							THERMAL_MAX_LIMIT>;
			};
		};
	};

	pm8150b-ibat-lvl0 {
		cooling-maps {
			ibat_cpu4 {
				trip = <&ibat_lvl0>;
				cooling-device = <&cpu4_isolate 1 1>;
			};

			ibat_cpu5 {
				trip = <&ibat_lvl0>;
				cooling-device = <&cpu5_isolate 1 1>;
			};

			ibat_gpu0 {
				trip = <&ibat_lvl0>;
				cooling-device = <&msm_gpu 2 2>;
			};
		};
	};

	pm8150b-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>;
			};

			ibat_gpu1 {
				trip = <&ibat_lvl1>;
				cooling-device = <&msm_gpu 4 4>;
			};
		};
	};

	pm8150l-vph-lvl0 {
	pm8150l-bcl-lvl0 {
		disable-thermal-zone;
		cooling-maps {
			vph_cpu4 {
				trip = <&vph_lvl0>;
				trip = <&l_bcl_lvl0>;
				cooling-device = <&cpu4_isolate 1 1>;
			};

			vph_cpu5 {
				trip = <&vph_lvl0>;
				trip = <&l_bcl_lvl0>;
				cooling-device = <&cpu5_isolate 1 1>;
			};

			vph_gpu0 {
				trip = <&vph_lvl0>;
				trip = <&l_bcl_lvl0>;
				cooling-device = <&msm_gpu 2 2>;
			};
		};
	};

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

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

			vph_gpu1 {
				trip = <&vph_lvl1>;
				trip = <&l_bcl_lvl1>;
				cooling-device = <&msm_gpu 4 4>;
			};
		};
	};

	pm8150l-vph-lvl2 {
	pm8150l-bcl-lvl2 {
		disable-thermal-zone;
		cooling-maps {
			vph_gpu2 {
				trip = <&vph_lvl2>;
				trip = <&l_bcl_lvl2>;
				cooling-device = <&msm_gpu THERMAL_MAX_LIMIT
							THERMAL_MAX_LIMIT>;
			};
+53 −12
Original line number Diff line number Diff line
@@ -263,15 +263,11 @@
			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";
			interrupt-names = "bcl-lvl0",
						"bcl-lvl1",
						"bcl-lvl2";
			#thermal-sensor-cells = <1>;
		};

@@ -578,7 +574,7 @@
	};

	pm8150b-ibat-lvl0 {
		polling-delay-passive = <100>;
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8150b_bcl 0>;
@@ -593,7 +589,7 @@
	};

	pm8150b-ibat-lvl1 {
		polling-delay-passive = <100>;
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8150b_bcl 1>;
@@ -608,7 +604,7 @@
	};

	pm8150b-vbat-lvl0 {
		polling-delay-passive = <100>;
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm8150b_bcl 2>;
@@ -624,7 +620,7 @@
	};

	pm8150b-vbat-lvl1 {
		polling-delay-passive = <100>;
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm8150b_bcl 3>;
@@ -640,7 +636,7 @@
	};

	pm8150b-vbat-lvl2 {
		polling-delay-passive = <100>;
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm8150b_bcl 4>;
@@ -655,6 +651,51 @@
		};
	};

	pm8150b-bcl-lvl0 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8150b_bcl 5>;

		trips {
			b_bcl_lvl0: b-bcl-lvl0 {
				temperature = <1>;
				hysteresis = <1>;
				type = "passive";
			};
		};
	};

	pm8150b-bcl-lvl1 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8150b_bcl 6>;

		trips {
			b_bcl_lvl1: b-bcl-lvl1 {
				temperature = <1>;
				hysteresis = <1>;
				type = "passive";
			};
		};
	};

	pm8150b-bcl-lvl2 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8150b_bcl 7>;

		trips {
			b_bcl_lvl2: b-bcl-lvl2 {
				temperature = <1>;
				hysteresis = <1>;
				type = "passive";
			};
		};
	};

	soc {
		polling-delay-passive = <100>;
		polling-delay = <0>;
+51 −6
Original line number Diff line number Diff line
@@ -103,9 +103,9 @@
			interrupts = <0x4 0x3d 0x0 IRQ_TYPE_NONE>,
					<0x4 0x3d 0x1 IRQ_TYPE_NONE>,
					<0x4 0x3d 0x2 IRQ_TYPE_NONE>;
			interrupt-names = "bcl-vbat-lvl0",
						"bcl-vbat-lvl1",
						"bcl-vbat-lvl2";
			interrupt-names = "bcl-lvl0",
						"bcl-lvl1",
						"bcl-lvl2";
			#thermal-sensor-cells = <1>;
		};

@@ -457,7 +457,7 @@
	};

	pm8150l-vph-lvl0 {
		polling-delay-passive = <100>;
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm8150l_bcl 2>;
@@ -473,7 +473,7 @@
	};

	pm8150l-vph-lvl1 {
		polling-delay-passive = <100>;
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm8150l_bcl 3>;
@@ -489,7 +489,7 @@
	};

	pm8150l-vph-lvl2 {
		polling-delay-passive = <100>;
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&pm8150l_bcl 4>;
@@ -503,4 +503,49 @@
			};
		};
	};

	pm8150l-bcl-lvl0 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8150l_bcl 5>;

		trips {
			l_bcl_lvl0: l-bcl-lvl0 {
				temperature = <1>;
				hysteresis = <1>;
				type = "passive";
			};
		};
	};

	pm8150l-bcl-lvl1 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8150l_bcl 6>;

		trips {
			l_bcl_lvl1: l-bcl-lvl1 {
				temperature = <1>;
				hysteresis = <1>;
				type = "passive";
			};
		};
	};

	pm8150l-bcl-lvl2 {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8150l_bcl 7>;

		trips {
			l_bcl_lvl2: l-bcl-lvl2 {
				temperature = <1>;
				hysteresis = <1>;
				type = "passive";
			};
		};
	};
};