Skip to content

Tegra234 Memory interconnect support

Sumit Gupta linux-devicetree linux-pci linux-pm linux-tegra lkml 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest8 patches 5 repliesIn review
  2. v78 patches 8 repliesSuperseded
  3. v69 patches 9 repliesApplied
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v58 patches2 repliesSuperseded
v410 patches20 repliesSuperseded
v311 patches12 repliesSuperseded
v29 patches13 repliesSuperseded
v110 patches42 repliesApplied

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8memory: tegra: add interconnect support for DRAM scaling in Tegra234drivers/memory/tegra/mc.c drivers/memory/tegra/tegra186-emc.c drivers/memory/tegra/tegra234.c +2 more+347 -11 reply
2/8memory: tegra: add mc clients for Tegra234drivers/memory/tegra/tegra234.c+420 -00 replies
3/8memory: tegra: add software mc clients in Tegra234drivers/memory/tegra/tegra234.c+15 -00 replies
4/8dt-bindings: tegra: add icc ids for dummy MC clientsinclude/dt-bindings/memory/tegra234-mc.h+5 -00 replies
5/8memory: tegra: make cpu cluster bw request a multiple of mc channelsdrivers/memory/tegra/mc.c drivers/memory/tegra/mc.h drivers/memory/tegra/tegra234.c +1 more+44 -10 replies
6/8PCI: tegra194: Fix possible array out of bounds accessdrivers/pci/controller/dwc/pcie-tegra194.c+11 -20 replies
7/8PCI: tegra194: Add interconnect support in Tegra234drivers/pci/controller/dwc/pcie-tegra194.c+35 -160 replies
8/8arm64: tegra: Add cpu OPP tables and interconnects propertyarch/arm64/boot/dts/nvidia/tegra234.dtsi+276 -00 replies

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchKrzysztof KozlowskiLorenzo PieralisiThierry Reding
SeriesA-b
1/8A-b
2/8A-b
3/8A-b
4/8A-b
5/8A-b
6/8A-b
7/8A-b
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v8 thread

Cover letter [Patch v8 0/8] Tegra234 Memory interconnect support

Hi All,

Have incorporated the suggestions in v7. Only changed 'patch 1' in v7 to fix possible race when setting 'mc->bpmp' as pointed by Krzysztof. Requesting to merge the patch series.

Thank you,
Sumit Gupta
============

This patch series adds memory interconnect support for Tegra234 SoC. It is used to dynamically scale DRAM Frequency as per the bandwidth requests from different Memory Controller (MC) clients.
MC Clients use ICC Framework's icc_set_bw() api to dynamically request for the DRAM bandwidth (BW). As per path, the request will be routed from MC to the EMC driver. MC driver passes the request info like the Client ID, type, and frequency request info to the BPMP-FW which will set the final DRAM freq considering all exisiting requests.

MC and EMC are the ICC providers. Nodes in path for a request will be:

     Client[1-n] -> MC -> EMC -> EMEM/DRAM

The patch series also adds interconnect support in below clients:
1) CPUFREQ driver for scaling bandwidth with CPU frequency. For that, add per cluster OPP table which will be used in the CPUFREQ driver by requesting the minimum BW respective to the given CPU frequency in the OPP table of it's cluster.
2) PCIE driver to request BW required for different modes.

---
v7[7] -> v8:
- fixed possible race and compiler re-ordering when setting 'mc->bpmp'.

v6[6] -> v7:
- removed 'Patch 6' from v6 as it has been applied in next by 'Viresh'.
- changed commit message of PCI patches as suggested by 'Lorenzo'.
- added ACK from 'Lorenzo' in both PCI patches.

v5[5] -> v6:
- split PCI patch into two 'patch 7 & 8' as suggested by 'Lorenzo'.
- added more info into the commit description of PCI patches.

v4[4] -> v5:
- dropped 'patch 1 & 2' from v4 which added "nvidia,bpmp" in MC node.
- save BPMP ref from EMC node into 'mc->bpmp' and use it in MC driver.
- added check for array bounds violation in pci suggested by Bjorn.
- moved DT patch having OPP table to the last 'Patch 8'.
- did multiple small changes and cleanup suggested by Krzysztof in v4.

v3[3] -> v4:
- dropped 'patch 1' from v3 which returns 'struct tegra_bpmp *'.
- added 'patch 1 & 2' to get bpmp ref using 'nvidia,bpmp' property.
- dropped 'patch 10 & 11' from v3 and added those changes in 'patch 3'.
- added static to prototype of 'tegra_cpufreq_init_cpufreq_table()' to fix the warning reported by 'kernel test robot'.

v2[2] -> v3:
- in 'patch 7', set 'icc_dram_bw_scaling' to false if set_opp call failed to avoid flooding of uart with 'Failed to set bw' messages.
- added 'patch 10' to handle if the bpmp-fw is old and not support bwmgr mrq.
- added 'patch 11' to fix interconnect registration in tegra186-emc. ref patch link in linux next:
[https://lore.kernel.org/all/[email protected]/]

v1[1] -> v2:
- moved BW setting to tegra234_mc_icc_set() from EMC driver.
- moved sw clients to the 'tegra_mc_clients' table.
- point 'node->data' to the entry within 'tegra_mc_clients'.
- removed 'struct tegra_icc_node' and get client info using 'node->data'.
- changed error handling in and around tegra_emc_interconnect_init().
- moved 'tegra-icc.h' from 'include/soc/tegra' to 'include/linux'.
- added interconnect support to PCIE driver in 'Patch 9'.
- merged 'Patch 9 & 10' from [1] to get num_channels and use.
- merged 'Patch 2 & 3' from [1] to add ISO and NISO clients.
- added 'Acked-by' of Krzysztof from 'Patch 05/10' of [1].
- Removed 'Patch 7' from [1] as that is merged now.

Sumit Gupta (8):
memory: tegra: add interconnect support for DRAM scaling in Tegra234
memory: tegra: add mc clients for Tegra234
memory: tegra: add software mc clients in Tegra234
dt-bindings: tegra: add icc ids for dummy MC clients
memory: tegra: make cpu cluster bw request a multiple of mc channels
PCI: tegra194: Fix possible array out of bounds access
PCI: tegra194: Add interconnect support in Tegra234
arm64: tegra: Add cpu OPP tables and interconnects property

 arch/arm64/boot/dts/nvidia/tegra234.dtsi   | 276 ++++++++++
 drivers/memory/tegra/mc.c                  |  24 +
 drivers/memory/tegra/mc.h                  |   1 +
 drivers/memory/tegra/tegra186-emc.c        | 133 +++++
 drivers/memory/tegra/tegra234.c            | 595 ++++++++++++++++++++-
 drivers/pci/controller/dwc/pcie-tegra194.c |  44 +-
 include/dt-bindings/memory/tegra234-mc.h   |   5 +
 include/linux/tegra-icc.h                  |  65 +++
 include/soc/tegra/mc.h                     |   8 +
 9 files changed, 1142 insertions(+), 9 deletions(-)
 create mode 100644 include/linux/tegra-icc.h

[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/
[3] https://lore.kernel.org/lkml/[email protected]/
[4] https://lore.kernel.org/lkml/[email protected]/
[5] https://lore.kernel.org/lkml/[email protected]/
[6] https://lore.kernel.org/lkml/[email protected]/
[7] https://lore.kernel.org/lkml/[email protected]/

Signature · 1 line
2.17.1