Skip to contentSkip to conversation

serial: esp32: add driver for esp32 series chips

PATCH In review [email protected] 2 participants 2 messages Jul 8 – Jul 24

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 serial: esp32: add driver for esp32 series chips

From: Honbo He <[email protected]>

Add a driver model serial driver for Espressif ESP32 UART controllers. The driver supports ESP32, ESP32-S3 and ESP32-S31 UART register variants, including baud-rate setup, FIFO access and basic port initialization.

Changes in v3:
- Add debug UART for early print output

---
 drivers/serial/Kconfig        |  15 ++
 drivers/serial/Makefile       |   1 +
 drivers/serial/serial_esp32.c | 367 ++++++++++++++++++++++++++++++++++
 3 files changed, 383 insertions(+)
 create mode 100644 drivers/serial/serial_esp32.c
drivers/serial/Kconfig +15 -0
index e221800d5d0..ffc58d663ff 100644
@@ -276,6 +276,14 @@ config DEBUG_UART_ATMEL
 	  will need to provide parameters to make this work. The driver will
 	  be available until the real driver-model serial is running.
 
+config DEBUG_UART_ESP32
+	bool "Espressif ESP32 UART"
+	depends on ESP32_SERIAL
+	help
+	  Select this to enable a debug UART using the ESP32 UART driver. You
+	  will need to provide parameters to make this work. The driver will
+	  be available until the real driver-model serial is running.
+
 config DEBUG_UART_BCM6345
 	bool "BCM6345 UART"
 	depends on BCM6345_SERIAL
@@ -1069,6 +1077,13 @@ config HTIF_CONSOLE
 	  console. The HTIF device is quite common in RISC-V emulators and
 	  RISC-V ISS so this driver allows using U-Boot on such platforms.
 
+config ESP32_SERIAL
+	bool "Espressif ESP32 UART support"
+	depends on DM_SERIAL
+	help
+	  Select this to enable UART support for Espressif ESP32 family
+	  devices using the U-Boot driver model.
+
 config SIFIVE_SERIAL
 	bool "SiFive UART support"
 	depends on DM_SERIAL
drivers/serial/Makefile +1 -0
index 66088b44eb6..44fb2170f9a 100644
@@ -22,6 +22,7 @@ obj-$(CONFIG_COREBOOT_SERIAL) += serial_coreboot.o
 obj-$(CONFIG_CORTINA_UART) += serial_cortina.o
 obj-$(CONFIG_DEBUG_SBI_CONSOLE) += serial_sbi.o
 obj-$(CONFIG_EFI_APP) += serial_efi.o
+obj-$(CONFIG_ESP32_SERIAL) += serial_esp32.o
 obj-$(CONFIG_MCFUART) += serial_mcf.o
 obj-$(CONFIG_SYS_NS16550) += ns16550.o
 obj-$(CONFIG_S5P_SERIAL) += serial_s5p.o
drivers/serial/serial_esp32.c new file +367 -0

367 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw
Quoted 8 lines · On Wed, 08 Jul 2026 20:54:06 +0800, [email protected] wrote:

Add a driver model serial driver for Espressif ESP32 UART controllers. The driver supports ESP32, ESP32-S3 and ESP32-S31 UART register variants, including baud-rate setup, FIFO access and basic port initialization.

[...]

Applied to u-boot/main, thanks!

[1/1] serial: esp32: add driver for esp32 series chips

      commit: 64ce0f86ab9ce931013195b68276770d8e02b40f
Signature · 1 line
Tom