arm64: dts: allwinner: a64: Add GPU thermal trips to the SoC dtsi
authorDragan Simic <dsimic@manjaro.org>
Tue, 20 Aug 2024 03:57:47 +0000 (05:57 +0200)
committerChen-Yu Tsai <wens@csie.org>
Wed, 4 Sep 2024 14:43:49 +0000 (22:43 +0800)
Add thermal trips for the two GPU thermal sensors found in the Allwinner A64.
There's only one GPU OPP defined since the commit 1428f0c19f9c ("arm64: dts:
allwinner: a64: Run GPU at 432 MHz"), so defining only the critical thermal
trips makes sense for the A64's two GPU thermal zones.

Having these critical thermal trips defined ensures that no hot spots develop
inside the SoC die that exceed the maximum junction temperature.  That might
have been possible before, although quite unlikely, because the CPU and GPU
portions of the SoC are packed closely inside the SoC, so the overheating GPU
would inevitably result in the heat soaking into the CPU portion of the SoC,
causing the CPU thermal sensor to return high readings and trigger the CPU
critical thermal trips.  However, it's better not to rely on the heat soak
and have the critical GPU thermal trips properly defined instead.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Tested-by: Norayr Chilingarian <norayr@arnet.am>
Link: https://lore.kernel.org/r/0a6110a7b27a050bd58ab3663087eecd8e873ac0.1724126053.git.dsimic@manjaro.org
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi

index e868ca5ae753a926e102eff414a63e825296713a..a5c3920e0f048e4fd6e368093d58b99b2803568e 100644 (file)
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
                        thermal-sensors = <&ths 1>;
+
+                       trips {
+                               gpu0_crit: gpu0-crit {
+                                       temperature = <110000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
                };
 
                gpu1_thermal: gpu1-thermal {
                        polling-delay-passive = <0>;
                        polling-delay = <0>;
                        thermal-sensors = <&ths 2>;
+
+                       trips {
+                               gpu1_crit: gpu1-crit {
+                                       temperature = <110000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
                };
        };