From f7c671915084c850d4a068ebc2c91068de0d3ff2 Mon Sep 17 00:00:00 2001 From: ashthespy Date: Fri, 17 Jan 2020 15:57:53 +0100 Subject: [PATCH 07/23] arm64: dts: rockchip: add cpu's thermal config for rk3308 --- arch/arm64/boot/dts/rockchip/rk3308.dtsi | 64 ++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi index 26af951be980..d2613ec774c1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi @@ -514,6 +514,70 @@ saradc: saradc@ff1e0000 { status = "disabled"; }; + thermal_zones: thermal-zones { + + soc_thermal: soc-thermal { + polling-delay-passive = <20>; + polling-delay = <1000>; + sustainable-power = <300>; + + thermal-sensors = <&tsadc 1>; + + 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 = <115000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&target>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + contribution = <4096>; + }; + }; + + }; + + logic_thermal: logic-thermal { + polling-delay-passive = <100>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ + + thermal-sensors = <&tsadc 0>; + }; + }; + + tsadc: tsadc@ff1f0000 { + compatible = "rockchip,rk3308-tsadc"; + reg = <0x0 0xff1f0000 0x0 0x100>; + interrupts = ; + rockchip,grf = <&grf>; + clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>; + clock-names = "tsadc", "apb_pclk"; + assigned-clocks = <&cru SCLK_TSADC>; + assigned-clock-rates = <50000>; + resets = <&cru SRST_TSADC>; + reset-names = "tsadc-apb"; + pinctrl-names = "gpio", "otpout"; + pinctrl-0 = <&tsadc_otp_pin>; + pinctrl-1 = <&tsadc_otp_out>; + #thermal-sensor-cells = <1>; + rockchip,hw-tshut-temp = <120000>; + status = "disabled"; + }; + amba: bus { compatible = "simple-bus"; #address-cells = <2>; -- 2.25.1