# Generic USB OTG Controller

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

> Device-tree binding reference for Generic USB OTG Controller.

<!-- 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;usb&#47;usb&#45;drd&#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;Greg Kroah&#45;Hartman &#60;gregkh&#64;linuxfoundation&#46;org&#62;&#34;</code></span>

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

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

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

### <code>otg&#45;rev</code> — not listed as required here

<div id="dt-3889b71abf3926039dd8">
<p style="white-space: pre-wrap">Tells usb driver the release number of the OTG and EH supplement with which the device and its descriptors are compliant, in binary-coded decimal (i.e. 2.0 is 0200H). This property is used if any real OTG features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be 0x0200 or above.</p>
</div>

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

**Allowed values (<code>enum</code>):** <a id="dt-c498dbb42bdbe8d38f5c"></a> <span id="dt-90749735bc2b924e3667"><code>256</code></span>, <span id="dt-f129abc932bba2357122"><code>288</code></span>, <span id="dt-afd748553ecb5ece8853"><code>304</code></span>, <span id="dt-69804685084feb0eb75f"><code>512</code></span>

<a id="dt-38c20c64fdf58b5261c4"></a>

### <code>dr&#95;mode</code> — not listed as required here

<div id="dt-d3db19d5d87da4e1ffeb">
<p style="white-space: pre-wrap">Tells Dual-Role USB controllers that we want to work on a particular mode. In case this attribute isn't passed via DT, USB DRD controllers should default to OTG.</p>
</div>

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

**Allowed values (<code>enum</code>):** <a id="dt-d28c9947b2479bf3fdb2"></a> <span id="dt-ccbd990ebe27631c5fc7"><code>&#34;host&#34;</code></span>, <span id="dt-639a20829c0a5041d3a4"><code>&#34;peripheral&#34;</code></span>, <span id="dt-33153c1bd3961092d770"><code>&#34;otg&#34;</code></span>

**Default value (<code>default</code>):** <span id="dt-98d5992258a80cc9d6b8"><code>&#34;otg&#34;</code></span>

<a id="dt-7365bf8eb193b75c68c2"></a>

### <code>hnp&#45;disable</code> — not listed as required here

<div id="dt-ac6b3e447ab9b2f89449">
<p style="white-space: pre-wrap">Tells OTG controllers we want to disable OTG HNP. Normally HNP is the basic function of real OTG except you want it to be a srp-capable only B device.</p>
</div>

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

<a id="dt-94b41f6cc21bb32b0f99"></a>

### <code>srp&#45;disable</code> — not listed as required here

<div id="dt-f3077570a9933eeb3fc8">
<p style="white-space: pre-wrap">Tells OTG controllers we want to disable OTG SRP. SRP is optional for OTG device.</p>
</div>

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

<a id="dt-6fcf52bf5dc84978df17"></a>

### <code>adp&#45;disable</code> — not listed as required here

<div id="dt-2e590247953c06c37094">
<p style="white-space: pre-wrap">Tells OTG controllers we want to disable OTG ADP. ADP is optional for OTG device.</p>
</div>

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

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

### <code>usb&#45;role&#45;switch</code> — not listed as required here

<div id="dt-d34b52be4b2d807f9ce5">
<p style="white-space: pre-wrap">Indicates that the device is capable of assigning the USB data role (USB host or USB device) for a given USB connector, such as Type-C, Type-B(micro). See connector/usb-connector.yaml.</p>
</div>

<a id="dt-691143356c81eb34319b"></a>

### <code>role&#45;switch&#45;default&#45;mode</code> — not listed as required here

<div id="dt-27748c3719345cabd950">
<p style="white-space: pre-wrap">Indicates if usb-role-switch is enabled, the device default operation mode of controller while usb role is USB_ROLE_NONE.</p>
</div>

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

**Allowed values (<code>enum</code>):** <a id="dt-62775098a1cf311b1d76"></a> <span id="dt-962cbe1726156dcf33d1"><code>&#34;host&#34;</code></span>, <span id="dt-230287e1e7df65744160"><code>&#34;peripheral&#34;</code></span>

**Default value (<code>default</code>):** <span id="dt-855a3adad370f24d967e"><code>&#34;peripheral&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

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

<code>true</code>

Allowed by this rule.

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

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">usb@4a030000 {
    compatible = "snps,dwc3";
    reg = &lt;0x4a030000 0xcfff&gt;;
    interrupts = &lt;0 92 4&gt;;
    usb-phy = &lt;&amp;usb2_phy&gt;, &lt;&amp;usb3_phy&gt;;
    maximum-speed = "super-speed";
    dr_mode = "otg";
    phy_type = "utmi_wide";
    otg-rev = &lt;0x0200&gt;;
    adp-disable;
};
</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>
