json-schema versions draft7 and earlier have a weird behavior in that any keywords combined with a '$ref' are ignored (silently). The correct form was to put a '$ref' under an 'allOf'. This behavior is now changed in the 2019-09 json-schema spec and '$ref' can be mixed with other keywords. The json-schema library doesn't yet support this, but the tooling now does a fixup for this and either way works. This has been a constant source of review comments, so let's change this treewide so everyone copies the simpler syntax. Scripted with ruamel.yaml with some manual fixups. Some minor whitespace changes from the script. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Maxime Ripard <mripard@kernel.org> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-By: Vinod Koul <vkoul@kernel.org> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> # for I2C Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio Reviewed-by: Stephen Boyd <sboyd@kernel.org> # clock Signed-off-by: Rob Herring <robh@kernel.org>
118 lines
2.8 KiB
YAML
118 lines
2.8 KiB
YAML
# SPDX-License-Identifier: GPL-2.0
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/serial/samsung_uart.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Samsung S3C, S5P and Exynos SoC UART Controller
|
|
|
|
maintainers:
|
|
- Krzysztof Kozlowski <krzk@kernel.org>
|
|
- Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
description: |+
|
|
Each Samsung UART should have an alias correctly numbered in the "aliases"
|
|
node, according to serialN format, where N is the port number (non-negative
|
|
decimal integer) as specified by User's Manual of respective SoC.
|
|
|
|
properties:
|
|
compatible:
|
|
items:
|
|
- enum:
|
|
- samsung,s3c2410-uart
|
|
- samsung,s3c2412-uart
|
|
- samsung,s3c2440-uart
|
|
- samsung,s3c6400-uart
|
|
- samsung,s5pv210-uart
|
|
- samsung,exynos4210-uart
|
|
|
|
reg:
|
|
maxItems: 1
|
|
|
|
clocks:
|
|
minItems: 2
|
|
maxItems: 5
|
|
|
|
clock-names:
|
|
description: N = 0 is allowed for SoCs without internal baud clock mux.
|
|
minItems: 2
|
|
maxItems: 5
|
|
items:
|
|
- const: uart
|
|
- pattern: '^clk_uart_baud[0-3]$'
|
|
- pattern: '^clk_uart_baud[0-3]$'
|
|
- pattern: '^clk_uart_baud[0-3]$'
|
|
- pattern: '^clk_uart_baud[0-3]$'
|
|
|
|
interrupts:
|
|
description: RX interrupt and optionally TX interrupt.
|
|
minItems: 1
|
|
maxItems: 2
|
|
|
|
samsung,uart-fifosize:
|
|
description: The fifo size supported by the UART channel.
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
enum: [16, 64, 256]
|
|
|
|
required:
|
|
- compatible
|
|
- clocks
|
|
- clock-names
|
|
- interrupts
|
|
- reg
|
|
|
|
allOf:
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
enum:
|
|
- samsung,s3c2410-uart
|
|
- samsung,s5pv210-uart
|
|
then:
|
|
properties:
|
|
clocks:
|
|
minItems: 2
|
|
maxItems: 3
|
|
clock-names:
|
|
minItems: 2
|
|
maxItems: 3
|
|
items:
|
|
- const: uart
|
|
- pattern: '^clk_uart_baud[0-1]$'
|
|
- pattern: '^clk_uart_baud[0-1]$'
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
enum:
|
|
- samsung,exynos4210-uart
|
|
then:
|
|
properties:
|
|
clocks:
|
|
minItems: 2
|
|
maxItems: 2
|
|
clock-names:
|
|
minItems: 2
|
|
maxItems: 2
|
|
items:
|
|
- const: uart
|
|
- const: clk_uart_baud0
|
|
|
|
examples:
|
|
- |
|
|
#include <dt-bindings/clock/samsung,s3c64xx-clock.h>
|
|
|
|
uart0: serial@7f005000 {
|
|
compatible = "samsung,s3c6400-uart";
|
|
reg = <0x7f005000 0x100>;
|
|
interrupt-parent = <&vic1>;
|
|
interrupts = <5>;
|
|
clock-names = "uart", "clk_uart_baud2",
|
|
"clk_uart_baud3";
|
|
clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
|
|
<&clocks SCLK_UART>;
|
|
samsung,uart-fifosize = <16>;
|
|
};
|