From patchwork Wed Jul 22 14:02:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Punit Agrawal X-Patchwork-Id: 6844491 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B51C79F1D4 for ; Wed, 22 Jul 2015 14:09:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE83A206E5 for ; Wed, 22 Jul 2015 14:09:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FC6F20722 for ; Wed, 22 Jul 2015 14:09:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934294AbbGVOEh (ORCPT ); Wed, 22 Jul 2015 10:04:37 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.140]:10608 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933282AbbGVOEg (ORCPT ); Wed, 22 Jul 2015 10:04:36 -0400 Received: from e105922-lin.cambridge.arm.com (e105922-lin.cambridge.arm.com [10.2.135.144]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with SMTP id t6ME3CF0010580; Wed, 22 Jul 2015 15:03:12 +0100 Received: by e105922-lin.cambridge.arm.com (sSMTP sendmail emulation); Wed, 22 Jul 2015 15:04:28 +0100 From: Punit Agrawal To: linux-pm@vger.kernel.org Cc: Punit Agrawal , lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Mark Rutland , Liviu Dudau , Sudeep Holla Subject: [PATCH 9/9] arm64: dts: Create SoC thermal zone for Juno Date: Wed, 22 Jul 2015 15:02:43 +0100 Message-Id: <1437573763-6525-10-git-send-email-punit.agrawal@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437573763-6525-1-git-send-email-punit.agrawal@arm.com> References: <1437573763-6525-1-git-send-email-punit.agrawal@arm.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. 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>; }; 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 { + 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" };