From 0f3b577384c07cdefd5735f78f9f375c6afe810e Mon Sep 17 00:00:00 2001 From: Rafał Miłecki Date: Sun, 29 Aug 2021 15:19:27 +0200 Subject: dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This helps validating DTS files. Redundant generic descriptions (e.g. "The base address of the UART register bank") were dropped and periph_clk was dropped from example as not required. Reviewed-by: Rob Herring Acked-by: Florian Fainelli Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20210829131927.13682-1-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman --- .../bindings/serial/brcm,bcm6345-uart.txt | 36 ----------------- .../bindings/serial/brcm,bcm6345-uart.yaml | 47 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 36 deletions(-) delete mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt create mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt deleted file mode 100644 index 8b2b0460259a..000000000000 --- a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt +++ /dev/null @@ -1,36 +0,0 @@ -* BCM63xx UART - -Required properties: - -- compatible: "brcm,bcm6345-uart" - -- reg: The base address of the UART register bank. - -- interrupts: A single interrupt specifier. - -- clocks: Clock driving the hardware; used to figure out the baud rate - divisor. - - -Optional properties: - -- clock-names: Should be "refclk". - -Example: - - uart0: serial@14e00520 { - compatible = "brcm,bcm6345-uart"; - reg = <0x14e00520 0x18>; - interrupt-parent = <&periph_intc>; - interrupts = <2>; - clocks = <&periph_clk>; - clock-names = "refclk"; - }; - - clocks { - periph_clk: periph_clk@0 { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <54000000>; - }; - }; diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml new file mode 100644 index 000000000000..a22285c43f80 --- /dev/null +++ b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/brcm,bcm6345-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: BCM63xx UART + +maintainers: + - Rafał Miłecki + +allOf: + - $ref: serial.yaml# + +properties: + compatible: + const: brcm,bcm6345-uart + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: refclk + +unevaluatedProperties: false + +required: + - reg + - interrupts + - clocks + +examples: + - | + serial@14e00520 { + compatible = "brcm,bcm6345-uart"; + reg = <0x14e00520 0x18>; + interrupt-parent = <&periph_intc>; + interrupts = <2>; + clocks = <&periph_clk>; + clock-names = "refclk"; + }; -- cgit v1.2.3-59-g8ed1b From 538a9909205d1dd7dce737e3fd9a8fa3165a0c02 Mon Sep 17 00:00:00 2001 From: Sam Protsenko Date: Wed, 11 Aug 2021 14:48:23 +0300 Subject: dt-bindings: serial: samsung: Add Exynos850 doc Add compatible string for Exynos850 SoC. Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20210811114827.27322-4-semen.protsenko@linaro.org Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/serial/samsung_uart.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml index f064e5b76cf1..2940afb874b3 100644 --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml @@ -26,6 +26,7 @@ properties: - samsung,s3c6400-uart - samsung,s5pv210-uart - samsung,exynos4210-uart + - samsung,exynos850-uart reg: maxItems: 1 -- cgit v1.2.3-59-g8ed1b From f77529d9b91ac484d2ec4ad733e7594731334348 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Thu, 26 Aug 2021 15:21:51 -0400 Subject: dt-bindings: serial: uartlite: Convert to json-schema This converts the existing documentation for the uartlite binding to json-schema. Reviewed-by: Rob Herring Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20210826192154.3202269-2-sean.anderson@seco.com Signed-off-by: Greg Kroah-Hartman --- .../bindings/serial/xlnx,opb-uartlite.txt | 23 ---------- .../bindings/serial/xlnx,opb-uartlite.yaml | 53 ++++++++++++++++++++++ 2 files changed, 53 insertions(+), 23 deletions(-) delete mode 100644 Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.txt create mode 100644 Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.txt b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.txt deleted file mode 100644 index c37deb44dead..000000000000 --- a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.txt +++ /dev/null @@ -1,23 +0,0 @@ -Xilinx Axi Uartlite controller Device Tree Bindings ---------------------------------------------------------- - -Required properties: -- compatible : Can be either of - "xlnx,xps-uartlite-1.00.a" - "xlnx,opb-uartlite-1.00.b" -- reg : Physical base address and size of the Axi Uartlite - registers map. -- interrupts : Should contain the UART controller interrupt. - -Optional properties: -- port-number : Set Uart port number -- clock-names : Should be "s_axi_aclk" -- clocks : Input clock specifier. Refer to common clock bindings. - -Example: -serial@800c0000 { - compatible = "xlnx,xps-uartlite-1.00.a"; - reg = <0x0 0x800c0000 0x10000>; - interrupts = <0x0 0x6e 0x1>; - port-number = <0>; -}; diff --git a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml new file mode 100644 index 000000000000..0cc94c920b17 --- /dev/null +++ b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/xlnx,opb-uartlite.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Xilinx Axi Uartlite + +maintainers: + - Peter Korsgaard + +properties: + compatible: + contains: + enum: + - xlnx,xps-uartlite-1.00.a + - xlnx,opb-uartlite-1.00.b + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + port-number: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Set Uart port number + + clocks: + maxItems: 1 + + clock-names: + const: s_axi_aclk + +required: + - compatible + - reg + - interrupts + +allOf: + - $ref: /schemas/serial.yaml# + +unevaluatedProperties: false + +examples: + - | + serial@800c0000 { + compatible = "xlnx,xps-uartlite-1.00.a"; + reg = <0x800c0000 0x10000>; + interrupts = <0x0 0x6e 0x1>; + port-number = <0>; + }; +... -- cgit v1.2.3-59-g8ed1b From 3de536a8c365ada3481839ffe8da533c9940ea3f Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Thu, 26 Aug 2021 15:21:52 -0400 Subject: dt-bindings: serial: uartlite: Add properties for synthesis-time parameters The uartlite device is a "soft" device. Many parameters, such as baud rate, data bits, and the presence of a parity bit are configured before synthesis and may not be changed (or discovered) at runtime. However, we must know what these settings are in order to properly calculate the uart timeout (and to inform the user about the actual baud of the uart). These properties are present for out-of-tree bindings generated by Xilinx's tools. However, they are also (mostly) present in in-tree bindings. I chose current-speed over xlnx,baudrate primarily because it seemed to be used by more existing bindings. Although these properties are marked as "required", note that only current-speed is required by the driver itself. Hopefully, this will allow for an easier transition. Reviewed-by: Rob Herring Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20210826192154.3202269-3-sean.anderson@seco.com Signed-off-by: Greg Kroah-Hartman --- .../bindings/serial/xlnx,opb-uartlite.yaml | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml index 0cc94c920b17..b8a2bfe14bed 100644 --- a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml +++ b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml @@ -32,13 +32,47 @@ properties: clock-names: const: s_axi_aclk + current-speed: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The fixed baud rate that the device was configured for. + + xlnx,data-bits: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [5, 6, 7, 8] + description: + The fixed number of data bits that the device was configured for. + + xlnx,use-parity: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + description: + Whether parity checking was enabled when the device was configured. + + xlnx,odd-parity: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + description: + Whether odd parity was configured. + required: - compatible - reg - interrupts + - current-speed + - xlnx,data-bits + - xlnx,use-parity allOf: - $ref: /schemas/serial.yaml# + - if: + properties: + xlnx,use-parity: + contains: + const: 1 + then: + required: + - xlnx,odd-parity unevaluatedProperties: false @@ -49,5 +83,8 @@ examples: reg = <0x800c0000 0x10000>; interrupts = <0x0 0x6e 0x1>; port-number = <0>; + current-speed = <115200>; + xlnx,data-bits = <8>; + xlnx,use-parity = <0>; }; ... -- cgit v1.2.3-59-g8ed1b From 63dfaadfac62434356bce13dba8c6cbbe75e3e04 Mon Sep 17 00:00:00 2001 From: Chunyan Zhang Date: Tue, 28 Sep 2021 17:52:28 +0800 Subject: dt-bindings: serial: Add a new compatible string for UMS512 The UMS512 also uses the same serial device with SC9836. Signed-off-by: Chunyan Zhang Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210928095229.233572-3-zhang.lyra@gmail.com Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/serial/sprd-uart.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/sprd-uart.yaml b/Documentation/devicetree/bindings/serial/sprd-uart.yaml index 09f6283f3cae..a444bebd2c1a 100644 --- a/Documentation/devicetree/bindings/serial/sprd-uart.yaml +++ b/Documentation/devicetree/bindings/serial/sprd-uart.yaml @@ -19,6 +19,7 @@ properties: - enum: - sprd,sc9860-uart - sprd,sc9863a-uart + - sprd,ums512-uart - const: sprd,sc9836-uart - const: sprd,sc9836-uart -- cgit v1.2.3-59-g8ed1b From 4c9883e1f4ddc53ff66eeb124a96530435dee22b Mon Sep 17 00:00:00 2001 From: Andreas Kemnade Date: Fri, 1 Oct 2021 23:17:31 +0200 Subject: dt-bindings: serial: 8250_omap: allow serdev subnodes additionalProperties: false ignores the pattern matching for serdev objects in serial.yaml, causing error messages when serdev subnodes like bluetooth or gnss devices are defined. Using unevaluatedProperties instead is the correct way if arbitrary children nodes can appear. Acked-by: Rob Herring Signed-off-by: Andreas Kemnade Link: https://lore.kernel.org/r/20211001211731.2923066-1-andreas@kemnade.info Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/serial/8250_omap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml index 70ca61688bb9..7b34ec8fa90e 100644 --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml @@ -86,7 +86,7 @@ required: - reg - interrupts -additionalProperties: false +unevaluatedProperties: false if: properties: -- cgit v1.2.3-59-g8ed1b From 5f0ac3a1dae17ec0af6b845376247d7cc948ea3d Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Sat, 9 Oct 2021 01:43:12 +0200 Subject: dt-bindings: serial: uartlite: drop $ref for -bits property Fixes warning: Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml: properties:xlnx,data-bits: {'const': '$ref'} is not allowed for '$ref' hint: Standard unit suffix properties don't need a type $ref from schema $id: http://devicetree.org/meta-schemas/core.yaml# Acked-by: Rob Herring Signed-off-by: David Heidelberg Link: https://lore.kernel.org/r/20211008234312.61688-1-david@ixit.cz Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml | 1 - 1 file changed, 1 deletion(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml index b8a2bfe14bed..f7617b88c7c3 100644 --- a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml +++ b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml @@ -38,7 +38,6 @@ properties: The fixed baud rate that the device was configured for. xlnx,data-bits: - $ref: /schemas/types.yaml#/definitions/uint32 enum: [5, 6, 7, 8] description: The fixed number of data bits that the device was configured for. -- cgit v1.2.3-59-g8ed1b