From patchwork Fri Mar 31 20:03:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 9657259 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 8A162601D2 for ; Fri, 31 Mar 2017 20:04:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C3DD286FC for ; Fri, 31 Mar 2017 20:04:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 713DD28707; Fri, 31 Mar 2017 20:04:09 +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=ham 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 26ABE286FC for ; Fri, 31 Mar 2017 20:04:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932356AbdCaUEF (ORCPT ); Fri, 31 Mar 2017 16:04:05 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:55865 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754898AbdCaUED (ORCPT ); Fri, 31 Mar 2017 16:04:03 -0400 Received: from localhost.localdomain ([95.91.4.8]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LapiO-1cRHay1GMS-00kLim; Fri, 31 Mar 2017 22:03:20 +0200 From: Stefan Wahren To: Eduardo Valentin , Zhang Rui , kernel@martin.sperl.org Cc: Eric Anholt , Rob Herring , Frank Rowand , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Stefan Wahren Subject: [PATCH V12 2/4] ARM: dts: bcm283x: Add CPU thermal zone with 1 trip point Date: Fri, 31 Mar 2017 20:03:04 +0000 Message-Id: <1490990586-30898-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1490990586-30898-1-git-send-email-stefan.wahren@i2se.com> References: <1490990586-30898-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:EWu1I2FCOmOZWddwcEVW/Hik563NmBSmSLiXahZAF69s2yAdH7j kdfdiDRjCMPPDFnxi4L7ypotT68D4z0yNphdwpMDdxCF1HG0skxx4+VmjVVOpzPm1EAwlMK M8aRMA2JDjF8QQ27RaM46LJp7/2Z1IIPjEJVMsJHXj5S4iKYsSFhElVCq9HORWhAX1uJvs6 /J1eFT+SVzc6ZFXABJZmQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:R5ez4jSiPfQ=:UANCivwDStl0DpK07HIjqM WJzbqkd1+liqbEEXiT6ucwzSEFYz2P4t9lIjJrlVFGZaW5k3zAh//2sHWcVxq1rAa4ikR1wrX ktdOMISUERxWXAxO6Gp/6lRmGfKs89dOOzzQorQKaxVrdNXy2aiiM/JhNq/+nYuVcUbX6nn0x +0L0zkuPZW24ve78Ex2UpDRNdZ016pD3kGsWiRB3nCXJ/kM71tDbfNIhsJ6wdfGp7zD1MmNqu 0i+ArWrOdWpPSNu4s/0jV5wV8zXBxViHu8xL6JAc9S8H7hs21EE9FQF3E9iieAuLUbeHje0FF 3KqHdFFbePEPYYyQ6/j/PnSXWfFNFDbV3WbaKPBdeEi0no2RvB7TMAQVe+au0BqzEjhwPwS7+ zdESCIPhUq9UbRbxPCynqG6nCTwsenH7kaX7E/Lha+ARkCVs4QJJ1P3k8IjtmdJMu8MLZEnbt 0FSjB9+O+snpUzKe4CXI2jY/uWwC2MUlGHN9BWdNq1uEPCvGkufxpOOFFy07sRH55b4htd7p0 av0sZ5hkc+gZa6eTdwBadgt+q0SJiCdaUrwfdym1IOp/jCBKZBZ4Qnh4jCib0yfqQLnZKEo0A 5G7VyAaoh/TCLYvEkCGpAj2UwdyHk7DPz/NOUrUjRItk3WYR+Ot7ReYijj63V2YY2HOPyZw2d a+tGzine5uZpEEFYJB8SESzBEs3Oc4UL7hliJ6YNcQyTmVoX5KdX4rVYfoomlD7BUysU= 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 Acked-by: Eduardo Valentin --- 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"; };