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

Commit ae305065 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: qcom: enable pmic alarm sensor and BCL thermal zones for monaco"

parents 0cb44ac2 ee8592bd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
#include "monaco-thermal-overlay.dtsi"
+101 −0
Original line number Diff line number Diff line
#include <dt-bindings/thermal/thermal_qti.h>

&thermal_zones {
	pm5100-tz {
		cooling-maps {
			trip0_cpu0 {
				trip = <&pm5100_trip0>;
				cooling-device =
					<&CPU0 (THERMAL_MAX_LIMIT-2)
						(THERMAL_MAX_LIMIT-2)>;
			};

			trip1_cpu2 {
				trip = <&pm5100_trip0>;
				cooling-device = <&cpu2_isolate 1 1>;
			};

			trip1_cpu3 {
				trip = <&pm5100_trip0>;
				cooling-device = <&cpu3_isolate 1 1>;
			};
		};
	};

	pm5100-bcl-lvl0 {
		cooling-maps {
			cpu0_cdev {
				trip = <&bcl_lvl0>;
				cooling-device =
					<&CPU0 (THERMAL_MAX_LIMIT-5)
						(THERMAL_MAX_LIMIT-5)>;
			};

			cpu2_cdev {
				trip = <&bcl_lvl0>;
				cooling-device = <&cpu2_isolate 1 1>;
			};

			cpu3_cdev {
				trip = <&bcl_lvl0>;
				cooling-device = <&cpu3_isolate 1 1>;
			};
		};
	};

	pm5100-bcl-lvl1 {
		cooling-maps {
			cpu0_cdev {
				trip = <&bcl_lvl1>;
				cooling-device =
					<&CPU0 (THERMAL_MAX_LIMIT-4)
						(THERMAL_MAX_LIMIT-4)>;
			};

			cpu1_cdev {
				trip = <&bcl_lvl1>;
				cooling-device = <&cpu1_isolate 1 1>;
			};

			modem_cdev {
				trip = <&bcl_lvl1>;
				cooling-device = <&modem_pa 2 2>;
			};

			modem1_cdev {
				trip = <&bcl_lvl1>;
				cooling-device = <&modem_tj 1 1>;
			};
		};
	};

	pm5100-bcl-lvl2 {
		cooling-maps {
			modem_cdev {
				trip = <&bcl_lvl2>;
				cooling-device = <&modem_tj 3 3>;
			};
		};
	};

	soc {
		cooling-maps {
			soc_cpu0 {
				trip = <&socd_trip>;
				cooling-device =
					<&CPU0 (THERMAL_MAX_LIMIT-4)
						(THERMAL_MAX_LIMIT-4)>;
			};

			soc_cpu2 {
				trip = <&socd_trip>;
				cooling-device = <&cpu2_isolate 1 1>;
			};

			soc_cpu3 {
				trip = <&socd_trip>;
				cooling-device = <&cpu3_isolate 1 1>;
			};
		};
	};
};
+0 −2
Original line number Diff line number Diff line
@@ -1428,8 +1428,6 @@
		};
	};

	thermal_zones: thermal-zones { };

	system_pm_rpm {
		compatible = "qcom,system-pm-rpm";
	};
+138 −0
Original line number Diff line number Diff line
@@ -156,6 +156,144 @@
		pm5100_cdc: qcom,pm5100-cdc {
			compatible = "qcom,pm5100-spmi";
		};

		pm5100_bcl: bcl@4700 {
			compatible = "qcom,bcl-v5";
			reg = <0x4700 0x100>;
			interrupts = <0x0 0x47 0x0 IRQ_TYPE_NONE>,
					<0x0 0x47 0x1 IRQ_TYPE_NONE>,
					<0x0 0x47 0x2 IRQ_TYPE_NONE>;
			interrupt-names = "bcl-lvl0",
						"bcl-lvl1",
						"bcl-lvl2";
			qcom,pmic7-threshold;
			qcom,ibat-ccm-hw-support;
			#thermal-sensor-cells = <1>;
		};

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

&thermal_zones {
	pm5100-tz {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm5100_tz>;

		trips {
			pm5100_trip0: trip0 {
				temperature = <95000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm5100_trip1: trip1 {
				temperature = <115000>;
				hysteresis = <0>;
				type = "critical";
			};

			pm5100_trip2: trip2 {
				temperature = <145000>;
				hysteresis = <0>;
				type = "critical";
			};
		};
	};

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

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

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

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

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

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

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

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

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

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

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

		trips {
			socd_trip:socd-trip {
				temperature = <90>;
				hysteresis = <0>;
				type = "passive";
			};
		};
	};
};