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

dt-bindings: serial: Convert sprd-uart to json-schema

Convert the sprd-uart binding to DT schema using json-schema.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
[robh: dual license GPL/BSD]
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Chunyan Zhang and committed by
Rob Herring
12e72714 f46e47f8

+71 -32
-32
Documentation/devicetree/bindings/serial/sprd-uart.txt
··· 1 - * Spreadtrum serial UART 2 - 3 - Required properties: 4 - - compatible: must be one of: 5 - * "sprd,sc9836-uart" 6 - * "sprd,sc9860-uart", "sprd,sc9836-uart" 7 - 8 - - reg: offset and length of the register set for the device 9 - - interrupts: exactly one interrupt specifier 10 - - clock-names: Should contain following entries: 11 - "enable" for UART module enable clock, 12 - "uart" for UART clock, 13 - "source" for UART source (parent) clock. 14 - - clocks: Should contain a clock specifier for each entry in clock-names. 15 - UART clock and source clock are optional properties, but enable clock 16 - is required. 17 - 18 - Optional properties: 19 - - dma-names: Should contain "rx" for receive and "tx" for transmit channels. 20 - - dmas: A list of dma specifiers, one for each entry in dma-names. 21 - 22 - Example: 23 - uart0: serial@0 { 24 - compatible = "sprd,sc9860-uart", 25 - "sprd,sc9836-uart"; 26 - reg = <0x0 0x100>; 27 - interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 28 - dma-names = "rx", "tx"; 29 - dmas = <&ap_dma 19>, <&ap_dma 20>; 30 - clock-names = "enable", "uart", "source"; 31 - clocks = <&clk_ap_apb_gates 9>, <&clk_uart0>, <&ext_26m>; 32 - };
+71
Documentation/devicetree/bindings/serial/sprd-uart.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + # Copyright 2019 Unisoc Inc. 3 + %YAML 1.2 4 + --- 5 + $id: "http://devicetree.org/schemas/serial/sprd-uart.yaml#" 6 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 7 + 8 + title: Spreadtrum serial UART 9 + 10 + maintainers: 11 + - Orson Zhai <orsonzhai@gmail.com> 12 + - Baolin Wang <baolin.wang7@gmail.com> 13 + - Chunyan Zhang <zhang.lyra@gmail.com> 14 + 15 + properties: 16 + compatible: 17 + oneOf: 18 + - items: 19 + - enum: 20 + - sprd,sc9860-uart 21 + - const: sprd,sc9836-uart 22 + - const: sprd,sc9836-uart 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + interrupts: 28 + maxItems: 1 29 + 30 + clocks: 31 + minItems: 1 32 + maxItems: 3 33 + 34 + clock-names: 35 + description: | 36 + "enable" for UART module enable clock, "uart" for UART clock, "source" 37 + for UART source (parent) clock. 38 + items: 39 + - const: enable 40 + - const: uart 41 + - const: source 42 + 43 + dmas: 44 + minItems: 1 45 + maxItems: 2 46 + 47 + dma-names: 48 + minItems: 1 49 + items: 50 + - const: rx 51 + - const: tx 52 + 53 + required: 54 + - compatible 55 + - reg 56 + - interrupts 57 + 58 + examples: 59 + - | 60 + #include <dt-bindings/interrupt-controller/arm-gic.h> 61 + serial@0 { 62 + compatible = "sprd,sc9860-uart", "sprd,sc9836-uart"; 63 + reg = <0x0 0x100>; 64 + interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 65 + dma-names = "rx", "tx"; 66 + dmas = <&ap_dma 19>, <&ap_dma 20>; 67 + clock-names = "enable", "uart", "source"; 68 + clocks = <&clk_ap_apb_gates 9>, <&clk_uart0>, <&ext_26m>; 69 + }; 70 + 71 + ...