Merge tag 'x86_seves_fixes_for_v5.10_rc1' of git://git.kernel.org/pub/scm/linux/kerne...
[linux-2.6-microblaze.git] / 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   reg-io-width:
33     description: |
34       The size (in bytes) of the IO accesses that should be performed
35       on the device.
36     $ref: /schemas/types.yaml#/definitions/uint32
37     enum: [ 1, 4 ]
38
39   clocks:
40     minItems: 2
41     maxItems: 5
42
43   clock-names:
44     description: N = 0 is allowed for SoCs without internal baud clock mux.
45     minItems: 2
46     maxItems: 5
47     items:
48       - const: uart
49       - pattern: '^clk_uart_baud[0-3]$'
50       - pattern: '^clk_uart_baud[0-3]$'
51       - pattern: '^clk_uart_baud[0-3]$'
52       - pattern: '^clk_uart_baud[0-3]$'
53
54   interrupts:
55     description: RX interrupt and optionally TX interrupt.
56     minItems: 1
57     maxItems: 2
58
59   samsung,uart-fifosize:
60     description: The fifo size supported by the UART channel.
61     $ref: /schemas/types.yaml#/definitions/uint32
62     enum: [16, 64, 256]
63
64 required:
65   - compatible
66   - clocks
67   - clock-names
68   - interrupts
69   - reg
70
71 additionalProperties: false
72
73 allOf:
74   - if:
75       properties:
76         compatible:
77           contains:
78             enum:
79               - samsung,s3c2410-uart
80               - samsung,s5pv210-uart
81     then:
82       properties:
83         clocks:
84           minItems: 2
85           maxItems: 3
86         clock-names:
87           minItems: 2
88           maxItems: 3
89           items:
90             - const: uart
91             - pattern: '^clk_uart_baud[0-1]$'
92             - pattern: '^clk_uart_baud[0-1]$'
93
94   - if:
95       properties:
96         compatible:
97           contains:
98             enum:
99               - samsung,exynos4210-uart
100     then:
101       properties:
102         clocks:
103           minItems: 2
104           maxItems: 2
105         clock-names:
106           minItems: 2
107           maxItems: 2
108           items:
109             - const: uart
110             - const: clk_uart_baud0
111
112 examples:
113   - |
114     #include <dt-bindings/clock/samsung,s3c64xx-clock.h>
115
116     uart0: serial@7f005000 {
117         compatible = "samsung,s3c6400-uart";
118         reg = <0x7f005000 0x100>;
119         interrupt-parent = <&vic1>;
120         interrupts = <5>;
121         clock-names = "uart", "clk_uart_baud2",
122                       "clk_uart_baud3";
123         clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
124                  <&clocks SCLK_UART>;
125         samsung,uart-fifosize = <16>;
126     };