0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 =====================================
0004 Generic System Interconnect Subsystem
0005 =====================================
0006
0007 Introduction
0008 ------------
0009
0010 This framework is designed to provide a standard kernel interface to control
0011 the settings of the interconnects on an SoC. These settings can be throughput,
0012 latency and priority between multiple interconnected devices or functional
0013 blocks. This can be controlled dynamically in order to save power or provide
0014 maximum performance.
0015
0016 The interconnect bus is hardware with configurable parameters, which can be
0017 set on a data path according to the requests received from various drivers.
0018 An example of interconnect buses are the interconnects between various
0019 components or functional blocks in chipsets. There can be multiple interconnects
0020 on an SoC that can be multi-tiered.
0021
0022 Below is a simplified diagram of a real-world SoC interconnect bus topology.
0023
0024 ::
0025
0026 +----------------+ +----------------+
0027 | HW Accelerator |--->| M NoC |<---------------+
0028 +----------------+ +----------------+ |
0029 | | +------------+
0030 +-----+ +-------------+ V +------+ | |
0031 | DDR | | +--------+ | PCIe | | |
0032 +-----+ | | Slaves | +------+ | |
0033 ^ ^ | +--------+ | | C NoC |
0034 | | V V | |
0035 +------------------+ +------------------------+ | | +-----+
0036 | |-->| |-->| |-->| CPU |
0037 | |-->| |<--| | +-----+
0038 | Mem NoC | | S NoC | +------------+
0039 | |<--| |---------+ |
0040 | |<--| |<------+ | | +--------+
0041 +------------------+ +------------------------+ | | +-->| Slaves |
0042 ^ ^ ^ ^ ^ | | +--------+
0043 | | | | | | V
0044 +------+ | +-----+ +-----+ +---------+ +----------------+ +--------+
0045 | CPUs | | | GPU | | DSP | | Masters |-->| P NoC |-->| Slaves |
0046 +------+ | +-----+ +-----+ +---------+ +----------------+ +--------+
0047 |
0048 +-------+
0049 | Modem |
0050 +-------+
0051
0052 Terminology
0053 -----------
0054
0055 Interconnect provider is the software definition of the interconnect hardware.
0056 The interconnect providers on the above diagram are M NoC, S NoC, C NoC, P NoC
0057 and Mem NoC.
0058
0059 Interconnect node is the software definition of the interconnect hardware
0060 port. Each interconnect provider consists of multiple interconnect nodes,
0061 which are connected to other SoC components including other interconnect
0062 providers. The point on the diagram where the CPUs connect to the memory is
0063 called an interconnect node, which belongs to the Mem NoC interconnect provider.
0064
0065 Interconnect endpoints are the first or the last element of the path. Every
0066 endpoint is a node, but not every node is an endpoint.
0067
0068 Interconnect path is everything between two endpoints including all the nodes
0069 that have to be traversed to reach from a source to destination node. It may
0070 include multiple master-slave pairs across several interconnect providers.
0071
0072 Interconnect consumers are the entities which make use of the data paths exposed
0073 by the providers. The consumers send requests to providers requesting various
0074 throughput, latency and priority. Usually the consumers are device drivers, that
0075 send request based on their needs. An example for a consumer is a video decoder
0076 that supports various formats and image sizes.
0077
0078 Interconnect providers
0079 ----------------------
0080
0081 Interconnect provider is an entity that implements methods to initialize and
0082 configure interconnect bus hardware. The interconnect provider drivers should
0083 be registered with the interconnect provider core.
0084
0085 .. kernel-doc:: include/linux/interconnect-provider.h
0086
0087 Interconnect consumers
0088 ----------------------
0089
0090 Interconnect consumers are the clients which use the interconnect APIs to
0091 get paths between endpoints and set their bandwidth/latency/QoS requirements
0092 for these interconnect paths. These interfaces are not currently
0093 documented.
0094
0095 Interconnect debugfs interfaces
0096 -------------------------------
0097
0098 Like several other subsystems interconnect will create some files for debugging
0099 and introspection. Files in debugfs are not considered ABI so application
0100 software shouldn't rely on format details change between kernel versions.
0101
0102 ``/sys/kernel/debug/interconnect/interconnect_summary``:
0103
0104 Show all interconnect nodes in the system with their aggregated bandwidth
0105 request. Indented under each node show bandwidth requests from each device.
0106
0107 ``/sys/kernel/debug/interconnect/interconnect_graph``:
0108
0109 Show the interconnect graph in the graphviz dot format. It shows all
0110 interconnect nodes and links in the system and groups together nodes from the
0111 same provider as subgraphs. The format is human-readable and can also be piped
0112 through dot to generate diagrams in many graphical formats::
0113
0114 $ cat /sys/kernel/debug/interconnect/interconnect_graph | \
0115 dot -Tsvg > interconnect_graph.svg