Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drivers/clock_control/clock_control_mcux_ccm.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LOG_MODULE_REGISTER(clock_control);
static sc_ipc_t ipc_handle;
#endif

#ifdef CONFIG_SPI_NXP_LPSPI
#if defined(CONFIG_SPI_NXP_LPSPI) || defined(CONFIG_SPI_MCUX_LPSPI)
static const clock_name_t lpspi_clocks[] = {
kCLOCK_Usb1PllPfd1Clk,
kCLOCK_Usb1PllPfd0Clk,
Expand Down Expand Up @@ -270,7 +270,7 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
break;
#endif

#ifdef CONFIG_SPI_NXP_LPSPI
#if defined(CONFIG_SPI_NXP_LPSPI) || defined(CONFIG_SPI_MCUX_LPSPI)
case IMX_CCM_LPSPI_CLK:
{
uint32_t lpspi_mux = CLOCK_GetMux(kCLOCK_LpspiMux);
Expand Down
4 changes: 2 additions & 2 deletions drivers/clock_control/clock_control_mcux_ccm_rev2.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
break;
#endif

#ifdef CONFIG_SPI_NXP_LPSPI
#if defined(CONFIG_SPI_NXP_LPSPI) || defined(CONFIG_SPI_MCUX_LPSPI)
#if defined(CONFIG_SOC_SERIES_IMXRT118X)
case IMX_CCM_LPSPI0102_CLK:
clock_root = kCLOCK_Root_Lpspi0102 + instance;
Expand All @@ -91,7 +91,7 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
clock_root = kCLOCK_Root_Lpspi1 + instance;
break;
#endif /* CONFIG_SOC_SERIES_IMXRT118X */
#endif /* CONFIG_SPI_NXP_LPSPI */
#endif /* CONFIG_SPI_NXP_LPSPI || CONFIG_SPI_MCUX_LPSPI */

#ifdef CONFIG_UART_MCUX_LPUART
#if defined(CONFIG_SOC_SERIES_IMXRT118X)
Expand Down
4 changes: 2 additions & 2 deletions drivers/clock_control/clock_control_mcux_syscon.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,14 +603,14 @@ static int mcux_lpc_syscon_clock_control_get_subsys_rate(const struct device *de
break;
#endif /* defined(CONFIG_DT_HAS_NXP_XSPI_ENABLED) */

#if (defined(CONFIG_SPI_NXP_LPSPI) && CONFIG_SOC_FAMILY_MCXA)
#if ((defined(CONFIG_SPI_NXP_LPSPI) || defined(CONFIG_SPI_MCUX_LPSPI)) && CONFIG_SOC_FAMILY_MCXA)
case MCUX_LPSPI0_CLK:
*rate = CLOCK_GetLpspiClkFreq(0);
break;
case MCUX_LPSPI1_CLK:
*rate = CLOCK_GetLpspiClkFreq(1);
break;
#endif /* defined(CONFIG_SPI_NXP_LPSPI) */
#endif /* defined(CONFIG_SPI_NXP_LPSPI) || defined(CONFIG_SPI_MCUX_LPSPI) */
}

return 0;
Expand Down
1 change: 1 addition & 0 deletions drivers/spi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_DSPI spi_mcux_dspi.c)
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_ECSPI spi_mcux_ecspi.c)
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_FLEXCOMM spi_mcux_flexcomm.c)
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_FLEXIO spi_mcux_flexio.c)
zephyr_library_sources_ifdef(CONFIG_SPI_MCUX_LPSPI spi_mcux_lpspi.c)
zephyr_library_sources_ifdef(CONFIG_SPI_MEC5_QSPI spi_mchp_mec5_qspi.c)
zephyr_library_sources_ifdef(CONFIG_SPI_NPCX_SPIP spi_npcx_spip.c)
zephyr_library_sources_ifdef(CONFIG_SPI_NRFX_SPI spi_nrfx_spi.c spi_nrfx_common.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/spi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ source "drivers/spi/Kconfig.mcux_dspi"
source "drivers/spi/Kconfig.mcux_ecspi"
source "drivers/spi/Kconfig.mcux_flexcomm"
source "drivers/spi/Kconfig.mcux_flexio"
source "drivers/spi/Kconfig.mcux_lpspi"
source "drivers/spi/Kconfig.mec5"
source "drivers/spi/Kconfig.npcx"
source "drivers/spi/Kconfig.nrfx"
Expand Down
37 changes: 37 additions & 0 deletions drivers/spi/Kconfig.mcux_lpspi
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# MCUXpresso SDK SPI

# Copyright (c) 2018, NXP
# SPDX-License-Identifier: Apache-2.0

config SPI_MCUX_LPSPI
bool "MCUX LPSPI driver"
default n
depends on !SPI_NXP_LPSPI
depends on DT_HAS_NXP_LPSPI_ENABLED
depends on CLOCK_CONTROL
select PINCTRL
help
Enable support for MCUX LPSPI driver.

if SPI_MCUX_LPSPI
config SPI_MCUX_LPSPI_DMA
bool "MCUX LPSPI SPI DMA Support"
select DMA
help
Enable the SPI DMA mode for SPI instances
that enable dma channels in their device tree node.

if SPI_RTIO
config SPI_MCUX_RTIO_SQ_SIZE
int "number of available submission queue entries"
default 8 # sensible default that covers most common spi transactions
help
when rtio is use with spi each driver holds a context with which blocking
api calls use to perform spi transactions. this queue needs to be as deep
as the longest set of spi_buf_sets used, where normal spi operations are
used (equal length buffers). it may need to be slightly deeper where the
spi buffer sets for transmit/receive are not always matched equally in
length as these are transformed into normal transceives.
endif # SPI_RTIO

endif # SPI_MCUX_LPSPI
Loading
Loading