# Trace, Profiling and Diagnostics Monitor - TPDM

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

> Device-tree binding reference for Trace, Profiling and Diagnostics Monitor - TPDM.

<!-- 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;tpdm&#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">The TPDM or Monitor serves as data collection component for various dataset
types specified in the QPMDA spec. It covers Implementation defined ((ImplDef),
Basic Counts (BC), Tenure Counts (TC), Continuous Multi-Bit (CMB), and Discrete
Single Bit (DSB). It performs data collection in the data producing clock
domain and transfers it to the data collection time domain, generally ATB
clock domain.</p>
<p style="white-space: pre-wrap">The primary use case of the TPDM is to collect data from different data
sources and send it to a TPDA for packetization, timestamping, and funneling.</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;tpdm&#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;tpdm&#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-39566f01414e34c67b85"></a>

#### Exactly one of these rules must match (<code>oneOf</code>)

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

**Rule 1**

> <a id="dt-07409cc9508405f48983"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-822691c82c9797f7b1f9"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-5deec2612224d8d915da"><code>&#34;qcom&#44;coresight&#45;static&#45;tpdm&#34;</code></span>

<a id="dt-7482b6e745c4f056161a"></a>

**Rule 2**

> <a id="dt-4c3e118873fbaedb5de2"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-b02d8860067795c00ae4"></a>
>
> **Item 1**
>
> > **Exact value (<code>const</code>):** <span id="dt-82dceb5784ff71f5fdf5"><code>&#34;qcom&#44;coresight&#45;tpdm&#34;</code></span>
>
> <a id="dt-bdc26de0ccb1d52bb6a4"></a>
>
> **Item 2**
>
> > **Exact value (<code>const</code>):** <span id="dt-cc26fa5d96bc7cf0a818"><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-ab5d1c409d5c39f1cfdb"></a>

### <code>qcom&#44;dsb&#45;element&#45;bits</code> — not listed as required here

<div id="dt-418cab892c5921de1ab0">
<p style="white-space: pre-wrap">Specifies the DSB(Discrete Single Bit) element size supported by the monitor. The associated aggregator will read this size before it is enabled. DSB element size currently only supports 32-bit and 64-bit.</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-6245facf9e0da75d1f49"></a> <span id="dt-89d8b58edb88c0952034"><code>32</code></span>, <span id="dt-0a6d0a0bfe7d2fa5df5c"><code>64</code></span>

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

### <code>qcom&#44;cmb&#45;element&#45;bits</code> — not listed as required here

<div id="dt-b887ff8720dd922e33e3">
<p style="white-space: pre-wrap">Specifies the CMB(Continuous Multi-Bit) element size supported by the monitor. The associated aggregator will read this size before it is enabled. CMB element size currently only supports 8-bit, 32-bit and 64-bit.</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-120b87de8d21ccb9e5ba"></a> <span id="dt-d5df921da0564853e8f7"><code>8</code></span>, <span id="dt-3297798cebb13caa12f8"><code>32</code></span>, <span id="dt-3582cfe6b3d50069f03a"><code>64</code></span>

<a id="dt-56c9e949887f2dec9b7d"></a>

### <code>qcom&#44;dsb&#45;msrs&#45;num</code> — not listed as required here

<div id="dt-6632bb354ebbd452beb6">
<p style="white-space: pre-wrap">Specifies the number of DSB(Discrete Single Bit) MSR(mux select register) registers supported by the monitor. If this property is not configured or set to 0, it means this DSB TPDM doesn't support MSR.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8f68585bd59134e441a6">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

**Minimum value (<code>minimum</code>):** <span id="dt-e82f27d1f6570ef536e7"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-668c902019a508dbb431"><code>32</code></span>

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

### <code>qcom&#44;cmb&#45;msrs&#45;num</code> — not listed as required here

<div id="dt-f58253b360663e3bd1a5">
<p style="white-space: pre-wrap">Specifies the number of CMB MSR(mux select register) registers supported by the monitor. If this property is not configured or set to 0, it means this TPDM doesn't support CMB MSR.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-8572ba6ec0971c783b5b">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

**Minimum value (<code>minimum</code>):** <span id="dt-444c003577d7b5594fa8"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-d85c5ec12728be589f1e"><code>32</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-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-a58d0f2c7800c61f8738"></a>

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

<div id="dt-d07ef426230e7f68a429">
<p style="white-space: pre-wrap">Output connections from the TPDM to coresight funnel/TPDA.</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 TPDM to coresight funnel/TPDA.</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>

<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">tpdm@684c000 {
  compatible = "qcom,coresight-tpdm", "arm,primecell";
  reg = &lt;0x0684c000 0x1000&gt;;

  qcom,dsb-element-bits = &lt;32&gt;;
  qcom,dsb-msrs-num = &lt;16&gt;;

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

  out-ports {
    port {
      tpdm_prng_out_tpda_qdss: endpoint {
        remote-endpoint =
          &lt;&amp;tpda_qdss_in_tpdm_prng&gt;;
      };
    };
  };
};

tpdm@6c29000 {
  compatible = "qcom,coresight-tpdm", "arm,primecell";
  reg = &lt;0x06c29000 0x1000&gt;;

  qcom,cmb-element-bits = &lt;64&gt;;
  qcom,cmb-msrs-num = &lt;32&gt;;

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

  out-ports {
    port {
      tpdm_ipcc_out_funnel_center: endpoint {
        remote-endpoint = &lt;&amp;funnel_center_in_tpdm_ipcc&gt;;
      };
    };
  };
};

turing-llm-tpdm {
  compatible = "qcom,coresight-static-tpdm";

  qcom,cmb-element-bits = &lt;32&gt;;

  out-ports {
    port {
     turing_llm_tpdm_out: endpoint {
       remote-endpoint = &lt;&amp;turing0_funnel_in1&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 25:</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 113:</strong> <span> minimum TPDM definition. TPDM connect to coresight TPDA.</span></p>

</details>
