Skip to content

RFC interconnect: Add imx support via devfreq

Leonard Crestez linux-arm-kernel linux-devicetree linux-pm 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 posting 2/28 patches 5 repliesIn review
  2. v6 RFC Latest9 patches 38 repliesIn review
  3. v5 RFC10 patches 4 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v4 RFC7 patches11 repliesSuperseded
v3 RFC posting 1/23 patches11 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9dt-bindings: interconnect: Add bindings for imx8m nocDocumentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml+104 -07 replies
2/9PM / devfreq: Add generic imx bus scaling driverdrivers/devfreq/Kconfig drivers/devfreq/Makefile drivers/devfreq/imx-devfreq.c+160 -019 replies
3/9PM / devfreq: imx: Register interconnect devicedrivers/devfreq/imx-devfreq.c+37 -07 replies
4/9interconnect: Add imx core driverdrivers/interconnect/Kconfig drivers/interconnect/Makefile drivers/interconnect/imx/Kconfig +3 more+369 -02 replies
5/9interconnect: imx: Add platform driver for imx8mmdrivers/interconnect/imx/Kconfig drivers/interconnect/imx/Makefile drivers/interconnect/imx/imx8mm.c +1 more+159 -02 replies
6/9interconnect: imx: Add platform driver for imx8mqdrivers/interconnect/imx/Kconfig drivers/interconnect/imx/Makefile drivers/interconnect/imx/imx8mq.c +1 more+156 -00 replies
7/9interconnect: imx: Add platform driver for imx8mndrivers/interconnect/imx/Kconfig drivers/interconnect/imx/Makefile drivers/interconnect/imx/imx8mn.c +1 more+140 -00 replies
8/9arm64: dts: imx8m: Add NOC nodesarch/arm64/boot/dts/freescale/imx8mm.dtsi arch/arm64/boot/dts/freescale/imx8mn.dtsi arch/arm64/boot/dts/freescale/imx8mq.dtsi+66 -00 replies
9/9arm64: dts: imx8m: Add interconnect provider propertiesarch/arm64/boot/dts/freescale/imx8mm.dtsi arch/arm64/boot/dts/freescale/imx8mn.dtsi arch/arm64/boot/dts/freescale/imx8mq.dtsi+18 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH RFC v6 0/9] interconnect: Add imx support via devfreq

This series adds 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 is implemented as distinct devfreq drivers instead.

The imx interconnect provider doesn't communicate with devfreq directly but rather computes "minimum frequencies" for nodes along the path and creates dev_pm_qos requests.

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 avoids introducing "virtual" devices but it means that DT bindings of main NOC includes properties for both devfreq and interconnect.

This depends on other series for devfreq pm/qos and ddrc:

	https://patchwork.kernel.org/cover/11244283/
	https://patchwork.kernel.org/cover/11212887/
	https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=196443

Also available as a github branch (with various unrelated changes):
https://github.com/cdleonard/linux/tree/next_imx_busfreq

Changes since RFCv5:
* Replace scanning for interconnect-node-id with explicit scalable-nodes/scalable-node-ids property on NoC.
* Now passes make dtbs_check
* Remove struct imx_icc_provider
* Switch to of_icc_xlate_onecell
* Use of_find_device_by_node to fetch QoS target, this causes fewer probe deferrals, removes dependency on devfreq API and even allows reloading ddrc module at runtime
* Add imx_icc_node_destroy helper
* Remove 0/1 on DEFINE_BUS_SLAVE/MASTER which created spurious links

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.

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/cover/11021563/

Leonard Crestez (9):
dt-bindings: interconnect: Add bindings for imx8m noc PM / devfreq: Add generic imx bus scaling driver PM / devfreq: imx: Register interconnect device
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

 .../bindings/interconnect/fsl,imx8m-noc.yaml  | 104 ++++++
 arch/arm64/boot/dts/freescale/imx8mm.dtsi     |  28 ++
 arch/arm64/boot/dts/freescale/imx8mn.dtsi     |  28 ++
 arch/arm64/boot/dts/freescale/imx8mq.dtsi     |  28 ++
 drivers/devfreq/Kconfig                       |   9 +
 drivers/devfreq/Makefile                      |   1 +
 drivers/devfreq/imx-devfreq.c                 | 187 +++++++++++
 drivers/interconnect/Kconfig                  |   1 +
 drivers/interconnect/Makefile                 |   1 +
 drivers/interconnect/imx/Kconfig              |  17 +
 drivers/interconnect/imx/Makefile             |   4 +
 drivers/interconnect/imx/imx.c                | 301 ++++++++++++++++++
 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 +++
 19 files changed, 1209 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.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
Signature · 1 line
2.17.1