xref: /freebsd/sys/contrib/device-tree/Bindings/serial/samsung_uart.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
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:
207ef62cebSEmmanuel Vadot    oneOf:
21c66ec88fSEmmanuel Vadot      - enum:
222eb4d8dcSEmmanuel Vadot          - apple,s5l-uart
23c9ccf3a3SEmmanuel Vadot          - axis,artpec8-uart
24*8d13bc63SEmmanuel Vadot          - google,gs101-uart
25c66ec88fSEmmanuel Vadot          - samsung,s3c6400-uart
26c66ec88fSEmmanuel Vadot          - samsung,s5pv210-uart
27c66ec88fSEmmanuel Vadot          - samsung,exynos4210-uart
28c9ccf3a3SEmmanuel Vadot          - samsung,exynos5433-uart
298cc087a1SEmmanuel Vadot          - samsung,exynos850-uart
30*8d13bc63SEmmanuel Vadot      - items:
31*8d13bc63SEmmanuel Vadot          - enum:
32*8d13bc63SEmmanuel Vadot              - samsung,exynos7-uart
33*8d13bc63SEmmanuel Vadot              - tesla,fsd-uart
34*8d13bc63SEmmanuel Vadot          - const: samsung,exynos4210-uart
35*8d13bc63SEmmanuel Vadot      - items:
36*8d13bc63SEmmanuel Vadot          - enum:
37*8d13bc63SEmmanuel Vadot              - samsung,exynos7885-uart
38*8d13bc63SEmmanuel Vadot          - const: samsung,exynos5433-uart
39*8d13bc63SEmmanuel Vadot      - items:
40*8d13bc63SEmmanuel Vadot          - enum:
41*8d13bc63SEmmanuel Vadot              - samsung,exynosautov9-uart
42*8d13bc63SEmmanuel Vadot              - samsung,exynosautov920-uart
43*8d13bc63SEmmanuel Vadot          - const: samsung,exynos850-uart
44c66ec88fSEmmanuel Vadot
45c66ec88fSEmmanuel Vadot  reg:
46c66ec88fSEmmanuel Vadot    maxItems: 1
47c66ec88fSEmmanuel Vadot
48c66ec88fSEmmanuel Vadot  reg-io-width:
49c66ec88fSEmmanuel Vadot    description: |
50c66ec88fSEmmanuel Vadot      The size (in bytes) of the IO accesses that should be performed
51c66ec88fSEmmanuel Vadot      on the device.
52c66ec88fSEmmanuel Vadot    enum: [ 1, 4 ]
53c66ec88fSEmmanuel Vadot
54c66ec88fSEmmanuel Vadot  clocks:
55c66ec88fSEmmanuel Vadot    minItems: 2
56c66ec88fSEmmanuel Vadot    maxItems: 5
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel Vadot  clock-names:
59c66ec88fSEmmanuel Vadot    description: N = 0 is allowed for SoCs without internal baud clock mux.
60c66ec88fSEmmanuel Vadot    minItems: 2
61c66ec88fSEmmanuel Vadot    items:
62c66ec88fSEmmanuel Vadot      - const: uart
63c66ec88fSEmmanuel Vadot      - pattern: '^clk_uart_baud[0-3]$'
64c66ec88fSEmmanuel Vadot      - pattern: '^clk_uart_baud[0-3]$'
65c66ec88fSEmmanuel Vadot      - pattern: '^clk_uart_baud[0-3]$'
66c66ec88fSEmmanuel Vadot      - pattern: '^clk_uart_baud[0-3]$'
67c66ec88fSEmmanuel Vadot
682eb4d8dcSEmmanuel Vadot  dmas:
692eb4d8dcSEmmanuel Vadot    items:
702eb4d8dcSEmmanuel Vadot      - description: DMA controller phandle and request line for RX
712eb4d8dcSEmmanuel Vadot      - description: DMA controller phandle and request line for TX
722eb4d8dcSEmmanuel Vadot
732eb4d8dcSEmmanuel Vadot  dma-names:
742eb4d8dcSEmmanuel Vadot    items:
752eb4d8dcSEmmanuel Vadot      - const: rx
762eb4d8dcSEmmanuel Vadot      - const: tx
772eb4d8dcSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot  interrupts:
79c66ec88fSEmmanuel Vadot    description: RX interrupt and optionally TX interrupt.
80c66ec88fSEmmanuel Vadot    minItems: 1
81c66ec88fSEmmanuel Vadot    maxItems: 2
82c66ec88fSEmmanuel Vadot
837ef62cebSEmmanuel Vadot  power-domains:
847ef62cebSEmmanuel Vadot    maxItems: 1
857ef62cebSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot  samsung,uart-fifosize:
87c66ec88fSEmmanuel Vadot    description: The fifo size supported by the UART channel.
88c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
89c66ec88fSEmmanuel Vadot    enum: [16, 64, 256]
90c66ec88fSEmmanuel Vadot
91c66ec88fSEmmanuel Vadotrequired:
92c66ec88fSEmmanuel Vadot  - compatible
93c66ec88fSEmmanuel Vadot  - clocks
94c66ec88fSEmmanuel Vadot  - clock-names
95c66ec88fSEmmanuel Vadot  - interrupts
96c66ec88fSEmmanuel Vadot  - reg
97c66ec88fSEmmanuel Vadot
98c66ec88fSEmmanuel VadotallOf:
995956d97fSEmmanuel Vadot  - $ref: serial.yaml#
1002eb4d8dcSEmmanuel Vadot
101c66ec88fSEmmanuel Vadot  - if:
102c66ec88fSEmmanuel Vadot      properties:
103c66ec88fSEmmanuel Vadot        compatible:
104c66ec88fSEmmanuel Vadot          contains:
105c66ec88fSEmmanuel Vadot            enum:
106c66ec88fSEmmanuel Vadot              - samsung,s5pv210-uart
107c66ec88fSEmmanuel Vadot    then:
108c66ec88fSEmmanuel Vadot      properties:
109c66ec88fSEmmanuel Vadot        clocks:
110c66ec88fSEmmanuel Vadot          minItems: 2
111c66ec88fSEmmanuel Vadot          maxItems: 3
112c66ec88fSEmmanuel Vadot        clock-names:
113c66ec88fSEmmanuel Vadot          minItems: 2
114c66ec88fSEmmanuel Vadot          items:
115c66ec88fSEmmanuel Vadot            - const: uart
116c66ec88fSEmmanuel Vadot            - pattern: '^clk_uart_baud[0-1]$'
117c66ec88fSEmmanuel Vadot            - pattern: '^clk_uart_baud[0-1]$'
118c66ec88fSEmmanuel Vadot
119c66ec88fSEmmanuel Vadot  - if:
120c66ec88fSEmmanuel Vadot      properties:
121c66ec88fSEmmanuel Vadot        compatible:
122c66ec88fSEmmanuel Vadot          contains:
123c66ec88fSEmmanuel Vadot            enum:
1242eb4d8dcSEmmanuel Vadot              - apple,s5l-uart
125c9ccf3a3SEmmanuel Vadot              - axis,artpec8-uart
126c66ec88fSEmmanuel Vadot              - samsung,exynos4210-uart
127c9ccf3a3SEmmanuel Vadot              - samsung,exynos5433-uart
128c66ec88fSEmmanuel Vadot    then:
129c66ec88fSEmmanuel Vadot      properties:
130c66ec88fSEmmanuel Vadot        clocks:
131c66ec88fSEmmanuel Vadot          maxItems: 2
132c66ec88fSEmmanuel Vadot        clock-names:
133c66ec88fSEmmanuel Vadot          items:
134c66ec88fSEmmanuel Vadot            - const: uart
135c66ec88fSEmmanuel Vadot            - const: clk_uart_baud0
136c66ec88fSEmmanuel Vadot
137*8d13bc63SEmmanuel Vadot  - if:
138*8d13bc63SEmmanuel Vadot      properties:
139*8d13bc63SEmmanuel Vadot        compatible:
140*8d13bc63SEmmanuel Vadot          contains:
141*8d13bc63SEmmanuel Vadot            enum:
142*8d13bc63SEmmanuel Vadot              - google,gs101-uart
143*8d13bc63SEmmanuel Vadot    then:
144*8d13bc63SEmmanuel Vadot      required:
145*8d13bc63SEmmanuel Vadot        - samsung,uart-fifosize
146*8d13bc63SEmmanuel Vadot
14784943d6fSEmmanuel VadotunevaluatedProperties: false
14884943d6fSEmmanuel Vadot
149c66ec88fSEmmanuel Vadotexamples:
150c66ec88fSEmmanuel Vadot  - |
151c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/samsung,s3c64xx-clock.h>
152c66ec88fSEmmanuel Vadot
153c66ec88fSEmmanuel Vadot    uart0: serial@7f005000 {
154c66ec88fSEmmanuel Vadot        compatible = "samsung,s3c6400-uart";
155c66ec88fSEmmanuel Vadot        reg = <0x7f005000 0x100>;
156c66ec88fSEmmanuel Vadot        interrupt-parent = <&vic1>;
157c66ec88fSEmmanuel Vadot        interrupts = <5>;
158c66ec88fSEmmanuel Vadot        clock-names = "uart", "clk_uart_baud2",
159c66ec88fSEmmanuel Vadot                      "clk_uart_baud3";
160c66ec88fSEmmanuel Vadot        clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
161c66ec88fSEmmanuel Vadot                 <&clocks SCLK_UART>;
162c66ec88fSEmmanuel Vadot        samsung,uart-fifosize = <16>;
163c66ec88fSEmmanuel Vadot    };
164