1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/serial/st,stm32-uart.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7maintainers:
8  - Erwan Le Ray <erwan.leray@st.com>
9
10title: STMicroelectronics STM32 USART bindings
11
12allOf:
13  - $ref: rs485.yaml
14
15properties:
16  compatible:
17    enum:
18      - st,stm32-uart
19      - st,stm32f7-uart
20      - st,stm32h7-uart
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    maxItems: 1
27
28  clocks:
29    maxItems: 1
30
31  resets:
32    maxItems: 1
33
34  label:
35    description: label associated with this uart
36
37  st,hw-flow-ctrl:
38    description: enable hardware flow control (deprecated)
39    $ref: /schemas/types.yaml#/definitions/flag
40
41  uart-has-rtscts: true
42
43  dmas:
44    minItems: 1
45    maxItems: 2
46
47  dma-names:
48    items:
49      enum: [ rx, tx ]
50    minItems: 1
51    maxItems: 2
52
53  cts-gpios:
54    maxItems: 1
55
56  rts-gpios:
57    maxItems: 1
58
59  wakeup-source: true
60
61  rs485-rts-delay: true
62  rs485-rts-active-low: true
63  linux,rs485-enabled-at-boot-time: true
64  rs485-rx-during-tx: true
65
66if:
67  required:
68    - st,hw-flow-ctrl
69then:
70  properties:
71    cts-gpios: false
72    rts-gpios: false
73
74required:
75  - compatible
76  - reg
77  - interrupts
78  - clocks
79
80additionalProperties: false
81
82examples:
83  - |
84    #include <dt-bindings/clock/stm32mp1-clks.h>
85    usart1: serial@40011000 {
86      compatible = "st,stm32-uart";
87      reg = <0x40011000 0x400>;
88      interrupts = <37>;
89      clocks = <&rcc 0 164>;
90      dmas = <&dma2 2 4 0x414 0x0>,
91             <&dma2 7 4 0x414 0x0>;
92      dma-names = "rx", "tx";
93      rs485-rts-active-low;
94    };
95
96...
97