1f8e9f2644b6b80e6fcba0b0fd670b1bcede06d7
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / serial / pl011.yaml
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/serial/pl011.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: ARM AMBA Primecell PL011 serial UART
8
9 maintainers:
10   - Rob Herring <robh@kernel.org>
11
12 allOf:
13   - $ref: /schemas/serial.yaml#
14
15 # Need a custom select here or 'arm,primecell' will match on lots of nodes
16 select:
17   properties:
18     compatible:
19       contains:
20         enum:
21           - arm,pl011
22   required:
23     - compatible
24
25 properties:
26   compatible:
27     oneOf:
28       - items:
29           - const: arm,pl011
30           - const: arm,primecell
31       - items:
32           - const: arm,primecell
33
34   reg:
35     maxItems: 1
36
37   interrupts:
38     maxItems: 1
39
40   pinctrl-0: true
41   pinctrl-1: true
42
43   pinctrl-names:
44     description:
45       When present, must have one state named "default",
46       and may contain a second name named "sleep". The former
47       state sets up pins for ordinary operation whereas
48       the latter state will put the associated pins to sleep
49       when the UART is unused
50     minItems: 1
51     items:
52       - const: default
53       - const: sleep
54
55   clocks:
56     description:
57       When present, the first clock listed must correspond to
58       the clock named UARTCLK on the IP block, i.e. the clock
59       to the external serial line, whereas the second clock
60       must correspond to the PCLK clocking the internal logic
61       of the block. Just listing one clock (the first one) is
62       deprecated.
63     maxItems: 2
64
65   clock-names:
66     items:
67       - const: uartclk
68       - const: apb_pclk
69
70   dmas:
71     minItems: 1
72     maxItems: 2
73
74   dma-names:
75     minItems: 1
76     items:
77       - const: rx
78       - const: tx
79
80   auto-poll:
81     description:
82       Enables polling when using RX DMA.
83     type: boolean
84
85   poll-rate-ms:
86     description:
87       Rate at which poll occurs when auto-poll is set.
88       default 100ms.
89     default: 100
90
91   poll-timeout-ms:
92     description:
93       Poll timeout when auto-poll is set, default
94       3000ms.
95     default: 3000
96
97 required:
98   - compatible
99   - reg
100   - interrupts
101
102 dependencies:
103   poll-rate-ms: [ auto-poll ]
104   poll-timeout-ms: [ auto-poll ]
105
106 additionalProperties: false
107
108 examples:
109   - |
110     serial@80120000 {
111       compatible = "arm,pl011", "arm,primecell";
112       reg = <0x80120000 0x1000>;
113       interrupts = <0 11 4>;
114       dmas = <&dma 13 0 0x2>, <&dma 13 0 0x0>;
115       dma-names = "rx", "tx";
116       clocks = <&foo_clk>, <&bar_clk>;
117       clock-names = "uartclk", "apb_pclk";
118     };
119
120 ...