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