Blame view

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