From patchwork Mon Jun 8 09:14:29 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: 11593211 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 8DE7A175A for ; Mon, 8 Jun 2020 12:01:37 +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 67EF12078C for ; Mon, 8 Jun 2020 12:01:37 +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="ULbTbrhQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67EF12078C 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+4757+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id 090QYY4521763x1HxHIxDMSG; Mon, 08 Jun 2020 05:01:37 -0700 X-Received: from wens.tw (wens.tw [140.112.30.76]) by mx.groups.io with SMTP id smtpd.web11.26099.1591607691131736590 for ; Mon, 08 Jun 2020 02:14:51 -0700 X-Received: by wens.tw (Postfix, from userid 1000) id 099496013A; Mon, 8 Jun 2020 17:14:44 +0800 (CST) From: "Chen-Yu Tsai (Moxa)" To: nobuhiro1.iwamatsu@toshiba.co.jp, pavel@denx.de Cc: cip-dev@lists.cip-project.org, JohnsonCH.Chen@moxa.com Subject: [cip-dev] [PATCH 4.4.y-cip v2 12/15] devicetree: bindings: Add optional dynamic-power-coefficient property Date: Mon, 8 Jun 2020 17:14:29 +0800 Message-Id: <20200608091432.15366-13-wens@csie.org> In-Reply-To: <20200608091432.15366-1-wens@csie.org> References: <20200608091432.15366-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: Vd59rbs3kP0w1PA7ZIeVLgKLx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1591617697; bh=GIPcoi17n3zdcS4bdNMKAd1+fRuAe5uvkOF/6RZsth4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=ULbTbrhQu9KhPxNw11YSlOJCmvbE81S6En+xy28BbQ37FuGp5yEjFsYgE6fCp10L6Zq bjjObrBEv3TONTo3UGTet4z4aSrA5VTbaTD2VDf210R2lgBok6LmiZ52PlRKvHxUW5erK lXB9ek/RqDQGJHn4oDi/tHru+ScQGoiuYao= 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 {