Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4416553pxb; Mon, 21 Feb 2022 20:56:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJwb5QOunEfzo6nyA9WflIOUtQwjzZHi1ikAKzJBBBQ8JCWAcKe2ufp8z/stIJmsWQYLrkTY X-Received: by 2002:a63:7e59:0:b0:373:520e:97e with SMTP id o25-20020a637e59000000b00373520e097emr18614444pgn.172.1645505803530; Mon, 21 Feb 2022 20:56:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645505803; cv=none; d=google.com; s=arc-20160816; b=tninv2rGOSCuPpOvPdnZEwSbVA5iEW9r93NLTZOOVYiLK3yZa5STaNUhIkJSnawlie QXeEhCIk8pkMFiR73rj+jbTSWNpMjaGx0BKOsopIJabtI40qmtgTYCILrgf5wqw1JtKG FxF2Qp6ia3/oAN/DbLGvdN/N4j3dX15tZu6zXDx0h4g7JDalPgcIw/qNA/QKKj9VRHpY MK3LNdgxsBkKTaQdRCk3Fgb/mmi8WoOuAySQNGLDVJkhGqZ9TyMfk/r1KJByTcFGYDMf 1gaF/jtd9qNR4LkNY3zexOLieV0GajbeclCIQqGFsjzPJA8y+mpn0Kf3BAKXmGK1omwb GmiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=PGKxVDqtxL9Sgq44L2czTdwZcXNuJXc7Wb6VJvs8sRU=; b=F5h/WtUFCdrzP7SFCU5f4eOFzbd2mlciUtbBh6Dppvc7jOfm+IydU2N2mQpQ1YcTxf NUUIty/oHQ+gjIDAn9/2fMRWEHVMxqtBWgSHBumVwMgpw2TF/1y2yvMviH3I2qsZhK49 WArpm9ZcbKc44eMwvf1dzmRjUwNA98LeH6QmehkMda+mypnmAGBqEmfEmKreUk48Snbl 7nVuIoBK28FZEyjEBQUIxQbOG6tKrhvk6z2i6e8mS2z6WYBZtTq9IyOCp9qT8FCLdTxd /kU0F9eqSRN7PBz+AjU+qjbduah6koyelNHSGztrd69AMSR5mhnrfIW1XhF/zxm3VMod GKTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n23si8062728pfa.253.2022.02.21.20.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 20:56:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1DFB8BBE; Mon, 21 Feb 2022 20:33:53 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235822AbiBUWwK (ORCPT + 99 others); Mon, 21 Feb 2022 17:52:10 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231338AbiBUWwI (ORCPT ); Mon, 21 Feb 2022 17:52:08 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5AF34DEEB; Mon, 21 Feb 2022 14:51:44 -0800 (PST) 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 2965F139F; Mon, 21 Feb 2022 14:51:44 -0800 (PST) Received: from e123648.arm.com (unknown [10.57.9.194]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E7E8C3F66F; Mon, 21 Feb 2022 14:51:41 -0800 (PST) From: Lukasz Luba To: linux-kernel@vger.kernel.org Cc: lukasz.luba@arm.com, dietmar.eggemann@arm.com, viresh.kumar@linaro.org, rafael@kernel.org, daniel.lezcano@linaro.org, nm@ti.com, sboyd@kernel.org, mka@chromium.org, dianders@chromium.org, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org Subject: [RFC][PATCH 1/2] dt-bindings: power: add Energy Model bindings Date: Mon, 21 Feb 2022 22:51:30 +0000 Message-Id: <20220221225131.15836-2-lukasz.luba@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220221225131.15836-1-lukasz.luba@arm.com> References: <20220221225131.15836-1-lukasz.luba@arm.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add DT bindings for the Energy Model information. Signed-off-by: Lukasz Luba --- .../bindings/power/energy-model.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/energy-model.yaml diff --git a/Documentation/devicetree/bindings/power/energy-model.yaml b/Documentation/devicetree/bindings/power/energy-model.yaml new file mode 100644 index 000000000000..804a9b324925 --- /dev/null +++ b/Documentation/devicetree/bindings/power/energy-model.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/energy-model.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Energy Model Bindings + +maintainers: + - Lukasz Luba + +description: |+ + Devices work at specific performance states (frequencies). The power which + is used at a given performance state is an important information. A framework + which maintains this information is Energy Model. This document defines + bindings for these Energy Model performance states applicable across wide + range of devices. For illustration purpose, this document uses GPU as a device. + + This binding only supports frequency-power pairs. + +select: true + +properties: + operating-points: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + items: + items: + - description: Frequency in kHz + - description: Power in uW + + +additionalProperties: true +examples: + { + gpu_energy_model: energy-model { + compatible = "energy-model"; + energy-model-entries = < + 200000 300000 + 297000 500000 + 400000 800000 + 500000 1400000 + 600000 2000000 + 800000 2800000 + >; + }; + }; + + &gpu { + energy-model = <&gpu_energy_model>; + }; +... -- 2.17.1