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

dt-bindings: serial: Convert Samsung UART bindings to json-schema

Convert Samsung S3C/S5P/Exynos Serial/UART bindings to DT schema format
using json-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Rob Herring
6a24490f 23c091d9

+119 -59
+1 -1
Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.txt
··· 18 18 UART, SLIMBUS, PCM, I2S, DMAC, Timers 0...4, VIC, WDT 0...1 devices. 19 19 20 20 Bindings of the sub-nodes are described in: 21 - ../serial/samsung_uart.txt 21 + ../serial/samsung_uart.yaml 22 22 ../sound/samsung-i2s.txt 23 23 ../dma/arm-pl330.txt 24 24
-58
Documentation/devicetree/bindings/serial/samsung_uart.txt
··· 1 - * Samsung's UART Controller 2 - 3 - The Samsung's UART controller is used for interfacing SoC with serial 4 - communicaion devices. 5 - 6 - Required properties: 7 - - compatible: should be one of following: 8 - - "samsung,exynos4210-uart" - Exynos4210 SoC, 9 - - "samsung,s3c2410-uart" - compatible with ports present on S3C2410 SoC, 10 - - "samsung,s3c2412-uart" - compatible with ports present on S3C2412 SoC, 11 - - "samsung,s3c2440-uart" - compatible with ports present on S3C2440 SoC, 12 - - "samsung,s3c6400-uart" - compatible with ports present on S3C6400 SoC, 13 - - "samsung,s5pv210-uart" - compatible with ports present on S5PV210 SoC. 14 - 15 - - reg: base physical address of the controller and length of memory mapped 16 - region. 17 - 18 - - interrupts: a single interrupt signal to SoC interrupt controller, 19 - according to interrupt bindings documentation [1]. 20 - 21 - - clock-names: input names of clocks used by the controller: 22 - - "uart" - controller bus clock, 23 - - "clk_uart_baudN" - Nth baud base clock input (N = 0, 1, ...), 24 - according to SoC User's Manual (only N = 0 is allowedfor SoCs without 25 - internal baud clock mux). 26 - - clocks: phandles and specifiers for all clocks specified in "clock-names" 27 - property, in the same order, according to clock bindings documentation [2]. 28 - 29 - [1] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 30 - [2] Documentation/devicetree/bindings/clock/clock-bindings.txt 31 - 32 - Optional properties: 33 - - samsung,uart-fifosize: The fifo size supported by the UART channel 34 - 35 - Note: Each Samsung UART should have an alias correctly numbered in the 36 - "aliases" node, according to serialN format, where N is the port number 37 - (non-negative decimal integer) as specified by User's Manual of respective 38 - SoC. 39 - 40 - Example: 41 - aliases { 42 - serial0 = &uart0; 43 - serial1 = &uart1; 44 - serial2 = &uart2; 45 - }; 46 - 47 - Example: 48 - uart1: serial@7f005400 { 49 - compatible = "samsung,s3c6400-uart"; 50 - reg = <0x7f005400 0x100>; 51 - interrupt-parent = <&vic1>; 52 - interrupts = <6>; 53 - clock-names = "uart", "clk_uart_baud2", 54 - "clk_uart_baud3"; 55 - clocks = <&clocks PCLK_UART1>, <&clocks PCLK_UART1>, 56 - <&clocks SCLK_UART>; 57 - samsung,uart-fifosize = <16>; 58 - };
+118
Documentation/devicetree/bindings/serial/samsung_uart.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/serial/samsung_uart.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S3C, S5P and Exynos SoC UART Controller 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzk@kernel.org> 11 + - Greg Kroah-Hartman <gregkh@linuxfoundation.org> 12 + 13 + description: |+ 14 + Each Samsung UART should have an alias correctly numbered in the "aliases" 15 + node, according to serialN format, where N is the port number (non-negative 16 + decimal integer) as specified by User's Manual of respective SoC. 17 + 18 + properties: 19 + compatible: 20 + items: 21 + - enum: 22 + - samsung,s3c2410-uart 23 + - samsung,s3c2412-uart 24 + - samsung,s3c2440-uart 25 + - samsung,s3c6400-uart 26 + - samsung,s5pv210-uart 27 + - samsung,exynos4210-uart 28 + 29 + reg: 30 + maxItems: 1 31 + 32 + clocks: 33 + minItems: 2 34 + maxItems: 5 35 + 36 + clock-names: 37 + description: N = 0 is allowed for SoCs without internal baud clock mux. 38 + minItems: 2 39 + maxItems: 5 40 + items: 41 + - const: uart 42 + - pattern: '^clk_uart_baud[0-3]$' 43 + - pattern: '^clk_uart_baud[0-3]$' 44 + - pattern: '^clk_uart_baud[0-3]$' 45 + - pattern: '^clk_uart_baud[0-3]$' 46 + 47 + interrupts: 48 + description: RX interrupt and optionally TX interrupt. 49 + minItems: 1 50 + maxItems: 2 51 + 52 + samsung,uart-fifosize: 53 + description: The fifo size supported by the UART channel. 54 + allOf: 55 + - $ref: /schemas/types.yaml#/definitions/uint32 56 + - enum: [16, 64, 256] 57 + 58 + required: 59 + - compatible 60 + - clocks 61 + - clock-names 62 + - interrupts 63 + - reg 64 + 65 + allOf: 66 + - if: 67 + properties: 68 + compatible: 69 + contains: 70 + enum: 71 + - samsung,s3c2410-uart 72 + - samsung,s5pv210-uart 73 + then: 74 + properties: 75 + clocks: 76 + minItems: 2 77 + maxItems: 3 78 + clock-names: 79 + minItems: 2 80 + maxItems: 3 81 + items: 82 + - const: uart 83 + - pattern: '^clk_uart_baud[0-1]$' 84 + - pattern: '^clk_uart_baud[0-1]$' 85 + 86 + - if: 87 + properties: 88 + compatible: 89 + contains: 90 + enum: 91 + - samsung,exynos4210-uart 92 + then: 93 + properties: 94 + clocks: 95 + minItems: 2 96 + maxItems: 2 97 + clock-names: 98 + minItems: 2 99 + maxItems: 2 100 + items: 101 + - const: uart 102 + - const: clk_uart_baud0 103 + 104 + examples: 105 + - | 106 + #include <dt-bindings/clock/samsung,s3c64xx-clock.h> 107 + 108 + uart0: serial@7f005000 { 109 + compatible = "samsung,s3c6400-uart"; 110 + reg = <0x7f005000 0x100>; 111 + interrupt-parent = <&vic1>; 112 + interrupts = <5>; 113 + clock-names = "uart", "clk_uart_baud2", 114 + "clk_uart_baud3"; 115 + clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>, 116 + <&clocks SCLK_UART>; 117 + samsung,uart-fifosize = <16>; 118 + };