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 and rts-gpios properties can be used instead of 'uart-has-rtscts'
54# or 'st,hw-flow-ctrl' (deprecated) for making use of any gpio pins for flow
55# control instead of dedicated pins.
56#
57# It should be noted that both cts-gpios/rts-gpios and 'uart-has-rtscts' or
58# 'st,hw-flow-ctrl' (deprecated) properties cannot co-exist in a design.
59  cts-gpios: true
60  rts-gpios: true
61
62  wakeup-source: true
63
64  rs485-rts-delay: true
65  rs485-rts-active-low: true
66  linux,rs485-enabled-at-boot-time: true
67  rs485-rx-during-tx: true
68
69if:
70  required:
71    - st,hw-flow-ctrl
72then:
73  properties:
74    cts-gpios: false
75    rts-gpios: false
76
77required:
78  - compatible
79  - reg
80  - interrupts
81  - clocks
82
83additionalProperties: false
84
85examples:
86  - |
87    #include <dt-bindings/clock/stm32mp1-clks.h>
88    usart1: serial@40011000 {
89      compatible = "st,stm32-uart";
90      reg = <0x40011000 0x400>;
91      interrupts = <37>;
92      clocks = <&rcc 0 164>;
93      dmas = <&dma2 2 4 0x414 0x0>,
94             <&dma2 7 4 0x414 0x0>;
95      dma-names = "rx", "tx";
96      rs485-rts-active-low;
97    };
98
99...
100