From dbc7eeb8ee3effcc9d2b79121cf4526a32365c85 Mon Sep 17 00:00:00 2001 From: Rocky Hao Date: Sat, 24 Feb 2018 18:14:49 +0800 Subject: [PATCH] arm64: dts: rockchip: add cpu's and gpu's thermal config for px30 add power model for gpu and also add cpu thermal config Change-Id: Iab5ef69b50c792b35c9ae5ffa863cc106d2c4292 Signed-off-by: Rocky Hao --- arch/arm64/boot/dts/rockchip/px30.dtsi | 49 ++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi index eb331d16f6cb..d68793713fe8 100644 --- a/arch/arm64/boot/dts/rockchip/px30.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi @@ -47,6 +47,8 @@ reg = <0x0 0x0>; enable-method = "psci"; clocks = <&cru ARMCLK>; + #cooling-cells = <2>; + dynamic-power-coefficient = <90>; operating-points-v2 = <&cpu0_opp_table>; }; @@ -686,12 +688,44 @@ }; thermal_zones: thermal-zones { + soc_thermal: soc-thermal { - polling-delay-passive = <20>; /* milliseconds */ - polling-delay = <1000>; /* milliseconds */ - sustainable-power = <1000>; /* milliwatts */ + polling-delay-passive = <20>; + polling-delay = <1000>; + sustainable-power = <750>; 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 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&target>; + 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>; + }; + }; }; gpu_thermal: gpu-thermal { @@ -983,9 +1017,18 @@ clocks = <&cru SCLK_GPU>; clock-names = "clk_mali"; power-domains = <&power PX30_PD_GPU>; + #cooling-cells = <2>; operating-points-v2 = <&gpu_opp_table>; status = "disabled"; + power_model@0 { + compatible = "arm,mali-simple-power-model"; + static-coefficient = <411000>; + dynamic-coefficient = <733>; + ts = <32000 4700 (-80) 2>; + thermal-zone = "gpu-thermal"; + }; + }; gpu_opp_table: gpu-opp-table {