From patchwork Sun Mar 12 22:11:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 9619573 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 51CBB60414 for ; Sun, 12 Mar 2017 22:11:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44C7628343 for ; Sun, 12 Mar 2017 22:11:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39A602840B; Sun, 12 Mar 2017 22:11:43 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 D22E928343 for ; Sun, 12 Mar 2017 22:11:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935478AbdCLWLm (ORCPT ); Sun, 12 Mar 2017 18:11:42 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:56402 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935393AbdCLWLh (ORCPT ); Sun, 12 Mar 2017 18:11:37 -0400 Received: from localhost.localdomain ([95.91.4.8]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MFfhh-1cz3gi11oT-00Eeun; Sun, 12 Mar 2017 23:11:21 +0100 From: Stefan Wahren To: Eduardo Valentin , Zhang Rui , kernel@martin.sperl.org Cc: Eric Anholt , Rob Herring , Frank Rowand , Florian Fainelli , linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Stefan Wahren Subject: [PATCH V11 4/6] ARM: dts: bcm283x: Add CPU thermal zone with 1 trip point Date: Sun, 12 Mar 2017 22:11:03 +0000 Message-Id: <1489356665-3175-5-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1489356665-3175-1-git-send-email-stefan.wahren@i2se.com> References: <1489356665-3175-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:Nqj9XVshn5EMdLMbOMRzAMrllvzXshZqTCYKY631CFSWdY/bebf ppvBg1IN7+vlTC5brVPvT9XdHgNnhq1KW+SLbfvMoDC6CYxOF2pMbkaI8Dsdttd+GUhY8ap 2eI4AvcEVkQHK3cAY78uhKRseR7HYgEZmQzDfOFk4GCn5pbNvMuCX2oe+c8wtjVO1fQe7e8 bIVE7vTXJni8eyG45tt1A== X-UI-Out-Filterresults: notjunk:1; V01:K0:8LRT26K/0ac=:YR+iEaF9rjXZ3n+6IcBpnf 90KfB+Zj3syBZW8kjrcRPnd43XrvOQpvNhClSPsFxeP53HoFHxidZfmr/4C0XeIsou3pWWX9h meLSLY7on8UcIx7iLBnMOafXeyXrsylMUZHo5Z9d2T4AUAn0013fgfSKcnC9Dlkk0/04deEf8 2dU9hAXK206f891QLGJaTBMclgqIq7Izx7EH4lVgKdS0XXpi675p9ccYDWKEArZ0J/CCddFzL lQH85u0nuBii+tprrzrLlp5UAI5YpFtyNwXrbXqECRWnt4LSgJvMMri3/HZYH3DZ4s2/UK/fK LNKMsMR4jA8zALUCGwcmV/lIkQ/jl0XeueXtPl1VpJaa6812DDtIjIQKavokuc3UHqWRA8Ubf +TPG+iGlzXBUP5vIS6egGws5l0lUYjkqW3Ju3FwSbNzYKLetx8SoG0rliD8NO6wn04yFCDiy/ FvwgQeCw0pLCm+jE7Fv4xSLWvy1+FnIRkDLz1ei3Y5QWjgWOi208bTIDMC2nTJVN0gYVD6K4u LzkC3YDhjd/mPEWWwSi/LxY0bfcGVF0fvaHT+R2PQqlLZCO0e9r8pucydLd4gMCAwQ16+4K0/ aEA40SgpUager9JO3FPmDuub71+nZcsHstb0P7akGdV6E9jmVcyurywDkQq9h9/EpH5VbRVPn 1fJFdAyN4t5Odf7ZkweOC5xdvuTt56Gh/Y5by5H2Mj8S1B06LUJ7KYDG8sNC+NaxHpHE= 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"; };