From patchwork Fri Feb 26 03:43:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 62923 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp502613lbc; Thu, 25 Feb 2016 19:46:28 -0800 (PST) X-Received: by 10.98.12.8 with SMTP id u8mr67713587pfi.36.1456458387817; Thu, 25 Feb 2016 19:46:27 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qp8si1322132pac.229.2016.02.25.19.46.27; Thu, 25 Feb 2016 19:46:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932350AbcBZDqW (ORCPT + 11 others); Thu, 25 Feb 2016 22:46:22 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:36772 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932288AbcBZDqU (ORCPT ); Thu, 25 Feb 2016 22:46:20 -0500 Received: by mail-pa0-f47.google.com with SMTP id yy13so43478928pab.3 for ; Thu, 25 Feb 2016 19:46:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ptpRdNtleHuKoko5kIrrwsBEwMHuzN7mlGhAtsR/+nc=; b=bB5WCwTS+6Tdg1VsNFM2LlfFvy0NnBcDDCdGnxFQFftCHhkRNj0eZpLw3koZrvRc2c xF/D7VfQ/YzBdGAWqmk0BOZT1sNSu2FH6XIOjR/AvHOIcXdHJo1alC64QgVcinhnwH9j SY/C8AdkxhxjB5rOQYkyI1bzJ5fGkhLIvuEwI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ptpRdNtleHuKoko5kIrrwsBEwMHuzN7mlGhAtsR/+nc=; b=LM/iMMyIh+uw2rfMt1o8KD1sp2sFhIMyssNYLRvf4WwNcCe2J0nyu+1NOPT3g60AwA W/mtLCvI55gx+B/rHVs73UfWLROf6kzLTRrI+ArU/sm6IFUdaxqs6TKpdedI+X7hxOX+ Zd3m2YFRp8YDXkyQ+r9EtvxDD7bdvxP1KPIx2L5cPDImXXuAvWXPIVAWAuvHcdt/Dn6T AV2KqwtwmgZAjxgT8wgZWhbeqRwW69KEqeEgJNtMB5DwnV7T57LeGJqZk2OJs17yH8JH 16qvTruYT7+jagKDlpfj9BII+1dY6l1Bun7/UP7b3c1qHHun9otztthjnSmhpKC2bMM+ tqSA== X-Gm-Message-State: AG10YOQWIGRRTxPZMfdKS4ycJ9c0P1Siy8lVUGgcM7UxZINjIYjmvmd/h8SvoalvzfvCeYdD X-Received: by 10.66.97.101 with SMTP id dz5mr59102636pab.61.1456458379606; Thu, 25 Feb 2016 19:46:19 -0800 (PST) Received: from leoy-linaro.a1.60in.com (li401-178.members.linode.com. [106.187.51.178]) by smtp.gmail.com with ESMTPSA id fn3sm15295884pab.20.2016.02.25.19.46.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Feb 2016 19:46:18 -0800 (PST) From: Leo Yan To: Wei Xu , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Catalin Marinas , Will Deacon , Zhang Rui , Eduardo Valentin , kongxinwei , Javi Merino , Punit Agrawal Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Leo Yan Subject: [PATCH v2 5/5] arm64: dts: register Hi6220's thermal zone for power allocator Date: Fri, 26 Feb 2016 11:43:47 +0800 Message-Id: <1456458227-12950-6-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456458227-12950-1-git-send-email-leo.yan@linaro.org> References: <1456458227-12950-1-git-send-email-leo.yan@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org With profiling Hi6220's power modeling so get dynamic coefficient and sustainable power. So pass these parameters from DT. Now enable power allocator with only one actor for CPU part, so directly use cluster0's thermal sensor for monitoring temperature. Reviewed-by: Javi Merino Signed-off-by: Leo Yan --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index 50ba1b0..d8b963c 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -6,6 +6,7 @@ #include #include +#include / { compatible = "hisilicon,hi6220"; @@ -87,6 +88,7 @@ cooling-max-level = <0>; #cooling-cells = <2>; /* min followed by max */ cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + dynamic-power-coefficient = <311>; }; cpu1: cpu@1 { @@ -322,5 +324,36 @@ clock-names = "thermal_clk"; #thermal-sensor-cells = <1>; }; + + thermal-zones { + + cls0: cls0 { + polling-delay = <1000>; + polling-delay-passive = <100>; + sustainable-power = <3326>; + + /* sensor ID */ + thermal-sensors = <&tsensor 2>; + + trips { + threshold: trip-point@0 { + temperature = <65000>; + type = "passive"; + }; + + target: trip-point@1 { + temperature = <75000>; + type = "passive"; + }; + }; + + cooling-maps { + map0 { + trip = <&target>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; }; };