arm64: dts: rockchip: update px30 thermal zones for GPU
authorChris Morgan <macromorgan@hotmail.com>
Thu, 1 Dec 2022 20:36:54 +0000 (14:36 -0600)
committerHeiko Stuebner <heiko@sntech.de>
Tue, 10 Jan 2023 22:15:16 +0000 (23:15 +0100)
Without the trips, the following errors are received in the dmesg
log and the rockchip-thermal driver fails to load the gpu sensor:

"thermal_sys: Failed to find 'trips' node"
"rockchip-thermal ff280000.tsadc: failed to register sensor 1: -22"

Trip values are assumed, unfortunately, as the same values as the
CPU. The datasheet and TRM didn't appear to have any information
regarding thermals for the GPU.

Stress tested successfully on my Odroid Go Advance.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20221201203655.1245-4-macroalpha82@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/px30.dtsi

index bfa3580429d10e010e736ad929243583287f0dea..4f6959eb564d54cc7e108aecf9941a82476946de 100644 (file)
                                        cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                        contribution = <4096>;
                                };
-
-                               map1 {
-                                       trip = <&target>;
-                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-                                       contribution = <4096>;
-                               };
                        };
                };
 
                        polling-delay-passive = <100>; /* milliseconds */
                        polling-delay = <1000>; /* milliseconds */
                        thermal-sensors = <&tsadc 1>;
+
+                       trips {
+                               gpu_threshold: gpu-threshold {
+                                       temperature = <70000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               gpu_target: gpu-target {
+                                       temperature = <85000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               gpu_crit: gpu-crit {
+                                       temperature = <115000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&gpu_target>;
+                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
                };
        };