Skip to content

Commit

Permalink
drivers: spi: Microchip XEC General Purpose SPI (GPSPI) controller
Browse files Browse the repository at this point in the history
SPI driver for Microchip XEC family General Purpose SPI (GPSPI)
controller. GPSPI is a byte oriented controller with hardware
support of chip select assertion. The controller and driver also
supports GPIO control of SPI chip select based upon the device
tree configuration. The driver supports SPI asynchronous mode for
byte by byte transfers (no DMA at this time).

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
  • Loading branch information
Manimaran-A committed Feb 6, 2024
1 parent 8fa312f commit c720f06
Show file tree
Hide file tree
Showing 6 changed files with 865 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/spi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ zephyr_library_sources_ifdef(CONFIG_SPI_AMBIQ spi_ambiq.c)
zephyr_library_sources_ifdef(CONFIG_SPI_RPI_PICO_PIO spi_rpi_pico_pio.c)
zephyr_library_sources_ifdef(CONFIG_MSPI_AMBIQ mspi_ambiq.c)
zephyr_library_sources_ifdef(CONFIG_SPI_MCHP_MSS spi_mchp_mss.c)
zephyr_library_sources_ifdef(CONFIG_SPI_XEC_GPSPI spi_xec_gpspi.c)

zephyr_library_sources_ifdef(CONFIG_SPI_RTIO spi_rtio.c)
zephyr_library_sources_ifdef(CONFIG_SPI_ASYNC spi_signal.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE spi_handlers.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/spi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,6 @@ source "drivers/spi/Kconfig.npcx"
source "drivers/spi/Kconfig.mchp_mss"

source "drivers/spi/Kconfig.grlib_spimctrl"
source "drivers/spi/Kconfig.xec_gpspi"

endif # SPI
25 changes: 25 additions & 0 deletions drivers/spi/Kconfig.xec_gpspi
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Microchip XEC GPSPI

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

config SPI_XEC_GPSPI
bool "Microchip MEC15x/MEC172x XEC GPSPI driver"
default y
depends on DT_HAS_MICROCHIP_XEC_GPSPI_ENABLED
help
Enable support for Microchip MEC15xx/MEC172x XEC GPSPI driver.
The GPSPI controller is a simple, byte-by-byte GPI controller
using GPIO's as chip select.

if SPI_XEC_GPSPI

config SPI_XEC_GPSPI_DMA
bool "Microchip XEC GPSPI DMA Support"
select DMA
help
Enable the SPI DMA mode for GPSPI instances
that enable dma channels in their device tree node.
Enables Microchip XEC DMA driver.

endif # SPI_XEC_GPSPI
Loading

0 comments on commit c720f06

Please sign in to comment.