Serial Interface Generic

Schema identifier ($id): "http://devicetree.org/schemas/serial/serial.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Rob Herring <robh@kernel.org>", "Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

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.

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^serial(@.*)?$"

label — not listed as required here #

true — No constraints added by this property rule.

cts-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's CTS line.

dcd-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's DCD line.

dsr-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's DSR line.

dtr-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's DTR line.

rng-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's RNG line.

rts-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's RTS line.

uart-has-rtscts — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

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.

rx-tx-swap — not listed as required here #

Value type (type): "boolean"

RX and TX pins are swapped.

cts-rts-swap — not listed as required here #

Value type (type): "boolean"

CTS and RTS pins are swapped.

rx-threshold — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

RX FIFO threshold configuration (in bytes).

tx-threshold — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

TX FIFO threshold configuration (in bytes).

Properties matching a name pattern (patternProperties) #

^(bluetooth|bluetooth-gnss|embedded-controller|gnss|gps|mcu|onewire)$ — name matches this regular expression #

Condition (if) #

Value type (type): "object"

When the condition matches (then) #

Properties not matched by properties or patternProperties in this schema (additionalProperties)

true

Allowed by this rule.

Shared schema rule ($ref): serial-peripheral-props.yaml#

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.

Properties and child nodes (properties)

compatible — required here

Compatible of the device connected to the serial port.

Required in this object (required): "compatible"

Condition (if) #

Required in this object (required): "uart-has-rtscts"

When the condition matches (then) #

Properties and child nodes (properties) #

cts-gpios — not listed as required here #

false — Not permitted by this property rule.

rts-gpios — not listed as required here #

false — Not permitted by this property rule.

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

true

Allowed by this rule.

Examples (examples) #

serial@1234 {
    compatible = "ns16550a";
    reg = <0x1234 0x20>;
    interrupts = <1>;

    bluetooth {
        compatible = "brcm,bcm4330-bt";
        interrupt-parent = <&gpio>;
        interrupts = <10>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page