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: 8431161 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D70B4C0553 for ; Fri, 26 Feb 2016 03:46:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21B93202EB for ; Fri, 26 Feb 2016 03:46:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5713520394 for ; Fri, 26 Feb 2016 03:46:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932350AbcBZDqW (ORCPT ); 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 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, UNPARSEABLE_RELAY autolearn=no 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 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(+) 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>; + }; + }; + }; + }; }; };