Debian Codegraph @

Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml

raw
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 # Copyright 2019 Linaro Ltd.
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/arm/arm,coresight-cti.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: ARM Coresight Cross Trigger Interface (CTI) device.
9
10 description: |
11 The CoreSight Embedded Cross Trigger (ECT) consists of CTI devices connected
12 to one or more CoreSight components and/or a CPU, with CTIs interconnected in
13 a star topology via the Cross Trigger Matrix (CTM), which is not programmable.
14 The ECT components are not part of the trace generation data path and are thus
15 not part of the CoreSight graph.
16
17 The CTI component properties define the connections between the individual
18 CTI and the components it is directly connected to, consisting of input and
19 output hardware trigger signals. CTIs can have a maximum number of input and
20 output hardware trigger signals (8 each for v1 CTI, 32 each for v2 CTI). The
21 number is defined at design time, the maximum of each defined in the DEVID
22 register.
23
24 CTIs are interconnected in a star topology via the CTM, using a number of
25 programmable channels, usually 4, but again implementation defined and
26 described in the DEVID register. The star topology is not required to be
27 described in the bindings as the actual connections are software
28 programmable.
29
30 In general the connections between CTI and components via the trigger signals
31 are implementation defined, except when the CTI is connected to an ARM v8
32 architecture core and optional ETM.
33
34 In this case the ARM v8 architecture defines the required signal connections
35 between CTI and the CPU core and ETM if present. In the case of a v8
36 architecturally connected CTI an additional compatible string is used to
37 indicate this feature (arm,coresight-cti-v8-arch).
38
39 When CTI trigger connection information is unavailable then a minimal driver
40 binding can be declared with no explicit trigger signals. This will result
41 the driver detecting the maximum available triggers and channels from the
42 DEVID register and make them all available for use as a single default
43 connection. Any user / client application will require additional information
44 on the connections between the CTI and other components for correct operation.
45 This information might be found by enabling the Integration Test registers in
46 the driver (set CONFIG_CORESIGHT_CTI_INTEGRATION_TEST in Kernel
47 configuration). These registers may be used to explore the trigger connections
48 between CTI and other CoreSight components.
49
50 Certain triggers between CoreSight devices and the CTI have specific types
51 and usages. These can be defined along with the signal indexes with the
52 constants defined in <dt-bindings/arm/coresight-cti-dt.h>
53
54 For example a CTI connected to a core will usually have a DBGREQ signal. This
55 is defined in the binding as type PE_EDBGREQ. These types will appear in an
56 optional array alongside the signal indexes. Omitting types will default all
57 signals to GEN_IO.
58
59 Note that some hardware trigger signals can be connected to non-CoreSight
60 components (e.g. UART etc) depending on hardware implementation.
61
62 maintainers:
63 - Mike Leach <[email protected]>
64
65 allOf:
66 - $ref: /schemas/arm/primecell.yaml#
67
68 # Need a custom select here or 'arm,primecell' will match on lots of nodes
69 select:
70 properties:
71 compatible:
72 contains:
73 enum:
74 - arm,coresight-cti
75 required:
76 - compatible
77
78 properties:
79 $nodename:
80 pattern: "^cti(@[0-9a-f]+)$"
81 compatible:
82 oneOf:
83 - items:
84 - const: arm,coresight-cti
85 - const: arm,primecell
86 - items:
87 - const: arm,coresight-cti-v8-arch
88 - const: arm,coresight-cti
89 - const: arm,primecell
90
91 reg:
92 maxItems: 1
93
94 cpu:
95 description:
96 Handle to cpu this CTI is associated with.
97
98 power-domains:
99 maxItems: 1
100
101 label:
102 description:
103 Description of a coresight device.
104
105 arm,cti-ctm-id:
106 $ref: /schemas/types.yaml#/definitions/uint32
107 description:
108 Defines the CTM this CTI is connected to, in large systems with multiple
109 separate CTI/CTM nets. Typically multi-socket systems where the CTM is
110 propagated between sockets.
111
112 arm,cs-dev-assoc:
113 $ref: /schemas/types.yaml#/definitions/phandle
114 description:
115 defines a phandle reference to an associated CoreSight trace device.
116 When the associated trace device is enabled, then the respective CTI
117 will be enabled. Use in CTI base node when compatible string
118 arm,coresight-cti-v8-arch used. If the associated device has not been
119 registered then the node name will be stored as the connection name for
120 later resolution. If the associated device is not a CoreSight device or
121 not registered then the node name will remain the connection name and
122 automatic enabling will not occur.
123
124 # size cells and address cells required if trig-conns node present.
125 "#size-cells":
126 const: 0
127
128 "#address-cells":
129 const: 1
130
131 patternProperties:
132 '^trig-conns@([0-9]+)$':
133 type: object
134 additionalProperties: false
135
136 description:
137 A trigger connections child node which describes the trigger signals
138 between this CTI and another hardware device. This device may be a CPU,
139 CoreSight device, any other hardware device or simple external IO lines.
140 The connection may have both input and output triggers, or only one or the
141 other.
142
143 properties:
144 reg:
145 maxItems: 1
146
147 cpu:
148 description:
149 Handle to cpu this trigger connection is associated with.
150
151 arm,cs-dev-assoc:
152 $ref: /schemas/types.yaml#/definitions/phandle
153 description:
154 defines a phandle reference to an associated CoreSight trace device.
155 When the associated trace device is enabled, then the respective CTI
156 will be enabled. If the associated device has not been registered
157 then the node name will be stored as the connection name for later
158 resolution. If the associated device is not a CoreSight device or
159 not registered then the node name will remain the connection name
160 and automatic enabling will not occur.
161
162 arm,trig-in-sigs:
163 $ref: /schemas/types.yaml#/definitions/uint32-array
164 minItems: 1
165 maxItems: 32
166 description:
167 List of CTI trigger in signal numbers in use by a trig-conns node.
168
169 arm,trig-in-types:
170 $ref: /schemas/types.yaml#/definitions/uint32-array
171 minItems: 1
172 maxItems: 32
173 description:
174 List of constants representing the types for the CTI trigger in
175 signals. Types in this array match to the corresponding signal in the
176 arm,trig-in-sigs array. If the -types array is smaller, or omitted
177 completely, then the types will default to GEN_IO.
178
179 arm,trig-out-sigs:
180 $ref: /schemas/types.yaml#/definitions/uint32-array
181 minItems: 1
182 maxItems: 32
183 description:
184 List of CTI trigger out signal numbers in use by a trig-conns node.
185
186 arm,trig-out-types:
187 $ref: /schemas/types.yaml#/definitions/uint32-array
188 minItems: 1
189 maxItems: 32
190 description:
191 List of constants representing the types for the CTI trigger out
192 signals. Types in this array match to the corresponding signal
193 in the arm,trig-out-sigs array. If the "-types" array is smaller,
194 or omitted completely, then the types will default to GEN_IO.
195
196 arm,trig-filters:
197 $ref: /schemas/types.yaml#/definitions/uint32-array
198 minItems: 1
199 maxItems: 32
200 description:
201 List of CTI trigger out signals that will be blocked from becoming
202 active, unless filtering is disabled on the driver.
203
204 arm,trig-conn-name:
205 $ref: /schemas/types.yaml#/definitions/string
206 description:
207 Defines a connection name that will be displayed, if the cpu or
208 arm,cs-dev-assoc properties are not being used in this connection.
209 Principle use for CTI that are connected to non-CoreSight devices, or
210 external IO.
211
212 anyOf:
213 - required:
214 - arm,trig-in-sigs
215 - required:
216 - arm,trig-out-sigs
217 oneOf:
218 - required:
219 - arm,trig-conn-name
220 - required:
221 - cpu
222 - required:
223 - arm,cs-dev-assoc
224 required:
225 - reg
226
227 required:
228 - compatible
229 - reg
230 - clocks
231 - clock-names
232
233 if:
234 properties:
235 compatible:
236 contains:
237 const: arm,coresight-cti-v8-arch
238
239 then:
240 required:
241 - cpu
242
243 unevaluatedProperties: false
244
245 examples:
246 # minimum CTI definition. DEVID register used to set number of triggers.
247 - |
248 cti@20020000 {
249 compatible = "arm,coresight-cti", "arm,primecell";
250 reg = <0x20020000 0x1000>;
251
252 clocks = <&soc_smc50mhz>;
253 clock-names = "apb_pclk";
254 };
255 # v8 architecturally defined CTI - CPU + ETM connections generated by the
256 # driver according to the v8 architecture specification.
257 - |
258 cti@859000 {
259 compatible = "arm,coresight-cti-v8-arch", "arm,coresight-cti",
260 "arm,primecell";
261 reg = <0x859000 0x1000>;
262
263 clocks = <&soc_smc50mhz>;
264 clock-names = "apb_pclk";
265
266 cpu = <&CPU1>;
267 arm,cs-dev-assoc = <&etm1>;
268 };
269 # Implementation defined CTI - CPU + ETM connections explicitly defined..
270 # Shows use of type constants from dt-bindings/arm/coresight-cti-dt.h
271 # #size-cells and #address-cells are required if trig-conns@ nodes present.
272 - |
273 #include <dt-bindings/arm/coresight-cti-dt.h>
274
275 cti@858000 {
276 compatible = "arm,coresight-cti", "arm,primecell";
277 reg = <0x858000 0x1000>;
278
279 clocks = <&soc_smc50mhz>;
280 clock-names = "apb_pclk";
281
282 arm,cti-ctm-id = <1>;
283
284 #address-cells = <1>;
285 #size-cells = <0>;
286
287 trig-conns@0 {
288 reg = <0>;
289 arm,trig-in-sigs = <4 5 6 7>;
290 arm,trig-in-types = <ETM_EXTOUT
291 ETM_EXTOUT
292 ETM_EXTOUT
293 ETM_EXTOUT>;
294 arm,trig-out-sigs = <4 5 6 7>;
295 arm,trig-out-types = <ETM_EXTIN
296 ETM_EXTIN
297 ETM_EXTIN
298 ETM_EXTIN>;
299 arm,cs-dev-assoc = <&etm0>;
300 };
301
302 trig-conns@1 {
303 reg = <1>;
304 cpu = <&CPU0>;
305 arm,trig-in-sigs = <0 1>;
306 arm,trig-in-types = <PE_DBGTRIGGER
307 PE_PMUIRQ>;
308 arm,trig-out-sigs = <0 1 2 >;
309 arm,trig-out-types = <PE_EDBGREQ
310 PE_DBGRESTART
311 PE_CTIIRQ>;
312
313 arm,trig-filters = <0>;
314 };
315 };
316 # Implementation defined CTI - non CoreSight component connections.
317 - |
318 cti@20110000 {
319 compatible = "arm,coresight-cti", "arm,primecell";
320 reg = <0x20110000 0x1000>;
321
322 clocks = <&soc_smc50mhz>;
323 clock-names = "apb_pclk";
324
325 #address-cells = <1>;
326 #size-cells = <0>;
327
328 trig-conns@0 {
329 reg = <0>;
330 arm,trig-in-sigs = <0>;
331 arm,trig-in-types = <GEN_INTREQ>;
332 arm,trig-out-sigs = <0>;
333 arm,trig-out-types = <GEN_HALTREQ>;
334 arm,trig-conn-name = "sys_profiler";
335 };
336
337 trig-conns@1 {
338 reg = <1>;
339 arm,trig-out-sigs = <2 3>;
340 arm,trig-out-types = <GEN_HALTREQ GEN_RESTARTREQ>;
341 arm,trig-conn-name = "watchdog";
342 };
343
344 trig-conns@2 {
345 reg = <2>;
346 arm,trig-in-sigs = <1 6>;
347 arm,trig-in-types = <GEN_HALTREQ GEN_RESTARTREQ>;
348 arm,trig-conn-name = "g_counter";
349 };
350 };
351
352 ...