drivers: spi: nrfx: Add support for SPIS3

This patch adds missing SPI_3_NRF_SPIS Kconfig option (referenced by
`ext/hal/nordic/nrfx_config_nrf9160.h`, although not defined anywhere)
and adds support for SPIS3 instance in the nrfx_spis driver shim.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2019-02-26 08:36:35 +01:00 committed by Anas Nashif
commit b6a31a80d0
2 changed files with 26 additions and 5 deletions

View file

@ -162,13 +162,29 @@ endif # SPI_2
if SPI_3
choice
prompt "SPI Port 3 Driver type"
config SPI_3_NRF_SPIM
bool
bool "nRF SPIM 3"
depends on HAS_HW_NRF_SPIM3
select NRFX_SPIM
default y
help
Enable nRF SPI Master with EasyDMA on port 3.
if SPI_3_NRF_SPIM
config SPI_3_NRF_SPIS
bool "nRF SPIS 3"
depends on HAS_HW_NRF_SPIS3
depends on SPI_SLAVE
select NRFX_SPIS
help
Enable nRF SPI Slave with EasyDMA on port 3.
Due to hardware limitations the implementation supports only simple
buffers (consisting of one part) located in RAM.
endchoice
if SPI_3_NRF_SPIM || SPI_3_NRF_SPIS
config SPI_3_NRF_ORC
hex "Over-read Character"
@ -178,8 +194,11 @@ config SPI_3_NRF_ORC
Over-read character. Character clocked out after an over-read
of the transmit buffer.
endif # SPI_3_NRF_SPIM || SPI_3_NRF_SPIS
config SPI_3_NRF_RX_DELAY
int "MISO sampling delay"
depends on SPI_3_NRF_SPIM && SOC_NRF52840
range 0 7
default 2
help
@ -187,8 +206,6 @@ config SPI_3_NRF_RX_DELAY
edge of SCK (leading or trailing, depending on the CPHA setting used)
until the input serial data on MISO is actually sampled.
endif # SPI_3_NRF_SPIM
endif # SPI_3
if NRFX_SPIM

View file

@ -295,3 +295,7 @@ SPI_NRFX_SPIS_DEVICE(1);
#ifdef CONFIG_SPI_2_NRF_SPIS
SPI_NRFX_SPIS_DEVICE(2);
#endif
#ifdef CONFIG_SPI_3_NRF_SPIS
SPI_NRFX_SPIS_DEVICE(3);
#endif