xref: /linux/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml (revision 06d07429858317ded2db7986113a9e0129cd599b)
1ebd35674SAnson Huang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2ebd35674SAnson Huang%YAML 1.2
3ebd35674SAnson Huang---
4ebd35674SAnson Huang$id: http://devicetree.org/schemas/serial/fsl-imx-uart.yaml#
5ebd35674SAnson Huang$schema: http://devicetree.org/meta-schemas/core.yaml#
6ebd35674SAnson Huang
7ebd35674SAnson Huangtitle: Freescale i.MX Universal Asynchronous Receiver/Transmitter (UART)
8ebd35674SAnson Huang
9ebd35674SAnson Huangmaintainers:
1081004f0bSFabio Estevam  - Fabio Estevam <festevam@gmail.com>
11ebd35674SAnson Huang
12ebd35674SAnson Huangproperties:
13ebd35674SAnson Huang  compatible:
14ebd35674SAnson Huang    oneOf:
15ebd35674SAnson Huang      - const: fsl,imx1-uart
16ebd35674SAnson Huang      - const: fsl,imx21-uart
17ebd35674SAnson Huang      - items:
18ebd35674SAnson Huang          - enum:
19ebd35674SAnson Huang              - fsl,imx25-uart
20ebd35674SAnson Huang              - fsl,imx27-uart
21ebd35674SAnson Huang              - fsl,imx31-uart
22ebd35674SAnson Huang              - fsl,imx35-uart
23ebd35674SAnson Huang              - fsl,imx50-uart
24ebd35674SAnson Huang              - fsl,imx51-uart
257a64ed02SKrzysztof Kozlowski              - fsl,imx53-uart
267a64ed02SKrzysztof Kozlowski              - fsl,imx6q-uart
27ebd35674SAnson Huang          - const: fsl,imx21-uart
28ebd35674SAnson Huang      - items:
29ebd35674SAnson Huang          - enum:
30ebd35674SAnson Huang              - fsl,imx6sl-uart
31ebd35674SAnson Huang              - fsl,imx6sll-uart
32ebd35674SAnson Huang              - fsl,imx6sx-uart
337a64ed02SKrzysztof Kozlowski          - const: fsl,imx6q-uart
347a64ed02SKrzysztof Kozlowski          - const: fsl,imx21-uart
357a64ed02SKrzysztof Kozlowski      - items:
367a64ed02SKrzysztof Kozlowski          - enum:
37ebd35674SAnson Huang              - fsl,imx6ul-uart
38ebd35674SAnson Huang              - fsl,imx7d-uart
39669e8aa3SKrzysztof Kozlowski              - fsl,imx8mm-uart
40669e8aa3SKrzysztof Kozlowski              - fsl,imx8mn-uart
41669e8aa3SKrzysztof Kozlowski              - fsl,imx8mp-uart
42669e8aa3SKrzysztof Kozlowski              - fsl,imx8mq-uart
43ebd35674SAnson Huang          - const: fsl,imx6q-uart
44ebd35674SAnson Huang
45ebd35674SAnson Huang  reg:
46ebd35674SAnson Huang    maxItems: 1
47ebd35674SAnson Huang
48872eb918SMarek Vasut  clocks:
49872eb918SMarek Vasut    maxItems: 2
50872eb918SMarek Vasut
51872eb918SMarek Vasut  clock-names:
52872eb918SMarek Vasut    items:
53872eb918SMarek Vasut      - const: ipg
54872eb918SMarek Vasut      - const: per
55872eb918SMarek Vasut
56cf8d4027SMarek Vasut  dmas:
57cf8d4027SMarek Vasut    items:
58cf8d4027SMarek Vasut      - description: DMA controller phandle and request line for RX
59cf8d4027SMarek Vasut      - description: DMA controller phandle and request line for TX
60cf8d4027SMarek Vasut
61cf8d4027SMarek Vasut  dma-names:
62cf8d4027SMarek Vasut    items:
63cf8d4027SMarek Vasut      - const: rx
64cf8d4027SMarek Vasut      - const: tx
65cf8d4027SMarek Vasut
66ebd35674SAnson Huang  interrupts:
67*9df1dd45SFabio Estevam    items:
68*9df1dd45SFabio Estevam      - description: UART RX Interrupt
69*9df1dd45SFabio Estevam      - description: UART TX Interrupt
70*9df1dd45SFabio Estevam      - description: UART RTS Interrupt
71*9df1dd45SFabio Estevam    minItems: 1
72ebd35674SAnson Huang
73500d1796SMarek Vasut  wakeup-source: true
74500d1796SMarek Vasut
75ebd35674SAnson Huang  fsl,dte-mode:
76ebd35674SAnson Huang    $ref: /schemas/types.yaml#/definitions/flag
77ebd35674SAnson Huang    description: |
78ebd35674SAnson Huang      Indicate the uart works in DTE mode. The uart works in DCE mode by default.
79ebd35674SAnson Huang
80ebd35674SAnson Huang  fsl,inverted-tx:
81ebd35674SAnson Huang    $ref: /schemas/types.yaml#/definitions/flag
82ebd35674SAnson Huang    description: |
83ebd35674SAnson Huang      Indicate that the hardware attached to the peripheral inverts the signal
84ebd35674SAnson Huang      transmitted, and that the peripheral should invert its output using the
85ebd35674SAnson Huang      INVT registers.
86ebd35674SAnson Huang
87ebd35674SAnson Huang  fsl,inverted-rx:
88ebd35674SAnson Huang    $ref: /schemas/types.yaml#/definitions/flag
89ebd35674SAnson Huang    description: |
90ebd35674SAnson Huang      Indicate that the hardware attached to the peripheral inverts the signal
91ebd35674SAnson Huang      received, and that the peripheral should invert its input using the
92ebd35674SAnson Huang      INVR registers.
93ebd35674SAnson Huang
94db0a196bSFabien Lahoudere  fsl,dma-info:
95db0a196bSFabien Lahoudere    $ref: /schemas/types.yaml#/definitions/uint32-array
96db0a196bSFabien Lahoudere    minItems: 2
97db0a196bSFabien Lahoudere    maxItems: 2
98db0a196bSFabien Lahoudere    description: |
99db0a196bSFabien Lahoudere      First cell contains the size of DMA buffer chunks, second cell contains
100db0a196bSFabien Lahoudere      the amount of chunks used for the device. Multiplying both numbers is
101db0a196bSFabien Lahoudere      the total size of memory used for receiving data.
102db0a196bSFabien Lahoudere      When not being configured the system will use default settings, which
103db0a196bSFabien Lahoudere      are sensible for most use cases. If you need low latency processing on
104db0a196bSFabien Lahoudere      slow connections this needs to be configured appropriately.
105db0a196bSFabien Lahoudere
106ebd35674SAnson Huangrequired:
107ebd35674SAnson Huang  - compatible
108ebd35674SAnson Huang  - reg
109872eb918SMarek Vasut  - clocks
110872eb918SMarek Vasut  - clock-names
111ebd35674SAnson Huang  - interrupts
112ebd35674SAnson Huang
113*9df1dd45SFabio EstevamallOf:
114*9df1dd45SFabio Estevam  - $ref: serial.yaml#
115*9df1dd45SFabio Estevam  - $ref: rs485.yaml#
116*9df1dd45SFabio Estevam
117*9df1dd45SFabio Estevam  - if:
118*9df1dd45SFabio Estevam      properties:
119*9df1dd45SFabio Estevam        compatible:
120*9df1dd45SFabio Estevam          contains:
121*9df1dd45SFabio Estevam            const: fsl,imx1-uart
122*9df1dd45SFabio Estevam    then:
123*9df1dd45SFabio Estevam      properties:
124*9df1dd45SFabio Estevam        interrupts:
125*9df1dd45SFabio Estevam          minItems: 3
126*9df1dd45SFabio Estevam          maxItems: 3
127*9df1dd45SFabio Estevam    else:
128*9df1dd45SFabio Estevam      properties:
129*9df1dd45SFabio Estevam        interrupts:
130*9df1dd45SFabio Estevam          maxItems: 1
131*9df1dd45SFabio Estevam
132ebd35674SAnson HuangunevaluatedProperties: false
133ebd35674SAnson Huang
134ebd35674SAnson Huangexamples:
135ebd35674SAnson Huang  - |
136872eb918SMarek Vasut    #include <dt-bindings/clock/imx5-clock.h>
137872eb918SMarek Vasut
138ebd35674SAnson Huang    aliases {
139ebd35674SAnson Huang        serial0 = &uart1;
140ebd35674SAnson Huang    };
141ebd35674SAnson Huang
142ebd35674SAnson Huang    uart1: serial@73fbc000 {
143ebd35674SAnson Huang        compatible = "fsl,imx51-uart", "fsl,imx21-uart";
144ebd35674SAnson Huang        reg = <0x73fbc000 0x4000>;
145ebd35674SAnson Huang        interrupts = <31>;
146872eb918SMarek Vasut        clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
147872eb918SMarek Vasut                 <&clks IMX5_CLK_UART1_PER_GATE>;
148872eb918SMarek Vasut        clock-names = "ipg", "per";
149cf8d4027SMarek Vasut        dmas = <&sdma 18 4 1>, <&sdma 19 4 2>;
150cf8d4027SMarek Vasut        dma-names = "rx", "tx";
151ebd35674SAnson Huang        uart-has-rtscts;
152ebd35674SAnson Huang        fsl,dte-mode;
153ebd35674SAnson Huang    };
154