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
7title: ARM AMBA Primecell PL011 serial UART
8
9maintainers:
10  - Rob Herring <robh@kernel.org>
11
12allOf:
13  - $ref: /schemas/serial.yaml#
14
15# Need a custom select here or 'arm,primecell' will match on lots of nodes
16select:
17  properties:
18    compatible:
19      contains:
20        enum:
21          - arm,pl011
22          - zte,zx296702-uart
23  required:
24    - compatible
25
26properties:
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    allOf:
92      - $ref: /schemas/types.yaml#/definitions/uint32
93      - default: 100
94
95  poll-timeout-ms:
96    description:
97      Poll timeout when auto-poll is set, default
98      3000ms.
99    allOf:
100      - $ref: /schemas/types.yaml#/definitions/uint32
101      - default: 3000
102
103required:
104  - compatible
105  - reg
106  - interrupts
107
108dependencies:
109  poll-rate-ms: [ auto-poll ]
110  poll-timeout-ms: [ auto-poll ]
111
112additionalProperties: false
113
114examples:
115  - |
116    serial@80120000 {
117      compatible = "arm,pl011", "arm,primecell";
118      reg = <0x80120000 0x1000>;
119      interrupts = <0 11 4>;
120      dmas = <&dma 13 0 0x2>, <&dma 13 0 0x0>;
121      dma-names = "rx", "tx";
122      clocks = <&foo_clk>, <&bar_clk>;
123      clock-names = "uartclk", "apb_pclk";
124    };
125
126...
127