From patchwork Thu Jun 4 03:18:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 11587831 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB2BC913 for ; Thu, 4 Jun 2020 11:55:36 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C57E220738 for ; Thu, 4 Jun 2020 11:55:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="Lw7eA9Sk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C57E220738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csie.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+4714+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id t38rYY4521763xcMTTkXQJ79; Thu, 04 Jun 2020 04:55:36 -0700 X-Received: from wens.tw (wens.tw [140.112.30.76]) by mx.groups.io with SMTP id smtpd.web12.6395.1591240766610050925 for ; Wed, 03 Jun 2020 20:19:26 -0700 X-Received: by wens.tw (Postfix, from userid 1000) id 30BB360092; Thu, 4 Jun 2020 11:19:20 +0800 (CST) From: "Chen-Yu Tsai (Moxa)" To: nobuhiro1.iwamatsu@toshiba.co.jp, pavel@denx.de Cc: Punit Agrawal , cip-dev@lists.cip-project.org, JohnsonCH.Chen@moxa.com, Rob Herring , Viresh Kumar , "Rafael J . Wysocki" , Chen-Yu Tsai Subject: [cip-dev] [4.4.y-cip 12/15] devicetree: bindings: Add optional dynamic-power-coefficient property Date: Thu, 4 Jun 2020 11:18:26 +0800 Message-Id: <20200604031829.3254-13-wens@csie.org> In-Reply-To: <20200604031829.3254-1-wens@csie.org> References: <20200604031829.3254-1-wens@csie.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: q4d3stVh1AD2KyeBOM4F5Qm5x4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1591271736; bh=sqTLfaATxoRJGdJ8Kym+I9AxNCMBQyED77ocKv6tGFU=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=Lw7eA9Skp+61nzHZjzWIqIEj4nsaTfQyKq5E19fdNKPryTugMFYC/kMgmwaHLv9F6wr TnUi/LGOWuvM8BxqIxX2rb946SyMvC+Ln/m444izU4J61XIMZpu0EoFMxf2f0AMA/aR0E K+ZPg6TsuwFMOqPmeGDtjhpL3FZRQta0OTU= From: Punit Agrawal commit 3be3f8f36e7349006f19c8c8f0d686e98462a993 upstream. The dynamic power consumption of a device is proportional to the square of voltage (V) and the clock frequency (f). It can be expressed as Pdyn = dynamic-power-coefficient * V^2 * f. The coefficient represents the running time dynamic power consumption in units of mw/MHz/uVolt^2 and can be used in the above formula to calculate the dynamic power in mW. Signed-off-by: Punit Agrawal Acked-by: Rob Herring Reviewed-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Signed-off-by: Chen-Yu Tsai (Moxa) --- Documentation/devicetree/bindings/arm/cpus.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 9ef9a2089a5e7..6b1d8ebb94b7b 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt @@ -243,6 +243,23 @@ nodes to be present and contain the properties described below. Definition: Specifies the syscon node controlling the cpu core power domains. + - dynamic-power-coefficient + Usage: optional + Value type: + Definition: A u32 value that represents the running time dynamic + power coefficient in units of mW/MHz/uVolt^2. The + coefficient can either be calculated from power + measurements or derived by analysis. + + The dynamic power consumption of the CPU is + proportional to the square of the Voltage (V) and + the clock frequency (f). The coefficient is used to + calculate the dynamic power as below - + + Pdyn = dynamic-power-coefficient * V^2 * f + + where voltage is in uV, frequency is in MHz. + Example 1 (dual-cluster big.LITTLE system 32-bit): cpus {