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 18properties: 19 $nodename: 20 pattern: "^serial(@.*)?$" 21 22 cts-gpios: 23 maxItems: 1 24 description: 25 Must contain a GPIO specifier, referring to the GPIO pin to be used as 26 the UART's CTS line. 27 28 dcd-gpios: 29 maxItems: 1 30 description: 31 Must contain a GPIO specifier, referring to the GPIO pin to be used as 32 the UART's DCD line. 33 34 dsr-gpios: 35 maxItems: 1 36 description: 37 Must contain a GPIO specifier, referring to the GPIO pin to be used as 38 the UART's DSR line. 39 40 dtr-gpios: 41 maxItems: 1 42 description: 43 Must contain a GPIO specifier, referring to the GPIO pin to be used as 44 the UART's DTR line. 45 46 rng-gpios: 47 maxItems: 1 48 description: 49 Must contain a GPIO specifier, referring to the GPIO pin to be used as 50 the UART's RNG line. 51 52 rts-gpios: 53 maxItems: 1 54 description: 55 Must contain a GPIO specifier, referring to the GPIO pin to be used as 56 the UART's RTS line. 57 58 uart-has-rtscts: 59 $ref: /schemas/types.yaml#/definitions/flag 60 description: 61 The presence of this property indicates that the UART has dedicated lines 62 for RTS/CTS hardware flow control, and that they are available for use 63 (wired and enabled by pinmux configuration). This depends on both the 64 UART hardware and the board wiring. 65 66if: 67 required: 68 - uart-has-rtscts 69then: 70 properties: 71 cts-gpios: false 72 rts-gpios: false 73 74patternProperties: 75 ".*": 76 if: 77 type: object 78 then: 79 description: 80 Serial attached devices shall be a child node of the host UART device 81 the slave device is attached to. It is expected that the attached 82 device is the only child node of the UART device. The slave device node 83 name shall reflect the generic type of device for the node. 84 85 properties: 86 compatible: 87 description: 88 Compatible of the device connected to the serial port. 89 90 max-speed: 91 $ref: /schemas/types.yaml#/definitions/uint32 92 description: 93 The maximum baud rate the device operates at. 94 This should only be present if the maximum is less than the slave 95 device can support. For example, a particular board has some 96 signal quality issue or the host processor can't support higher 97 baud rates. 98 99 current-speed: 100 $ref: /schemas/types.yaml#/definitions/uint32 101 description: | 102 The current baud rate the device operates at. 103 This should only be present in case a driver has no chance to know 104 the baud rate of the slave device. 105 Examples: 106 * device supports auto-baud 107 * the rate is setup by a bootloader and there is no way to reset 108 the device 109 * device baud rate is configured by its firmware but there is no 110 way to request the actual settings 111 112 required: 113 - compatible 114 115examples: 116 - | 117 serial@1234 { 118 compatible = "ns16550a"; 119 reg = <0x1234 0x20>; 120 interrupts = <1>; 121 122 bluetooth { 123 compatible = "brcm,bcm43341-bt"; 124 interrupt-parent = <&gpio>; 125 interrupts = <10>; 126 }; 127 }; 128