xref: /freebsd/sys/contrib/device-tree/Bindings/serial/samsung_uart.yaml (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/serial/samsung_uart.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
72eb4d8dcSEmmanuel Vadottitle: Samsung S3C, S5P, Exynos, and S5L (Apple SoC) SoC UART Controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Krzysztof Kozlowski <krzk@kernel.org>
11c66ec88fSEmmanuel Vadot  - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotdescription: |+
14c66ec88fSEmmanuel Vadot  Each Samsung UART should have an alias correctly numbered in the "aliases"
15c66ec88fSEmmanuel Vadot  node, according to serialN format, where N is the port number (non-negative
16c66ec88fSEmmanuel Vadot  decimal integer) as specified by User's Manual of respective SoC.
17c66ec88fSEmmanuel Vadot
18c66ec88fSEmmanuel Vadotproperties:
19c66ec88fSEmmanuel Vadot  compatible:
20c66ec88fSEmmanuel Vadot    items:
21c66ec88fSEmmanuel Vadot      - enum:
222eb4d8dcSEmmanuel Vadot          - apple,s5l-uart
23c66ec88fSEmmanuel Vadot          - samsung,s3c2410-uart
24c66ec88fSEmmanuel Vadot          - samsung,s3c2412-uart
25c66ec88fSEmmanuel Vadot          - samsung,s3c2440-uart
26c66ec88fSEmmanuel Vadot          - samsung,s3c6400-uart
27c66ec88fSEmmanuel Vadot          - samsung,s5pv210-uart
28c66ec88fSEmmanuel Vadot          - samsung,exynos4210-uart
29c66ec88fSEmmanuel Vadot
30c66ec88fSEmmanuel Vadot  reg:
31c66ec88fSEmmanuel Vadot    maxItems: 1
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot  reg-io-width:
34c66ec88fSEmmanuel Vadot    description: |
35c66ec88fSEmmanuel Vadot      The size (in bytes) of the IO accesses that should be performed
36c66ec88fSEmmanuel Vadot      on the device.
37c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
38c66ec88fSEmmanuel Vadot    enum: [ 1, 4 ]
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel Vadot  clocks:
41c66ec88fSEmmanuel Vadot    minItems: 2
42c66ec88fSEmmanuel Vadot    maxItems: 5
43c66ec88fSEmmanuel Vadot
44c66ec88fSEmmanuel Vadot  clock-names:
45c66ec88fSEmmanuel Vadot    description: N = 0 is allowed for SoCs without internal baud clock mux.
46c66ec88fSEmmanuel Vadot    minItems: 2
47c66ec88fSEmmanuel Vadot    items:
48c66ec88fSEmmanuel Vadot      - const: uart
49c66ec88fSEmmanuel Vadot      - pattern: '^clk_uart_baud[0-3]$'
50c66ec88fSEmmanuel Vadot      - pattern: '^clk_uart_baud[0-3]$'
51c66ec88fSEmmanuel Vadot      - pattern: '^clk_uart_baud[0-3]$'
52c66ec88fSEmmanuel Vadot      - pattern: '^clk_uart_baud[0-3]$'
53c66ec88fSEmmanuel Vadot
542eb4d8dcSEmmanuel Vadot  dmas:
552eb4d8dcSEmmanuel Vadot    items:
562eb4d8dcSEmmanuel Vadot      - description: DMA controller phandle and request line for RX
572eb4d8dcSEmmanuel Vadot      - description: DMA controller phandle and request line for TX
582eb4d8dcSEmmanuel Vadot
592eb4d8dcSEmmanuel Vadot  dma-names:
602eb4d8dcSEmmanuel Vadot    items:
612eb4d8dcSEmmanuel Vadot      - const: rx
622eb4d8dcSEmmanuel Vadot      - const: tx
632eb4d8dcSEmmanuel Vadot
64c66ec88fSEmmanuel Vadot  interrupts:
65c66ec88fSEmmanuel Vadot    description: RX interrupt and optionally TX interrupt.
66c66ec88fSEmmanuel Vadot    minItems: 1
67c66ec88fSEmmanuel Vadot    maxItems: 2
68c66ec88fSEmmanuel Vadot
69c66ec88fSEmmanuel Vadot  samsung,uart-fifosize:
70c66ec88fSEmmanuel Vadot    description: The fifo size supported by the UART channel.
71c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
72c66ec88fSEmmanuel Vadot    enum: [16, 64, 256]
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadotrequired:
75c66ec88fSEmmanuel Vadot  - compatible
76c66ec88fSEmmanuel Vadot  - clocks
77c66ec88fSEmmanuel Vadot  - clock-names
78c66ec88fSEmmanuel Vadot  - interrupts
79c66ec88fSEmmanuel Vadot  - reg
80c66ec88fSEmmanuel Vadot
812eb4d8dcSEmmanuel VadotunevaluatedProperties: false
826be33864SEmmanuel Vadot
83c66ec88fSEmmanuel VadotallOf:
84*5956d97fSEmmanuel Vadot  - $ref: serial.yaml#
852eb4d8dcSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot  - if:
87c66ec88fSEmmanuel Vadot      properties:
88c66ec88fSEmmanuel Vadot        compatible:
89c66ec88fSEmmanuel Vadot          contains:
90c66ec88fSEmmanuel Vadot            enum:
91c66ec88fSEmmanuel Vadot              - samsung,s3c2410-uart
92c66ec88fSEmmanuel Vadot              - samsung,s5pv210-uart
93c66ec88fSEmmanuel Vadot    then:
94c66ec88fSEmmanuel Vadot      properties:
95c66ec88fSEmmanuel Vadot        clocks:
96c66ec88fSEmmanuel Vadot          minItems: 2
97c66ec88fSEmmanuel Vadot          maxItems: 3
98c66ec88fSEmmanuel Vadot        clock-names:
99c66ec88fSEmmanuel Vadot          minItems: 2
100c66ec88fSEmmanuel Vadot          maxItems: 3
101c66ec88fSEmmanuel Vadot          items:
102c66ec88fSEmmanuel Vadot            - const: uart
103c66ec88fSEmmanuel Vadot            - pattern: '^clk_uart_baud[0-1]$'
104c66ec88fSEmmanuel Vadot            - pattern: '^clk_uart_baud[0-1]$'
105c66ec88fSEmmanuel Vadot
106c66ec88fSEmmanuel Vadot  - if:
107c66ec88fSEmmanuel Vadot      properties:
108c66ec88fSEmmanuel Vadot        compatible:
109c66ec88fSEmmanuel Vadot          contains:
110c66ec88fSEmmanuel Vadot            enum:
1112eb4d8dcSEmmanuel Vadot              - apple,s5l-uart
112c66ec88fSEmmanuel Vadot              - samsung,exynos4210-uart
113c66ec88fSEmmanuel Vadot    then:
114c66ec88fSEmmanuel Vadot      properties:
115c66ec88fSEmmanuel Vadot        clocks:
116c66ec88fSEmmanuel Vadot          minItems: 2
117c66ec88fSEmmanuel Vadot          maxItems: 2
118c66ec88fSEmmanuel Vadot        clock-names:
119c66ec88fSEmmanuel Vadot          minItems: 2
120c66ec88fSEmmanuel Vadot          maxItems: 2
121c66ec88fSEmmanuel Vadot          items:
122c66ec88fSEmmanuel Vadot            - const: uart
123c66ec88fSEmmanuel Vadot            - const: clk_uart_baud0
124c66ec88fSEmmanuel Vadot
125c66ec88fSEmmanuel Vadotexamples:
126c66ec88fSEmmanuel Vadot  - |
127c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/samsung,s3c64xx-clock.h>
128c66ec88fSEmmanuel Vadot
129c66ec88fSEmmanuel Vadot    uart0: serial@7f005000 {
130c66ec88fSEmmanuel Vadot        compatible = "samsung,s3c6400-uart";
131c66ec88fSEmmanuel Vadot        reg = <0x7f005000 0x100>;
132c66ec88fSEmmanuel Vadot        interrupt-parent = <&vic1>;
133c66ec88fSEmmanuel Vadot        interrupts = <5>;
134c66ec88fSEmmanuel Vadot        clock-names = "uart", "clk_uart_baud2",
135c66ec88fSEmmanuel Vadot                      "clk_uart_baud3";
136c66ec88fSEmmanuel Vadot        clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
137c66ec88fSEmmanuel Vadot                 <&clocks SCLK_UART>;
138c66ec88fSEmmanuel Vadot        samsung,uart-fifosize = <16>;
139c66ec88fSEmmanuel Vadot    };
140