Skip to content

Commit 006f4f6

Browse files
committed
drivers: spi: microchip: Add SPI driver for MEC5 HAL quad SPI
SPI driver for Microchip MEC5 HAL based QSPI controller. QSPI is capable of single, dual, and quad opertion. It includes three local DMA channels for each direction to off load firmware. The driver supports CONFIG_SPI_ASYNC and CONFIG_SPI_EXTENDED_MODE. Driver buffer handling tries follows the Zephyr SPI_NOR flash driver model. We keep finding more buffer corner cases the zephyr tests keep adding. Example: flash common test passes SPI RX buffer with a non-null pointer and zero length. Signed-off-by: Scott Worley <[email protected]>
1 parent f412cc6 commit 006f4f6

File tree

6 files changed

+823
-1
lines changed

6 files changed

+823
-1
lines changed

drivers/spi/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_DSPI spi_mcux_dspi.c)
3737
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_ECSPI spi_mcux_ecspi.c)
3838
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_FLEXCOMM spi_mcux_flexcomm.c)
3939
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_FLEXIO spi_mcux_flexio.c)
40+
zephyr_library_sources_ifdef(CONFIG_SPI_MEC5_QSPI spi_mchp_mec5_qspi.c)
4041
zephyr_library_sources_ifdef(CONFIG_SPI_NPCX_SPIP spi_npcx_spip.c)
4142
zephyr_library_sources_ifdef(CONFIG_SPI_NRFX_SPI spi_nrfx_spi.c spi_nrfx_common.c)
4243
zephyr_library_sources_ifdef(CONFIG_SPI_NRFX_SPIM spi_nrfx_spim.c spi_nrfx_common.c)

drivers/spi/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,6 @@ source "drivers/spi/Kconfig.xmc4xxx"
144144
source "drivers/spi/spi_nxp_lpspi/Kconfig"
145145
# zephyr-keep-sorted-stop
146146

147+
source "drivers/spi/Kconfig.mec5"
148+
147149
endif # SPI

drivers/spi/Kconfig.mec5

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Microchip MEC5 QSPI
2+
3+
# Copyright (c) 2025 Microchip Technology Inc.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config SPI_MEC5_QSPI
7+
bool "Microchip MEC5 QSPI driver"
8+
default y
9+
depends on DT_HAS_MICROCHIP_MEC5_QSPI_ENABLED
10+
select PINCTRL
11+
help
12+
Enable support for Microchip MEC5 QSPI driver.

0 commit comments

Comments
 (0)