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