15df7ea33SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 25df7ea33SEmmanuel Vadot# Copyright 2019 Linaro Ltd. 35df7ea33SEmmanuel Vadot%YAML 1.2 45df7ea33SEmmanuel Vadot--- 55df7ea33SEmmanuel Vadot$id: http://devicetree.org/schemas/arm/coresight-cti.yaml# 65df7ea33SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 75df7ea33SEmmanuel Vadot 85df7ea33SEmmanuel Vadottitle: ARM Coresight Cross Trigger Interface (CTI) device. 95df7ea33SEmmanuel Vadot 105df7ea33SEmmanuel Vadotdescription: | 115df7ea33SEmmanuel Vadot The CoreSight Embedded Cross Trigger (ECT) consists of CTI devices connected 125df7ea33SEmmanuel Vadot to one or more CoreSight components and/or a CPU, with CTIs interconnected in 135df7ea33SEmmanuel Vadot a star topology via the Cross Trigger Matrix (CTM), which is not programmable. 145df7ea33SEmmanuel Vadot The ECT components are not part of the trace generation data path and are thus 155df7ea33SEmmanuel Vadot not part of the CoreSight graph described in the general CoreSight bindings 165df7ea33SEmmanuel Vadot file coresight.txt. 175df7ea33SEmmanuel Vadot 185df7ea33SEmmanuel Vadot The CTI component properties define the connections between the individual 195df7ea33SEmmanuel Vadot CTI and the components it is directly connected to, consisting of input and 205df7ea33SEmmanuel Vadot output hardware trigger signals. CTIs can have a maximum number of input and 215df7ea33SEmmanuel Vadot output hardware trigger signals (8 each for v1 CTI, 32 each for v2 CTI). The 225df7ea33SEmmanuel Vadot number is defined at design time, the maximum of each defined in the DEVID 235df7ea33SEmmanuel Vadot register. 245df7ea33SEmmanuel Vadot 255df7ea33SEmmanuel Vadot CTIs are interconnected in a star topology via the CTM, using a number of 265df7ea33SEmmanuel Vadot programmable channels, usually 4, but again implementation defined and 275df7ea33SEmmanuel Vadot described in the DEVID register. The star topology is not required to be 285df7ea33SEmmanuel Vadot described in the bindings as the actual connections are software 295df7ea33SEmmanuel Vadot programmable. 305df7ea33SEmmanuel Vadot 315df7ea33SEmmanuel Vadot In general the connections between CTI and components via the trigger signals 325df7ea33SEmmanuel Vadot are implementation defined, except when the CTI is connected to an ARM v8 335df7ea33SEmmanuel Vadot architecture core and optional ETM. 345df7ea33SEmmanuel Vadot 355df7ea33SEmmanuel Vadot In this case the ARM v8 architecture defines the required signal connections 365df7ea33SEmmanuel Vadot between CTI and the CPU core and ETM if present. In the case of a v8 375df7ea33SEmmanuel Vadot architecturally connected CTI an additional compatible string is used to 385df7ea33SEmmanuel Vadot indicate this feature (arm,coresight-cti-v8-arch). 395df7ea33SEmmanuel Vadot 405df7ea33SEmmanuel Vadot When CTI trigger connection information is unavailable then a minimal driver 415df7ea33SEmmanuel Vadot binding can be declared with no explicit trigger signals. This will result 425df7ea33SEmmanuel Vadot the driver detecting the maximum available triggers and channels from the 435df7ea33SEmmanuel Vadot DEVID register and make them all available for use as a single default 445df7ea33SEmmanuel Vadot connection. Any user / client application will require additional information 455df7ea33SEmmanuel Vadot on the connections between the CTI and other components for correct operation. 465df7ea33SEmmanuel Vadot This information might be found by enabling the Integration Test registers in 475df7ea33SEmmanuel Vadot the driver (set CONFIG_CORESIGHT_CTI_INTEGRATION_TEST in Kernel 485df7ea33SEmmanuel Vadot configuration). These registers may be used to explore the trigger connections 495df7ea33SEmmanuel Vadot between CTI and other CoreSight components. 505df7ea33SEmmanuel Vadot 515df7ea33SEmmanuel Vadot Certain triggers between CoreSight devices and the CTI have specific types 525df7ea33SEmmanuel Vadot and usages. These can be defined along with the signal indexes with the 535df7ea33SEmmanuel Vadot constants defined in <dt-bindings/arm/coresight-cti-dt.h> 545df7ea33SEmmanuel Vadot 555df7ea33SEmmanuel Vadot For example a CTI connected to a core will usually have a DBGREQ signal. This 565df7ea33SEmmanuel Vadot is defined in the binding as type PE_EDBGREQ. These types will appear in an 575df7ea33SEmmanuel Vadot optional array alongside the signal indexes. Omitting types will default all 585df7ea33SEmmanuel Vadot signals to GEN_IO. 595df7ea33SEmmanuel Vadot 605df7ea33SEmmanuel Vadot Note that some hardware trigger signals can be connected to non-CoreSight 615df7ea33SEmmanuel Vadot components (e.g. UART etc) depending on hardware implementation. 625df7ea33SEmmanuel Vadot 635df7ea33SEmmanuel Vadotmaintainers: 645df7ea33SEmmanuel Vadot - Mike Leach <mike.leach@linaro.org> 655df7ea33SEmmanuel Vadot 665df7ea33SEmmanuel VadotallOf: 675df7ea33SEmmanuel Vadot - $ref: /schemas/arm/primecell.yaml# 685df7ea33SEmmanuel Vadot 695df7ea33SEmmanuel Vadot# Need a custom select here or 'arm,primecell' will match on lots of nodes 705df7ea33SEmmanuel Vadotselect: 715df7ea33SEmmanuel Vadot properties: 725df7ea33SEmmanuel Vadot compatible: 735df7ea33SEmmanuel Vadot contains: 745df7ea33SEmmanuel Vadot enum: 755df7ea33SEmmanuel Vadot - arm,coresight-cti 765df7ea33SEmmanuel Vadot required: 775df7ea33SEmmanuel Vadot - compatible 785df7ea33SEmmanuel Vadot 795df7ea33SEmmanuel Vadotproperties: 805df7ea33SEmmanuel Vadot $nodename: 815df7ea33SEmmanuel Vadot pattern: "^cti(@[0-9a-f]+)$" 825df7ea33SEmmanuel Vadot compatible: 835df7ea33SEmmanuel Vadot oneOf: 845df7ea33SEmmanuel Vadot - items: 855df7ea33SEmmanuel Vadot - const: arm,coresight-cti 865df7ea33SEmmanuel Vadot - const: arm,primecell 875df7ea33SEmmanuel Vadot - items: 885df7ea33SEmmanuel Vadot - const: arm,coresight-cti-v8-arch 895df7ea33SEmmanuel Vadot - const: arm,coresight-cti 905df7ea33SEmmanuel Vadot - const: arm,primecell 915df7ea33SEmmanuel Vadot 925df7ea33SEmmanuel Vadot reg: 935df7ea33SEmmanuel Vadot maxItems: 1 945df7ea33SEmmanuel Vadot 955df7ea33SEmmanuel Vadot cpu: 965df7ea33SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 975df7ea33SEmmanuel Vadot description: 985df7ea33SEmmanuel Vadot Handle to cpu this device is associated with. This must appear in the 995df7ea33SEmmanuel Vadot base cti node if compatible string arm,coresight-cti-v8-arch is used, 1005df7ea33SEmmanuel Vadot or may appear in a trig-conns child node when appropriate. 1015df7ea33SEmmanuel Vadot 1025df7ea33SEmmanuel Vadot arm,cti-ctm-id: 1035df7ea33SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1045df7ea33SEmmanuel Vadot description: 1055df7ea33SEmmanuel Vadot Defines the CTM this CTI is connected to, in large systems with multiple 1065df7ea33SEmmanuel Vadot separate CTI/CTM nets. Typically multi-socket systems where the CTM is 1075df7ea33SEmmanuel Vadot propagated between sockets. 1085df7ea33SEmmanuel Vadot 1095df7ea33SEmmanuel Vadot arm,cs-dev-assoc: 1105df7ea33SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 1115df7ea33SEmmanuel Vadot description: 1125df7ea33SEmmanuel Vadot defines a phandle reference to an associated CoreSight trace device. 1135df7ea33SEmmanuel Vadot When the associated trace device is enabled, then the respective CTI 1145df7ea33SEmmanuel Vadot will be enabled. Use in a trig-conns node, or in CTI base node when 1155df7ea33SEmmanuel Vadot compatible string arm,coresight-cti-v8-arch used. If the associated 1165df7ea33SEmmanuel Vadot device has not been registered then the node name will be stored as 1175df7ea33SEmmanuel Vadot the connection name for later resolution. If the associated device is 1185df7ea33SEmmanuel Vadot not a CoreSight device or not registered then the node name will remain 1195df7ea33SEmmanuel Vadot the connection name and automatic enabling will not occur. 1205df7ea33SEmmanuel Vadot 1215df7ea33SEmmanuel Vadot # size cells and address cells required if trig-conns node present. 1225df7ea33SEmmanuel Vadot "#size-cells": 1235df7ea33SEmmanuel Vadot const: 0 1245df7ea33SEmmanuel Vadot 1255df7ea33SEmmanuel Vadot "#address-cells": 1265df7ea33SEmmanuel Vadot const: 1 1275df7ea33SEmmanuel Vadot 1285df7ea33SEmmanuel VadotpatternProperties: 1295df7ea33SEmmanuel Vadot '^trig-conns@([0-9]+)$': 1305df7ea33SEmmanuel Vadot type: object 1315df7ea33SEmmanuel Vadot description: 1325df7ea33SEmmanuel Vadot A trigger connections child node which describes the trigger signals 1335df7ea33SEmmanuel Vadot between this CTI and another hardware device. This device may be a CPU, 1345df7ea33SEmmanuel Vadot CoreSight device, any other hardware device or simple external IO lines. 1355df7ea33SEmmanuel Vadot The connection may have both input and output triggers, or only one or the 1365df7ea33SEmmanuel Vadot other. 1375df7ea33SEmmanuel Vadot 1385df7ea33SEmmanuel Vadot properties: 1395df7ea33SEmmanuel Vadot reg: 1405df7ea33SEmmanuel Vadot maxItems: 1 1415df7ea33SEmmanuel Vadot 1425df7ea33SEmmanuel Vadot arm,trig-in-sigs: 1432554fe8fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 1445df7ea33SEmmanuel Vadot minItems: 1 1455df7ea33SEmmanuel Vadot maxItems: 32 1465df7ea33SEmmanuel Vadot description: 1475df7ea33SEmmanuel Vadot List of CTI trigger in signal numbers in use by a trig-conns node. 1485df7ea33SEmmanuel Vadot 1495df7ea33SEmmanuel Vadot arm,trig-in-types: 1502554fe8fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 1515df7ea33SEmmanuel Vadot minItems: 1 1525df7ea33SEmmanuel Vadot maxItems: 32 1535df7ea33SEmmanuel Vadot description: 1545df7ea33SEmmanuel Vadot List of constants representing the types for the CTI trigger in 1555df7ea33SEmmanuel Vadot signals. Types in this array match to the corresponding signal in the 1565df7ea33SEmmanuel Vadot arm,trig-in-sigs array. If the -types array is smaller, or omitted 1575df7ea33SEmmanuel Vadot completely, then the types will default to GEN_IO. 1585df7ea33SEmmanuel Vadot 1595df7ea33SEmmanuel Vadot arm,trig-out-sigs: 1602554fe8fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 1615df7ea33SEmmanuel Vadot minItems: 1 1625df7ea33SEmmanuel Vadot maxItems: 32 1635df7ea33SEmmanuel Vadot description: 1645df7ea33SEmmanuel Vadot List of CTI trigger out signal numbers in use by a trig-conns node. 1655df7ea33SEmmanuel Vadot 1665df7ea33SEmmanuel Vadot arm,trig-out-types: 1672554fe8fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 1685df7ea33SEmmanuel Vadot minItems: 1 1695df7ea33SEmmanuel Vadot maxItems: 32 1705df7ea33SEmmanuel Vadot description: 1715df7ea33SEmmanuel Vadot List of constants representing the types for the CTI trigger out 1725df7ea33SEmmanuel Vadot signals. Types in this array match to the corresponding signal 1735df7ea33SEmmanuel Vadot in the arm,trig-out-sigs array. If the "-types" array is smaller, 1745df7ea33SEmmanuel Vadot or omitted completely, then the types will default to GEN_IO. 1755df7ea33SEmmanuel Vadot 1765df7ea33SEmmanuel Vadot arm,trig-filters: 1772554fe8fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 1785df7ea33SEmmanuel Vadot minItems: 1 1795df7ea33SEmmanuel Vadot maxItems: 32 1805df7ea33SEmmanuel Vadot description: 1815df7ea33SEmmanuel Vadot List of CTI trigger out signals that will be blocked from becoming 1825df7ea33SEmmanuel Vadot active, unless filtering is disabled on the driver. 1835df7ea33SEmmanuel Vadot 1845df7ea33SEmmanuel Vadot arm,trig-conn-name: 1852554fe8fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 1865df7ea33SEmmanuel Vadot description: 1875df7ea33SEmmanuel Vadot Defines a connection name that will be displayed, if the cpu or 1885df7ea33SEmmanuel Vadot arm,cs-dev-assoc properties are not being used in this connection. 1895df7ea33SEmmanuel Vadot Principle use for CTI that are connected to non-CoreSight devices, or 1905df7ea33SEmmanuel Vadot external IO. 1915df7ea33SEmmanuel Vadot 1925df7ea33SEmmanuel Vadot anyOf: 1935df7ea33SEmmanuel Vadot - required: 1945df7ea33SEmmanuel Vadot - arm,trig-in-sigs 1955df7ea33SEmmanuel Vadot - required: 1965df7ea33SEmmanuel Vadot - arm,trig-out-sigs 1975df7ea33SEmmanuel Vadot oneOf: 1985df7ea33SEmmanuel Vadot - required: 1995df7ea33SEmmanuel Vadot - arm,trig-conn-name 2005df7ea33SEmmanuel Vadot - required: 2015df7ea33SEmmanuel Vadot - cpu 2025df7ea33SEmmanuel Vadot - required: 2035df7ea33SEmmanuel Vadot - arm,cs-dev-assoc 2045df7ea33SEmmanuel Vadot required: 2055df7ea33SEmmanuel Vadot - reg 2065df7ea33SEmmanuel Vadot 2075df7ea33SEmmanuel Vadotrequired: 2085df7ea33SEmmanuel Vadot - compatible 2095df7ea33SEmmanuel Vadot - reg 2105df7ea33SEmmanuel Vadot - clocks 2115df7ea33SEmmanuel Vadot - clock-names 2125df7ea33SEmmanuel Vadot 2135df7ea33SEmmanuel Vadotif: 2145df7ea33SEmmanuel Vadot properties: 2155df7ea33SEmmanuel Vadot compatible: 2165df7ea33SEmmanuel Vadot contains: 2175df7ea33SEmmanuel Vadot const: arm,coresight-cti-v8-arch 2185df7ea33SEmmanuel Vadot 2195df7ea33SEmmanuel Vadotthen: 2205df7ea33SEmmanuel Vadot required: 2215df7ea33SEmmanuel Vadot - cpu 2225df7ea33SEmmanuel Vadot 223e7ffa3b5SEmmanuel VadotunevaluatedProperties: false 224e7ffa3b5SEmmanuel Vadot 2255df7ea33SEmmanuel Vadotexamples: 2265df7ea33SEmmanuel Vadot # minimum CTI definition. DEVID register used to set number of triggers. 2275df7ea33SEmmanuel Vadot - | 2285df7ea33SEmmanuel Vadot cti@20020000 { 2295df7ea33SEmmanuel Vadot compatible = "arm,coresight-cti", "arm,primecell"; 2305df7ea33SEmmanuel Vadot reg = <0x20020000 0x1000>; 2315df7ea33SEmmanuel Vadot 2325df7ea33SEmmanuel Vadot clocks = <&soc_smc50mhz>; 2335df7ea33SEmmanuel Vadot clock-names = "apb_pclk"; 2345df7ea33SEmmanuel Vadot }; 2355df7ea33SEmmanuel Vadot # v8 architecturally defined CTI - CPU + ETM connections generated by the 2365df7ea33SEmmanuel Vadot # driver according to the v8 architecture specification. 2375df7ea33SEmmanuel Vadot - | 2385df7ea33SEmmanuel Vadot cti@859000 { 2395df7ea33SEmmanuel Vadot compatible = "arm,coresight-cti-v8-arch", "arm,coresight-cti", 2405df7ea33SEmmanuel Vadot "arm,primecell"; 2415df7ea33SEmmanuel Vadot reg = <0x859000 0x1000>; 2425df7ea33SEmmanuel Vadot 2435df7ea33SEmmanuel Vadot clocks = <&soc_smc50mhz>; 2445df7ea33SEmmanuel Vadot clock-names = "apb_pclk"; 2455df7ea33SEmmanuel Vadot 2465df7ea33SEmmanuel Vadot cpu = <&CPU1>; 2475df7ea33SEmmanuel Vadot arm,cs-dev-assoc = <&etm1>; 2485df7ea33SEmmanuel Vadot }; 2495df7ea33SEmmanuel Vadot # Implementation defined CTI - CPU + ETM connections explicitly defined.. 2505df7ea33SEmmanuel Vadot # Shows use of type constants from dt-bindings/arm/coresight-cti-dt.h 2515df7ea33SEmmanuel Vadot # #size-cells and #address-cells are required if trig-conns@ nodes present. 2525df7ea33SEmmanuel Vadot - | 2535df7ea33SEmmanuel Vadot #include <dt-bindings/arm/coresight-cti-dt.h> 2545df7ea33SEmmanuel Vadot 2555df7ea33SEmmanuel Vadot cti@858000 { 2565df7ea33SEmmanuel Vadot compatible = "arm,coresight-cti", "arm,primecell"; 2575df7ea33SEmmanuel Vadot reg = <0x858000 0x1000>; 2585df7ea33SEmmanuel Vadot 2595df7ea33SEmmanuel Vadot clocks = <&soc_smc50mhz>; 2605df7ea33SEmmanuel Vadot clock-names = "apb_pclk"; 2615df7ea33SEmmanuel Vadot 2625df7ea33SEmmanuel Vadot arm,cti-ctm-id = <1>; 2635df7ea33SEmmanuel Vadot 2645df7ea33SEmmanuel Vadot #address-cells = <1>; 2655df7ea33SEmmanuel Vadot #size-cells = <0>; 2665df7ea33SEmmanuel Vadot 2675df7ea33SEmmanuel Vadot trig-conns@0 { 2685df7ea33SEmmanuel Vadot reg = <0>; 2695df7ea33SEmmanuel Vadot arm,trig-in-sigs = <4 5 6 7>; 2705df7ea33SEmmanuel Vadot arm,trig-in-types = <ETM_EXTOUT 2715df7ea33SEmmanuel Vadot ETM_EXTOUT 2725df7ea33SEmmanuel Vadot ETM_EXTOUT 2735df7ea33SEmmanuel Vadot ETM_EXTOUT>; 2745df7ea33SEmmanuel Vadot arm,trig-out-sigs = <4 5 6 7>; 2755df7ea33SEmmanuel Vadot arm,trig-out-types = <ETM_EXTIN 2765df7ea33SEmmanuel Vadot ETM_EXTIN 2775df7ea33SEmmanuel Vadot ETM_EXTIN 2785df7ea33SEmmanuel Vadot ETM_EXTIN>; 2795df7ea33SEmmanuel Vadot arm,cs-dev-assoc = <&etm0>; 2805df7ea33SEmmanuel Vadot }; 2815df7ea33SEmmanuel Vadot 2825df7ea33SEmmanuel Vadot trig-conns@1 { 2835df7ea33SEmmanuel Vadot reg = <1>; 2845df7ea33SEmmanuel Vadot cpu = <&CPU0>; 2855df7ea33SEmmanuel Vadot arm,trig-in-sigs = <0 1>; 2865df7ea33SEmmanuel Vadot arm,trig-in-types = <PE_DBGTRIGGER 2875df7ea33SEmmanuel Vadot PE_PMUIRQ>; 2885df7ea33SEmmanuel Vadot arm,trig-out-sigs=<0 1 2 >; 2895df7ea33SEmmanuel Vadot arm,trig-out-types = <PE_EDBGREQ 2905df7ea33SEmmanuel Vadot PE_DBGRESTART 2915df7ea33SEmmanuel Vadot PE_CTIIRQ>; 2925df7ea33SEmmanuel Vadot 2935df7ea33SEmmanuel Vadot arm,trig-filters = <0>; 2945df7ea33SEmmanuel Vadot }; 2955df7ea33SEmmanuel Vadot }; 2965df7ea33SEmmanuel Vadot # Implementation defined CTI - non CoreSight component connections. 2975df7ea33SEmmanuel Vadot - | 2985df7ea33SEmmanuel Vadot cti@20110000 { 2995df7ea33SEmmanuel Vadot compatible = "arm,coresight-cti", "arm,primecell"; 3002554fe8fSEmmanuel Vadot reg = <0x20110000 0x1000>; 3015df7ea33SEmmanuel Vadot 3025df7ea33SEmmanuel Vadot clocks = <&soc_smc50mhz>; 3035df7ea33SEmmanuel Vadot clock-names = "apb_pclk"; 3045df7ea33SEmmanuel Vadot 3055df7ea33SEmmanuel Vadot #address-cells = <1>; 3065df7ea33SEmmanuel Vadot #size-cells = <0>; 3075df7ea33SEmmanuel Vadot 3085df7ea33SEmmanuel Vadot trig-conns@0 { 3095df7ea33SEmmanuel Vadot reg = <0>; 3105df7ea33SEmmanuel Vadot arm,trig-in-sigs=<0>; 3115df7ea33SEmmanuel Vadot arm,trig-in-types=<GEN_INTREQ>; 3125df7ea33SEmmanuel Vadot arm,trig-out-sigs=<0>; 3135df7ea33SEmmanuel Vadot arm,trig-out-types=<GEN_HALTREQ>; 3145df7ea33SEmmanuel Vadot arm,trig-conn-name = "sys_profiler"; 3155df7ea33SEmmanuel Vadot }; 3165df7ea33SEmmanuel Vadot 3175df7ea33SEmmanuel Vadot trig-conns@1 { 3185df7ea33SEmmanuel Vadot reg = <1>; 3195df7ea33SEmmanuel Vadot arm,trig-out-sigs=<2 3>; 3205df7ea33SEmmanuel Vadot arm,trig-out-types=<GEN_HALTREQ GEN_RESTARTREQ>; 3215df7ea33SEmmanuel Vadot arm,trig-conn-name = "watchdog"; 3225df7ea33SEmmanuel Vadot }; 3235df7ea33SEmmanuel Vadot 3245df7ea33SEmmanuel Vadot trig-conns@2 { 3255df7ea33SEmmanuel Vadot reg = <2>; 3265df7ea33SEmmanuel Vadot arm,trig-in-sigs=<1 6>; 3275df7ea33SEmmanuel Vadot arm,trig-in-types=<GEN_HALTREQ GEN_RESTARTREQ>; 3285df7ea33SEmmanuel Vadot arm,trig-conn-name = "g_counter"; 3295df7ea33SEmmanuel Vadot }; 3305df7ea33SEmmanuel Vadot }; 3315df7ea33SEmmanuel Vadot 3325df7ea33SEmmanuel Vadot... 333