1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: "http://devicetree.org/schemas/serial/serial.yaml#" 5$schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 7title: Serial Interface Generic DT Bindings 8 9maintainers: 10 - Rob Herring <robh@kernel.org> 11 - Greg Kroah-Hartman <gregkh@linuxfoundation.org> 12 13description: 14 This document lists a set of generic properties for describing UARTs in a 15 device tree. Whether these properties apply to a particular device depends 16 on the DT bindings for the actual device. 17 18 Each enabled UART may have an optional "serialN" alias in the "aliases" node, 19 where N is the port number (non-negative decimal integer) as printed on the 20 label next to the physical port. 21 22properties: 23 $nodename: 24 pattern: "^serial(@.*)?$" 25 26 cts-gpios: 27 maxItems: 1 28 description: 29 Must contain a GPIO specifier, referring to the GPIO pin to be used as 30 the UART's CTS line. 31 32 dcd-gpios: 33 maxItems: 1 34 description: 35 Must contain a GPIO specifier, referring to the GPIO pin to be used as 36 the UART's DCD line. 37 38 dsr-gpios: 39 maxItems: 1 40 description: 41 Must contain a GPIO specifier, referring to the GPIO pin to be used as 42 the UART's DSR line. 43 44 dtr-gpios: 45 maxItems: 1 46 description: 47 Must contain a GPIO specifier, referring to the GPIO pin to be used as 48 the UART's DTR line. 49 50 rng-gpios: 51 maxItems: 1 52 description: 53 Must contain a GPIO specifier, referring to the GPIO pin to be used as 54 the UART's RNG line. 55 56 rts-gpios: 57 maxItems: 1 58 description: 59 Must contain a GPIO specifier, referring to the GPIO pin to be used as 60 the UART's RTS line. 61 62 uart-has-rtscts: 63 $ref: /schemas/types.yaml#/definitions/flag 64 description: 65 The presence of this property indicates that the UART has dedicated lines 66 for RTS/CTS hardware flow control, and that they are available for use 67 (wired and enabled by pinmux configuration). This depends on both the 68 UART hardware and the board wiring. 69 70if: 71 required: 72 - uart-has-rtscts 73then: 74 properties: 75 cts-gpios: false 76 rts-gpios: false 77 78patternProperties: 79 ".*": 80 if: 81 type: object 82 then: 83 description: 84 Serial attached devices shall be a child node of the host UART device 85 the slave device is attached to. It is expected that the attached 86 device is the only child node of the UART device. The slave device node 87 name shall reflect the generic type of device for the node. 88 89 properties: 90 compatible: 91 description: 92 Compatible of the device connected to the serial port. 93 94 max-speed: 95 $ref: /schemas/types.yaml#/definitions/uint32 96 description: 97 The maximum baud rate the device operates at. 98 This should only be present if the maximum is less than the slave 99 device can support. For example, a particular board has some 100 signal quality issue or the host processor can't support higher 101 baud rates. 102 103 current-speed: 104 $ref: /schemas/types.yaml#/definitions/uint32 105 description: | 106 The current baud rate the device operates at. 107 This should only be present in case a driver has no chance to know 108 the baud rate of the slave device. 109 Examples: 110 * device supports auto-baud 111 * the rate is setup by a bootloader and there is no way to reset 112 the device 113 * device baud rate is configured by its firmware but there is no 114 way to request the actual settings 115 116 required: 117 - compatible 118 119examples: 120 - | 121 serial@1234 { 122 compatible = "ns16550a"; 123 reg = <0x1234 0x20>; 124 interrupts = <1>; 125 126 bluetooth { 127 compatible = "brcm,bcm43341-bt"; 128 interrupt-parent = <&gpio>; 129 interrupts = <10>; 130 }; 131 }; 132