From e2fc934b982ff8be182311a0714dde65ef058dbf Mon Sep 17 00:00:00 2001 From: Finley Xiao Date: Mon, 4 Jan 2021 11:50:25 +0800 Subject: [PATCH] arm64: dts: rockchip: Add cooling devices for rk3568 Signed-off-by: Finley Xiao Change-Id: I08cd7b2462bbb28c7cee79d72682f314d8ce716b --- arch/arm64/boot/dts/rockchip/rk3568.dtsi | 46 +++++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi index 83b82b21dddc..f92ed5906cbc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include #include "rk3568-dram-default-timing.dtsi" / { @@ -63,6 +64,16 @@ enable-method = "psci"; clocks = <&scmi_clk 0>; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; + dynamic-power-coefficient = <187>; + power-model { + compatible = "simple-power-model"; + leakage-range= <10 40>; + ls = <(-9196) 6360 0>; + static-coefficient = <100000>; + ts = <83822 206397 (-4300) 71>; + thermal-zone = "soc-thermal"; + }; }; cpu1: cpu@100 { @@ -266,9 +277,20 @@ soc_thermal: soc-thermal { polling-delay-passive = <20>; /* milliseconds */ polling-delay = <1000>; /* milliseconds */ + sustainable-power = <1475>; /* milliwatts */ thermal-sensors = <&tsadc 0>; trips { + threshold: trip-point-0 { + temperature = <70000>; + hysteresis = <2000>; + type = "passive"; + }; + target: trip-point-1 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; soc_crit: soc-crit { /* millicelsius */ temperature = <115000>; @@ -277,6 +299,18 @@ type = "critical"; }; }; + cooling-maps { + map0 { + trip = <&target>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + contribution = <1024>; + }; + map1 { + trip = <&target>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + contribution = <1024>; + }; + }; }; gpu_thermal: gpu-thermal { @@ -961,11 +995,13 @@ operating-points-v2 = <&gpu_opp_table>; status = "disabled"; - power_model { - compatible = "arm,mali-simple-power-model"; - static-coefficient = <411000>; - dynamic-coefficient = <733>; - ts = <32000 4700 (-80) 2>; + gpu_power_model: power-model { + compatible = "simple-power-model"; + leakage-range= <5 15>; + ls = <(-24002) 22823 0>; + static-coefficient = <100000>; + dynamic-coefficient = <953>; + ts = <(-108890) 63610 (-1355) 20>; thermal-zone = "gpu-thermal"; }; };