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

Commit e0a127f7 authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

ARM: dts: qcom: Add thermal configuration for BENGAL

Add thermal configuration to add CPU isolation cooling device,
CPU emergency mitigation, CDSP mitigation, virtual sensors,
VDD restriction config, CXIP thermal zone config etc. for BENGAL.

Change-Id: I1681448728b74c02d0d91395f8d4be347acfa935
parent 719602ba
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -84,6 +84,11 @@
	/delete-node/ rpm-regulator-ldoa24;
};

&thermal_zones {
	/delete-node/ mapss-lowf;
	/delete-node/ camera-lowf;
};

 #include "bengal-stub-regulator.dtsi"

&sdhc_1 {
+446 −0
Original line number Diff line number Diff line
@@ -23,6 +23,49 @@
		qcom,no-cooling-device-register;
		#thermal-sensor-cells = <0>;
	};

	qcom,cpu-isolation {
		compatible = "qcom,cpu-isolate";
		cpu0_isolate: cpu0-isolate {
			qcom,cpu = <&CPU0>;
			#cooling-cells = <2>;
		};

		cpu1_isolate: cpu1-isolate {
			qcom,cpu = <&CPU1>;
			#cooling-cells = <2>;
		};

		cpu2_isolate: cpu2-isolate {
			qcom,cpu = <&CPU2>;
			#cooling-cells = <2>;
		};

		cpu3_isolate: cpu3-isolate {
			qcom,cpu = <&CPU3>;
			#cooling-cells = <2>;
		};

		cpu4_isolate: cpu4-isolate {
			qcom,cpu = <&CPU4>;
			#cooling-cells = <2>;
		};

		cpu5_isolate: cpu5-isolate {
			qcom,cpu = <&CPU5>;
			#cooling-cells = <2>;
		};

		cpu6_isolate: cpu6-isolate {
			qcom,cpu = <&CPU6>;
			#cooling-cells = <2>;
		};

		cpu7_isolate: cpu7-isolate {
			qcom,cpu = <&CPU7>;
			#cooling-cells = <2>;
		};
	};
};

&soc {
@@ -514,4 +557,407 @@
			};
		};
	};

	gpu-step {
		polling-delay-passive = <10>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&tsens0 15>;
		wake-capable-sensor;
		trips {
			gpu_step_trip: gpu-trip {
				temperature = <95000>;
				hysteresis = <0>;
				type = "passive";
			};
		};

		cooling-maps {
			gpu_cdev {
				trip = <&gpu_step_trip>;
				cooling-device = <&msm_gpu THERMAL_NO_LIMIT
							THERMAL_NO_LIMIT>;
			};
		};
	};

	hepta-cpu-max-step {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		wake-capable-sensor;

		trips {
			silver-trip {
				temperature = <120000>;
				hysteresis = <0>;
				type = "passive";
			};
		};
	};

	cpuss-0-step {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&tsens0 10>;
		wake-capable-sensor;

		trips {
			cpu4_5_config: cpu-4-5-config {
				temperature = <110000>;
				hysteresis = <10000>;
				type = "passive";
			};
		};

		cooling-maps {
			cpu4_cdev {
				trip = <&cpu4_5_config>;
				cooling-device = <&cpu4_isolate 1 1>;
			};

			cpu5_cdev {
				trip = <&cpu4_5_config>;
				cooling-device = <&cpu5_isolate 1 1>;
			};
		};
	};

	cpuss-1-step {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&tsens0 11>;
		wake-capable-sensor;

		trips {
			cpu6_7_config: cpu-6-7-config {
				temperature = <110000>;
				hysteresis = <10000>;
				type = "passive";
			};
		};

		cooling-maps {
			cpu6_cdev {
				trip = <&cpu6_7_config>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			cpu7_cdev {
				trip = <&cpu6_7_config>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	cpuss-2-step {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&tsens0 12>;
		wake-capable-sensor;

		trips {
			silv_cpus_config: silv-cpus-config {
				temperature = <110000>;
				hysteresis = <10000>;
				type = "passive";
			};
		};

		cooling-maps {
			cpu0_cdev {
				trip = <&silv_cpus_config>;
				cooling-device = <&cpu0_isolate 1 1>;
			};

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

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

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

	cpu-1-0-step {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&tsens0 6>;
		wake-capable-sensor;

		trips {
			cpu4_config: cpu4-config {
				temperature = <110000>;
				hysteresis = <10000>;
				type = "passive";
			};
		};

		cooling-maps {
			cpu4_cdev {
				trip = <&cpu4_config>;
				cooling-device = <&cpu4_isolate 1 1>;
			};
		};
	};

	cpu-1-1-step {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&tsens0 7>;
		wake-capable-sensor;

		trips {
			cpu5_config: cpu5-config {
				temperature = <110000>;
				hysteresis = <10000>;
				type = "passive";
			};
		};

		cooling-maps {
			cpu5_cdev {
				trip = <&cpu5_config>;
				cooling-device = <&cpu5_isolate 1 1>;
			};
		};
	};

	cpu-1-2-step {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&tsens0 8>;
		wake-capable-sensor;

		trips {
			cpu6_config: cpu6-config {
				temperature = <110000>;
				hysteresis = <10000>;
				type = "passive";
			};
		};

		cooling-maps {
			cpu6_cdev {
				trip = <&cpu6_config>;
				cooling-device = <&cpu6_isolate 1 1>;
			};
		};
	};

	cpu-1-3-step {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&tsens0 9>;
		wake-capable-sensor;

		trips {
			cpu7_config: cpu7-config {
				temperature = <110000>;
				hysteresis = <10000>;
				type = "passive";
			};
		};

		cooling-maps {
			cpu7_cdev {
				trip = <&cpu7_config>;
				cooling-device = <&cpu7_isolate 1 1>;
			};
		};
	};

	cdsp-hvx-step {
		polling-delay-passive = <10>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 1>;
		thermal-governor = "step_wise";
		wake-capable-sensor;

		trips {
			cdsp_trip0: cdsp-trip0 {
				temperature = <95000>;
				hysteresis = <20000>;
				type = "passive";
			};

			cdsp_trip1: cdsp-trip1 {
				temperature = <95000>;
				hysteresis = <0>;
				type = "passive";
			};

			cdsp_cx_mon: cdsp-cx-mon {
				temperature = <100000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};

		cooling-maps {
			cxip-cdev {
				trip = <&cdsp_trip0>;
				cooling-device = <&cxip_cdev 1 1>;
			};

			cdsp-cdev0 {
				trip = <&cdsp_trip1>;
				cooling-device = <&cdsp_sw THERMAL_NO_LIMIT
							THERMAL_NO_LIMIT>;
			};

			cdsp-cx-cdev0 {
				trip = <&cdsp_cx_mon>;
				cooling-device = <&msm_gpu THERMAL_MAX_LIMIT
							THERMAL_MAX_LIMIT>;
			};

			cdsp-cx-cdev1 {
				trip = <&cdsp_cx_mon>;
				cooling-device = <&modem_proc 3 3>;
			};

			cdsp-cx-cdev2 {
				trip = <&cdsp_cx_mon>;
				cooling-device = <&modem_pa 3 3>;
			};

			cdsp-cx-cdev3 {
				trip = <&cdsp_cx_mon>;
				cooling-device = <&cdsp_sw THERMAL_MAX_LIMIT
							THERMAL_MAX_LIMIT>;
			};
		};
	};

	mapss-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_floor";
		thermal-sensors = <&tsens0 0>;
		wake-capable-sensor;
		tracks-low;

		trips {
			mapss_trip: mapss-trip {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};

		cooling-maps {
			cx_vdd_cdev {
				trip = <&mapss_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};

			mx_vdd_cdev {
				trip = <&mapss_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};

			modem_vdd_cdev {
				trip = <&mapss_trip>;
				cooling-device = <&modem_vdd 0 0>;
			};
		};
	};

	mapss-lowc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&tsens0 0>;
		wake-capable-sensor;
		tracks-low;

		trips {
			mapss_cap_trip: mapss-cap-trip {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};

		cooling-maps {
			lmh_cpu_cdev {
				trip = <&mapss_cap_trip>;
				cooling-device = <&lmh_cpu_vdd 1 1>;
			};
		};
	};

	camera-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_floor";
		thermal-sensors = <&tsens0 3>;
		wake-capable-sensor;
		tracks-low;

		trips {
			camera_trip: camera-trip {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};

		cooling-maps {
			cx_vdd_cdev {
				trip = <&camera_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};

			mx_vdd_cdev {
				trip = <&camera_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};

			modem_vdd_cdev {
				trip = <&camera_trip>;
				cooling-device = <&modem_vdd 0 0>;
			};
		};
	};

	camera-lowc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "low_limits_cap";
		thermal-sensors = <&tsens0 3>;
		wake-capable-sensor;
		tracks-low;

		trips {
			camera_cap_trip: camera-cap-trip {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};

		cooling-maps {
			lmh_cpu_cdev {
				trip = <&camera_cap_trip>;
				cooling-device = <&lmh_cpu_vdd 1 1>;
			};
		};
	};
};
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
			next-level-cache = <&L2_0>;
			qcom,freq-domain = <&cpufreq_hw 0 7>;
			qcom,lmh-dcvs = <&lmh_dcvs0>;
			#cooling-cells = <2>;
			L2_0: l2-cache {
				compatible = "arm,arch-cache";
				cache-level = <2>;
@@ -137,6 +138,7 @@
			next-level-cache = <&L2_1>;
			qcom,freq-domain = <&cpufreq_hw 1 7>;
			qcom,lmh-dcvs = <&lmh_dcvs1>;
			#cooling-cells = <2>;
			L2_1: l2-cache {
				compatible = "arm,arch-cache";
				cache-level = <2>;