From patchwork Sat Feb 22 21:42:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 11398359 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAD13930 for ; Sat, 22 Feb 2020 21:42:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7ED3206ED for ; Sat, 22 Feb 2020 21:42:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="j/Vc86OE"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=megous.com header.i=@megous.com header.b="rQJKas5i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7ED3206ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=megous.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=WHcjhU6xP/x4vaORmdgV3AEUxGbfv/1vn9NNPBeeBVc=; b=j/Vc86OE5ATLu3 w+KXyX4GsuY8Yykz3Hv377BJv+PlRvLyyh5SgH/pb3apAlq0QiI81ky0o5/Wm32kZ7l09tYol6nww 0WqUZLU8EIPruHVeJ9SOSqFJRkEina9775tJ192U29PX2h97ANGFO05u/jLnVMxhvjZGz6M5OnxQb 5WvITuO1IEeHlirtR+goQK/OitrH/H3h0Q+oAvly9uIdxqsbSW2hbvOAeUxho6piyOqAQwuczvolb ar9y/iKioZkg/JPiTVXCw77Tbao/XXYKmt7z1K1aQfme6XLt6DX6Z8vVFyzFUo7slnMtny9xNN5EA hzLzvl6Dbmf8EbthixmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5cXf-0006LZ-8z; Sat, 22 Feb 2020 21:42:31 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5cXb-0006L2-R7 for linux-arm-kernel@lists.infradead.org; Sat, 22 Feb 2020 21:42:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1582407746; bh=dcKJ6GDfjw8QBMbjUXyPISDFnoMrCuLTTe5c0g7pVbw=; h=From:To:Cc:Subject:Date:From; b=rQJKas5ihA94WS3YO+z1mztUCIwTlTp/jxaMTXLH3Ef6PrauCTy22n+MVavgSn9Sl +Lb98w5y3t/hfRZm9t/AVvt99h/rLMisJa56FvDaAA1oHDkcNR2u2NZB18sbFdrCz/ eKpMSBvmkdM+3U1P6r6rC2o+IkAz085jyjUYwad4= From: Ondrej Jirman To: linux-sunxi@googlegroups.com Subject: [PATCH] ARM: dts: sun8i-h3: Add thermal trip points/cooling maps Date: Sat, 22 Feb 2020 22:42:24 +0100 Message-Id: <20200222214224.209860-1-megous@megous.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200222_134228_048334_E9F9FA35 X-CRM114-Status: UNSURE ( 6.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , Maxime Ripard , Chen-Yu Tsai , Rob Herring , "moderated list:ARM/Allwinner sunXi SoC support" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This enables passive cooling by down-regulating CPU voltage and frequency. Signed-off-by: Ondrej Jirman --- arch/arm/boot/dts/sun8i-h3.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi index 7d2e30a00cd2a..dca51548881a8 100644 --- a/arch/arm/boot/dts/sun8i-h3.dtsi +++ b/arch/arm/boot/dts/sun8i-h3.dtsi @@ -41,6 +41,7 @@ */ #include "sunxi-h3-h5.dtsi" +#include / { cpus { @@ -204,6 +205,30 @@ cpu_thermal: cpu-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 0>; + + trips { + cpu_hot_trip: cpu-hot { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_very_hot_trip: cpu-very-hot { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + cpu-hot-limit { + trip = <&cpu_hot_trip>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; }; };