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
7title: Samsung S3C, S5P and Exynos SoC UART Controller
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11  - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12
13description: |+
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
18properties:
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    $ref: /schemas/types.yaml#/definitions/uint32
55    enum: [16, 64, 256]
56
57required:
58  - compatible
59  - clocks
60  - clock-names
61  - interrupts
62  - reg
63
64allOf:
65  - if:
66      properties:
67        compatible:
68          contains:
69            enum:
70              - samsung,s3c2410-uart
71              - samsung,s5pv210-uart
72    then:
73      properties:
74        clocks:
75          minItems: 2
76          maxItems: 3
77        clock-names:
78          minItems: 2
79          maxItems: 3
80          items:
81            - const: uart
82            - pattern: '^clk_uart_baud[0-1]$'
83            - pattern: '^clk_uart_baud[0-1]$'
84
85  - if:
86      properties:
87        compatible:
88          contains:
89            enum:
90              - samsung,exynos4210-uart
91    then:
92      properties:
93        clocks:
94          minItems: 2
95          maxItems: 2
96        clock-names:
97          minItems: 2
98          maxItems: 2
99          items:
100            - const: uart
101            - const: clk_uart_baud0
102
103examples:
104  - |
105    #include <dt-bindings/clock/samsung,s3c64xx-clock.h>
106
107    uart0: serial@7f005000 {
108        compatible = "samsung,s3c6400-uart";
109        reg = <0x7f005000 0x100>;
110        interrupt-parent = <&vic1>;
111        interrupts = <5>;
112        clock-names = "uart", "clk_uart_baud2",
113                      "clk_uart_baud3";
114        clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
115                 <&clocks SCLK_UART>;
116        samsung,uart-fifosize = <16>;
117    };
118