Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: serial: Convert generic bindings to json-schema

Convert the generic serial interface Device Tree binding documentation
to json-schema.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Geert Uytterhoeven and committed by
Rob Herring
175a7427 ac5fe2e6

+74 -59
+1 -1
Documentation/devicetree/bindings/serial/fsl-imx-uart.txt
··· 15 15 the transceiver is actually CTS_B, not RTS_B. CTS_B is always output, 16 16 and RTS_B is input, regardless of dte-mode. 17 17 18 - Please check Documentation/devicetree/bindings/serial/serial.txt 18 + Please check Documentation/devicetree/bindings/serial/serial.yaml 19 19 for the complete list of generic properties. 20 20 21 21 Note: Each uart controller should have an alias correctly numbered
+2 -2
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
··· 128 128 transmission, and one for reception. 129 129 - dma-names: Must contain a list of two DMA names, "tx" and "rx". 130 130 - {cts,dsr,dcd,rng,rts,dtr}-gpios: Specify GPIOs for modem lines, cfr. the 131 - generic serial DT bindings in serial.txt. 131 + generic serial DT bindings in serial.yaml. 132 132 - uart-has-rtscts: Indicates dedicated lines for RTS/CTS hardware flow 133 - control, cfr. the generic serial DT bindings in serial.txt. 133 + control, cfr. the generic serial DT bindings in serial.yaml. 134 134 135 135 Example: 136 136 aliases {
-56
Documentation/devicetree/bindings/serial/serial.txt
··· 1 - Generic Serial DT Bindings 2 - 3 - This document lists a set of generic properties for describing UARTs in a 4 - device tree. Whether these properties apply to a particular device depends on 5 - the DT bindings for the actual device. 6 - 7 - Optional properties: 8 - - cts-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be 9 - used as the UART's CTS line. 10 - - dcd-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be 11 - used as the UART's DCD line. 12 - - dsr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be 13 - used as the UART's DSR line. 14 - - dtr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be 15 - used as the UART's DTR line. 16 - - rng-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be 17 - used as the UART's RNG line. 18 - - rts-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be 19 - used as the UART's RTS line. 20 - 21 - - uart-has-rtscts: The presence of this property indicates that the 22 - UART has dedicated lines for RTS/CTS hardware flow control, and that 23 - they are available for use (wired and enabled by pinmux configuration). 24 - This depends on both the UART hardware and the board wiring. 25 - Note that this property is mutually-exclusive with "cts-gpios" and 26 - "rts-gpios" above, unless support is provided to switch between modes 27 - dynamically. 28 - 29 - 30 - Examples: 31 - 32 - uart1: serial@48022000 { 33 - compatible = "ti,am3352-uart", "ti,omap3-uart"; 34 - ti,hwmods = "uart2"; 35 - clock-frequency = <48000000>; 36 - reg = <0x48022000 0x2000>; 37 - interrupts = <73>; 38 - dmas = <&edma 28 0>, <&edma 29 0>; 39 - dma-names = "tx", "rx"; 40 - dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; 41 - dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; 42 - dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; 43 - rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; 44 - cts-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; 45 - rts-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; 46 - }; 47 - 48 - scifa4: serial@e6c80000 { 49 - compatible = "renesas,scifa-sh73a0", "renesas,scifa"; 50 - reg = <0xe6c80000 0x100>; 51 - interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>; 52 - clocks = <&mstp2_clks SH73A0_CLK_SCIFA4>; 53 - clock-names = "fck"; 54 - power-domains = <&pd_a3sp>; 55 - uart-has-rtscts; 56 - };
+71
Documentation/devicetree/bindings/serial/serial.yaml
··· 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 + 7 + title: Serial Interface Generic DT Bindings 8 + 9 + maintainers: 10 + - Greg Kroah-Hartman <gregkh@linuxfoundation.org> 11 + 12 + description: 13 + This document lists a set of generic properties for describing UARTs in a 14 + device tree. Whether these properties apply to a particular device depends 15 + on the DT bindings for the actual device. 16 + 17 + properties: 18 + $nodename: 19 + pattern: "^serial(@.*)?$" 20 + 21 + cts-gpios: 22 + maxItems: 1 23 + description: 24 + Must contain a GPIO specifier, referring to the GPIO pin to be used as 25 + the UART's CTS line. 26 + 27 + dcd-gpios: 28 + maxItems: 1 29 + description: 30 + Must contain a GPIO specifier, referring to the GPIO pin to be used as 31 + the UART's DCD line. 32 + 33 + dsr-gpios: 34 + maxItems: 1 35 + description: 36 + Must contain a GPIO specifier, referring to the GPIO pin to be used as 37 + the UART's DSR line. 38 + 39 + dtr-gpios: 40 + maxItems: 1 41 + description: 42 + Must contain a GPIO specifier, referring to the GPIO pin to be used as 43 + the UART's DTR line. 44 + 45 + rng-gpios: 46 + maxItems: 1 47 + description: 48 + Must contain a GPIO specifier, referring to the GPIO pin to be used as 49 + the UART's RNG line. 50 + 51 + rts-gpios: 52 + maxItems: 1 53 + description: 54 + Must contain a GPIO specifier, referring to the GPIO pin to be used as 55 + the UART's RTS line. 56 + 57 + uart-has-rtscts: 58 + $ref: /schemas/types.yaml#/definitions/flag 59 + description: 60 + The presence of this property indicates that the UART has dedicated lines 61 + for RTS/CTS hardware flow control, and that they are available for use 62 + (wired and enabled by pinmux configuration). This depends on both the 63 + UART hardware and the board wiring. 64 + 65 + if: 66 + required: 67 + - uart-has-rtscts 68 + then: 69 + properties: 70 + cts-gpios: false 71 + rts-gpios: false