From patchwork Fri Mar 3 23:18:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 9603685 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 B6D4A602B4 for ; Fri, 3 Mar 2017 23:21:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7AE22846A for ; Fri, 3 Mar 2017 23:21:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C06A2861C; Fri, 3 Mar 2017 23:21:39 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 4E8F02846A for ; Fri, 3 Mar 2017 23:21:39 +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=yXq3+M6Ujc3IBuCK8uXtGCMXFl+ThVixQq5QiNIbgD0=; b=dYTSzfuzmvhWQ+Oy0IdrWkwtLe M/xcpk/MxdFoQtcyWk1Q8V7MPFxWFM0NMTK4NsSxkFujHF2/KdFVlHHKi+tUS2BC+gKa16cvIlpHO 2Sgz1lKQIDTXmIxCldeVY7+qSSKdoUSgAw1Fufsx/NtGRSjTXLw5coefzFthdtktV/yVVbTiELc4J oNvkBlHwH5FMgn1o1uo98QDHgVaf2w5fH1pYM1sCL3HG0JnshCFMrZQLHW+zhNBTwZEZOXwiPgS45 lUo0NnfcZu19lTIpRKTglCZtZJPQNsV6oDYD8KwmVjGQg17Ql0iYY+uVy32wnrYm/vRJVH8iU3ZXa lVJsWKSg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cjwW2-00043c-TE; Fri, 03 Mar 2017 23:21:38 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cjwU5-0001f6-7P; Fri, 03 Mar 2017 23:19:41 +0000 Received: from localhost.localdomain ([95.91.4.8]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LnGP8-1c5daC12RK-00hfT8; Sat, 04 Mar 2017 00:19:02 +0100 From: Stefan Wahren To: Eric Anholt , Zhang Rui , Eduardo Valentin Subject: [PATCH V10 4/6] ARM: dts: bcm283x: Add CPU thermal zone with 1 trip point Date: Fri, 3 Mar 2017 23:18:47 +0000 Message-Id: <1488583129-4159-5-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1488583129-4159-1-git-send-email-stefan.wahren@i2se.com> References: <1488583129-4159-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:AFLadEMuEPp90+//SLrAJPAdMCi+X6FRf/t3JbFtQh7rC7T+1fA quhKtjjcBlrYWz8f7+OzySzGut9+qs3eEV5TMynv4oWFoPGP32OhY44D+Jo0btMKbyq5BEt HZ1RvLBRCvD53wGUwj4SUN6HKZdpyA9y6Z2tr3ZEdHnk6Dxmro8InUq3VszkcBlhaYe+WYD j9Zdbhx26u9nomSQFTcXg== X-UI-Out-Filterresults: notjunk:1; V01:K0:s0jNCrXiDqE=:gsbrzM9Yye+pi9K392o2bF +8Dw+kSFbX/v4UnIbFpPnqJqQv/Gar1+7KeakTQzwora4762mJoIM61lgaiRH2EQPzDO875X+ ihqgrP6W9pUQOlGm85qEXruk6HCxtNszfLR/VgnV4kfCVhLRPIdRd4ShzJkPmOSvwS5Cn0I9U Kyed/fjP/KPPyfRBB3/q55CRVM5qyyULXpmXnqfMHs45wloQs+/iQZ+ylcxizXtcrxix7tuie soFqxDQc4SyeQxOK4Luo1Qcxm+u5zRxiCqIUvZUfcjXqoPUuNMrPgJGtJ0jCJPmYU1YCqUCV9 bCnBQFQLBpwnL8uNDRsg8xvohdlH8hFnhaCv0aCvmCP6xdJpI0DQWCOqkXOxKR+M9uG3FptkN UjFIbcNrdtZ4JgiJ2iafD8mVXI2o1090I8M4xR81n+v6ud+Z+I07g1uSpJCYC2dUKOCeDUtby MX94AZZ9WhoHcor2Fgasmwd6RhlYFNCioFBkrtqmJW73OdYdFD4RLuJVubG0+mdEC/OtTi6BI VmbntxcBMC7FJCB/2fgMum6jqyNX2BR0iyy1iqUQv12b+e7oKWGn0JbHoq+x+7hy174rFZ82H odC/6zlSpo4Hg/dupZzPMEWzkS0M0kxmHA5EBqRqzD+eSuVnd/Mdz3rYQJraMOsNepvhqjY4m 8uXNwMcZHyDW/rGpW2H1aAIs8JdQG+15/eMQtaC4jKfJFWDs2I4TK8NJiFMQABRyct9k= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170303_151937_620124_D756083B X-CRM114-Status: GOOD ( 10.19 ) 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: Stefan Wahren , devicetree@vger.kernel.org, Florian Fainelli , linux-pm@vger.kernel.org, Catalin Marinas , Will Deacon , Rob Herring , linux-rpi-kernel@lists.infradead.org, Martin Sperl , Frank Rowand , 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 As suggested by Eduardo Valentin this adds the thermal zone for the bcm2835 SoC with its single thermal sensor. We start with the criticial trip point and leave the cooling devices empty since we don't have any at the moment. Since the coefficients could vary depending on the SoC we need to define them separate. Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/bcm2835.dtsi | 4 ++++ arch/arm/boot/dts/bcm2836.dtsi | 4 ++++ arch/arm/boot/dts/bcm283x.dtsi | 21 +++++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index 0890d97..659b6e9 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi @@ -24,6 +24,10 @@ }; }; +&cpu_thermal { + coefficients = <(-538) 407000>; +}; + /* enable thermal sensor with the correct compatible property set */ &thermal { compatible = "brcm,bcm2835-thermal"; diff --git a/arch/arm/boot/dts/bcm2836.dtsi b/arch/arm/boot/dts/bcm2836.dtsi index 519a44f..da3deeb 100644 --- a/arch/arm/boot/dts/bcm2836.dtsi +++ b/arch/arm/boot/dts/bcm2836.dtsi @@ -77,6 +77,10 @@ interrupts = <8>; }; +&cpu_thermal { + coefficients = <(-538) 407000>; +}; + /* enable thermal sensor with the correct compatible property set */ &thermal { compatible = "brcm,bcm2836-thermal"; diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index a3106aa..9bc0a1c9 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -19,6 +19,26 @@ bootargs = "earlyprintk console=ttyAMA0"; }; + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <0>; + polling-delay = <1000>; + + thermal-sensors = <&thermal>; + + trips { + cpu-crit { + temperature = <80000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + }; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <1>; @@ -394,6 +414,7 @@ compatible = "brcm,bcm2835-thermal"; reg = <0x7e212000 0x8>; clocks = <&clocks BCM2835_CLOCK_TSENS>; + #thermal-sensor-cells = <0>; status = "disabled"; };