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