# Trace, Profiling and Diagnostics Aggregator - TPDA

_Peios Kernel / Hardware and drivers / Device-tree binding reference / ARM platform bindings_

> Device-tree binding reference for Trace, Profiling and Diagnostics Aggregator - TPDA.

<!-- SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;arm&#47;qcom&#44;coresight&#45;tpda&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">TPDAs are responsible for packetization and timestamping of data sets
utilizing the MIPI STPv2 packet protocol. Pulling data sets from one or
more attached TPDM and pushing the resultant (packetized) data out a
master ATB interface. Performing an arbitrated ATB interleaving (funneling)
task for free-flowing data from TPDM (i.e. CMB and DSB data set flows).</p>
<p style="white-space: pre-wrap">There is no strict binding between TPDM and TPDA. TPDA can have multiple
TPDMs connect to it. But There must be only one TPDA in the path from the
TPDM source to TMC sink. TPDM can directly connect to TPDA's inport or
connect to funnel which will connect to TPDA's inport.</p>
<p style="white-space: pre-wrap">We can use the commands are similar to the below to validate TPDMs.
Enable coresight sink first.</p>
<p style="white-space: pre-wrap">echo 1 &gt; /sys/bus/coresight/devices/tmc_etf0/enable_sink
echo 1 &gt; /sys/bus/coresight/devices/tpdm0/enable_source
echo 1 &gt; /sys/bus/coresight/devices/tpdm0/integration_test
echo 2 &gt; /sys/bus/coresight/devices/tpdm0/integration_test</p>
<p style="white-space: pre-wrap">The test data will be collected in the coresight sink which is enabled.
If rwp register of the sink is keeping updating when do integration_test
(by cat tmc_etf0/mgmt/rwp), it means there is data generated from TPDM
to sink.</p>
</div>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Mao Jinlong &#60;jinlong&#46;mao&#64;oss&#46;qualcomm&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Tao Zhang &#60;tao&#46;zhang&#64;oss&#46;qualcomm&#46;com&#62;&#34;</code></span>

<a id="dt-865ef19e891fb9fe7b15"></a>

## Automatic schema selection (<code>select</code>)

> <a id="dt-54d143fae2406295c883"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-e3400bab629503b08322"></a>
>
> #### <code>compatible</code> — required here
>
> <a id="dt-2ae4f0f9580bb5b2e406"></a>
>
> **Rule for matching array elements (<code>contains</code>)**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-ce9b069a8031ff280c23"></a> <span id="dt-e79f31d4eec3cf736314"><code>&#34;qcom&#44;coresight&#45;tpda&#34;</code></span>
>
> **Required in this object (<code>required</code>):** <a id="dt-c7b135d3aebb6d627788"></a> <span id="dt-7b7a89ef483af1198868"><code>&#34;compatible&#34;</code></span>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5155525ecd924660ec0a"></a>

### <code>&#36;nodename</code> — not listed as required here

**String pattern (<code>pattern</code>):** <span id="dt-0b2111a24a010949ece7"><code>&#34;&#94;tpda&#40;&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#41;&#36;&#34;</code></span>

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

<a id="dt-cc3709943397035582d2"></a>

#### Array item rules (<code>items</code>)

<a id="dt-fec97e71a4359503ae6e"></a>

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-aaadfb6b044cada8472e"><code>&#34;qcom&#44;coresight&#45;tpda&#34;</code></span>

<a id="dt-0891c69625632ea817fd"></a>

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-f1f862a3cfab3ac620c8"><code>&#34;arm&#44;primecell&#34;</code></span>

<a id="dt-9c1635fdb65d87e33d77"></a>

### <code>reg</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>1</code></span>

<a id="dt-4e9a371963ac013ad39d"></a>

### <code>clocks</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-c7438d9082840936a9a7"><code>1</code></span>

<a id="dt-041d7cd76b652a5de06a"></a>

### <code>clock&#45;names</code> — required here

<a id="dt-3d1de59bdfddccf00eed"></a>

#### Array item rules (<code>items</code>)

<a id="dt-b779484bf9e022991fd6"></a>

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-3403d68873725c15739a"><code>&#34;apb&#95;pclk&#34;</code></span>

<a id="dt-0c6076cd9d6f109c5cc6"></a>

### <code>label</code> — not listed as required here

<div id="dt-f7c1a813bb0d2e9dd066">
<p style="white-space: pre-wrap">Description of a coresight device.</p>
</div>

<a id="dt-2f52e7ec9fd894cb9e81"></a>

### <code>in&#45;ports</code> — required here

<div id="dt-c2194d8ad01a4e73b108">
<p style="white-space: pre-wrap">Input connections from TPDM to TPDA</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-32c2359c5b814554b061">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;ports</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-638717a7c9bbf1878b7e>)</span>

<a id="dt-a58d0f2c7800c61f8738"></a>

### <code>out&#45;ports</code> — required here

<div id="dt-d07ef426230e7f68a429">
<p style="white-space: pre-wrap">Output connections from the TPDA to legacy CoreSight trace bus.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-b49582c43c8b8566441b">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;ports</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-638717a7c9bbf1878b7e>)</span>

<a id="dt-0929997c6980ff71694d"></a>

#### Properties and child nodes (<code>properties</code>)

<a id="dt-faaa63856c377308fd84"></a>

**<code>port</code> — not listed as required here**

<div id="dt-700ac6b822a512dbfee4">
<p style="white-space: pre-wrap">Output connection from the TPDA to legacy CoreSight Trace bus.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-ace227593fbbebe47bff">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;port</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-1d845f0617b4072cef77>)</span>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;reg&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;clocks&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;clock&#45;names&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;in&#45;ports&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;out&#45;ports&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">tpda@6004000 {
  compatible = "qcom,coresight-tpda", "arm,primecell";
  reg = &lt;0x6004000 0x1000&gt;;

  clocks = &lt;&amp;aoss_qmp&gt;;
  clock-names = "apb_pclk";

  in-ports {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    port@0 {
      reg = &lt;0&gt;;
      tpda_qdss_0_in_tpdm_dcc: endpoint {
        remote-endpoint = &lt;&amp;tpdm_dcc_out_tpda_qdss_0&gt;;
      };
    };
  };

  out-ports {
    port {
      tpda_qdss_out_funnel_in0: endpoint {
        remote-endpoint = &lt;&amp;funnel_in0_in_tpda_qdss&gt;;
      };
    };
  };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause</span></p>

<p id="dt-comment-1"><strong>Line 2:</strong> <span> Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.</span></p>

<p id="dt-comment-2"><strong>Line 39:</strong> <span> Need a custom select here or 'arm,primecell' will match on lots of nodes</span></p>

<p id="dt-comment-3"><strong>Line 98:</strong> <span> minimum tpda definition.</span></p>

</details>
