# MediaTek XS-PHY Controller

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

> Device-tree binding reference for MediaTek XS-PHY Controller.

<!-- 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;phy&#47;mediatek&#44;xsphy&#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;Chunfeng Yun &#60;chunfeng&#46;yun&#64;mediatek&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The XS-PHY controller supports physical layer functionality for USB3.1
GEN2 controller on MediaTek SoCs.</p>
<pre><code>Banks layout of xsphy
----------------------------------
port        offset    bank
u2 port0    0x0000    MISC
            0x0100    FMREG
            0x0300    U2PHY_COM
u2 port1    0x1000    MISC
            0x1100    FMREG
            0x1300    U2PHY_COM
u2 port2    0x2000    MISC
            ...
u31 common  0x3000    DIG_GLB
            0x3100    PHYA_GLB
u31 port0   0x3400    DIG_LN_TOP
            0x3500    DIG_LN_TX0
            0x3600    DIG_LN_RX0
            0x3700    DIG_LN_DAIF
            0x3800    PHYA_LN
u31 port1   0x3a00    DIG_LN_TOP
            0x3b00    DIG_LN_TX0
            0x3c00    DIG_LN_RX0
            0x3d00    DIG_LN_DAIF
            0x3e00    PHYA_LN
            ...
DIG_GLB &amp; PHYA_GLB are shared by U31 ports.</code></pre>
</div>

<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;xs&#45;phy&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#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**

> **Allowed values (<code>enum</code>):** <a id="dt-851ace07a50c83495949"></a> <span id="dt-63b688f2ccd82724cb8f"><code>&#34;mediatek&#44;mt3611&#45;xsphy&#34;</code></span>, <span id="dt-2d97ae0f34d14dd8e72b"><code>&#34;mediatek&#44;mt3612&#45;xsphy&#34;</code></span>, <span id="dt-9802844ed4869452d348"><code>&#34;mediatek&#44;mt7988&#45;xsphy&#34;</code></span>

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

**Item 2**

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

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

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

<div id="dt-571d87f60678ead6c5ff">
<p style="white-space: pre-wrap">Register shared by multiple U3 ports, exclude port's private register, if only U2 ports provided, shouldn't use the property.</p>
</div>

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

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

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

**Allowed values (<code>enum</code>):** <a id="dt-01d9ce7fc56f712455be"></a> <span id="dt-94d3735d14e27e2d7df1"><code>1</code></span>, <span id="dt-0dda607ef98de398e3f7"><code>2</code></span>

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

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

**Allowed values (<code>enum</code>):** <a id="dt-11f8fcdf7ed0ce5274ad"></a> <span id="dt-1df5884131042d9f2b35"><code>1</code></span>, <span id="dt-0d778c9f0ef0966b501c"><code>2</code></span>

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

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

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

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

### <code>mediatek&#44;src&#45;ref&#45;clk&#45;mhz</code> — not listed as required here

<div id="dt-7cac080f3204ca289ec6">
<p style="white-space: pre-wrap">Frequency of reference clock for slew rate calibrate</p>
</div>

**Default value (<code>default</code>):** <span id="dt-976f2eb64ded9a4580b8"><code>26</code></span>

<a id="dt-039be3e55f048060f147"></a>

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

<div id="dt-e6cee8377f48305cc7a4">
<p style="white-space: pre-wrap">Coefficient for slew rate calibrate, depends on SoC process</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-bb0888728db71632187a">[<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-aba56a7003430619c6ba"><code>17</code></span>

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

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

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

### <code>&#94;usb&#45;phy&#64;&#91;0&#45;9a&#45;f&#93;&#43;&#36;</code> — name matches this regular expression

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

<div id="dt-a9ffee9e7dbba99fa0fd">
<p style="white-space: pre-wrap">A sub-node is required for each port the controller provides. Address range information including the usual 'reg' property is used inside these nodes to describe the controller's topology.</p>
</div>

<a id="dt-6627d37140665ee81289"></a>

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

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

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

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

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

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

<a id="dt-08d285ff2f6481eb7769"></a>

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

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

**Item 1**

> <div id="dt-08da9823aa844bcdd7cf">
> <p style="white-space: pre-wrap">Reference clock, (HS is 48Mhz, SS/P is 24~27Mhz)</p>
> </div>

<a id="dt-35a4172a94ea65c36798"></a>

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

<a id="dt-839615b54ee289000005"></a>

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-5af31c57cfe7965f0909"><code>&#34;ref&#34;</code></span>

<a id="dt-8e04f1c314fa71cc545d"></a>

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

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

<div id="dt-a43d55bf07e76d30a78a">
<p style="white-space: pre-wrap">The cells contain the following arguments.</p>
<pre><code>- description: The PHY type
    enum:
      - PHY_TYPE_USB2
      - PHY_TYPE_USB3</code></pre>
</div>

<a id="dt-1294e3d053d312335e0c"></a>

**<code>mediatek&#44;eye&#45;src</code> — not listed as required here**

<div id="dt-02f06f3991ae1af367b6">
<p style="white-space: pre-wrap">The value of slew rate calibrate (U2 phy)</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-aa66d35fb9d80f92b864">[<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-c1446df0c34593f4a8f0"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-3e91d767fb3569fde66c"><code>7</code></span>

<a id="dt-8b2d0b0aa299dbfdadde"></a>

**<code>mediatek&#44;eye&#45;vrt</code> — not listed as required here**

<div id="dt-a26bd2ffa1636d03d828">
<p style="white-space: pre-wrap">The selection of VRT reference voltage (U2 phy)</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-e31785a1fd0c1f89a7ab">[<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-f942e35c40b8731bf439"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-28b12aae728329094e83"><code>7</code></span>

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

**<code>mediatek&#44;eye&#45;term</code> — not listed as required here**

<div id="dt-d6f9ec3e81201d9e3a78">
<p style="white-space: pre-wrap">The selection of HS_TX TERM reference voltage (U2 phy)</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-f838dee853ea8cd9fc60">[<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-cd3156e2890a9d4fb907"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-90cfd2307675a00a0d33"><code>7</code></span>

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

**<code>mediatek&#44;efuse&#45;intr</code> — not listed as required here**

<div id="dt-235f4d9787016c29096b">
<p style="white-space: pre-wrap">The selection of Internal Resistor (U2/U3 phy)</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-034e7cd8583d3fe572a7">[<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-362e862c9fb851ea5ddc"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-7b7160499d86b89d7e67"><code>63</code></span>

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

**<code>mediatek&#44;efuse&#45;tx&#45;imp</code> — not listed as required here**

<div id="dt-20e9c8bf099a2ef69219">
<p style="white-space: pre-wrap">The selection of TX Impedance (U3 phy)</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-aca9a1a62a0a0bf88427">[<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-55f69bc8483d83b7cd3e"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-b719015aa33803dcaad0"><code>31</code></span>

<a id="dt-590d2738a442c0a6a7c5"></a>

**<code>mediatek&#44;efuse&#45;rx&#45;imp</code> — not listed as required here**

<div id="dt-5dfc0e4e00b30905f7a8">
<p style="white-space: pre-wrap">The selection of RX Impedance (U3 phy)</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-279653685595f7626ac2">[<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-168019ebeb022a6c25a0"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-aaeaa3583b724382df7d"><code>31</code></span>

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

**<code>mediatek&#44;syscon&#45;type</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-2d681c02f269d418c309">[<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>

<div id="dt-d765d8d7f8ebcd51a4f9">
<p style="white-space: pre-wrap">A phandle to syscon used to access the register of type switch, the field should always be 3 cells long.</p>
</div>

<a id="dt-069d38af6aacffabd918"></a>

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

<a id="dt-07ed74f02df0aad66cff"></a>

**Item 1**

> <a id="dt-f48907aac9b5e36f5eaa"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-4deba00661854771cadf"></a>
>
> **Item 1**
>
> > <div id="dt-f41f7d3e9e045726d84d">
> > <p style="white-space: pre-wrap">Phandle to phy type configuration system controller</p>
> > </div>
>
> <a id="dt-2c725bef9db80428245f"></a>
>
> **Item 2**
>
> > <div id="dt-942b3a997a9a43c32ada">
> > <p style="white-space: pre-wrap">Phy type configuration register offset</p>
> > </div>
>
> <a id="dt-4db1e5bbcbca4c8cc8d2"></a>
>
> **Item 3**
>
> > <div id="dt-de6696c767c380e6bb72">
> > <p style="white-space: pre-wrap">Index of config segment</p>
> > </div>
> >
> > **Allowed values (<code>enum</code>):** <a id="dt-92e7050e6974a00a9cb6"></a> <span id="dt-aebdc73fa28ce211abbc"><code>0</code></span>, <span id="dt-15e96e93b0858b481106"><code>1</code></span>, <span id="dt-ec982e8a30b77be68b20"><code>2</code></span>, <span id="dt-e2d902daf14b169b2fa0"><code>3</code></span>

**Required in this object (<code>required</code>):** <a id="dt-e8a55b73b82621f2b1ce"></a> <span id="dt-30fe2a71a8a679ec7320"><code>&#34;reg&#34;</code></span>, <span id="dt-b70820fb45ca1130a7e0"><code>&#34;clocks&#34;</code></span>, <span id="dt-51879f15faf88cf08962"><code>&#34;clock&#45;names&#34;</code></span>, <span id="dt-bcfe12c9a3b4fba48d24"><code>&#34;&#35;phy&#45;cells&#34;</code></span>

<a id="dt-77e9bca2609688d62331"></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;&#35;address&#45;cells&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;&#35;size&#45;cells&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;ranges&#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/phy/phy.h&gt;

u3phy: xs-phy@11c40000 {
    compatible = "mediatek,mt3611-xsphy", "mediatek,xsphy";
    reg = &lt;0x11c43000 0x0200&gt;;
    mediatek,src-ref-clk-mhz = &lt;26&gt;;
    mediatek,src-coef = &lt;17&gt;;
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;1&gt;;
    ranges;

    u2port0: usb-phy@11c40000 {
        reg = &lt;0x11c40000 0x0400&gt;;
        clocks = &lt;&amp;clk48m&gt;;
        clock-names = "ref";
        mediatek,eye-src = &lt;4&gt;;
        #phy-cells = &lt;1&gt;;
    };

    u3port0: usb-phy@11c43000 {
        reg = &lt;0x11c43400 0x0500&gt;;
        clocks = &lt;&amp;clk26m&gt;;
        clock-names = "ref";
        mediatek,efuse-intr = &lt;28&gt;;
        #phy-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-only OR BSD-2-Clause)</span></p>

<p id="dt-comment-1"><strong>Line 2:</strong> <span> Copyright (c) 2020 MediaTek</span></p>

<p id="dt-comment-2"><strong>Line 80:</strong> <span> Required child node:</span></p>

<p id="dt-comment-3"><strong>Line 111:</strong> <span> The following optional vendor properties are only for debug or HQA test</span></p>

</details>
