Skip to content

Commit

Permalink
drivers: serial: mec5: Microchip MEC5 UART serial driver
Browse files Browse the repository at this point in the history
We add a serial UART driver for Microchip MEC5 HAL based chips.
The driver supports polling, interrupts, and runtime configuration
features. Power management will be implemented in a future PR.

Signed-off-by: Scott Worley <[email protected]>
  • Loading branch information
scottwcpg committed Oct 22, 2024
1 parent 2bfc2a3 commit 921aaae
Show file tree
Hide file tree
Showing 5 changed files with 725 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/serial/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ zephyr_library_sources_ifdef(CONFIG_UART_SI32_USART uart_si32_usart.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE uart_handlers.c)
zephyr_library_sources_ifdef(CONFIG_UART_SCI_RA uart_renesas_ra_sci.c)
zephyr_library_sources_ifdef(CONFIG_UART_SY1XX uart_sy1xx.c)
zephyr_library_sources_ifdef(CONFIG_UART_MCHP_MEC5 uart_mchp_mec5.c)

if(CONFIG_UART_NATIVE_POSIX)
zephyr_library_compile_definitions(NO_POSIX_CHEATS)
Expand Down
2 changes: 2 additions & 0 deletions drivers/serial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -284,4 +284,6 @@ rsource "Kconfig.sy1xx"

source "drivers/serial/Kconfig.si32"

source "drivers/serial/Kconfig.mec5"

endif # SERIAL
27 changes: 27 additions & 0 deletions drivers/serial/Kconfig.mec5
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Microchip MEC5 UART

# Copyright (c) 2024 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

config UART_MCHP_MEC5
bool "Microchip MEC5 family ns16550 compatible UART driver"
default y
depends on DT_HAS_MICROCHIP_MEC5_UART_ENABLED
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
help
This option enables the UART driver for Microchip MEC5
family processors.

if UART_MCHP_MEC5

config UART_MCHP_MEC5_LINE_CTRL
bool "Serial Line Control for Apps"
depends on UART_LINE_CTRL
help
This enables the API for apps to control the serial line,
such as CTS and RTS.

Says n if not sure.

endif # UART_MCHP_MEC5
Loading

0 comments on commit 921aaae

Please sign in to comment.