interconnect.rst 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. .. SPDX-License-Identifier: GPL-2.0
  2. =====================================
  3. Generic System Interconnect Subsystem
  4. =====================================
  5. Introduction
  6. ------------
  7. This framework is designed to provide a standard kernel interface to control
  8. the settings of the interconnects on an SoC. These settings can be throughput,
  9. latency and priority between multiple interconnected devices or functional
  10. blocks. This can be controlled dynamically in order to save power or provide
  11. maximum performance.
  12. The interconnect bus is hardware with configurable parameters, which can be
  13. set on a data path according to the requests received from various drivers.
  14. An example of interconnect buses are the interconnects between various
  15. components or functional blocks in chipsets. There can be multiple interconnects
  16. on an SoC that can be multi-tiered.
  17. Below is a simplified diagram of a real-world SoC interconnect bus topology.
  18. ::
  19. +----------------+ +----------------+
  20. | HW Accelerator |--->| M NoC |<---------------+
  21. +----------------+ +----------------+ |
  22. | | +------------+
  23. +-----+ +-------------+ V +------+ | |
  24. | DDR | | +--------+ | PCIe | | |
  25. +-----+ | | Slaves | +------+ | |
  26. ^ ^ | +--------+ | | C NoC |
  27. | | V V | |
  28. +------------------+ +------------------------+ | | +-----+
  29. | |-->| |-->| |-->| CPU |
  30. | |-->| |<--| | +-----+
  31. | Mem NoC | | S NoC | +------------+
  32. | |<--| |---------+ |
  33. | |<--| |<------+ | | +--------+
  34. +------------------+ +------------------------+ | | +-->| Slaves |
  35. ^ ^ ^ ^ ^ | | +--------+
  36. | | | | | | V
  37. +------+ | +-----+ +-----+ +---------+ +----------------+ +--------+
  38. | CPUs | | | GPU | | DSP | | Masters |-->| P NoC |-->| Slaves |
  39. +------+ | +-----+ +-----+ +---------+ +----------------+ +--------+
  40. |
  41. +-------+
  42. | Modem |
  43. +-------+
  44. Terminology
  45. -----------
  46. Interconnect provider is the software definition of the interconnect hardware.
  47. The interconnect providers on the above diagram are M NoC, S NoC, C NoC, P NoC
  48. and Mem NoC.
  49. Interconnect node is the software definition of the interconnect hardware
  50. port. Each interconnect provider consists of multiple interconnect nodes,
  51. which are connected to other SoC components including other interconnect
  52. providers. The point on the diagram where the CPUs connect to the memory is
  53. called an interconnect node, which belongs to the Mem NoC interconnect provider.
  54. Interconnect endpoints are the first or the last element of the path. Every
  55. endpoint is a node, but not every node is an endpoint.
  56. Interconnect path is everything between two endpoints including all the nodes
  57. that have to be traversed to reach from a source to destination node. It may
  58. include multiple master-slave pairs across several interconnect providers.
  59. Interconnect consumers are the entities which make use of the data paths exposed
  60. by the providers. The consumers send requests to providers requesting various
  61. throughput, latency and priority. Usually the consumers are device drivers, that
  62. send request based on their needs. An example for a consumer is a video decoder
  63. that supports various formats and image sizes.
  64. Interconnect providers
  65. ----------------------
  66. Interconnect provider is an entity that implements methods to initialize and
  67. configure interconnect bus hardware. The interconnect provider drivers should
  68. be registered with the interconnect provider core.
  69. .. kernel-doc:: include/linux/interconnect-provider.h
  70. Interconnect consumers
  71. ----------------------
  72. Interconnect consumers are the clients which use the interconnect APIs to
  73. get paths between endpoints and set their bandwidth/latency/QoS requirements
  74. for these interconnect paths. These interfaces are not currently
  75. documented.
  76. Interconnect debugfs interfaces
  77. -------------------------------
  78. Like several other subsystems interconnect will create some files for debugging
  79. and introspection. Files in debugfs are not considered ABI so application
  80. software shouldn't rely on format details change between kernel versions.
  81. ``/sys/kernel/debug/interconnect/interconnect_summary``:
  82. Show all interconnect nodes in the system with their aggregated bandwidth
  83. request. Indented under each node show bandwidth requests from each device.
  84. ``/sys/kernel/debug/interconnect/interconnect_graph``:
  85. Show the interconnect graph in the graphviz dot format. It shows all
  86. interconnect nodes and links in the system and groups together nodes from the
  87. same provider as subgraphs. The format is human-readable and can also be piped
  88. through dot to generate diagrams in many graphical formats::
  89. $ cat /sys/kernel/debug/interconnect/interconnect_graph | \
  90. dot -Tsvg > interconnect_graph.svg