From patchwork Thu Aug 24 10:27:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rocky Hao X-Patchwork-Id: 9919779 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3211460353 for ; Thu, 24 Aug 2017 10:30:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21C5428BDC for ; Thu, 24 Aug 2017 10:30:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1686E28BDE; Thu, 24 Aug 2017 10:30:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=2.0 tests=BAYES_00, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C78B428BDC for ; Thu, 24 Aug 2017 10:30:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752112AbdHXKaO (ORCPT ); Thu, 24 Aug 2017 06:30:14 -0400 Received: from regular2.263xmail.com ([211.157.152.5]:59160 "EHLO regular2.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865AbdHXKaM (ORCPT ); Thu, 24 Aug 2017 06:30:12 -0400 X-Greylist: delayed 398 seconds by postgrey-1.27 at vger.kernel.org; Thu, 24 Aug 2017 06:30:11 EDT Received: from regular1.263xmail.com (unknown [192.168.165.230]) by regular2.263xmail.com (Postfix) with ESMTP id E9EE6B0; Thu, 24 Aug 2017 18:23:34 +0800 (CST) Received: from rocky.hao?rock-chips.com (unknown [192.168.167.230]) by regular1.263xmail.com (Postfix) with ESMTP id 3D40AB074; Thu, 24 Aug 2017 18:23:12 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 6E601387; Thu, 24 Aug 2017 18:23:10 +0800 (CST) X-RL-SENDER: rocky.hao@rock-chips.com X-FST-TO: rui.zhang@intel.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: rocky.hao@rock-chips.com X-UNIQUE-TAG: <223dd98911bb13caf767be74d0155f13> X-ATTACHMENT-NUM: 0 X-SENDER: rocky.hao@rock-chips.com X-DNS-TYPE: 0 Received: from unknown (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith SMTP id 14287SHS57S; Thu, 24 Aug 2017 18:23:12 +0800 (CST) From: Rocky Hao To: rui.zhang@intel.com, edubezval@gmail.com, heiko@sntech.de, robh+dt@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Cc: shawn.lin@rock-chips.com, cl@rock-chips.com, william.wu@rock-chips.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, xxx@rock-chips.com, jay.xu@rock-chips.com, wxt@rock-chips.com, huangtao@rock-chips.com, rocky.hao@rock-chips.com Subject: [PATCH 4/5] arm: dts: rockchip: add thermal nodes for RV1108 SoC Date: Thu, 24 Aug 2017 18:27:54 +0800 Message-Id: <1503570475-7850-5-git-send-email-rocky.hao@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503570475-7850-1-git-send-email-rocky.hao@rock-chips.com> References: <1503570475-7850-1-git-send-email-rocky.hao@rock-chips.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add thermal zone and dynamic CPU power coefficients for RV1108 Signed-off-by: Rocky Hao --- arch/arm/boot/dts/rv1108.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi index dbdd8c2180e7..cae920b6a145 100644 --- a/arch/arm/boot/dts/rv1108.dtsi +++ b/arch/arm/boot/dts/rv1108.dtsi @@ -43,6 +43,7 @@ #include #include #include +#include / { #address-cells = <1>; #size-cells = <1>; @@ -69,6 +70,8 @@ device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0xf00>; + #cooling-cells = <2>; /* min followed by max */ + dynamic-power-coefficient = <75>; }; }; @@ -275,6 +278,43 @@ status = "disabled"; }; + thermal-zones { + soc_thermal: soc-thermal { + polling-delay-passive = <20>; + polling-delay = <1000>; + sustainable-power = <50>; + + thermal-sensors = <&tsadc 0>; + + trips { + threshold: trip-point0 { + temperature = <70000>; + hysteresis = <2000>; + type = "passive"; + }; + target: trip-point1 { + 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>; + }; + }; + }; + + }; + tsadc: tsadc@10370000 { compatible = "rockchip,rv1108-tsadc"; reg = <0x10370000 0x100>;