# Samsung Exynos SoC Bus and Interconnect

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

> Device-tree binding reference for Samsung Exynos SoC Bus and Interconnect.

<!-- 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;interconnect&#47;samsung&#44;exynos&#45;bus&#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 many buses for data transfer between DRAM and
sub-blocks in SoC. Most Exynos SoCs share the common architecture for buses.
Generally, each bus of Exynos SoC includes a source clock and a power line,
which are able to change the clock frequency of the bus in runtime. To
monitor the usage of each bus in runtime, the driver uses the PPMU (Platform
Performance Monitoring Unit), which is able to measure the current load of
sub-blocks.</p>
<p style="white-space: pre-wrap">The Exynos SoC includes the various sub-blocks which have the each AXI bus.
The each AXI bus has the owned source clock but, has not the only owned power
line. The power line might be shared among one more sub-blocks.  So, we can
divide into two type of device as the role of each sub-block.  There are two
type of bus devices as following::
 - parent bus device
 - passive bus device</p>
<p style="white-space: pre-wrap">Basically, parent and passive bus device share the same power line.  The
parent bus device can only change the voltage of shared power line and the
rest bus devices (passive bus device) depend on the decision of the parent
bus device. If there are three blocks which share the VDD_xxx power line,
Only one block should be parent device and then the rest blocks should depend
on the parent device as passive device.</p>
<pre><code>  VDD_xxx |--- A block (parent)
    |--- B block (passive)
    |--- C block (passive)</code></pre>
<p style="white-space: pre-wrap">There are a little different composition among Exynos SoC because each Exynos
SoC has different sub-blocks. Therefore, such difference should be specified
in devicetree file instead of each device driver. In result, this driver is
able to support the bus frequency for all Exynos SoCs.</p>
<pre><code>Detailed correlation between sub-blocks and power line according
to Exynos SoC::
 - In case of Exynos3250, there are two power line as following::
   VDD_MIF |--- DMC (Dynamic Memory Controller)</code></pre>
<pre><code>   VDD_INT |--- LEFTBUS (parent device)
     |--- PERIL
     |--- MFC
     |--- G3D
     |--- RIGHTBUS
     |--- PERIR
     |--- FSYS
     |--- LCD0
     |--- PERIR
     |--- ISP
     |--- CAM</code></pre>
<pre><code>   - MIF bus's frequency/voltage table
     -----------------------
     |Lv| Freq   | Voltage |
     -----------------------
     |L1| 50000  |800000   |
     |L2| 100000 |800000   |
     |L3| 134000 |800000   |
     |L4| 200000 |825000   |
     |L5| 400000 |875000   |
     -----------------------</code></pre>
<pre><code>   - INT bus's frequency/voltage table
     ----------------------------------------------------------
     |Block|LEFTBUS|RIGHTBUS|MCUISP |ISP    |PERIL  ||VDD_INT |
     | name|       |LCD0    |       |       |       ||        |
     |     |       |FSYS    |       |       |       ||        |
     |     |       |MFC     |       |       |       ||        |
     ----------------------------------------------------------
     |Mode |*parent|passive |passive|passive|passive||        |
     ----------------------------------------------------------
     |Lv   |Frequency                               ||Voltage |
     ----------------------------------------------------------
     |L1   |50000  |50000   |50000  |50000  |50000  ||900000  |
     |L2   |80000  |80000   |80000  |80000  |80000  ||900000  |
     |L3   |100000 |100000  |100000 |100000 |100000 ||1000000 |
     |L4   |134000 |134000  |200000 |200000 |       ||1000000 |
     |L5   |200000 |200000  |400000 |300000 |       ||1000000 |
     ----------------------------------------------------------</code></pre>
<pre><code> - In case of Exynos4210, there is one power line as following::
   VDD_INT |--- DMC (parent device, Dynamic Memory Controller)
     |--- LEFTBUS
     |--- PERIL
     |--- MFC(L)
     |--- G3D
     |--- TV
     |--- LCD0
     |--- RIGHTBUS
     |--- PERIR
     |--- MFC(R)
     |--- CAM
     |--- FSYS
     |--- GPS
     |--- LCD0
     |--- LCD1</code></pre>
<pre><code> - In case of Exynos4x12, there are two power line as following::
   VDD_MIF |--- DMC (Dynamic Memory Controller)</code></pre>
<pre><code>   VDD_INT |--- LEFTBUS (parent device)
     |--- PERIL
     |--- MFC(L)
     |--- G3D
     |--- TV
     |--- IMAGE
     |--- RIGHTBUS
     |--- PERIR
     |--- MFC(R)
     |--- CAM
     |--- FSYS
     |--- GPS
     |--- LCD0
     |--- ISP</code></pre>
<pre><code> - In case of Exynos5422, there are two power line as following::
   VDD_MIF |--- DREX 0 (parent device, DRAM EXpress controller)
           |--- DREX 1</code></pre>
<pre><code>   VDD_INT |--- NoC_Core (parent device)
     |--- G2D
     |--- G3D
     |--- DISP1
     |--- NoC_WCORE
     |--- GSCL
     |--- MSCL
     |--- ISP
     |--- MFC
     |--- GEN
     |--- PERIS
     |--- PERIC
     |--- FSYS
     |--- FSYS2</code></pre>
<pre><code> - In case of Exynos5433, there is VDD_INT power line as following::
   VDD_INT |--- G2D (parent device)
     |--- MSCL
     |--- GSCL
     |--- JPEG
     |--- MFC
     |--- HEVC
     |--- BUS0
     |--- BUS1
     |--- BUS2
     |--- PERIS (Fixed clock rate)
     |--- PERIC (Fixed clock rate)
     |--- FSYS  (Fixed clock rate)</code></pre>
</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;bus&#34;</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;bus&#34;</code></span>

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

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

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

<div id="dt-c0b57dd84640a1ff3af9">
<p style="white-space: pre-wrap">Parent bus device. Valid and required only for the passive bus devices.</p>
</div>

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

### <code>devfreq&#45;events</code> — not listed as required here

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

**Minimum number of items (<code>minItems</code>):** <span id="dt-506072e12ee0d97471e2"><code>1</code></span>

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

<div id="dt-68e5fe15005648b0d70b">
<p style="white-space: pre-wrap">Devfreq-event device to monitor the current utilization of buses. Valid and required only for the parent bus devices.</p>
</div>

<a id="dt-32e5e797cc8aaedb9de1"></a>

### <code>exynos&#44;saturation&#45;ratio</code> — not listed as required here

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

<div id="dt-cf84bbf777b2ea577378">
<p style="white-space: pre-wrap">Percentage value which is used to calibrate the performance count against total cycle count.  Valid only for the parent bus devices.</p>
</div>

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

### <code>&#35;interconnect&#45;cells</code> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-bbf0029d5af0156a271b"><code>0</code></span>

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

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

**Minimum number of items (<code>minItems</code>):** <span id="dt-e2b192456ccc0762244e"><code>1</code></span>

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

<a id="dt-324942e28549e5e189eb"></a>

### <code>operating&#45;points&#45;v2</code> — required here

<code>true</code> — No constraints added by this property rule.

<a id="dt-242e482ee6fa5e68b3dc"></a>

### <code>opp&#45;table</code> — not listed as required here

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

<a id="dt-72fb62d72f2a6dfea1ef"></a>

### <code>samsung&#44;data&#45;clock&#45;ratio</code> — not listed as required here

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

**Default value (<code>default</code>):** <span id="dt-5844146d2679d6104925"><code>8</code></span>

<div id="dt-60f03e32572e7a82fdc4">
<p style="white-space: pre-wrap">Ratio of the data throughput in B/s to minimum data clock frequency in Hz.</p>
</div>

<a id="dt-236855bde9eebcc9d904"></a>

### <code>vdd&#45;supply</code> — not listed as required here

<div id="dt-bc3e69b335e23d461899">
<p style="white-space: pre-wrap">Main bus power rail. Valid and required only for the parent bus devices.</p>
</div>

**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;clocks&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;clock&#45;names&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;operating&#45;points&#45;v2&#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">#include &lt;dt-bindings/clock/exynos3250.h&gt;

bus-dmc {
    compatible = "samsung,exynos-bus";
    clocks = &lt;&amp;cmu_dmc CLK_DIV_DMC&gt;;
    clock-names = "bus";
    operating-points-v2 = &lt;&amp;bus_dmc_opp_table&gt;;
    devfreq-events = &lt;&amp;ppmu_dmc0_3&gt;, &lt;&amp;ppmu_dmc1_3&gt;;
    vdd-supply = &lt;&amp;buck1_reg&gt;;

    bus_dmc_opp_table: opp-table {
        compatible = "operating-points-v2";

        opp-50000000 {
            opp-hz = /bits/ 64 &lt;50000000&gt;;
            opp-microvolt = &lt;800000&gt;;
        };
        opp-100000000 {
            opp-hz = /bits/ 64 &lt;100000000&gt;;
            opp-microvolt = &lt;800000&gt;;
        };
        opp-134000000 {
            opp-hz = /bits/ 64 &lt;134000000&gt;;
            opp-microvolt = &lt;800000&gt;;
        };
        opp-200000000 {
            opp-hz = /bits/ 64 &lt;200000000&gt;;
            opp-microvolt = &lt;825000&gt;;
        };
        opp-400000000 {
            opp-hz = /bits/ 64 &lt;400000000&gt;;
            opp-microvolt = &lt;875000&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";
        };
    };
};

bus_leftbus: bus-leftbus {
    compatible = "samsung,exynos-bus";
    clocks = &lt;&amp;cmu CLK_DIV_GDL&gt;;
    clock-names = "bus";
    operating-points-v2 = &lt;&amp;bus_leftbus_opp_table&gt;;
    devfreq-events = &lt;&amp;ppmu_leftbus_3&gt;, &lt;&amp;ppmu_rightbus_3&gt;;
    vdd-supply = &lt;&amp;buck3_reg&gt;;
};

bus-rightbus {
    compatible = "samsung,exynos-bus";
    clocks = &lt;&amp;cmu CLK_DIV_GDR&gt;;
    clock-names = "bus";
    operating-points-v2 = &lt;&amp;bus_leftbus_opp_table&gt;;
    devfreq = &lt;&amp;bus_leftbus&gt;;
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">dmc: bus-dmc {
    compatible = "samsung,exynos-bus";
    clocks = &lt;&amp;clock CLK_DIV_DMC&gt;;
    clock-names = "bus";
    operating-points-v2 = &lt;&amp;bus_dmc_opp_table&gt;;
    samsung,data-clock-ratio = &lt;4&gt;;
    #interconnect-cells = &lt;0&gt;;
    devfreq-events = &lt;&amp;ppmu_dmc0_3&gt;, &lt;&amp;ppmu_dmc1_3&gt;;
    vdd-supply = &lt;&amp;buck1_reg&gt;;
};

leftbus: bus-leftbus {
    compatible = "samsung,exynos-bus";
    clocks = &lt;&amp;clock CLK_DIV_GDL&gt;;
    clock-names = "bus";
    operating-points-v2 = &lt;&amp;bus_leftbus_opp_table&gt;;
    interconnects = &lt;&amp;dmc&gt;;
    #interconnect-cells = &lt;0&gt;;
    devfreq-events = &lt;&amp;ppmu_leftbus_3&gt;, &lt;&amp;ppmu_rightbus_3&gt;;
    vdd-supply = &lt;&amp;buck3_reg&gt;;
};

display: bus-display {
    compatible = "samsung,exynos-bus";
    clocks = &lt;&amp;clock CLK_DIV_ACLK_266&gt;;
    clock-names = "bus";
    operating-points-v2 = &lt;&amp;bus_display_opp_table&gt;;
    interconnects = &lt;&amp;leftbus &amp;dmc&gt;;
    #interconnect-cells = &lt;0&gt;;
    devfreq = &lt;&amp;leftbus&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>
