From 061459c453298fb35c6fb9dba644e64049ed6a5e Mon Sep 17 00:00:00 2001 From: Hugh Cole-Baker Date: Sun, 12 Apr 2020 10:48:15 +0100 Subject: [PATCH] sigmaris: dts: rockpro64: Cool CPU with fan before throttling --- .../boot/dts/rockchip/rk3399-rockpro64.dtsi | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi index 17af7868afe76f..1968e5e356232d 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi @@ -59,6 +59,7 @@ #cooling-cells = <2>; fan-supply = <&vcc12v_dcin>; pwms = <&pwm1 0 50000 0>; + cooling-levels = <0 102 170 255>; }; sdio_pwrseq: sdio-pwrseq { @@ -215,6 +216,41 @@ cpu-supply = <&vdd_cpu_b>; }; +&cpu_thermal { + trips { + cpu_high0: cpu_high0 { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + cpu_high1: cpu_high1 { + temperature = <60000>; + hysteresis = <2000>; + type = "active"; + }; + cpu_high2: cpu_high2 { + temperature = <65000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map2 { + trip = <&cpu_high0>; + cooling-device = <&fan 0 1>; + }; + map3 { + trip = <&cpu_high1>; + cooling-device = <&fan 1 2>; + }; + map4 { + trip = <&cpu_high2>; + cooling-device = <&fan 2 3>; + }; + }; +}; + &emmc_phy { status = "okay"; };