From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932264AbbHLPzJ (ORCPT ); Wed, 12 Aug 2015 11:55:09 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:44047 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932083AbbHLPzH convert rfc822-to-8bit (ORCPT ); Wed, 12 Aug 2015 11:55:07 -0400 Date: Wed, 12 Aug 2015 16:55:00 +0100 From: Liviu Dudau To: Punit Agrawal Cc: "linux-pm@vger.kernel.org" , "lm-sensors@lm-sensors.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Rob Herring , Mark Rutland , Sudeep Holla Subject: Re: [PATCH v2 10/10] arm64: dts: Create SoC thermal zone for Juno Message-ID: <20150812155500.GW20890@e106497-lin.cambridge.arm.com> References: <1438615378-14241-1-git-send-email-punit.agrawal@arm.com> <1438615378-14241-11-git-send-email-punit.agrawal@arm.com> MIME-Version: 1.0 In-Reply-To: <1438615378-14241-11-git-send-email-punit.agrawal@arm.com> User-Agent: Mutt/1.5.22 (2013-10-16) X-OriginalArrivalTime: 12 Aug 2015 15:55:01.0180 (UTC) FILETIME=[3F01EFC0:01D0D517] X-MC-Unique: kNJcNvfxTnSvMD1RoHaIvQ-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 03, 2015 at 04:22:58PM +0100, Punit Agrawal wrote: > Setup a thermal zone driven by the SoC temperature sensor on Juno > r0. Create passive trip points and bind them to cpufreq cooling > devices that support the power extensions. Hi Punit, > > Signed-off-by: Punit Agrawal > Cc: Rob Herring > Cc: Mark Rutland > Cc: Liviu Dudau > Cc: Sudeep Holla > --- > arch/arm64/boot/dts/arm/juno.dts | 50 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > > diff --git a/arch/arm64/boot/dts/arm/juno.dts b/arch/arm64/boot/dts/arm/juno.dts > index d2e67f3..664961c 100644 > --- a/arch/arm64/boot/dts/arm/juno.dts > +++ b/arch/arm64/boot/dts/arm/juno.dts > @@ -9,6 +9,7 @@ > /dts-v1/; > > #include > +#include > > / { > model = "ARM Juno development board (r0)"; > @@ -90,6 +91,8 @@ > next-level-cache = <&A57_L2>; > clocks = <&scpi_dvfs 0>; > cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; > + #cooling-cells = <2>; > + dynamic-power-coefficient = <530>; The Documentation/devicetree/bindings/thermal/thermal.txt document describes two additional required properties, cooling-min-state and cooling-max-state which are missing here. > }; > > A57_1: cpu@1 { > @@ -100,6 +103,8 @@ > next-level-cache = <&A57_L2>; > clocks = <&scpi_dvfs 0>; > cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; > + #cooling-cells = <2>; > + dynamic-power-coefficient = <530>; > }; > > A53_0: cpu@100 { > @@ -110,6 +115,8 @@ > next-level-cache = <&A53_L2>; > clocks = <&scpi_dvfs 1>; > cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; > + #cooling-cells = <2>; > + dynamic-power-coefficient = <140>; > }; > > A53_1: cpu@101 { > @@ -120,6 +127,8 @@ > next-level-cache = <&A53_L2>; > clocks = <&scpi_dvfs 1>; > cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; > + #cooling-cells = <2>; > + dynamic-power-coefficient = <140>; > }; > > A53_2: cpu@102 { > @@ -130,6 +139,8 @@ > next-level-cache = <&A53_L2>; > clocks = <&scpi_dvfs 1>; > cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; > + #cooling-cells = <2>; > + dynamic-power-coefficient = <140>; > }; > > A53_3: cpu@103 { > @@ -140,6 +151,8 @@ > next-level-cache = <&A53_L2>; > clocks = <&scpi_dvfs 1>; > cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; > + #cooling-cells = <2>; > + dynamic-power-coefficient = <140>; > }; > > A57_L2: l2-cache0 { > @@ -167,5 +180,42 @@ > <&A53_3>; > }; > > + thermal-zones { > + soc_thermal { > + polling-delay = <1000>; > + polling-delay-passive = <100>; > + sustainable-power = <2500>; > + > + thermal-sensors = <&scpi_sensors0 3>; > + > + trips { > + threshold: trip-point@0 { You also need a reg= property if you have the @index thing. Best regards, Liviu > + temperature = <55000>; > + hysteresis = <1000>; > + type = "passive"; > + }; > + target: trip-point@1 { > + temperature = <65000>; > + hysteresis = <1000>; > + type = "passive"; > + }; > + }; > + > + cooling-maps { > + map0 { > + trip = <&target>; > + cooling-device = <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + contribution = <2048>; > + }; > + map1 { > + trip = <&target>; > + cooling-device = <&A57_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + contribution = <1024>; > + }; > + > + }; > + }; > + }; > + > #include "juno-base.dtsi" > }; > -- > 2.1.4 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯