# Serial Interface Generic

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

> Device-tree binding reference for Serial Interface Generic.

<!-- 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;serial&#47;serial&#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;Rob Herring &#60;robh&#64;kernel&#46;org&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Greg Kroah&#45;Hartman &#60;gregkh&#64;linuxfoundation&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">This document lists a set of generic properties for describing UARTs in a device tree.  Whether these properties apply to a particular device depends on the DT bindings for the actual device.
Each enabled UART may have an optional "serialN" alias in the "aliases" node, where N is the port number (non-negative decimal integer) as printed on the label next to the physical port.</p>
</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;serial&#40;&#64;&#46;&#42;&#41;&#63;&#36;&#34;</code></span>

<a id="dt-0c6076cd9d6f109c5cc6"></a>

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

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

<a id="dt-088093900cb18097f6dc"></a>

### <code>cts&#45;gpios</code> — not listed as required here

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

<div id="dt-70b9619a058546e1b04d">
<p style="white-space: pre-wrap">Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's CTS line.</p>
</div>

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

### <code>dcd&#45;gpios</code> — not listed as required here

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

<div id="dt-5cfee28d3653b33168c2">
<p style="white-space: pre-wrap">Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's DCD line.</p>
</div>

<a id="dt-14a9ca1b799e524b74ac"></a>

### <code>dsr&#45;gpios</code> — not listed as required here

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

<div id="dt-fa88d0ccd349edd3531c">
<p style="white-space: pre-wrap">Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's DSR line.</p>
</div>

<a id="dt-10880b9307ebe4a49fdb"></a>

### <code>dtr&#45;gpios</code> — not listed as required here

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

<div id="dt-6c7151991c0608209228">
<p style="white-space: pre-wrap">Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's DTR line.</p>
</div>

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

### <code>rng&#45;gpios</code> — not listed as required here

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

<div id="dt-dba9d91f5b854fef58bd">
<p style="white-space: pre-wrap">Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's RNG line.</p>
</div>

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

### <code>rts&#45;gpios</code> — not listed as required here

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

<div id="dt-2564f16546dc3f5bccd0">
<p style="white-space: pre-wrap">Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's RTS line.</p>
</div>

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

### <code>uart&#45;has&#45;rtscts</code> — not listed as required here

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

<div id="dt-1cc94cb155aa38b61a6a">
<p style="white-space: pre-wrap">The presence of this property indicates that the UART has dedicated lines for RTS/CTS hardware flow control, and that they are available for use (wired and enabled by pinmux configuration).  This depends on both the UART hardware and the board wiring.</p>
</div>

<a id="dt-5d00215f2c5432bca97b"></a>

### <code>rx&#45;tx&#45;swap</code> — not listed as required here

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

<div id="dt-547207cc7b93b54bb4f7">
<p style="white-space: pre-wrap">RX and TX pins are swapped.</p>
</div>

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

### <code>cts&#45;rts&#45;swap</code> — not listed as required here

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

<div id="dt-e455fa5de846af84e100">
<p style="white-space: pre-wrap">CTS and RTS pins are swapped.</p>
</div>

<a id="dt-346544ca2c042507dd4e"></a>

### <code>rx&#45;threshold</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-c1d2a6f73609b5e50b24">[<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-4944411163f79d45eaf4">
<p style="white-space: pre-wrap">RX FIFO threshold configuration (in bytes).</p>
</div>

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

### <code>tx&#45;threshold</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-79fc7f5f6ca1e860de1c">[<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-7f68d8e0c9c1fd0f7a5e">
<p style="white-space: pre-wrap">TX FIFO threshold configuration (in bytes).</p>
</div>

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

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

<a id="dt-20b138ba0bb91bcbf90a"></a>

### <code>&#94;&#40;bluetooth&#124;bluetooth&#45;gnss&#124;embedded&#45;controller&#124;gnss&#124;gps&#124;mcu&#124;onewire&#41;&#36;</code> — name matches this regular expression

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

#### Condition (<code>if</code>)

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

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

#### When the condition matches (<code>then</code>)

> <a id="dt-922a06d05076b367d2ff"></a>
>
> **Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)**
>
> <code>true</code>
>
> Allowed by this rule.
>
> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-9c2a19b8f64e5510b42e">[<code>serial&#45;peripheral&#45;props&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-serial/serial-peripheral-props.md#dt-root>)</span>
>
> <div id="dt-b76a997186349e6d5d34">
> <p style="white-space: pre-wrap">Serial attached devices shall be a child node of the host UART device the slave device is attached to. It is expected that the attached device is the only child node of the UART device. The slave device node name shall reflect the generic type of device for the node.</p>
> </div>
>
> <a id="dt-8b588a2c07eeedc3983e"></a>
>
> **Properties and child nodes (<code>properties</code>)**
>
> <a id="dt-413905dcbba3c373aba1"></a>
>
> **<code>compatible</code> — required here**
>
> <div id="dt-70f64da9db26e7b79ce3">
> <p style="white-space: pre-wrap">Compatible of the device connected to the serial port.</p>
> </div>
>
> **Required in this object (<code>required</code>):** <a id="dt-12f917b2e051903926e3"></a> <span id="dt-4e119deb78fe0defc243"><code>&#34;compatible&#34;</code></span>

<a id="dt-158e3f6339df9dc0e448"></a>

## Condition (<code>if</code>)

> **Required in this object (<code>required</code>):** <a id="dt-14e52113574fb38ea542"></a> <span id="dt-29f94e3578414110598d"><code>&#34;uart&#45;has&#45;rtscts&#34;</code></span>

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

## When the condition matches (<code>then</code>)

> <a id="dt-d3da345ec82b9041251c"></a>
>
> ### Properties and child nodes (<code>properties</code>)
>
> <a id="dt-cda6cd4b04490d72e320"></a>
>
> #### <code>cts&#45;gpios</code> — not listed as required here
>
> <code>false</code> — Not permitted by this property rule.
>
> <a id="dt-fc612c6ee4653ae26feb"></a>
>
> #### <code>rts&#45;gpios</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>true</code>

Allowed by this rule.

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">serial@1234 {
    compatible = "ns16550a";
    reg = &lt;0x1234 0x20&gt;;
    interrupts = &lt;1&gt;;

    bluetooth {
        compatible = "brcm,bcm4330-bt";
        interrupt-parent = &lt;&amp;gpio&gt;;
        interrupts = &lt;10&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>

</details>
