1# STM32 UART configuration
2
3# Copyright (c) 2016 Open-RnD Sp. z o.o.
4# SPDX-License-Identifier: Apache-2.0
5
6config UART_STM32
7	bool "STM32 MCU serial driver"
8	default y
9	depends on DT_HAS_ST_STM32_UART_ENABLED
10	select SERIAL_HAS_DRIVER
11	select SERIAL_SUPPORT_INTERRUPT
12	# the ASYNC implementation requires a DMA controller
13	select SERIAL_SUPPORT_ASYNC \
14		if DT_HAS_ST_STM32_DMA_V1_ENABLED || \
15		   DT_HAS_ST_STM32_DMA_V2_ENABLED || \
16		   DT_HAS_ST_STM32_DMA_V2BIS_ENABLED || \
17		   DT_HAS_ST_STM32U5_DMA_ENABLED
18	select DMA if UART_ASYNC_API
19	select RESET
20	select PINCTRL
21	help
22	  This option enables the UART driver for STM32 family of
23	  processors.
24	  Say y if you wish to use serial port on STM32 MCU.
25
26if UART_STM32
27
28config UART_STM32U5_ERRATA_DMAT
29	bool
30	default y
31	depends on SOC_STM32U575XX || SOC_STM32U585XX || \
32		   SOC_STM32H562XX || SOC_STM32H563XX || SOC_STM32H573XX
33	help
34	  Handles erratum "USART does not generate DMA requests after
35	  setting/clearing DMAT bit".
36	  Seen in Errata Sheet 0499 § 2.19.2 and §2.20.1 for stm32u57x/u58x,
37	          Errata Sheet 0565 § 2.14.1 and §2.15.1 for stm32h56x/h57x
38
39endif
40