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: 9603691 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 6409160522 for ; Fri, 3 Mar 2017 23:21:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54E9E2846A for ; Fri, 3 Mar 2017 23:21:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 499FF285B8; Fri, 3 Mar 2017 23:21:41 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 059A32861F for ; Fri, 3 Mar 2017 23:21:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752375AbdCCXVf (ORCPT ); Fri, 3 Mar 2017 18:21:35 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:56623 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752107AbdCCXVM (ORCPT ); Fri, 3 Mar 2017 18:21:12 -0500 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 Cc: Martin Sperl , Catalin Marinas , Will Deacon , Rob Herring , Frank Rowand , Florian Fainelli , linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren 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= 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 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"; };