From patchwork Sat Feb 20 15:52:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 62458 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp375248lbl; Sat, 20 Feb 2016 07:53:16 -0800 (PST) X-Received: by 10.98.17.208 with SMTP id 77mr25914570pfr.37.1455983596621; Sat, 20 Feb 2016 07:53:16 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id af6si24663933pad.226.2016.02.20.07.53.16; Sat, 20 Feb 2016 07:53:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1758633AbcBTPxK (ORCPT + 6 others); Sat, 20 Feb 2016 10:53:10 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:36710 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758369AbcBTPw7 (ORCPT ); Sat, 20 Feb 2016 10:52:59 -0500 Received: by mail-pf0-f175.google.com with SMTP id e127so68040670pfe.3 for ; Sat, 20 Feb 2016 07:52:58 -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=8PGD10gNWoiHSVKPJaKiI6QCz59FKHZmh2SxzAUdRXc=; b=UeiX5GQ0ytj3e6ptug3tr9M4kZZ0L7v/txtBCv50WjZ0BSf+5ZIk/ZsHrmE0HRcg9l JToDFPS/AVuYkGmniAgGsbOUvEsiYDFQDhNymttpJUkdaBGpd6lXF2Ha9EgN1vuTuxV5 0m3awusMB9IjtENj5lyw9+GqLpVnZfcoNf6VI= 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=8PGD10gNWoiHSVKPJaKiI6QCz59FKHZmh2SxzAUdRXc=; b=hlNSZFqN9ERWPh/WFWUiJDzz7jjRNpQoVmr1HmqC7Db5WVM7ju4teiPB8UkPYq3rb7 7+JbiKg191AGmUNK/v5fabzjGC8Fz7ihLdSpwd0YfNedfCWeM1JliiB8Gzyv2/Env/cy zizCxIz2zpwhzislnDJ7qi/dgzD15LIZbGUpkMuYOrTconD+iPv6fYz++JQ55yoJD/aU wyhIIIM3UygacokrjuMCLzKZ69oLBiigvaDp0TygEgFvDZS72jazp8CTUaj82v/AcxG0 0494lPn+cFkNmDO8oF7pN5anp5L65FhICjGbk4NizC6i/WiihQV+ItG4yBGI4YkdtoOS ZQYg== X-Gm-Message-State: AG10YOQBh1RXMSXk8h28hs73OVT+lTY+QT91+YVdPg2srxp8Yuc8BcDWCEX1O+ms1G70Z9cQ X-Received: by 10.98.16.150 with SMTP id 22mr26172335pfq.128.1455983578719; Sat, 20 Feb 2016 07:52:58 -0800 (PST) Received: from localhost.localdomain (v17.blockcn.net. [192.241.236.26]) by smtp.gmail.com with ESMTPSA id n28sm17081299pfa.45.2016.02.20.07.52.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 20 Feb 2016 07:52:57 -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 3/3] arm64: dts: register Hi6220's thermal zone for power allocator Date: Sat, 20 Feb 2016 23:52:09 +0800 Message-Id: <1455983529-9559-4-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455983529-9559-1-git-send-email-leo.yan@linaro.org> References: <1455983529-9559-1-git-send-email-leo.yan@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 wit only one actor for CPU part, so directly use cluster0's thermal sensor for monitoring temperature. Signed-off-by: Leo Yan --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Javi Merino diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index 50ba1b0..3608a3e 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,39 @@ 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>; + hysteresis = <1000>; + type = "passive"; + }; + + target: trip-point@1 { + temperature = <75000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + + cooling-maps { + map0 { + trip = <&target>; + contribution = <1024>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; }; };