From patchwork Thu Aug 30 15:45:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 10582227 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 46524174A for ; Thu, 30 Aug 2018 16:08:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 314D22C01F for ; Thu, 30 Aug 2018 16:08:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21B6C2C029; Thu, 30 Aug 2018 16:08:29 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C6082C01F for ; Thu, 30 Aug 2018 16:08:28 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=SGkeoxcoggzL3rK4xKzHfmumYu2N030OsYvBTAEJvkc=; b=rciBHmd47Ol4j5FcHXKIDdR7Xk /icn2nMXl9RUtYyj5xY+lexFLkj7564Qr488PHxHzjv79sRxAjSjpUlvCqJKFfx843e0LvmwxSEi1 WLPnXHGCKjeCE8S6Hz65GObLJrKpR36bJKdK6Lb89/JruPShcd5hl5Jrhj4L7lsqeofQc0JPs+At0 ZKPf8PdgleapqV6HGSn/VVBK8yBpRpeiB+n0Xz2apcx78I5q3uhD9nQlRrXATAXSOqGGD7SMGQ0dX NFYo1zmDglpcS8keOTJudIPiLzVGA0NI6d6c6MlHrJbWd3136cahlYYzX6UGqTq7Cj9969VSO8nAj uFPPpRag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvPUZ-00087w-Kh; Thu, 30 Aug 2018 16:08:19 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvP91-0001mq-GV for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 15:46:05 +0000 Received: by mail-wr1-x441.google.com with SMTP id 20-v6so8495117wrb.12 for ; Thu, 30 Aug 2018 08:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sICcaZN9SuHUxjIoI4iQcsXgJZYewubrScoChP39YpI=; b=Aw9v103kYcLLYZnLacNAi2w5W6W18WUc1/2IS7u1/9HUeYKyu4eVfDzJpD1PybEatM MrznRHu0Dyec+WLTggEvXmp5Kv0AyCMgzolRBcFSo0gyBteDJBPi4A3FbFhuf+bVVJSr c1plByogpJ61B/oG/PH35mpesTFkcO7qUY76jxP8pTCn7XnBOtLXxgNT2WGs4rSCcFrx 1CpIT5w6d56m/eCqh2mYJ9XgYLwEf0A5sLm4P28K/L8XHYSP8UyvztV8hXy6EtYlXBAA dPIIgci9jS3fMMvNK2OTj7tLhbedaZocdsbA8R+/5Bkh1jiKxN4AiDz31Uttg+7SNhPU Ry6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sICcaZN9SuHUxjIoI4iQcsXgJZYewubrScoChP39YpI=; b=ROSMO4rvoq8oHJduTdUV+1crN9khfN6VaVH8G6T7jA80ZRvYxF5uFOCG7/JGX476nz XGEBMuirC4Ri6OpS0sOqPK+kXpsRuHAUtAavKvD7XaBOy06hSQ/ZL+QUZHqF3qx6Qc+o 6JR+cyjvFa8Dd0aKj6lzgtXbJG5aUw++kbulQOry7CT/FFTTjwBcnhmaHHVyY+P7QUT+ p9Y4kvFTBSiQ5xi7kkXsNCTiKB3HEHNGYnWWA8dh0cs/4896F/9gWfUxnSrbodYU9bPM 8A3AQu85Gw2Cgtt3HJed184m+vBOMwnNtYOggQd8G5cOtaxn/PxcV1u+OZWVfQSrt8w/ Tivg== X-Gm-Message-State: APzg51DoVpycgDBYbCRAO0NfbYXh/1EUQLU6CA9xpkS+RtW65mqpbzaU Dxl4hSwH2MgBc67ZByfnCyc= X-Google-Smtp-Source: ANB0VdZ0MikSKsrAa87d0u3AUJ+5RqMu1iRmXtZH7fLGRlp1wDHMuNiCDvEZEfF05cd4AM5E4NiNTA== X-Received: by 2002:adf:8504:: with SMTP id 4-v6mr7769616wrh.72.1535643951102; Thu, 30 Aug 2018 08:45:51 -0700 (PDT) Received: from debian-hp.wlan.uni-ulm.de (eduroam170-020.wlan.uni-ulm.de. [134.60.170.20]) by smtp.gmail.com with ESMTPSA id j20-v6sm1362759wmh.9.2018.08.30.08.45.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 08:45:50 -0700 (PDT) From: Philipp Rossak To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, eugen.hristev@microchip.com, rdunlap@infradead.org, vilhelm.gray@gmail.com, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, geert+renesas@glider.be, lukas@wunner.de, icenowy@aosc.io, arnd@arndb.de, broonie@kernel.org, arnaud.pouliquen@st.com Subject: [PATCH v3 29/30] ARM: dts: sun8i: a83t: add thermal zone to A83T Date: Thu, 30 Aug 2018 17:45:17 +0200 Message-Id: <20180830154518.29507-30-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180830154518.29507-1-embed3d@gmail.com> References: <20180830154518.29507-1-embed3d@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_084603_614880_BF1C4580 X-CRM114-Status: GOOD ( 13.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the thermal zones to the A83T. Sensor 0 is located besides the cpu cluster 0. Sensor 1 is located besides cluster 1 and sensor 2 is located besides in the gpu. Signed-off-by: Philipp Rossak --- arch/arm/boot/dts/sun8i-a83t.dtsi | 103 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index f2f745930b08..78aa448e869f 100644 --- a/arch/arm/boot/dts/sun8i-a83t.dtsi +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi @@ -50,6 +50,7 @@ #include #include #include +#include / { interrupt-parent = <&gic>; @@ -69,6 +70,9 @@ cci-control-port = <&cci_control0>; enable-method = "allwinner,sun8i-a83t-smp"; reg = <0>; + #cooling-cells = <2>; + cooling-min-level = <0>; + cooling-max-level = <7>; }; cpu@1 { @@ -107,6 +111,9 @@ cci-control-port = <&cci_control1>; enable-method = "allwinner,sun8i-a83t-smp"; reg = <0x100>; + #cooling-cells = <2>; + cooling-min-level = <0>; + cooling-max-level = <7>; }; cpu@101 { @@ -1035,4 +1042,100 @@ #size-cells = <0>; }; }; + + thermal-zones { + cpu0_thermal: cpu0-thermal { + polling-delay-passive = <1000>; + polling-delay = <5000>; + thermal-sensors = <&ths 0>; + + trips { + cpu0_warm: cpu_warm { + temperature = <70000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu0_hot: cpu_hot { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu0_very_hot: cpu_very_hot { + temperature = <90000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu0_crit: cpu_crit { + temperature = <105000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + cpu_warm_limit_cpu { + trip = <&cpu0_warm>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT 4>; + }; + cpu_hot_limit_cpu { + trip = <&cpu0_hot>; + cooling-device = <&cpu0 5 5>; + }; + cpu_very_hot_limit_cpu { + trip = <&cpu0_very_hot>; + cooling-device = <&cpu0 7 THERMAL_NO_LIMIT>; + }; + }; + }; + + cpu1_thermal: cpu1-thermal { + polling-delay-passive = <1000>; + polling-delay = <5000>; + thermal-sensors = <&ths 1>; + + trips { + cpu1_warm: cpu_warm { + temperature = <70000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu1_hot: cpu_hot { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu1_very_hot: cpu_very_hot { + temperature = <90000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu1_crit: cpu_crit { + temperature = <105000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + cpu_warm_limit_cpu { + trip = <&cpu1_warm>; + cooling-device = <&cpu100 THERMAL_NO_LIMIT 4>; + }; + cpu_hot_limit_cpu { + trip = <&cpu1_hot>; + cooling-device = <&cpu100 5 5>; + }; + cpu_very_hot_limit_cpu { + trip = <&cpu1_very_hot>; + cooling-device = <&cpu100 7 THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu_thermal: gpu-thermal { + polling-delay-passive = <1000>; + polling-delay = <5000>; + thermal-sensors = <&ths 2>; + }; + }; };