1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/serial/serial.yaml# 5fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: Serial Interface Generic 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Rob Herring <robh@kernel.org> 11c66ec88fSEmmanuel Vadot - Greg Kroah-Hartman <gregkh@linuxfoundation.org> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotdescription: 14c66ec88fSEmmanuel Vadot This document lists a set of generic properties for describing UARTs in a 15c66ec88fSEmmanuel Vadot device tree. Whether these properties apply to a particular device depends 16c66ec88fSEmmanuel Vadot on the DT bindings for the actual device. 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel Vadot Each enabled UART may have an optional "serialN" alias in the "aliases" node, 19c66ec88fSEmmanuel Vadot where N is the port number (non-negative decimal integer) as printed on the 20c66ec88fSEmmanuel Vadot label next to the physical port. 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel Vadotproperties: 23c66ec88fSEmmanuel Vadot $nodename: 24c66ec88fSEmmanuel Vadot pattern: "^serial(@.*)?$" 25c66ec88fSEmmanuel Vadot 265956d97fSEmmanuel Vadot label: true 275956d97fSEmmanuel Vadot 28c66ec88fSEmmanuel Vadot cts-gpios: 29c66ec88fSEmmanuel Vadot maxItems: 1 30c66ec88fSEmmanuel Vadot description: 31c66ec88fSEmmanuel Vadot Must contain a GPIO specifier, referring to the GPIO pin to be used as 32c66ec88fSEmmanuel Vadot the UART's CTS line. 33c66ec88fSEmmanuel Vadot 34c66ec88fSEmmanuel Vadot dcd-gpios: 35c66ec88fSEmmanuel Vadot maxItems: 1 36c66ec88fSEmmanuel Vadot description: 37c66ec88fSEmmanuel Vadot Must contain a GPIO specifier, referring to the GPIO pin to be used as 38c66ec88fSEmmanuel Vadot the UART's DCD line. 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot dsr-gpios: 41c66ec88fSEmmanuel Vadot maxItems: 1 42c66ec88fSEmmanuel Vadot description: 43c66ec88fSEmmanuel Vadot Must contain a GPIO specifier, referring to the GPIO pin to be used as 44c66ec88fSEmmanuel Vadot the UART's DSR line. 45c66ec88fSEmmanuel Vadot 46c66ec88fSEmmanuel Vadot dtr-gpios: 47c66ec88fSEmmanuel Vadot maxItems: 1 48c66ec88fSEmmanuel Vadot description: 49c66ec88fSEmmanuel Vadot Must contain a GPIO specifier, referring to the GPIO pin to be used as 50c66ec88fSEmmanuel Vadot the UART's DTR line. 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel Vadot rng-gpios: 53c66ec88fSEmmanuel Vadot maxItems: 1 54c66ec88fSEmmanuel Vadot description: 55c66ec88fSEmmanuel Vadot Must contain a GPIO specifier, referring to the GPIO pin to be used as 56c66ec88fSEmmanuel Vadot the UART's RNG line. 57c66ec88fSEmmanuel Vadot 58c66ec88fSEmmanuel Vadot rts-gpios: 59c66ec88fSEmmanuel Vadot maxItems: 1 60c66ec88fSEmmanuel Vadot description: 61c66ec88fSEmmanuel Vadot Must contain a GPIO specifier, referring to the GPIO pin to be used as 62c66ec88fSEmmanuel Vadot the UART's RTS line. 63c66ec88fSEmmanuel Vadot 64c66ec88fSEmmanuel Vadot uart-has-rtscts: 65c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 66c66ec88fSEmmanuel Vadot description: 67c66ec88fSEmmanuel Vadot The presence of this property indicates that the UART has dedicated lines 68c66ec88fSEmmanuel Vadot for RTS/CTS hardware flow control, and that they are available for use 69c66ec88fSEmmanuel Vadot (wired and enabled by pinmux configuration). This depends on both the 70c66ec88fSEmmanuel Vadot UART hardware and the board wiring. 71c66ec88fSEmmanuel Vadot 72c66ec88fSEmmanuel Vadot rx-tx-swap: 73c66ec88fSEmmanuel Vadot type: boolean 74c66ec88fSEmmanuel Vadot description: RX and TX pins are swapped. 75c66ec88fSEmmanuel Vadot 76c66ec88fSEmmanuel Vadot cts-rts-swap: 77c66ec88fSEmmanuel Vadot type: boolean 78c66ec88fSEmmanuel Vadot description: CTS and RTS pins are swapped. 79c66ec88fSEmmanuel Vadot 802eb4d8dcSEmmanuel Vadot rx-threshold: 812eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 822eb4d8dcSEmmanuel Vadot description: 832eb4d8dcSEmmanuel Vadot RX FIFO threshold configuration (in bytes). 842eb4d8dcSEmmanuel Vadot 852eb4d8dcSEmmanuel Vadot tx-threshold: 862eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 872eb4d8dcSEmmanuel Vadot description: 882eb4d8dcSEmmanuel Vadot TX FIFO threshold configuration (in bytes). 892eb4d8dcSEmmanuel Vadot 90c66ec88fSEmmanuel VadotpatternProperties: 91*b2d2a78aSEmmanuel Vadot "^(bluetooth|bluetooth-gnss|embedded-controller|gnss|gps|mcu|onewire)$": 92c66ec88fSEmmanuel Vadot if: 93c66ec88fSEmmanuel Vadot type: object 94c66ec88fSEmmanuel Vadot then: 95*b2d2a78aSEmmanuel Vadot additionalProperties: true 96*b2d2a78aSEmmanuel Vadot $ref: serial-peripheral-props.yaml# 97c66ec88fSEmmanuel Vadot description: 98c66ec88fSEmmanuel Vadot Serial attached devices shall be a child node of the host UART device 99c66ec88fSEmmanuel Vadot the slave device is attached to. It is expected that the attached 100c66ec88fSEmmanuel Vadot device is the only child node of the UART device. The slave device node 101c66ec88fSEmmanuel Vadot name shall reflect the generic type of device for the node. 102c66ec88fSEmmanuel Vadot 103c66ec88fSEmmanuel Vadot properties: 104c66ec88fSEmmanuel Vadot compatible: 105c66ec88fSEmmanuel Vadot description: 106c66ec88fSEmmanuel Vadot Compatible of the device connected to the serial port. 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot required: 109c66ec88fSEmmanuel Vadot - compatible 110c66ec88fSEmmanuel Vadot 11184943d6fSEmmanuel Vadotif: 11284943d6fSEmmanuel Vadot required: 11384943d6fSEmmanuel Vadot - uart-has-rtscts 11484943d6fSEmmanuel Vadotthen: 11584943d6fSEmmanuel Vadot properties: 11684943d6fSEmmanuel Vadot cts-gpios: false 11784943d6fSEmmanuel Vadot rts-gpios: false 11884943d6fSEmmanuel Vadot 1196be33864SEmmanuel VadotadditionalProperties: true 1206be33864SEmmanuel Vadot 121c66ec88fSEmmanuel Vadotexamples: 122c66ec88fSEmmanuel Vadot - | 123c66ec88fSEmmanuel Vadot serial@1234 { 124c66ec88fSEmmanuel Vadot compatible = "ns16550a"; 125c66ec88fSEmmanuel Vadot reg = <0x1234 0x20>; 126c66ec88fSEmmanuel Vadot interrupts = <1>; 127c66ec88fSEmmanuel Vadot 128c66ec88fSEmmanuel Vadot bluetooth { 1292eb4d8dcSEmmanuel Vadot compatible = "brcm,bcm4330-bt"; 130c66ec88fSEmmanuel Vadot interrupt-parent = <&gpio>; 131c66ec88fSEmmanuel Vadot interrupts = <10>; 132c66ec88fSEmmanuel Vadot }; 133c66ec88fSEmmanuel Vadot }; 134