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

dt-bindings: serial: Convert snps,dw-apb-uart to json-schema

Convert the snps,dw-apb-uart binding to DT schema using json-schema.

The Rockchip and Broadcom compatible strings were not documented,
so add them here.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-serial@vger.kernel.org
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rob Herring and committed by
Greg Kroah-Hartman
df230079 defe3b6d

+135 -76
-76
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.txt
··· 1 - * Synopsys DesignWare ABP UART 2 - 3 - Required properties: 4 - - compatible : "snps,dw-apb-uart" 5 - - reg : offset and length of the register set for the device. 6 - - interrupts : should contain uart interrupt. 7 - 8 - Clock handling: 9 - The clock rate of the input clock needs to be supplied by one of 10 - - clock-frequency : the input clock frequency for the UART. 11 - - clocks : phandle to the input clock 12 - 13 - The supplying peripheral clock can also be handled, needing a second property 14 - - clock-names: tuple listing input clock names. 15 - Required elements: "baudclk", "apb_pclk" 16 - 17 - Optional properties: 18 - - snps,uart-16550-compatible : reflects the value of UART_16550_COMPATIBLE 19 - configuration parameter. Define this if your UART does not implement the busy 20 - functionality. 21 - - resets : phandle to the parent reset controller. 22 - - reg-shift : quantity to shift the register offsets by. If this property is 23 - not present then the register offsets are not shifted. 24 - - reg-io-width : the size (in bytes) of the IO accesses that should be 25 - performed on the device. If this property is not present then single byte 26 - accesses are used. 27 - - dcd-override : Override the DCD modem status signal. This signal will always 28 - be reported as active instead of being obtained from the modem status 29 - register. Define this if your serial port does not use this pin. 30 - - dsr-override : Override the DTS modem status signal. This signal will always 31 - be reported as active instead of being obtained from the modem status 32 - register. Define this if your serial port does not use this pin. 33 - - cts-override : Override the CTS modem status signal. This signal will always 34 - be reported as active instead of being obtained from the modem status 35 - register. Define this if your serial port does not use this pin. 36 - - ri-override : Override the RI modem status signal. This signal will always be 37 - reported as inactive instead of being obtained from the modem status register. 38 - Define this if your serial port does not use this pin. 39 - 40 - Example: 41 - 42 - uart@80230000 { 43 - compatible = "snps,dw-apb-uart"; 44 - reg = <0x80230000 0x100>; 45 - clock-frequency = <3686400>; 46 - interrupts = <10>; 47 - reg-shift = <2>; 48 - reg-io-width = <4>; 49 - dcd-override; 50 - dsr-override; 51 - cts-override; 52 - ri-override; 53 - }; 54 - 55 - Example with one clock: 56 - 57 - uart@80230000 { 58 - compatible = "snps,dw-apb-uart"; 59 - reg = <0x80230000 0x100>; 60 - clocks = <&baudclk>; 61 - interrupts = <10>; 62 - reg-shift = <2>; 63 - reg-io-width = <4>; 64 - }; 65 - 66 - Example with two clocks: 67 - 68 - uart@80230000 { 69 - compatible = "snps,dw-apb-uart"; 70 - reg = <0x80230000 0x100>; 71 - clocks = <&baudclk>, <&apb_pclk>; 72 - clock-names = "baudclk", "apb_pclk"; 73 - interrupts = <10>; 74 - reg-shift = <2>; 75 - reg-io-width = <4>; 76 - };
+135
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/serial/snps-dw-apb-uart.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Synopsys DesignWare ABP UART 8 + 9 + maintainers: 10 + - Rob Herring <robh@kernel.org> 11 + 12 + allOf: 13 + - $ref: /schemas/serial.yaml# 14 + 15 + properties: 16 + compatible: 17 + oneOf: 18 + - items: 19 + - enum: 20 + - rockchip,px30-uart 21 + - rockchip,rk3036-uart 22 + - rockchip,rk3066-uart 23 + - rockchip,rk3188-uart 24 + - rockchip,rk3288-uart 25 + - rockchip,rk3328-uart 26 + - rockchip,rk3368-uart 27 + - rockchip,rk3399-uart 28 + - rockchip,rv1108-uart 29 + - const: snps,dw-apb-uart 30 + - items: 31 + - enum: 32 + - brcm,bcm11351-dw-apb-uart 33 + - brcm,bcm21664-dw-apb-uart 34 + - const: snps,dw-apb-uart 35 + - const: snps,dw-apb-uart 36 + 37 + reg: 38 + maxItems: 1 39 + 40 + interrupts: 41 + maxItems: 1 42 + 43 + clock-frequency: true 44 + 45 + clocks: 46 + minItems: 1 47 + maxItems: 2 48 + 49 + clock-names: 50 + items: 51 + - const: baudclk 52 + - const: apb_pclk 53 + 54 + snps,uart-16550-compatible: 55 + description: reflects the value of UART_16550_COMPATIBLE configuration 56 + parameter. Define this if your UART does not implement the busy functionality. 57 + type: boolean 58 + 59 + resets: 60 + maxItems: 1 61 + 62 + reg-shift: true 63 + 64 + reg-io-width: true 65 + 66 + dcd-override: 67 + description: Override the DCD modem status signal. This signal will 68 + always be reported as active instead of being obtained from the modem 69 + status register. Define this if your serial port does not use this 70 + pin. 71 + type: boolean 72 + 73 + dsr-override: 74 + description: Override the DTS modem status signal. This signal will 75 + always be reported as active instead of being obtained from the modem 76 + status register. Define this if your serial port does not use this 77 + pin. 78 + type: boolean 79 + 80 + cts-override: 81 + description: Override the CTS modem status signal. This signal will 82 + always be reported as active instead of being obtained from the modem 83 + status register. Define this if your serial port does not use this 84 + pin. 85 + type: boolean 86 + 87 + ri-override: 88 + description: Override the RI modem status signal. This signal will always 89 + be reported as inactive instead of being obtained from the modem status 90 + register. Define this if your serial port does not use this pin. 91 + type: boolean 92 + 93 + required: 94 + - compatible 95 + - reg 96 + - interrupts 97 + 98 + examples: 99 + - | 100 + serial@80230000 { 101 + compatible = "snps,dw-apb-uart"; 102 + reg = <0x80230000 0x100>; 103 + clock-frequency = <3686400>; 104 + interrupts = <10>; 105 + reg-shift = <2>; 106 + reg-io-width = <4>; 107 + dcd-override; 108 + dsr-override; 109 + cts-override; 110 + ri-override; 111 + }; 112 + 113 + - | 114 + // Example with one clock: 115 + serial@80230000 { 116 + compatible = "snps,dw-apb-uart"; 117 + reg = <0x80230000 0x100>; 118 + clocks = <&baudclk>; 119 + interrupts = <10>; 120 + reg-shift = <2>; 121 + reg-io-width = <4>; 122 + }; 123 + 124 + - | 125 + // Example with two clocks: 126 + serial@80230000 { 127 + compatible = "snps,dw-apb-uart"; 128 + reg = <0x80230000 0x100>; 129 + clocks = <&baudclk>, <&apb_pclk>; 130 + clock-names = "baudclk", "apb_pclk"; 131 + interrupts = <10>; 132 + reg-shift = <2>; 133 + reg-io-width = <4>; 134 + }; 135 + ...