From: Georgi Djakov <georgi.djakov@linaro.org>
To: vireshk@kernel.org, nm@ti.com, sboyd@kernel.org,
robh+dt@kernel.org, rjw@rjwysocki.net, saravanak@google.com,
sibis@codeaurora.org
Cc: rnayak@codeaurora.org, bjorn.andersson@linaro.org,
vincent.guittot@linaro.org, jcrouse@codeaurora.org,
evgreen@chromium.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
georgi.djakov@linaro.org
Subject: [PATCH v7 0/7] Introduce OPP bandwidth bindings
Date: Fri, 24 Apr 2020 18:53:57 +0300 [thread overview]
Message-ID: <20200424155404.10746-1-georgi.djakov@linaro.org> (raw)
Here is a proposal to extend the OPP bindings with bandwidth based on
a few previous discussions [1] and patchsets from me [2][3] and Saravana
[4][5][6][7][8][9].
Changes in v7:
* This version is combination of both patchsets by Saravana and me, based
on [3] and [9].
* The latest version of DT bindings from Saravana is used here, with a
minor change of using arrays instead of single integers for opp-peak-kBps
and opp-avg-kBps. This is needed to support multiple interconnect paths.
* The concept of having multiple OPP tables per device has been dropped,
as it was nacked by Viresh.
* Various reviews comments have been addressed and some patches are
split, and there are also some new patches. Thanks to Viresh, Sibi and
others for providing feedback!
With this version of the patchset, the CPU/GPU to DDR bandwidth scaling
will look like this in DT:
One interconnect path (no change from Saravana's v6 patches):
cpu@0 {
operating-points-v2 = <&cpu_opp_table>;
interconnects = <&noc1 MASTER1 &noc2 SLAVE1>,
};
cpu_opp_table: cpu_opp_table {
compatible = "operating-points-v2";
opp-800000000 {
opp-hz = /bits/ 64 <800000000>;
opp-peak-kBps = <1525000>;
opp-avg-kBps = <457000>;
};
opp-998400000 {
opp-hz = /bits/ 64 <998400000>;
opp-peak-kBps = <7614000>;
opp-avg-kBps = <2284000>;
};
};
Two interconnect paths:
cpu@0 {
operating-points-v2 = <&cpu_opp_table>;
interconnects = <&noc1 MASTER1 &noc2 SLAVE1>,
<&noc3 MASTER2 &noc4 SLAVE2>;
};
cpu_opp_table: cpu_opp_table {
compatible = "operating-points-v2";
opp-800000000 {
opp-hz = /bits/ 64 <800000000>;
opp-peak-kBps = <1525000 2000>;
opp-avg-kBps = <457000 1000>;
};
opp-998400000 {
opp-hz = /bits/ 64 <998400000>;
opp-peak-kBps = <7614000 4000>;
opp-avg-kBps = <2284000 2000>;
};
};
------
Every functional block on a SoC can contribute to the system power
efficiency by expressing its own bandwidth needs (to memory or other SoC
modules). This will allow the system to save power when high throughput
is not required (and also provide maximum throughput when needed).
There are at least three ways for a device to determine its bandwidth
needs:
1. The device can dynamically calculate the needed bandwidth
based on some known variable. For example: UART (baud rate), I2C (fast
mode, high-speed mode, etc), USB (specification version, data transfer
type), SDHC (SD standard, clock rate, bus-width), Video Encoder/Decoder
(video format, resolution, frame-rate)
2. There is a hardware specific value. For example: hardware
specific constant value (e.g. for PRNG) or use-case specific value that
is hard-coded.
3. Predefined SoC/board specific bandwidth values. For example:
CPU or GPU bandwidth is related to the current core frequency and both
bandwidth and frequency are scaled together.
This patchset is trying to address point 3 above by extending the OPP
bindings to support predefined SoC/board bandwidth values and adds
support in cpufreq-dt to scale the interconnect between the CPU and the
DDR together with frequency and voltage.
[1] https://patchwork.kernel.org/patch/10577315/
[2] https://lore.kernel.org/r/20190313090010.20534-1-georgi.djakov@linaro.org/
[3] https://lore.kernel.org/r/20190423132823.7915-1-georgi.djakov@linaro.org/
[4] https://lore.kernel.org/r/20190608044339.115026-1-saravanak@google.com
[5] https://lore.kernel.org/r/20190614041733.120807-1-saravanak@google.com
[6] https://lore.kernel.org/r/20190703011020.151615-1-saravanak@google.com
[7] https://lore.kernel.org/r/20190726231558.175130-1-saravanak@google.com
[8] https://lore.kernel.org/r/20190807223111.230846-1-saravanak@google.com
[9] https://lore.kernel.org/r/20191207002424.201796-1-saravanak@google.com
Georgi Djakov (5):
interconnect: Add of_icc_get_by_index() helper function
OPP: Add support for parsing interconnect bandwidth
OPP: Add sanity checks in _read_opp_key()
OPP: Update the bandwidth on OPP frequency changes
cpufreq: dt: Add support for interconnect bandwidth scaling
Saravana Kannan (2):
dt-bindings: opp: Introduce opp-peak-kBps and opp-avg-kBps bindings
OPP: Add helpers for reading the binding properties
Documentation/devicetree/bindings/opp/opp.txt | 20 ++-
.../devicetree/bindings/property-units.txt | 4 +
drivers/cpufreq/Kconfig | 1 +
drivers/cpufreq/cpufreq-dt.c | 15 ++
drivers/interconnect/core.c | 68 +++++--
drivers/opp/Kconfig | 1 +
drivers/opp/core.c | 44 ++++-
drivers/opp/of.c | 170 ++++++++++++++++--
drivers/opp/opp.h | 10 ++
include/linux/interconnect.h | 6 +
include/linux/pm_opp.h | 12 ++
11 files changed, 311 insertions(+), 40 deletions(-)
next reply other threads:[~2020-04-24 15:54 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 15:53 Georgi Djakov [this message]
2020-04-24 15:53 ` [PATCH v7 1/7] dt-bindings: opp: Introduce opp-peak-kBps and opp-avg-kBps bindings Georgi Djakov
2020-04-30 5:09 ` Viresh Kumar
2020-05-04 20:31 ` Sibi Sankar
2020-05-11 21:51 ` Rob Herring
2020-04-24 15:53 ` [PATCH v7 2/7] OPP: Add helpers for reading the binding properties Georgi Djakov
2020-04-24 17:30 ` Matthias Kaehlcke
2020-04-30 5:21 ` Viresh Kumar
2020-05-04 20:40 ` Sibi Sankar
2020-04-24 15:54 ` [PATCH v7 3/7] interconnect: Add of_icc_get_by_index() helper function Georgi Djakov
2020-04-24 18:02 ` Matthias Kaehlcke
2020-05-04 20:58 ` Sibi Sankar
2020-04-24 15:54 ` [PATCH v7 4/7] OPP: Add support for parsing interconnect bandwidth Georgi Djakov
2020-04-24 19:20 ` Matthias Kaehlcke
2020-04-28 16:21 ` Georgi Djakov
2020-04-30 5:28 ` Viresh Kumar
2020-05-04 21:03 ` Sibi Sankar
2020-04-24 15:54 ` [PATCH v7 5/7] OPP: Add sanity checks in _read_opp_key() Georgi Djakov
2020-04-24 19:26 ` Matthias Kaehlcke
2020-05-04 20:47 ` Sibi Sankar
2020-04-24 15:54 ` [PATCH v7 6/7] OPP: Update the bandwidth on OPP frequency changes Georgi Djakov
2020-04-24 19:36 ` Matthias Kaehlcke
2020-04-24 21:18 ` Saravana Kannan
2020-04-30 6:09 ` Viresh Kumar
2020-04-30 7:35 ` Saravana Kannan
2020-04-30 7:53 ` Viresh Kumar
2020-04-30 16:32 ` Saravana Kannan
2020-05-04 5:00 ` Viresh Kumar
2020-05-04 21:01 ` Saravana Kannan
2020-05-05 3:38 ` Viresh Kumar
2020-05-04 20:54 ` Sibi Sankar
2020-04-24 15:54 ` [PATCH v7 7/7] cpufreq: dt: Add support for interconnect bandwidth scaling Georgi Djakov
2020-04-24 19:41 ` Matthias Kaehlcke
2020-05-04 20:50 ` Sibi Sankar
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=20200424155404.10746-1-georgi.djakov@linaro.org \
--to=georgi.djakov@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=evgreen@chromium.org \
--cc=jcrouse@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=rnayak@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.com \
--cc=sboyd@kernel.org \
--cc=sibis@codeaurora.org \
--cc=vincent.guittot@linaro.org \
--cc=vireshk@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.