ARM: sun8i: a33: Add devfreq-based GPU cooling
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 5 Apr 2017 09:06:33 +0000 (11:06 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 5 Apr 2017 12:11:19 +0000 (14:11 +0200)
This adds GPU thermal throttling for the Allwinner A33.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
arch/arm/boot/dts/sun8i-a23-a33.dtsi
arch/arm/boot/dts/sun8i-a33.dtsi

index e26110e..bd28f75 100644 (file)
                        clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
                        clock-names = "bus", "core";
                        resets = <&ccu RST_BUS_GPU>;
+                       #cooling-cells = <2>;
 
                        assigned-clocks = <&ccu CLK_GPU>;
                        assigned-clock-rates = <408000000>;
index 2bf36d8..eeba172 100644 (file)
                                        trip = <&cpu_alert1>;
                                        cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
+
+                               map2 {
+                                       trip = <&gpu_alert0>;
+                                       cooling-device = <&mali 1 THERMAL_NO_LIMIT>;
+                               };
+
+                               map3 {
+                                       trip = <&gpu_alert1>;
+                                       cooling-device = <&mali 2 THERMAL_NO_LIMIT>;
+                               };
                        };
 
                        trips {
                                        type = "passive";
                                };
 
+                               gpu_alert0: gpu_alert0 {
+                                       /* milliCelsius */
+                                       temperature = <85000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
                                cpu_alert1: cpu_alert1 {
                                        /* milliCelsius */
                                        temperature = <90000>;
                                        type = "hot";
                                };
 
+                               gpu_alert1: gpu_alert1 {
+                                       /* milliCelsius */
+                                       temperature = <95000>;
+                                       hysteresis = <2000>;
+                                       type = "hot";
+                               };
+
                                cpu_crit: cpu_crit {
                                        /* milliCelsius */
                                        temperature = <110000>;