# MediaTek Functional Clock Controller for MT8196

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

> Device-tree binding reference for MediaTek Functional Clock Controller for MT8196.

<!-- SPDX-License-Identifier: (GPL-2.0 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;clock&#47;mediatek&#44;mt8196&#45;clock&#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;Guangjie Song &#60;guangjie&#46;song&#64;mediatek&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Laura Nao &#60;laura&#46;nao&#64;collabora&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<pre><code>The clock architecture in MediaTek SoCs is structured like below:
PLLs --&gt;
        dividers --&gt;
                    muxes
                         --&gt;
                            clock gate</code></pre>
<p style="white-space: pre-wrap">The device nodes provide clock gate control in different IP blocks.</p>
</div>

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

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

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

> **Allowed values (<code>enum</code>):** <a id="dt-851ace07a50c83495949"></a> <span id="dt-63b688f2ccd82724cb8f"><code>&#34;mediatek&#44;mt8196&#45;imp&#45;iic&#45;wrap&#45;c&#34;</code></span>, <span id="dt-2d97ae0f34d14dd8e72b"><code>&#34;mediatek&#44;mt8196&#45;imp&#45;iic&#45;wrap&#45;e&#34;</code></span>, <span id="dt-9802844ed4869452d348"><code>&#34;mediatek&#44;mt8196&#45;imp&#45;iic&#45;wrap&#45;n&#34;</code></span>, <span id="dt-24a1253e29125294194d"><code>&#34;mediatek&#44;mt8196&#45;imp&#45;iic&#45;wrap&#45;w&#34;</code></span>, <span id="dt-6eb9cf2b3f55b257fde4"><code>&#34;mediatek&#44;mt8196&#45;mdpsys0&#34;</code></span>, <span id="dt-50ce8af78a6d0f3b7b82"><code>&#34;mediatek&#44;mt8196&#45;mdpsys1&#34;</code></span>, <span id="dt-8be3d578ae616ce6273c"><code>&#34;mediatek&#44;mt8196&#45;pericfg&#45;ao&#34;</code></span>, <span id="dt-348801aa97cc32ed4b8e"><code>&#34;mediatek&#44;mt8196&#45;pextp0cfg&#45;ao&#34;</code></span>, <span id="dt-08e250be67bbdba4113e"><code>&#34;mediatek&#44;mt8196&#45;pextp1cfg&#45;ao&#34;</code></span>, <span id="dt-b384a2e268c424bd4737"><code>&#34;mediatek&#44;mt8196&#45;ufscfg&#45;ao&#34;</code></span>, <span id="dt-00645d7276e48dce88cf"><code>&#34;mediatek&#44;mt8196&#45;vencsys&#34;</code></span>, <span id="dt-e5bb0b4c6f96135591dc"><code>&#34;mediatek&#44;mt8196&#45;vencsys&#45;c1&#34;</code></span>, <span id="dt-4bde956a8cf6f215f70e"><code>&#34;mediatek&#44;mt8196&#45;vencsys&#45;c2&#34;</code></span>, <span id="dt-10b35ef19b737dbb8601"><code>&#34;mediatek&#44;mt8196&#45;vdecsys&#34;</code></span>, <span id="dt-04e607d0cca73ecd9a42"><code>&#34;mediatek&#44;mt8196&#45;vdecsys&#45;soc&#34;</code></span>, <span id="dt-e2db6a6268b84a260286"><code>&#34;mediatek&#44;mt8196&#45;vdisp&#45;ao&#34;</code></span>

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

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-f1f862a3cfab3ac620c8"><code>&#34;syscon&#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-7471877b51a93881192b"></a>

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

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

<a id="dt-02c38475362b738e226b"></a>

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

**Exact value (<code>const</code>):** <span id="dt-374f156ee5b81c392b56"><code>1</code></span>

<div id="dt-0c5e21d5853fdd8c84a9">
<p style="white-space: pre-wrap">Reset lines for PEXTP0/1 and UFS blocks.</p>
</div>

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

### <code>mediatek&#44;hardware&#45;voter</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-263c97242fb9aef91311">[<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-2e21c433275c874d664e">
<p style="white-space: pre-wrap">Phandle to the "Hardware Voter" (HWV), as named in the vendor
documentation for MT8196/MT6991.</p>
<p style="white-space: pre-wrap">The HWV is a SoC-internal fixed-function MCU used to collect votes from
both the Application Processor and other remote processors within the SoC.
It is intended to transparently enable or disable hardware resources (such
as power domains or clocks) based on internal vote aggregation handled by
the MCU's internal state machine.</p>
<p style="white-space: pre-wrap">However, in practice, this design is incomplete. While the HWV performs
some internal vote aggregation,software is still required to
- Manually enable power supplies externally, if present and if required
- Manually enable parent clocks via direct MMIO writes to clock controllers
- Enable the FENC after the clock has been ungated via direct MMIO
writes to clock controllers</p>
<p style="white-space: pre-wrap">As such, the HWV behaves more like a hardware-managed clock reference
counter than a true voter. Furthermore, it is not a separate
controller. It merely serves as an alternative interface to the same
underlying clock or power controller. Actual control still requires
direct access to the controller's own MMIO register space, in
addition to writing to the HWV's MMIO region.</p>
<p style="white-space: pre-wrap">For this reason, a custom phandle is used here - drivers need to directly
access the HWV MMIO region in a syscon-like fashion, due to how the
hardware is wired. This differs from true hardware voting systems, which
typically do not require custom phandles and rely instead on generic APIs
(clocks, power domains, interconnects).</p>
<p style="white-space: pre-wrap">The name "hardware-voter" is retained to match vendor documentation, but
this should not be reused or misunderstood as a proper voting mechanism.</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;reg&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;&#35;clock&#45;cells&#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">pericfg_ao: clock-controller@16640000 {
    compatible = "mediatek,mt8196-pericfg-ao", "syscon";
    reg = &lt;0x16640000 0x1000&gt;;
    mediatek,hardware-voter = &lt;&amp;scp_hwv&gt;;
    #clock-cells = &lt;1&gt;;
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">pextp0cfg_ao: clock-controller@169b0000 {
    compatible = "mediatek,mt8196-pextp0cfg-ao", "syscon";
    reg = &lt;0x169b0000 0x1000&gt;;
    #clock-cells = &lt;1&gt;;
    #reset-cells = &lt;1&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 OR BSD-2-Clause)</span></p>

</details>
