Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[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           - zte,zx296702-uart
23   required:
24     - compatible
25
26 properties:
27   compatible:
28     oneOf:
29       - items:
30           - const: arm,pl011
31           - const: arm,primecell
32       - items:
33           - const: zte,zx296702-uart
34           - const: arm,primecell
35
36   reg:
37     maxItems: 1
38
39   interrupts:
40     maxItems: 1
41
42   pinctrl-0: true
43   pinctrl-1: true
44
45   pinctrl-names:
46     description:
47       When present, must have one state named "default",
48       and may contain a second name named "sleep". The former
49       state sets up pins for ordinary operation whereas
50       the latter state will put the associated pins to sleep
51       when the UART is unused
52     minItems: 1
53     items:
54       - const: default
55       - const: sleep
56
57   clocks:
58     description:
59       When present, the first clock listed must correspond to
60       the clock named UARTCLK on the IP block, i.e. the clock
61       to the external serial line, whereas the second clock
62       must correspond to the PCLK clocking the internal logic
63       of the block. Just listing one clock (the first one) is
64       deprecated.
65     maxItems: 2
66
67   clock-names:
68     items:
69       - const: uartclk
70       - const: apb_pclk
71
72   dmas:
73     minItems: 1
74     maxItems: 2
75
76   dma-names:
77     minItems: 1
78     items:
79       - const: rx
80       - const: tx
81
82   auto-poll:
83     description:
84       Enables polling when using RX DMA.
85     type: boolean
86
87   poll-rate-ms:
88     description:
89       Rate at which poll occurs when auto-poll is set.
90       default 100ms.
91     $ref: /schemas/types.yaml#/definitions/uint32
92     default: 100
93
94   poll-timeout-ms:
95     description:
96       Poll timeout when auto-poll is set, default
97       3000ms.
98     $ref: /schemas/types.yaml#/definitions/uint32
99     default: 3000
100
101 required:
102   - compatible
103   - reg
104   - interrupts
105
106 dependencies:
107   poll-rate-ms: [ auto-poll ]
108   poll-timeout-ms: [ auto-poll ]
109
110 additionalProperties: false
111
112 examples:
113   - |
114     serial@80120000 {
115       compatible = "arm,pl011", "arm,primecell";
116       reg = <0x80120000 0x1000>;
117       interrupts = <0 11 4>;
118       dmas = <&dma 13 0 0x2>, <&dma 13 0 0x0>;
119       dma-names = "rx", "tx";
120       clocks = <&foo_clk>, <&bar_clk>;
121       clock-names = "uartclk", "apb_pclk";
122     };
123
124 ...