drivers: serial: esp32: Unify serial driver for esp32 & esp32s2

1) Allow use of interrup driven instance.
   ROM implementation could be selected via dts compatiable.

2) Use UART rx fifo and timeout interrupt for end of message detection.
   Added to decrease interrupts count on data reception

3) Use ESP_LL api.

Signed-off-by: Pavlo Hamov <p.hamov@venstar.com>
This commit is contained in:
Pavlo Hamov 2021-10-12 17:10:05 +03:00 committed by Christopher Friedt
commit 89e907d4f0
5 changed files with 103 additions and 161 deletions

View file

@ -1,11 +1,14 @@
# SPDX-License-Identifier: Apache-2.0
DT_COMPAT_ESP32_UART := espressif,esp32-uart
config UART_ESP32
bool "ESP32 UART driver"
default y
default $(dt_compat_enabled,$(DT_COMPAT_ESP32_UART))
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
select GPIO_ESP32
depends on SOC_ESP32
depends on SOC_ESP32 || SOC_ESP32S2
help
Enable the ESP32 UART using ROM routines.