# Samsung Exynos SoC PPMU (Platform Performance Monitoring Unit)

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Devfreq bindings / event_

> Device-tree binding reference for Samsung Exynos SoC PPMU (Platform Performance Monitoring Unit).

<!-- SPDX-License-Identifier: GPL-2.0 -->


<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;devfreq&#47;event&#47;samsung&#44;exynos&#45;ppmu&#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>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Chanwoo Choi &#60;cw00&#46;choi&#64;samsung&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Krzysztof Kozlowski &#60;krzk&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Samsung Exynos SoC has PPMU (Platform Performance Monitoring Unit) for
each IP. PPMU provides the primitive values to get performance data. These
PPMU events provide information of the SoC's behaviors so that you may use to
analyze system performance, to make behaviors visible and to count usages of
each IP (DMC, CPU, RIGHTBUS, LEFTBUS, CAM interface, LCD, G3D, MFC).  The
Exynos PPMU driver uses the devfreq-event class to provide event data to
various devfreq devices. The devfreq devices would use the event data when
determining the current state of each IP.</p>
</div>

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

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

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

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

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;samsung&#44;exynos&#45;ppmu&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;samsung&#44;exynos&#45;ppmu&#45;v2&#34;</code></span>

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

### <code>clock&#45;names</code> — not listed as 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;ppmu&#34;</code></span>

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

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-c7438d9082840936a9a7"><code>1</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-30f79ee1cea977ef0e79"></a>

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

**Value type (<code>type</code>):** <span id="dt-0ca6b74797068dfa6eee"><code>&#34;object&#34;</code></span>

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

#### Properties matching a name pattern (<code>patternProperties</code>)

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

**<code>&#94;ppmu&#45;event&#91;0&#45;9&#93;&#43;&#40;&#45;&#91;a&#45;z0&#45;9&#93;&#43;&#41;&#123;&#44;2&#125;&#36;</code> — name matches this regular expression**

**Value type (<code>type</code>):** <span id="dt-17c27f5f45d79e1299b3"><code>&#34;object&#34;</code></span>

<a id="dt-42b1100859b989ad2b4e"></a>

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

<a id="dt-8762bbe871ed7b37821c"></a>

**<code>event&#45;name</code> — required here**

<div id="dt-e243950fa9eac084cbd6">
<p style="white-space: pre-wrap">The unique event name among PPMU device</p>
</div>

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

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

**<code>event&#45;data&#45;type</code> — not listed as required here**

<div id="dt-5f0a96efb8f18f918f86">
<p style="white-space: pre-wrap">Define the type of data which shell be counted by the counter.
You can check include/dt-bindings/pmu/exynos_ppmu.h for all
possible type, i.e. count read requests, count write data in
bytes, etc.  This field is optional and when it is missing, the
driver code will use default data type.</p>
</div>

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

**Required in this object (<code>required</code>):** <a id="dt-1f0a6a5be6e7b909ac46"></a> <span id="dt-c89ad0c527a4d194215c"><code>&#34;event&#45;name&#34;</code></span>

<a id="dt-762f781267c17c50457d"></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-f7267e5afeb4ad94a66b"></a>

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

<code>false</code>

Not allowed by this rule.

**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>

<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">// PPMUv1 nodes for Exynos3250 (although the board DTS defines events)
#include &lt;dt-bindings/clock/exynos3250.h&gt;

ppmu_dmc0: ppmu@106a0000 {
    compatible = "samsung,exynos-ppmu";
    reg = &lt;0x106a0000 0x2000&gt;;

    events {
        ppmu_dmc0_3: ppmu-event3-dmc0 {
            event-name = "ppmu-event3-dmc0";
        };

        ppmu_dmc0_2: ppmu-event2-dmc0 {
            event-name = "ppmu-event2-dmc0";
        };

        ppmu_dmc0_1: ppmu-event1-dmc0 {
            event-name = "ppmu-event1-dmc0";
        };

        ppmu_dmc0_0: ppmu-event0-dmc0 {
            event-name = "ppmu-event0-dmc0";
        };
    };
};

ppmu_rightbus: ppmu@112a0000 {
    compatible = "samsung,exynos-ppmu";
    reg = &lt;0x112a0000 0x2000&gt;;
    clocks = &lt;&amp;cmu CLK_PPMURIGHT&gt;;
    clock-names = "ppmu";

    events {
        ppmu_rightbus_3: ppmu-event3-rightbus {
            event-name = "ppmu-event3-rightbus";
        };
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">// PPMUv2 nodes in Exynos5433
ppmu_d0_cpu: ppmu@10480000 {
    compatible = "samsung,exynos-ppmu-v2";
    reg = &lt;0x10480000 0x2000&gt;;
};

ppmu_d0_general: ppmu@10490000 {
    compatible = "samsung,exynos-ppmu-v2";
    reg = &lt;0x10490000 0x2000&gt;;

    events {
        ppmu_event0_d0_general: ppmu-event0-d0-general {
            event-name = "ppmu-event0-d0-general";
        };
    };
};

ppmu_d0_rt: ppmu@104a0000 {
    compatible = "samsung,exynos-ppmu-v2";
    reg = &lt;0x104a0000 0x2000&gt;;
};

ppmu_d1_cpu: ppmu@104b0000 {
    compatible = "samsung,exynos-ppmu-v2";
    reg = &lt;0x104b0000 0x2000&gt;;
};

ppmu_d1_general: ppmu@104c0000 {
    compatible = "samsung,exynos-ppmu-v2";
    reg = &lt;0x104c0000 0x2000&gt;;
};

ppmu_d1_rt: ppmu@104d0000 {
    compatible = "samsung,exynos-ppmu-v2";
    reg = &lt;0x104d0000 0x2000&gt;;
};
</code></pre>

<pre id="dt-d0212a4cd671f89a0b40"><code class="language-dts">// PPMUv1 nodes with event-data-type for Exynos4412
#include &lt;dt-bindings/pmu/exynos_ppmu.h&gt;

ppmu@106a0000 {
    compatible = "samsung,exynos-ppmu";
    reg = &lt;0x106a0000 0x2000&gt;;
    clocks = &lt;&amp;clock 400&gt;;
    clock-names = "ppmu";

    events {
        ppmu-event3-dmc0 {
            event-name = "ppmu-event3-dmc0";
            event-data-type = &lt;(PPMU_RO_DATA_CNT |
                                PPMU_WO_DATA_CNT)&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</span></p>

</details>
