16a24490fSKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0
26a24490fSKrzysztof Kozlowski%YAML 1.2
36a24490fSKrzysztof Kozlowski---
46a24490fSKrzysztof Kozlowski$id: http://devicetree.org/schemas/serial/samsung_uart.yaml#
56a24490fSKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
66a24490fSKrzysztof Kozlowski
7b8466833SHector Martintitle: Samsung S3C, S5P, Exynos, and S5L (Apple SoC) SoC UART Controller
86a24490fSKrzysztof Kozlowski
96a24490fSKrzysztof Kozlowskimaintainers:
106a24490fSKrzysztof Kozlowski  - Krzysztof Kozlowski <krzk@kernel.org>
116a24490fSKrzysztof Kozlowski  - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
126a24490fSKrzysztof Kozlowski
136a24490fSKrzysztof Kozlowskidescription: |+
146a24490fSKrzysztof Kozlowski  Each Samsung UART should have an alias correctly numbered in the "aliases"
156a24490fSKrzysztof Kozlowski  node, according to serialN format, where N is the port number (non-negative
166a24490fSKrzysztof Kozlowski  decimal integer) as specified by User's Manual of respective SoC.
176a24490fSKrzysztof Kozlowski
186a24490fSKrzysztof Kozlowskiproperties:
196a24490fSKrzysztof Kozlowski  compatible:
206a24490fSKrzysztof Kozlowski    items:
216a24490fSKrzysztof Kozlowski      - enum:
22b8466833SHector Martin          - apple,s5l-uart
236a24490fSKrzysztof Kozlowski          - samsung,s3c2410-uart
246a24490fSKrzysztof Kozlowski          - samsung,s3c2412-uart
256a24490fSKrzysztof Kozlowski          - samsung,s3c2440-uart
266a24490fSKrzysztof Kozlowski          - samsung,s3c6400-uart
276a24490fSKrzysztof Kozlowski          - samsung,s5pv210-uart
286a24490fSKrzysztof Kozlowski          - samsung,exynos4210-uart
296a24490fSKrzysztof Kozlowski
306a24490fSKrzysztof Kozlowski  reg:
316a24490fSKrzysztof Kozlowski    maxItems: 1
326a24490fSKrzysztof Kozlowski
337ad3bee4SHyunki Koo  reg-io-width:
347ad3bee4SHyunki Koo    description: |
357ad3bee4SHyunki Koo      The size (in bytes) of the IO accesses that should be performed
367ad3bee4SHyunki Koo      on the device.
37086e9074SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
38086e9074SRob Herring    enum: [ 1, 4 ]
397ad3bee4SHyunki Koo
406a24490fSKrzysztof Kozlowski  clocks:
416a24490fSKrzysztof Kozlowski    minItems: 2
426a24490fSKrzysztof Kozlowski    maxItems: 5
436a24490fSKrzysztof Kozlowski
446a24490fSKrzysztof Kozlowski  clock-names:
456a24490fSKrzysztof Kozlowski    description: N = 0 is allowed for SoCs without internal baud clock mux.
466a24490fSKrzysztof Kozlowski    minItems: 2
476a24490fSKrzysztof Kozlowski    maxItems: 5
486a24490fSKrzysztof Kozlowski    items:
496a24490fSKrzysztof Kozlowski      - const: uart
506a24490fSKrzysztof Kozlowski      - pattern: '^clk_uart_baud[0-3]$'
516a24490fSKrzysztof Kozlowski      - pattern: '^clk_uart_baud[0-3]$'
526a24490fSKrzysztof Kozlowski      - pattern: '^clk_uart_baud[0-3]$'
536a24490fSKrzysztof Kozlowski      - pattern: '^clk_uart_baud[0-3]$'
546a24490fSKrzysztof Kozlowski
55*71b25f4dSKrzysztof Kozlowski  dmas:
56*71b25f4dSKrzysztof Kozlowski    items:
57*71b25f4dSKrzysztof Kozlowski      - description: DMA controller phandle and request line for RX
58*71b25f4dSKrzysztof Kozlowski      - description: DMA controller phandle and request line for TX
59*71b25f4dSKrzysztof Kozlowski
60*71b25f4dSKrzysztof Kozlowski  dma-names:
61*71b25f4dSKrzysztof Kozlowski    items:
62*71b25f4dSKrzysztof Kozlowski      - const: rx
63*71b25f4dSKrzysztof Kozlowski      - const: tx
64*71b25f4dSKrzysztof Kozlowski
656a24490fSKrzysztof Kozlowski  interrupts:
666a24490fSKrzysztof Kozlowski    description: RX interrupt and optionally TX interrupt.
676a24490fSKrzysztof Kozlowski    minItems: 1
686a24490fSKrzysztof Kozlowski    maxItems: 2
696a24490fSKrzysztof Kozlowski
706a24490fSKrzysztof Kozlowski  samsung,uart-fifosize:
716a24490fSKrzysztof Kozlowski    description: The fifo size supported by the UART channel.
723d21a460SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
733d21a460SRob Herring    enum: [16, 64, 256]
746a24490fSKrzysztof Kozlowski
756a24490fSKrzysztof Kozlowskirequired:
766a24490fSKrzysztof Kozlowski  - compatible
776a24490fSKrzysztof Kozlowski  - clocks
786a24490fSKrzysztof Kozlowski  - clock-names
796a24490fSKrzysztof Kozlowski  - interrupts
806a24490fSKrzysztof Kozlowski  - reg
816a24490fSKrzysztof Kozlowski
825be478f9SRob HerringadditionalProperties: false
835be478f9SRob Herring
846a24490fSKrzysztof KozlowskiallOf:
856a24490fSKrzysztof Kozlowski  - if:
866a24490fSKrzysztof Kozlowski      properties:
876a24490fSKrzysztof Kozlowski        compatible:
886a24490fSKrzysztof Kozlowski          contains:
896a24490fSKrzysztof Kozlowski            enum:
906a24490fSKrzysztof Kozlowski              - samsung,s3c2410-uart
916a24490fSKrzysztof Kozlowski              - samsung,s5pv210-uart
926a24490fSKrzysztof Kozlowski    then:
936a24490fSKrzysztof Kozlowski      properties:
946a24490fSKrzysztof Kozlowski        clocks:
956a24490fSKrzysztof Kozlowski          minItems: 2
966a24490fSKrzysztof Kozlowski          maxItems: 3
976a24490fSKrzysztof Kozlowski        clock-names:
986a24490fSKrzysztof Kozlowski          minItems: 2
996a24490fSKrzysztof Kozlowski          maxItems: 3
1006a24490fSKrzysztof Kozlowski          items:
1016a24490fSKrzysztof Kozlowski            - const: uart
1026a24490fSKrzysztof Kozlowski            - pattern: '^clk_uart_baud[0-1]$'
1036a24490fSKrzysztof Kozlowski            - pattern: '^clk_uart_baud[0-1]$'
1046a24490fSKrzysztof Kozlowski
1056a24490fSKrzysztof Kozlowski  - if:
1066a24490fSKrzysztof Kozlowski      properties:
1076a24490fSKrzysztof Kozlowski        compatible:
1086a24490fSKrzysztof Kozlowski          contains:
1096a24490fSKrzysztof Kozlowski            enum:
110b8466833SHector Martin              - apple,s5l-uart
1116a24490fSKrzysztof Kozlowski              - samsung,exynos4210-uart
1126a24490fSKrzysztof Kozlowski    then:
1136a24490fSKrzysztof Kozlowski      properties:
1146a24490fSKrzysztof Kozlowski        clocks:
1156a24490fSKrzysztof Kozlowski          minItems: 2
1166a24490fSKrzysztof Kozlowski          maxItems: 2
1176a24490fSKrzysztof Kozlowski        clock-names:
1186a24490fSKrzysztof Kozlowski          minItems: 2
1196a24490fSKrzysztof Kozlowski          maxItems: 2
1206a24490fSKrzysztof Kozlowski          items:
1216a24490fSKrzysztof Kozlowski            - const: uart
1226a24490fSKrzysztof Kozlowski            - const: clk_uart_baud0
1236a24490fSKrzysztof Kozlowski
1246a24490fSKrzysztof Kozlowskiexamples:
1256a24490fSKrzysztof Kozlowski  - |
1266a24490fSKrzysztof Kozlowski    #include <dt-bindings/clock/samsung,s3c64xx-clock.h>
1276a24490fSKrzysztof Kozlowski
1286a24490fSKrzysztof Kozlowski    uart0: serial@7f005000 {
1296a24490fSKrzysztof Kozlowski        compatible = "samsung,s3c6400-uart";
1306a24490fSKrzysztof Kozlowski        reg = <0x7f005000 0x100>;
1316a24490fSKrzysztof Kozlowski        interrupt-parent = <&vic1>;
1326a24490fSKrzysztof Kozlowski        interrupts = <5>;
1336a24490fSKrzysztof Kozlowski        clock-names = "uart", "clk_uart_baud2",
1346a24490fSKrzysztof Kozlowski                      "clk_uart_baud3";
1356a24490fSKrzysztof Kozlowski        clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
1366a24490fSKrzysztof Kozlowski                 <&clocks SCLK_UART>;
1376a24490fSKrzysztof Kozlowski        samsung,uart-fifosize = <16>;
1386a24490fSKrzysztof Kozlowski    };
139