arm64: dts: qcom: sm6115: Hook up GPU cooling device
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Tue, 2 Jan 2024 13:34:09 +0000 (14:34 +0100)
committerBjorn Andersson <andersson@kernel.org>
Sat, 27 Jan 2024 23:06:38 +0000 (17:06 -0600)
In order to allow for throttling the GPU, hook up the cooling device
to the respective thermal zones.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240102-topic-gpu_cooling-v1-5-fda30c57e353@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sm6115.dtsi

index cf8e72f06f8e5fd64aed9a77d846cb0cb7898abc..3ae696f6eb452fdb7912751dc1e503c155018666 100644 (file)
@@ -14,6 +14,7 @@
 #include <dt-bindings/interconnect/qcom,sm6115.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/qcom-rpmpd.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
        interrupt-parent = <&intc>;
 
                        nvmem-cells = <&gpu_speed_bin>;
                        nvmem-cell-names = "speed_bin";
+                       #cooling-cells = <2>;
 
                        status = "disabled";
 
                        polling-delay = <0>;
                        thermal-sensors = <&tsens0 15>;
 
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpu_alert0>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
+
                        trips {
-                               trip-point0 {
+                               gpu_alert0: trip-point0 {
                                        temperature = <115000>;
                                        hysteresis = <5000>;
                                        type = "passive";