]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
arm64: dts: qcom: sdm630: Add thermal-zones configuration
authorKonrad Dybcio <konrad.dybcio@somainline.org>
Wed, 28 Jul 2021 22:25:19 +0000 (00:25 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 4 Aug 2021 20:07:03 +0000 (15:07 -0500)
Add a basic thermal-zones configuration to make sure the SoC
doesn't overheat itself to death.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20210728222542.54269-17-konrad.dybcio@somainline.org
[bjorn: Sorted thermal-zones below "soc"]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/sdm630.dtsi

index d952caf208cfc713ab822a716eb1db8c142345df..e71f799b1e4ab53fc40878ab0cfcf618a4b2ff2b 100644 (file)
                #hwlock-cells = <1>;
        };
 
+       thermal-zones {
+               aoss-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsens 0>;
+
+                       trips {
+                               aoss_alert0: trip-point0 {
+                                       temperature = <105000>;
+                                       hysteresis = <1000>;
+                                       type = "hot";
+                               };
+                       };
+               };
+
+               cpuss0-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsens 1>;
+
+                       trips {
+                               cpuss0_alert0: trip-point0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "hot";
+                               };
+                       };
+               };
+
+               cpuss1-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsens 2>;
+
+                       trips {
+                               cpuss1_alert0: trip-point0 {
+                                       temperature = <125000>;
+                                       hysteresis = <1000>;
+                                       type = "hot";
+                               };
+                       };
+               };
+
+               cpu0-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsens 3>;
+
+                       trips {
+                               cpu0_alert0: trip-point0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+
+                               cpu0_crit: cpu_crit {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               cpu1-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsens 4>;
+
+                       trips {
+                               cpu1_alert0: trip-point0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+
+                               cpu1_crit: cpu_crit {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               cpu2-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsens 5>;
+
+                       trips {
+                               cpu2_alert0: trip-point0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+
+                               cpu2_crit: cpu_crit {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               cpu3-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsens 6>;
+
+                       trips {
+                               cpu3_alert0: trip-point0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+
+                               cpu3_crit: cpu_crit {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               /*
+                * According to what downstream DTS says,
+                * the entire power efficient cluster has
+                * only a single thermal sensor.
+                */
+
+               pwr-cluster-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsens 7>;
+
+                       trips {
+                               pwr_cluster_alert0: trip-point0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+
+                               pwr_cluster_crit: cpu_crit {
+                                       temperature = <110000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               gpu-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&tsens 8>;
+
+                       trips {
+                               gpu_alert0: trip-point0 {
+                                       temperature = <90000>;
+                                       hysteresis = <1000>;
+                                       type = "hot";
+                               };
+                       };
+               };
+       };
+
        timer {
                compatible = "arm,armv8-timer";
                interrupts = <GIC_PPI 1 0xf08>,