xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/serial/8250.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# Copyright 2020 Lubomir Rintel <lkundrak@v3.sk>
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/serial/8250.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: UART (Universal Asynchronous Receiver/Transmitter) bindings
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - devicetree@vger.kernel.org
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunallOf:
13*4882a593Smuzhiyun  - $ref: /schemas/serial.yaml#
14*4882a593Smuzhiyun  - if:
15*4882a593Smuzhiyun      required:
16*4882a593Smuzhiyun        - aspeed,sirq-polarity-sense
17*4882a593Smuzhiyun    then:
18*4882a593Smuzhiyun      properties:
19*4882a593Smuzhiyun        compatible:
20*4882a593Smuzhiyun          const: aspeed,ast2500-vuart
21*4882a593Smuzhiyun  - if:
22*4882a593Smuzhiyun      properties:
23*4882a593Smuzhiyun        compatible:
24*4882a593Smuzhiyun          const: mrvl,mmp-uart
25*4882a593Smuzhiyun    then:
26*4882a593Smuzhiyun      properties:
27*4882a593Smuzhiyun        reg-shift:
28*4882a593Smuzhiyun          const: 2
29*4882a593Smuzhiyun      required:
30*4882a593Smuzhiyun        - reg-shift
31*4882a593Smuzhiyun  - if:
32*4882a593Smuzhiyun      not:
33*4882a593Smuzhiyun        properties:
34*4882a593Smuzhiyun          compatible:
35*4882a593Smuzhiyun            items:
36*4882a593Smuzhiyun              - enum:
37*4882a593Smuzhiyun                  - ns8250
38*4882a593Smuzhiyun                  - ns16450
39*4882a593Smuzhiyun                  - ns16550
40*4882a593Smuzhiyun                  - ns16550a
41*4882a593Smuzhiyun    then:
42*4882a593Smuzhiyun      anyOf:
43*4882a593Smuzhiyun        - required: [ clock-frequency ]
44*4882a593Smuzhiyun        - required: [ clocks ]
45*4882a593Smuzhiyun
46*4882a593Smuzhiyunproperties:
47*4882a593Smuzhiyun  compatible:
48*4882a593Smuzhiyun    oneOf:
49*4882a593Smuzhiyun      - const: ns8250
50*4882a593Smuzhiyun      - const: ns16450
51*4882a593Smuzhiyun      - const: ns16550
52*4882a593Smuzhiyun      - const: ns16550a
53*4882a593Smuzhiyun      - const: ns16850
54*4882a593Smuzhiyun      - const: aspeed,ast2400-vuart
55*4882a593Smuzhiyun      - const: aspeed,ast2500-vuart
56*4882a593Smuzhiyun      - const: intel,xscale-uart
57*4882a593Smuzhiyun      - const: mrvl,pxa-uart
58*4882a593Smuzhiyun      - const: nuvoton,npcm750-uart
59*4882a593Smuzhiyun      - const: nvidia,tegra20-uart
60*4882a593Smuzhiyun      - const: nxp,lpc3220-uart
61*4882a593Smuzhiyun      - items:
62*4882a593Smuzhiyun          - enum:
63*4882a593Smuzhiyun              - altr,16550-FIFO32
64*4882a593Smuzhiyun              - altr,16550-FIFO64
65*4882a593Smuzhiyun              - altr,16550-FIFO128
66*4882a593Smuzhiyun              - fsl,16550-FIFO64
67*4882a593Smuzhiyun              - fsl,ns16550
68*4882a593Smuzhiyun              - andestech,uart16550
69*4882a593Smuzhiyun              - nxp,lpc1850-uart
70*4882a593Smuzhiyun              - opencores,uart16550-rtlsvn105
71*4882a593Smuzhiyun              - ti,da830-uart
72*4882a593Smuzhiyun          - const: ns16550a
73*4882a593Smuzhiyun      - items:
74*4882a593Smuzhiyun          - enum:
75*4882a593Smuzhiyun              - ns16750
76*4882a593Smuzhiyun              - cavium,octeon-3860-uart
77*4882a593Smuzhiyun              - xlnx,xps-uart16550-2.00.b
78*4882a593Smuzhiyun              - ralink,rt2880-uart
79*4882a593Smuzhiyun          - enum:
80*4882a593Smuzhiyun              - ns16550 # Deprecated, unless the FIFO really is broken
81*4882a593Smuzhiyun              - ns16550a
82*4882a593Smuzhiyun      - items:
83*4882a593Smuzhiyun          - enum:
84*4882a593Smuzhiyun              - ralink,mt7620a-uart
85*4882a593Smuzhiyun              - ralink,rt3052-uart
86*4882a593Smuzhiyun              - ralink,rt3883-uart
87*4882a593Smuzhiyun          - const: ralink,rt2880-uart
88*4882a593Smuzhiyun          - enum:
89*4882a593Smuzhiyun              - ns16550 # Deprecated, unless the FIFO really is broken
90*4882a593Smuzhiyun              - ns16550a
91*4882a593Smuzhiyun      - items:
92*4882a593Smuzhiyun          - enum:
93*4882a593Smuzhiyun              - mediatek,mt7622-btif
94*4882a593Smuzhiyun              - mediatek,mt7623-btif
95*4882a593Smuzhiyun          - const: mediatek,mtk-btif
96*4882a593Smuzhiyun      - items:
97*4882a593Smuzhiyun          - const: mrvl,mmp-uart
98*4882a593Smuzhiyun          - const: intel,xscale-uart
99*4882a593Smuzhiyun      - items:
100*4882a593Smuzhiyun          - enum:
101*4882a593Smuzhiyun              - nvidia,tegra30-uart
102*4882a593Smuzhiyun              - nvidia,tegra114-uart
103*4882a593Smuzhiyun              - nvidia,tegra124-uart
104*4882a593Smuzhiyun              - nvidia,tegra186-uart
105*4882a593Smuzhiyun              - nvidia,tegra194-uart
106*4882a593Smuzhiyun              - nvidia,tegra210-uart
107*4882a593Smuzhiyun          - const: nvidia,tegra20-uart
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun  reg:
110*4882a593Smuzhiyun    maxItems: 1
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun  interrupts:
113*4882a593Smuzhiyun    maxItems: 1
114*4882a593Smuzhiyun
115*4882a593Smuzhiyun  clock-frequency: true
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun  clocks:
118*4882a593Smuzhiyun    maxItems: 1
119*4882a593Smuzhiyun
120*4882a593Smuzhiyun  resets:
121*4882a593Smuzhiyun    maxItems: 1
122*4882a593Smuzhiyun
123*4882a593Smuzhiyun  current-speed:
124*4882a593Smuzhiyun    $ref: /schemas/types.yaml#definitions/uint32
125*4882a593Smuzhiyun    description: The current active speed of the UART.
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun  reg-offset:
128*4882a593Smuzhiyun    description: |
129*4882a593Smuzhiyun      Offset to apply to the mapbase from the start of the registers.
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun  reg-shift:
132*4882a593Smuzhiyun    description: Quantity to shift the register offsets by.
133*4882a593Smuzhiyun
134*4882a593Smuzhiyun  reg-io-width:
135*4882a593Smuzhiyun    description: |
136*4882a593Smuzhiyun      The size (in bytes) of the IO accesses that should be performed on the
137*4882a593Smuzhiyun      device. There are some systems that require 32-bit accesses to the
138*4882a593Smuzhiyun      UART (e.g. TI davinci).
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun  used-by-rtas:
141*4882a593Smuzhiyun    type: boolean
142*4882a593Smuzhiyun    description: |
143*4882a593Smuzhiyun      Set to indicate that the port is in use by the OpenFirmware RTAS and
144*4882a593Smuzhiyun      should not be registered.
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun  no-loopback-test:
147*4882a593Smuzhiyun    type: boolean
148*4882a593Smuzhiyun    description: |
149*4882a593Smuzhiyun      Set to indicate that the port does not implement loopback test mode.
150*4882a593Smuzhiyun
151*4882a593Smuzhiyun  fifo-size:
152*4882a593Smuzhiyun    $ref: /schemas/types.yaml#definitions/uint32
153*4882a593Smuzhiyun    description: The fifo size of the UART.
154*4882a593Smuzhiyun
155*4882a593Smuzhiyun  auto-flow-control:
156*4882a593Smuzhiyun    type: boolean
157*4882a593Smuzhiyun    description: |
158*4882a593Smuzhiyun      One way to enable automatic flow control support. The driver is
159*4882a593Smuzhiyun      allowed to detect support for the capability even without this
160*4882a593Smuzhiyun      property.
161*4882a593Smuzhiyun
162*4882a593Smuzhiyun  tx-threshold:
163*4882a593Smuzhiyun    $ref: /schemas/types.yaml#definitions/uint32
164*4882a593Smuzhiyun    description: |
165*4882a593Smuzhiyun      Specify the TX FIFO low water indication for parts with programmable
166*4882a593Smuzhiyun      TX FIFO thresholds.
167*4882a593Smuzhiyun
168*4882a593Smuzhiyun  overrun-throttle-ms:
169*4882a593Smuzhiyun    description: |
170*4882a593Smuzhiyun      How long to pause uart rx when input overrun is encountered.
171*4882a593Smuzhiyun
172*4882a593Smuzhiyun  rts-gpios: true
173*4882a593Smuzhiyun  cts-gpios: true
174*4882a593Smuzhiyun  dtr-gpios: true
175*4882a593Smuzhiyun  dsr-gpios: true
176*4882a593Smuzhiyun  rng-gpios: true
177*4882a593Smuzhiyun  dcd-gpios: true
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun  aspeed,sirq-polarity-sense:
180*4882a593Smuzhiyun    $ref: /schemas/types.yaml#/definitions/phandle-array
181*4882a593Smuzhiyun    description: |
182*4882a593Smuzhiyun      Phandle to aspeed,ast2500-scu compatible syscon alongside register
183*4882a593Smuzhiyun      offset and bit number to identify how the SIRQ polarity should be
184*4882a593Smuzhiyun      configured. One possible data source is the LPC/eSPI mode bit. Only
185*4882a593Smuzhiyun      applicable to aspeed,ast2500-vuart.
186*4882a593Smuzhiyun
187*4882a593Smuzhiyunrequired:
188*4882a593Smuzhiyun  - reg
189*4882a593Smuzhiyun  - interrupts
190*4882a593Smuzhiyun
191*4882a593SmuzhiyununevaluatedProperties: false
192*4882a593Smuzhiyun
193*4882a593Smuzhiyunexamples:
194*4882a593Smuzhiyun  - |
195*4882a593Smuzhiyun    serial@80230000 {
196*4882a593Smuzhiyun        compatible = "ns8250";
197*4882a593Smuzhiyun        reg = <0x80230000 0x100>;
198*4882a593Smuzhiyun        interrupts = <10>;
199*4882a593Smuzhiyun        reg-shift = <2>;
200*4882a593Smuzhiyun        clock-frequency = <48000000>;
201*4882a593Smuzhiyun    };
202*4882a593Smuzhiyun  - |
203*4882a593Smuzhiyun    #include <dt-bindings/gpio/gpio.h>
204*4882a593Smuzhiyun    serial@49042000 {
205*4882a593Smuzhiyun        compatible = "andestech,uart16550", "ns16550a";
206*4882a593Smuzhiyun        reg = <0x49042000 0x400>;
207*4882a593Smuzhiyun        interrupts = <80>;
208*4882a593Smuzhiyun        clock-frequency = <48000000>;
209*4882a593Smuzhiyun        cts-gpios = <&gpio3 5 GPIO_ACTIVE_LOW>;
210*4882a593Smuzhiyun        rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
211*4882a593Smuzhiyun        dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
212*4882a593Smuzhiyun        dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
213*4882a593Smuzhiyun        dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
214*4882a593Smuzhiyun        rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
215*4882a593Smuzhiyun    };
216*4882a593Smuzhiyun  - |
217*4882a593Smuzhiyun    #include <dt-bindings/clock/aspeed-clock.h>
218*4882a593Smuzhiyun    serial@1e787000 {
219*4882a593Smuzhiyun        compatible = "aspeed,ast2500-vuart";
220*4882a593Smuzhiyun        reg = <0x1e787000 0x40>;
221*4882a593Smuzhiyun        reg-shift = <2>;
222*4882a593Smuzhiyun        interrupts = <8>;
223*4882a593Smuzhiyun        clocks = <&syscon ASPEED_CLK_APB>;
224*4882a593Smuzhiyun        no-loopback-test;
225*4882a593Smuzhiyun        aspeed,sirq-polarity-sense = <&syscon 0x70 25>;
226*4882a593Smuzhiyun    };
227*4882a593Smuzhiyun
228*4882a593Smuzhiyun...
229