2025-04-01 18:17:11 -05:00
|
|
|
# Copyright 2018, 2024-2025 NXP
|
2018-09-14 16:06:13 -05:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2019-10-22 01:04:04 +02:00
|
|
|
config SPI_MCUX_LPSPI
|
2024-12-09 11:35:48 -06:00
|
|
|
bool "NXP LPSPI peripheral"
|
2022-07-20 16:14:56 -05:00
|
|
|
default y
|
2024-11-24 14:32:27 +07:00
|
|
|
depends on DT_HAS_NXP_LPSPI_ENABLED
|
2022-07-20 16:14:56 -05:00
|
|
|
depends on CLOCK_CONTROL
|
2023-04-19 16:41:53 +02:00
|
|
|
select PINCTRL
|
2018-09-14 16:06:13 -05:00
|
|
|
help
|
2025-04-01 18:17:11 -05:00
|
|
|
Enable driver support for NXP LPSPI.
|
2021-11-01 14:53:09 -05:00
|
|
|
|
|
|
|
if SPI_MCUX_LPSPI
|
2024-12-09 11:35:48 -06:00
|
|
|
|
2021-11-01 14:53:09 -05:00
|
|
|
config SPI_MCUX_LPSPI_DMA
|
2025-04-01 18:17:11 -05:00
|
|
|
bool "NXP LPSPI DMA-based Driver"
|
2025-02-06 10:05:15 -06:00
|
|
|
default y
|
2021-11-01 14:53:09 -05:00
|
|
|
select DMA
|
2024-12-09 14:53:25 -06:00
|
|
|
depends on $(dt_compat_any_has_prop,$(DT_COMPAT_NXP_LPSPI),dmas)
|
2021-11-01 14:53:09 -05:00
|
|
|
help
|
2025-04-01 18:17:11 -05:00
|
|
|
Enable DMA-based transfers for LPSPI peripherals
|
|
|
|
that have a dmas property specified in their DT node.
|
|
|
|
The DMA based driver prioritizes bandwidth over latency, due to
|
|
|
|
DMA being more efficient for larger data transfers, to avoid CPU
|
|
|
|
having to be utilized to do the work. However, setting up a DMA
|
|
|
|
transfer is more complicated setup than just starting the transfer
|
|
|
|
immediately with CPU, so there could be more latency between
|
|
|
|
the point of requesting a transfer and when it actually starts.
|
2023-08-29 13:26:38 -05:00
|
|
|
|
2025-02-19 20:01:15 -06:00
|
|
|
config SPI_MCUX_LPSPI_CPU
|
2025-04-01 18:17:11 -05:00
|
|
|
bool "NXP LPSPI CPU-based driver"
|
2024-12-09 11:35:48 -06:00
|
|
|
default y
|
2024-12-09 14:53:25 -06:00
|
|
|
depends on $(dt_compat_any_not_has_prop,$(DT_COMPAT_NXP_LPSPI),dmas) || !SPI_MCUX_LPSPI_DMA
|
2024-12-09 11:35:48 -06:00
|
|
|
help
|
2025-04-01 18:17:11 -05:00
|
|
|
Enable "normal" CPU based SPI driver for LPSPI.
|
|
|
|
This has lower latency than DMA-based driver but over the
|
|
|
|
longer transfers will likely have less bandwidth and use more CPU time.
|
2023-08-29 13:26:38 -05:00
|
|
|
|
2025-05-19 14:43:18 -05:00
|
|
|
config SPI_NXP_LPSPI_TXFIFO_WAIT_CYCLES
|
|
|
|
int "Number of CPU cycles to wait on TX fifo empty"
|
|
|
|
default 0 if DEBUG
|
|
|
|
default 10000
|
|
|
|
help
|
|
|
|
This option most likely does not need changed.
|
|
|
|
The drivers tend to need to wait on confirming the transmit command
|
|
|
|
is consumed by the hardware by checking of the TX fifo is emptied.
|
|
|
|
This option gives a maximum number of CPU cycles to wait on that check.
|
|
|
|
The special value of 0 means infinite, which can be useful for debugging
|
|
|
|
for if there is some programming error that causes TX fifo not to empty.
|
|
|
|
The default of 10000 is arbitrary.
|
|
|
|
|
2021-11-01 14:53:09 -05:00
|
|
|
endif # SPI_MCUX_LPSPI
|