From: Leonard Crestez <leonard.crestez@nxp.com>
To: Georgi Djakov <georgi.djakov@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Chanwoo Choi <cw00.choi@samsung.com>
Cc: "Artur Świgoń" <a.swigon@partner.samsung.com>,
"Alexandre Bailon" <abailon@baylibre.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Jacky Bai" <ping.bai@nxp.com>,
"Anson Huang" <Anson.Huang@nxp.com>,
"Abel Vesa" <abel.vesa@nxp.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"MyungJoo Ham" <myungjoo.ham@samsung.com>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Saravana Kannan" <saravanak@google.com>,
"Mark Rutland" <mark.rutland@arm.com>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
"Shawn Guo" <shawnguo@kernel.org>,
"Dong Aisheng" <aisheng.dong@nxp.com>,
"Fabio Estevam" <fabio.estevam@nxp.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Michael Turquette" <mturquette@baylibre.com>,
"Matthias Kaehlcke" <mka@chromium.org>,
"Angus Ainslie" <angus@akkea.ca>,
"Martin Kepplinger" <martink@posteo.de>,
linux-pm@vger.kernel.org, kernel@pengutronix.de,
linux-imx@nxp.com, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC v5 00/10] interconnect: Add imx support via devfreq
Date: Fri, 1 Nov 2019 00:51:59 +0200 [thread overview]
Message-ID: <cover.1572562150.git.leonard.crestez@nxp.com> (raw)
This series adds upstream DRAM and interconnect scaling support for imx8m
series chips. It uses a per-SOC interconnect provider layered on top of
multiple instances of devfreq for scalable nodes along the interconnect.
Existing qcom interconnect providers mostly translate bandwidth requests into
firmware calls but equivalent firmware on imx8m is much thinner. Scaling
support for individual nodes (NIC/NOC and DDRC) is implemented through
devfreq.
The imx interconnect provider doesn't communicate with devfreq instance
directly but rather computes "minimum frequencies" for nodes along the path
and creates dev_pm_qos requests.
This needs core changes for dev_pm_qos frequency support for devfreq:
https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=196443
Since imx interconnect only needs to interact with imx devfreq it would also be
possible to tie them together directly, but it would be a little sad.
Since there is no single devicetree node that can represent the
"interconnect" the main NOC is picked as the "interconnect provider" and
will probe the interconnect platform device if #interconnect-cells is
present. This is a bit odd.
On i.MX there are multiple instances of a few interconnect IPs, this
patch identifies them by enumerating the entire devicetree scanning for
the "interconnect-node-id" property. As far as I see current providers
do this based entirely on compatible string of the interconnect instance
and this seems very odd to me. Do you think we could move this
"interconnect-node-id" approach to core interconnect bindings?
The same interconnect-node-id property is used to identify the DDRC and
this is arguably a hack.
Also as a github branch (with few other changes):
https://github.com/cdleonard/linux/tree/next_imx_busfreq
This is layered upon imx-ddrc scaling support:
* https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=196459
The DDRC only really interacts by receiving dev_pm_qos requests.
Changes since RFCv4:
* Drop icc proxy nonsense
* Make devfreq driver for NOC probe the ICC driver if
#interconnect-cells is present.
* Move NOC support to interconnect series and rename the node in DT
* Add support for all chips at once, differences are not intereseting
and there is more community interest for 8mq than 8mm.
Link: https://patchwork.kernel.org/cover/11111865/
Changes since RFCv3:
* Remove the virtual "icc" node and add devfreq nodes as proxy providers
* Fix build on 32-bit arm (reported by kbuilt test robot)
* Remove ARCH_MXC_ARM64 (never existed in upstream)
* Remove _numlinks, calculate instead
* Replace __BUSFREQ_H header guard
* Improve commit message and comment spelling
* Fix checkpatch issues
Link to RFCv3: https://patchwork.kernel.org/cover/11078671/
Changes since RFCv2 and initial work by Alexandre Bailon:
* Relying on devfreq and dev_pm_qos instead of CLK
* No more "platform opp" stuff
* No more special suspend handling: use suspend-opp on devfreq instead.
* Replace all mentions of "busfreq" with "interconnect"
Link to v2: https://patchwork.kernel.org/patch/11056789/
Leonard Crestez (10):
dt-bindings: devfreq: Add bindings for generic imx buses
PM / devfreq: Add generic imx bus driver
PM / devfreq: imx: Register interconnect device
PM / devfreq: Add devfreq_get_devfreq_by_node
interconnect: Add imx core driver
interconnect: imx: Add platform driver for imx8mm
interconnect: imx: Add platform driver for imx8mq
interconnect: imx: Add platform driver for imx8mn
arm64: dts: imx8m: Add NOC nodes
arm64: dts: imx8m: Add interconnect provider properties
.../devicetree/bindings/devfreq/imx.yaml | 83 ++++++
arch/arm64/boot/dts/freescale/imx8mm.dtsi | 26 ++
arch/arm64/boot/dts/freescale/imx8mn.dtsi | 26 ++
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 26 ++
drivers/devfreq/Kconfig | 12 +
drivers/devfreq/Makefile | 1 +
drivers/devfreq/devfreq.c | 42 ++-
drivers/devfreq/imx-devfreq.c | 185 ++++++++++++
drivers/interconnect/Kconfig | 1 +
drivers/interconnect/Makefile | 1 +
drivers/interconnect/imx/Kconfig | 17 ++
drivers/interconnect/imx/Makefile | 4 +
drivers/interconnect/imx/imx.c | 273 ++++++++++++++++++
drivers/interconnect/imx/imx.h | 60 ++++
drivers/interconnect/imx/imx8mm.c | 105 +++++++
drivers/interconnect/imx/imx8mn.c | 94 ++++++
drivers/interconnect/imx/imx8mq.c | 103 +++++++
include/dt-bindings/interconnect/imx8mm.h | 49 ++++
include/dt-bindings/interconnect/imx8mn.h | 41 +++
include/dt-bindings/interconnect/imx8mq.h | 48 +++
include/linux/devfreq.h | 1 +
21 files changed, 1187 insertions(+), 11 deletions(-)
create mode 100644 Documentation/devicetree/bindings/devfreq/imx.yaml
create mode 100644 drivers/devfreq/imx-devfreq.c
create mode 100644 drivers/interconnect/imx/Kconfig
create mode 100644 drivers/interconnect/imx/Makefile
create mode 100644 drivers/interconnect/imx/imx.c
create mode 100644 drivers/interconnect/imx/imx.h
create mode 100644 drivers/interconnect/imx/imx8mm.c
create mode 100644 drivers/interconnect/imx/imx8mn.c
create mode 100644 drivers/interconnect/imx/imx8mq.c
create mode 100644 include/dt-bindings/interconnect/imx8mm.h
create mode 100644 include/dt-bindings/interconnect/imx8mn.h
create mode 100644 include/dt-bindings/interconnect/imx8mq.h
--
2.17.1
next reply other threads:[~2019-10-31 22:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 22:51 Leonard Crestez [this message]
2019-10-31 22:52 ` [PATCH RFC v5 01/10] dt-bindings: devfreq: Add bindings for generic imx buses Leonard Crestez
2019-11-04 22:49 ` Rob Herring
2019-11-11 22:28 ` Leonard Crestez
2019-10-31 22:52 ` [PATCH RFC v5 02/10] PM / devfreq: Add generic imx bus driver Leonard Crestez
2019-10-31 22:52 ` [PATCH RFC v5 03/10] PM / devfreq: imx: Register interconnect device Leonard Crestez
2019-10-31 22:52 ` [PATCH RFC v5 04/10] PM / devfreq: Add devfreq_get_devfreq_by_node Leonard Crestez
2019-10-31 22:52 ` [PATCH RFC v5 05/10] interconnect: Add imx core driver Leonard Crestez
2019-11-12 15:07 ` Georgi Djakov
2019-11-12 17:25 ` Leonard Crestez
2019-10-31 22:52 ` [PATCH RFC v5 06/10] interconnect: imx: Add platform driver for imx8mm Leonard Crestez
2019-10-31 22:52 ` [PATCH RFC v5 07/10] interconnect: imx: Add platform driver for imx8mq Leonard Crestez
2019-10-31 22:52 ` [PATCH RFC v5 08/10] interconnect: imx: Add platform driver for imx8mn Leonard Crestez
2019-10-31 22:52 ` [PATCH RFC v5 09/10] arm64: dts: imx8m: Add NOC nodes Leonard Crestez
2019-10-31 22:52 ` [PATCH RFC v5 10/10] arm64: dts: imx8m: Add interconnect provider properties Leonard Crestez
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=cover.1572562150.git.leonard.crestez@nxp.com \
--to=leonard.crestez@nxp.com \
--cc=Anson.Huang@nxp.com \
--cc=a.swigon@partner.samsung.com \
--cc=abailon@baylibre.com \
--cc=abel.vesa@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=angus@akkea.ca \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=fabio.estevam@nxp.com \
--cc=georgi.djakov@linaro.org \
--cc=kernel@pengutronix.de \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=martink@posteo.de \
--cc=mka@chromium.org \
--cc=mturquette@baylibre.com \
--cc=myungjoo.ham@samsung.com \
--cc=ping.bai@nxp.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.com \
--cc=sboyd@kernel.org \
--cc=shawnguo@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).