From 2c1523262bd04c8e14cc43c1e7e2158762c07ab9 Mon Sep 17 00:00:00 2001 From: Finley Xiao Date: Tue, 9 Oct 2018 11:39:21 +0800 Subject: [PATCH] arm64: dts: rockchip: Add thermal thermal zone node for rk1808 Change-Id: Ie42fcef7d94829aeb056ac1ead3d5885fc1a30f8 Signed-off-by: Finley Xiao --- arch/arm64/boot/dts/rockchip/rk1808.dtsi | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk1808.dtsi b/arch/arm64/boot/dts/rockchip/rk1808.dtsi index e13b584d371d..09420471873a 100644 --- a/arch/arm64/boot/dts/rockchip/rk1808.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk1808.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include / { compatible = "rockchip,rk1808"; @@ -502,6 +503,55 @@ status = "disabled"; }; + thermal_zones: thermal-zones { + soc_thermal: soc-thermal { + polling-delay-passive = <20>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ + sustainable-power = <527>; /* milliwatts */ + + thermal-sensors = <&tsadc 0>; + + trips { + threshold: trip-point-0 { + /* millicelsius */ + temperature = <75000>; + /* millicelsius */ + hysteresis = <2000>; + type = "passive"; + }; + target: trip-point-1 { + /* millicelsius */ + temperature = <85000>; + /* millicelsius */ + hysteresis = <2000>; + type = "passive"; + }; + soc_crit: soc-crit { + /* millicelsius */ + temperature = <115000>; + /* millicelsius */ + 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 = + <&npu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + contribution = <1024>; + }; + }; + }; + }; + tsadc: tsadc@ff3a0000 { compatible = "rockchip,rk1808-tsadc"; reg = <0x0 0xff3a0000 0x0 0x100>;