linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
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	[thread overview]
Message-ID: <20220221225131.15836-2-lukasz.luba@arm.com> (raw)
In-Reply-To: <20220221225131.15836-1-lukasz.luba@arm.com>

Add DT bindings for the Energy Model information.

Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
---
 .../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 <lukasz.luba@arm.com>
+
+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


  reply	other threads:[~2022-02-21 22:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 22:51 [RFC][PATCH 0/2] Introduce 'advanced' Energy Model in DT Lukasz Luba
2022-02-21 22:51 ` Lukasz Luba [this message]
2022-02-22  3:03   ` [RFC][PATCH 1/2] dt-bindings: power: add Energy Model bindings Viresh Kumar
2022-02-22  8:06     ` Lukasz Luba
2022-02-22  9:45       ` Viresh Kumar
2022-02-22 10:03         ` Lukasz Luba
2022-02-22 10:12           ` Viresh Kumar
2022-02-22 11:03             ` Lukasz Luba
2022-02-22 11:15               ` Viresh Kumar
2022-02-22 11:23                 ` Lukasz Luba
2022-02-22 14:22   ` Rob Herring
2022-02-22 14:30     ` Lukasz Luba
2022-02-21 22:51 ` [RFC][PATCH 2/2] opp: Add support for 'advanced' Energy Model in DT Lukasz Luba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220221225131.15836-2-lukasz.luba@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=nm@ti.com \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).