Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: rockchip: Configure the GPU thermal zone for mickey

mickey crams a lot of hardware into a tiny package, which requires
more aggressive thermal throttling than for devices with a larger
footprint. Configure the GPU thermal zone to throttle the GPU
progressively at temperatures >= 60°C. Heat dissipated by the
CPUs also affects the GPU temperature, hence we cap the CPU
frequency to 1.4 GHz for temperatures above 65°C. Further throttling
of the CPUs may be performed by the CPU thermal zone.

The configuration matches that of the downstream Chrome OS 3.14
kernel, the 'official' kernel for mickey.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

authored by

Matthias Kaehlcke and committed by
Heiko Stuebner
c87efcc3 11983d85

+67
+67
arch/arm/boot/dts/rk3288-veyron-mickey.dts
··· 136 136 }; 137 137 }; 138 138 139 + &gpu_thermal { 140 + /delete-node/ trips; 141 + /delete-node/ cooling-maps; 142 + 143 + trips { 144 + gpu_alert_warmish: gpu_alert_warmish { 145 + temperature = <60000>; /* millicelsius */ 146 + hysteresis = <2000>; /* millicelsius */ 147 + type = "passive"; 148 + }; 149 + gpu_alert_warm: gpu_alert_warm { 150 + temperature = <65000>; /* millicelsius */ 151 + hysteresis = <2000>; /* millicelsius */ 152 + type = "passive"; 153 + }; 154 + gpu_alert_hotter: gpu_alert_hotter { 155 + temperature = <84000>; /* millicelsius */ 156 + hysteresis = <2000>; /* millicelsius */ 157 + type = "passive"; 158 + }; 159 + gpu_alert_very_very_hot: gpu_alert_very_very_hot { 160 + temperature = <86000>; /* millicelsius */ 161 + hysteresis = <2000>; /* millicelsius */ 162 + type = "passive"; 163 + }; 164 + gpu_crit: gpu_crit { 165 + temperature = <90000>; /* millicelsius */ 166 + hysteresis = <2000>; /* millicelsius */ 167 + type = "critical"; 168 + }; 169 + }; 170 + 171 + cooling-maps { 172 + /* After 1st level throttle the GPU down to as low as 400 MHz */ 173 + gpu_warmish_limit_gpu { 174 + trip = <&gpu_alert_warmish>; 175 + cooling-device = <&gpu THERMAL_NO_LIMIT 1>; 176 + }; 177 + 178 + /* 179 + * Slightly after we throttle the GPU, we'll also make sure that 180 + * the CPU can't go faster than 1.4 GHz. Note that we won't 181 + * throttle the CPU lower than 1.4 GHz due to GPU heat--we'll 182 + * let the CPU do the rest itself. 183 + */ 184 + gpu_warm_limit_cpu { 185 + trip = <&gpu_alert_warm>; 186 + cooling-device = <&cpu0 4 4>, 187 + <&cpu1 4 4>, 188 + <&cpu2 4 4>, 189 + <&cpu3 4 4>; 190 + }; 191 + 192 + /* When hot, GPU goes down to 300 MHz */ 193 + gpu_hotter_limit_gpu { 194 + trip = <&gpu_alert_hotter>; 195 + cooling-device = <&gpu 2 2>; 196 + }; 197 + 198 + /* When really hot, don't let GPU go _above_ 300 MHz */ 199 + gpu_very_very_hot_limit_gpu { 200 + trip = <&gpu_alert_very_very_hot>; 201 + cooling-device = <&gpu 2 THERMAL_NO_LIMIT>; 202 + }; 203 + }; 204 + }; 205 + 139 206 &i2c2 { 140 207 status = "disabled"; 141 208 };