xref: /freebsd/sys/contrib/device-tree/Bindings/arm/qcom,coresight-tpda.yaml (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2cb7aa33aSEmmanuel Vadot# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
3cb7aa33aSEmmanuel Vadot%YAML 1.2
4cb7aa33aSEmmanuel Vadot---
5cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/arm/qcom,coresight-tpda.yaml#
6cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7cb7aa33aSEmmanuel Vadot
8cb7aa33aSEmmanuel Vadottitle: Trace, Profiling and Diagnostics Aggregator - TPDA
9cb7aa33aSEmmanuel Vadot
10cb7aa33aSEmmanuel Vadotdescription: |
11cb7aa33aSEmmanuel Vadot  TPDAs are responsible for packetization and timestamping of data sets
12cb7aa33aSEmmanuel Vadot  utilizing the MIPI STPv2 packet protocol. Pulling data sets from one or
13cb7aa33aSEmmanuel Vadot  more attached TPDM and pushing the resultant (packetized) data out a
14cb7aa33aSEmmanuel Vadot  master ATB interface. Performing an arbitrated ATB interleaving (funneling)
15cb7aa33aSEmmanuel Vadot  task for free-flowing data from TPDM (i.e. CMB and DSB data set flows).
16cb7aa33aSEmmanuel Vadot
17cb7aa33aSEmmanuel Vadot  There is no strict binding between TPDM and TPDA. TPDA can have multiple
18cb7aa33aSEmmanuel Vadot  TPDMs connect to it. But There must be only one TPDA in the path from the
19cb7aa33aSEmmanuel Vadot  TPDM source to TMC sink. TPDM can directly connect to TPDA's inport or
20cb7aa33aSEmmanuel Vadot  connect to funnel which will connect to TPDA's inport.
21cb7aa33aSEmmanuel Vadot
22cb7aa33aSEmmanuel Vadot  We can use the commands are similar to the below to validate TPDMs.
23cb7aa33aSEmmanuel Vadot  Enable coresight sink first.
24cb7aa33aSEmmanuel Vadot
25cb7aa33aSEmmanuel Vadot  echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink
26cb7aa33aSEmmanuel Vadot  echo 1 > /sys/bus/coresight/devices/tpdm0/enable_source
27cb7aa33aSEmmanuel Vadot  echo 1 > /sys/bus/coresight/devices/tpdm0/integration_test
28cb7aa33aSEmmanuel Vadot  echo 2 > /sys/bus/coresight/devices/tpdm0/integration_test
29cb7aa33aSEmmanuel Vadot
30cb7aa33aSEmmanuel Vadot  The test data will be collected in the coresight sink which is enabled.
31cb7aa33aSEmmanuel Vadot  If rwp register of the sink is keeping updating when do integration_test
32cb7aa33aSEmmanuel Vadot  (by cat tmc_etf0/mgmt/rwp), it means there is data generated from TPDM
33cb7aa33aSEmmanuel Vadot  to sink.
34cb7aa33aSEmmanuel Vadot
35cb7aa33aSEmmanuel Vadotmaintainers:
36cb7aa33aSEmmanuel Vadot  - Mao Jinlong <quic_jinlmao@quicinc.com>
37cb7aa33aSEmmanuel Vadot  - Tao Zhang <quic_taozha@quicinc.com>
38cb7aa33aSEmmanuel Vadot
39cb7aa33aSEmmanuel Vadot# Need a custom select here or 'arm,primecell' will match on lots of nodes
40cb7aa33aSEmmanuel Vadotselect:
41cb7aa33aSEmmanuel Vadot  properties:
42cb7aa33aSEmmanuel Vadot    compatible:
43cb7aa33aSEmmanuel Vadot      contains:
44cb7aa33aSEmmanuel Vadot        enum:
45cb7aa33aSEmmanuel Vadot          - qcom,coresight-tpda
46cb7aa33aSEmmanuel Vadot  required:
47cb7aa33aSEmmanuel Vadot    - compatible
48cb7aa33aSEmmanuel Vadot
49cb7aa33aSEmmanuel Vadotproperties:
50cb7aa33aSEmmanuel Vadot  $nodename:
51cb7aa33aSEmmanuel Vadot    pattern: "^tpda(@[0-9a-f]+)$"
52cb7aa33aSEmmanuel Vadot  compatible:
53cb7aa33aSEmmanuel Vadot    items:
54cb7aa33aSEmmanuel Vadot      - const: qcom,coresight-tpda
55cb7aa33aSEmmanuel Vadot      - const: arm,primecell
56cb7aa33aSEmmanuel Vadot
57cb7aa33aSEmmanuel Vadot  reg:
58cb7aa33aSEmmanuel Vadot    minItems: 1
59cb7aa33aSEmmanuel Vadot    maxItems: 2
60cb7aa33aSEmmanuel Vadot
61cb7aa33aSEmmanuel Vadot  clocks:
62cb7aa33aSEmmanuel Vadot    maxItems: 1
63cb7aa33aSEmmanuel Vadot
64cb7aa33aSEmmanuel Vadot  clock-names:
65cb7aa33aSEmmanuel Vadot    items:
66cb7aa33aSEmmanuel Vadot      - const: apb_pclk
67cb7aa33aSEmmanuel Vadot
68cb7aa33aSEmmanuel Vadot  in-ports:
69cb7aa33aSEmmanuel Vadot    description: |
70cb7aa33aSEmmanuel Vadot      Input connections from TPDM to TPDA
71cb7aa33aSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
72cb7aa33aSEmmanuel Vadot
73cb7aa33aSEmmanuel Vadot  out-ports:
74cb7aa33aSEmmanuel Vadot    description: |
75cb7aa33aSEmmanuel Vadot      Output connections from the TPDA to legacy CoreSight trace bus.
76cb7aa33aSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
77cb7aa33aSEmmanuel Vadot
78cb7aa33aSEmmanuel Vadot    properties:
79cb7aa33aSEmmanuel Vadot      port:
80cb7aa33aSEmmanuel Vadot        description:
81cb7aa33aSEmmanuel Vadot          Output connection from the TPDA to legacy CoreSight Trace bus.
82cb7aa33aSEmmanuel Vadot        $ref: /schemas/graph.yaml#/properties/port
83cb7aa33aSEmmanuel Vadot
84cb7aa33aSEmmanuel Vadotrequired:
85cb7aa33aSEmmanuel Vadot  - compatible
86cb7aa33aSEmmanuel Vadot  - reg
87cb7aa33aSEmmanuel Vadot  - clocks
88cb7aa33aSEmmanuel Vadot  - clock-names
89cb7aa33aSEmmanuel Vadot  - in-ports
90cb7aa33aSEmmanuel Vadot  - out-ports
91cb7aa33aSEmmanuel Vadot
92cb7aa33aSEmmanuel VadotadditionalProperties: false
93cb7aa33aSEmmanuel Vadot
94cb7aa33aSEmmanuel Vadotexamples:
95cb7aa33aSEmmanuel Vadot  # minimum tpda definition.
96cb7aa33aSEmmanuel Vadot  - |
97cb7aa33aSEmmanuel Vadot    tpda@6004000 {
98cb7aa33aSEmmanuel Vadot      compatible = "qcom,coresight-tpda", "arm,primecell";
99cb7aa33aSEmmanuel Vadot      reg = <0x6004000 0x1000>;
100cb7aa33aSEmmanuel Vadot
101cb7aa33aSEmmanuel Vadot      clocks = <&aoss_qmp>;
102cb7aa33aSEmmanuel Vadot      clock-names = "apb_pclk";
103cb7aa33aSEmmanuel Vadot
104cb7aa33aSEmmanuel Vadot      in-ports {
105cb7aa33aSEmmanuel Vadot        #address-cells = <1>;
106cb7aa33aSEmmanuel Vadot        #size-cells = <0>;
107cb7aa33aSEmmanuel Vadot
108cb7aa33aSEmmanuel Vadot        port@0 {
109cb7aa33aSEmmanuel Vadot          reg = <0>;
110cb7aa33aSEmmanuel Vadot          tpda_qdss_0_in_tpdm_dcc: endpoint {
111*7d0873ebSEmmanuel Vadot            remote-endpoint = <&tpdm_dcc_out_tpda_qdss_0>;
112cb7aa33aSEmmanuel Vadot          };
113cb7aa33aSEmmanuel Vadot        };
114cb7aa33aSEmmanuel Vadot      };
115cb7aa33aSEmmanuel Vadot
116cb7aa33aSEmmanuel Vadot      out-ports {
117cb7aa33aSEmmanuel Vadot        port {
118cb7aa33aSEmmanuel Vadot          tpda_qdss_out_funnel_in0: endpoint {
119*7d0873ebSEmmanuel Vadot            remote-endpoint = <&funnel_in0_in_tpda_qdss>;
120cb7aa33aSEmmanuel Vadot          };
121cb7aa33aSEmmanuel Vadot        };
122cb7aa33aSEmmanuel Vadot      };
123cb7aa33aSEmmanuel Vadot    };
124cb7aa33aSEmmanuel Vadot
125cb7aa33aSEmmanuel Vadot...
126