From patchwork Wed Dec 9 11:51:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 340466 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86297C433FE for ; Wed, 9 Dec 2020 11:54:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E5EF23B81 for ; Wed, 9 Dec 2020 11:54:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731042AbgLILxB (ORCPT ); Wed, 9 Dec 2020 06:53:01 -0500 Received: from foss.arm.com ([217.140.110.172]:33462 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729988AbgLILwr (ORCPT ); Wed, 9 Dec 2020 06:52:47 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5C4251042; Wed, 9 Dec 2020 03:52:02 -0800 (PST) Received: from e123648.arm.com (unknown [10.57.24.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 96EC73F718; Wed, 9 Dec 2020 03:52:00 -0800 (PST) From: Lukasz Luba To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: lukasz.luba@arm.com, robh@kernel.org, airlied@linux.ie, daniel@ffwll.ch Subject: [PATCH 1/2] dt-bindings: mali-midgard: Add dynamic-power-coefficient Date: Wed, 9 Dec 2020 11:51:42 +0000 Message-Id: <20201209115143.15321-2-lukasz.luba@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201209115143.15321-1-lukasz.luba@arm.com> References: <20201209115143.15321-1-lukasz.luba@arm.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a property dynamic-power-coefficient which allows to register Energy Model for the Mali Midgard devices. Signed-off-by: Lukasz Luba --- .../bindings/gpu/arm,mali-midgard.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml index e9c42b59f30f..696c17aedbbe 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml @@ -90,6 +90,23 @@ properties: dma-coherent: true + dynamic-power-coefficient: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: + A u32 value that represents the running time dynamic + power coefficient in units of uW/MHz/V^2. The + coefficient can either be calculated from power + measurements or derived by analysis. + + The dynamic power consumption of the GPU 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 V, frequency is in MHz. + required: - compatible - reg