# Realtek DHC SoCs USB 2.0 PHY

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

> Device-tree binding reference for Realtek DHC SoCs USB 2.0 PHY.

<!-- 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;phy&#47;realtek&#44;usb2phy&#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;Stanley Chang &#60;stanley&#95;chang&#64;realtek&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">Realtek USB 2.0 PHY support the digital home center (DHC) RTD series SoCs.
The USB 2.0 PHY driver is designed to support the XHCI controller. The SoCs
support multiple XHCI controllers. One PHY device node maps to one XHCI
controller.</p>
<pre><code>RTD1295/RTD1619 SoCs USB
The USB architecture includes three XHCI controllers.
Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on some
controllers.
XHCI controller#0 -- usb2phy -- phy#0
                  |- usb3phy -- phy#0
XHCI controller#1 -- usb2phy -- phy#0
XHCI controller#2 -- usb2phy -- phy#0
                  |- usb3phy -- phy#0</code></pre>
<pre><code>RTD1395 SoCs USB
The USB architecture includes two XHCI controllers.
The controller#0 has one USB 2.0 PHY. The controller#1 includes two USB 2.0
PHY.
XHCI controller#0 -- usb2phy -- phy#0
XHCI controller#1 -- usb2phy -- phy#0
                             |- phy#1</code></pre>
<pre><code>RTD1319/RTD1619b SoCs USB
The USB architecture includes three XHCI controllers.
Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#2.
XHCI controller#0 -- usb2phy -- phy#0
XHCI controller#1 -- usb2phy -- phy#0
XHCI controller#2 -- usb2phy -- phy#0
                  |- usb3phy -- phy#0</code></pre>
<pre><code>RTD1319d SoCs USB
The USB architecture includes three XHCI controllers.
Each xhci maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#0.
XHCI controller#0 -- usb2phy -- phy#0
                  |- usb3phy -- phy#0
XHCI controller#1 -- usb2phy -- phy#0
XHCI controller#2 -- usb2phy -- phy#0</code></pre>
<p style="white-space: pre-wrap">RTD1312c/RTD1315e SoCs USB
The USB architecture includes three XHCI controllers.
Each XHCI maps to one USB 2.0 PHY.
XHCI controller#0 -- usb2phy -- phy#0
XHCI controller#1 -- usb2phy -- phy#0
XHCI controller#2 -- usb2phy -- phy#0</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;realtek&#44;rtd1295&#45;usb2phy&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;realtek&#44;rtd1312c&#45;usb2phy&#34;</code></span>, <span id="dt-88ff8a31b3bd20d1ddec"><code>&#34;realtek&#44;rtd1315e&#45;usb2phy&#34;</code></span>, <span id="dt-76b67e65b51f033b1109"><code>&#34;realtek&#44;rtd1319&#45;usb2phy&#34;</code></span>, <span id="dt-498d24c42855e222b0fd"><code>&#34;realtek&#44;rtd1319d&#45;usb2phy&#34;</code></span>, <span id="dt-216696827b315708886c"><code>&#34;realtek&#44;rtd1395&#45;usb2phy&#34;</code></span>, <span id="dt-5708aa713f48e19e156f"><code>&#34;realtek&#44;rtd1395&#45;usb2phy&#45;2port&#34;</code></span>, <span id="dt-3edbd20dc5b59e47edf5"><code>&#34;realtek&#44;rtd1619&#45;usb2phy&#34;</code></span>, <span id="dt-07feb33463d5c114ab05"><code>&#34;realtek&#44;rtd1619b&#45;usb2phy&#34;</code></span>

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

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

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

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

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

**Item 1**

> <div id="dt-e773fec0b410a1422253">
> <p style="white-space: pre-wrap">PHY data registers</p>
> </div>

<a id="dt-302751dd79bfd514b9d7"></a>

**Item 2**

> <div id="dt-b729cb065b03c20c0e01">
> <p style="white-space: pre-wrap">PHY control registers</p>
> </div>

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

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

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

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

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

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

<div id="dt-6e22bea212c5f15c1ddb">
<p style="white-space: pre-wrap">Phandles to nvmem cell that contains the trimming data. If unspecified, default value is used.</p>
</div>

<a id="dt-28ee7fd676493bbd8d08"></a>

### <code>nvmem&#45;cell&#45;names</code> — not listed as required here

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

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

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

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-30d2a590f6c0a447cfaa"><code>&#34;usb&#45;dc&#45;cal&#34;</code></span>

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

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-441ea0caeb43e3f23d69"><code>&#34;usb&#45;dc&#45;dis&#34;</code></span>

<div id="dt-4ae1790e13df97959984">
<p style="white-space: pre-wrap">The following names, which correspond to each nvmem-cells. usb-dc-cal is the driving level for each phy specified via efuse. usb-dc-dis is the disconnection level for each phy specified via efuse.</p>
</div>

<a id="dt-7ee6e367e9ad209aeaa9"></a>

### <code>realtek&#44;inverse&#45;hstx&#45;sync&#45;clock</code> — not listed as required here

<div id="dt-c03dd3cd5b4d23b9a00d">
<p style="white-space: pre-wrap">For one of the phys of RTD1619b SoC, the synchronous clock of the high-speed tx must be inverted.</p>
</div>

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

<a id="dt-2216b09df4f5b829c6d9"></a>

### <code>realtek&#44;driving&#45;level</code> — not listed as required here

<div id="dt-36dc72e3509e3ad715f0">
<p style="white-space: pre-wrap">Control the magnitude of High speed Dp/Dm output swing (mV). For a different board or port, the original magnitude maybe not meet the specification. In this situation we can adjust the value to meet the specification.</p>
</div>

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

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

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

<a id="dt-92c1e0656b8411d644c5"></a>

### <code>realtek&#44;driving&#45;level&#45;compensate</code> — not listed as required here

<div id="dt-192e040ea5f77582ee97">
<p style="white-space: pre-wrap">For RTD1315e SoC, the driving level can be adjusted by reading the efuse table. This property provides drive compensation. If the magnitude of High speed Dp/Dm output swing still not meet the specification, then we can set this value to meet the specification.</p>
</div>

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

**Default value (<code>default</code>):** <span id="dt-f9aea6c0de547644f177"><code>0</code></span>

**Minimum value (<code>minimum</code>):** <span id="dt-c4e3a6d924de918ffd95"><code>&#45;8</code></span>

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

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

### <code>realtek&#44;disconnection&#45;compensate</code> — not listed as required here

<div id="dt-efe4790d8e35570d1392">
<p style="white-space: pre-wrap">This adjusts the disconnection level compensation for the different boards with different disconnection level.</p>
</div>

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

**Default value (<code>default</code>):** <span id="dt-221699bddd206bf017bd"><code>0</code></span>

**Minimum value (<code>minimum</code>):** <span id="dt-8106f0fb8fef9f6183be"><code>&#45;8</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-3d90563c24ca6956a52c"><code>8</code></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;&#35;phy&#45;cells&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

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

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-17723ad0bbc7f42a3e70"></a>
> >
> > **This rule must not match (<code>not</code>)**
> >
> > > <a id="dt-3defb1f4dc0d6847a043"></a>
> > >
> > > **Properties and child nodes (<code>properties</code>)**
> > >
> > > <a id="dt-0e5d4207b2374940f9d3"></a>
> > >
> > > **<code>compatible</code> — not listed as required here**
> > >
> > > <a id="dt-6e1ee4ed1b112666419d"></a>
> > >
> > > **Rule for matching array elements (<code>contains</code>)**
> > >
> > > > **Allowed values (<code>enum</code>):** <a id="dt-66d2e4111e4fd49859fb"></a> <span id="dt-5f804f07539691f45609"><code>&#34;realtek&#44;rtd1619b&#45;usb2phy&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-b212c2ef78c22fab2e20"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-014ffc63a9742ec014e9"></a>
> >
> > **<code>realtek&#44;inverse&#45;hstx&#45;sync&#45;clock</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.

<a id="dt-22ca5ec5b89308748ecc"></a>

### Rule 2

> <a id="dt-ffbf5afb799d5f07b3e1"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-1f5272cb1d084137975e"></a>
> >
> > **This rule must not match (<code>not</code>)**
> >
> > > <a id="dt-eebbb9d41b21f12566d7"></a>
> > >
> > > **Properties and child nodes (<code>properties</code>)**
> > >
> > > <a id="dt-6aeb4c84797e4c678f3d"></a>
> > >
> > > **<code>compatible</code> — not listed as required here**
> > >
> > > <a id="dt-80145746a4351c4efa1b"></a>
> > >
> > > **Rule for matching array elements (<code>contains</code>)**
> > >
> > > > **Allowed values (<code>enum</code>):** <a id="dt-443ad9ac2f97f204d10a"></a> <span id="dt-a909db0a3ccf92d72799"><code>&#34;realtek&#44;rtd1315e&#45;usb2phy&#34;</code></span>
>
> <a id="dt-0971d01a730acc20e97a"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > <a id="dt-26d1c84fcc55a7d91dea"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-d641426d4cc64bae35b3"></a>
> >
> > **<code>realtek&#44;driving&#45;level&#45;compensate</code> — not listed as required here**
> >
> > <code>false</code> — Not permitted by this property rule.

<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">usb-phy@13214 {
    compatible = "realtek,rtd1619b-usb2phy";
    reg = &lt;0x13214 0x4&gt;, &lt;0x28280 0x4&gt;;
    #phy-cells = &lt;0&gt;;
    nvmem-cells = &lt;&amp;otp_usb_port0_dc_cal&gt;, &lt;&amp;otp_usb_port0_dc_dis&gt;;
    nvmem-cell-names = "usb-dc-cal", "usb-dc-dis";

    realtek,inverse-hstx-sync-clock;
    realtek,driving-level = &lt;0xa&gt;;
    realtek,disconnection-compensate = &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>

<p id="dt-comment-1"><strong>Line 2:</strong> <span> Copyright 2023 Realtek Semiconductor Corporation</span></p>

</details>
