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:
parent
244aecf2d2
commit
b6a31a80d0
2 changed files with 26 additions and 5 deletions
|
@ -162,13 +162,29 @@ endif # SPI_2
|
||||||
|
|
||||||
if SPI_3
|
if SPI_3
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "SPI Port 3 Driver type"
|
||||||
|
|
||||||
config SPI_3_NRF_SPIM
|
config SPI_3_NRF_SPIM
|
||||||
bool
|
bool "nRF SPIM 3"
|
||||||
depends on HAS_HW_NRF_SPIM3
|
depends on HAS_HW_NRF_SPIM3
|
||||||
select NRFX_SPIM
|
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
|
config SPI_3_NRF_ORC
|
||||||
hex "Over-read Character"
|
hex "Over-read Character"
|
||||||
|
@ -178,8 +194,11 @@ config SPI_3_NRF_ORC
|
||||||
Over-read character. Character clocked out after an over-read
|
Over-read character. Character clocked out after an over-read
|
||||||
of the transmit buffer.
|
of the transmit buffer.
|
||||||
|
|
||||||
|
endif # SPI_3_NRF_SPIM || SPI_3_NRF_SPIS
|
||||||
|
|
||||||
config SPI_3_NRF_RX_DELAY
|
config SPI_3_NRF_RX_DELAY
|
||||||
int "MISO sampling delay"
|
int "MISO sampling delay"
|
||||||
|
depends on SPI_3_NRF_SPIM && SOC_NRF52840
|
||||||
range 0 7
|
range 0 7
|
||||||
default 2
|
default 2
|
||||||
help
|
help
|
||||||
|
@ -187,8 +206,6 @@ config SPI_3_NRF_RX_DELAY
|
||||||
edge of SCK (leading or trailing, depending on the CPHA setting used)
|
edge of SCK (leading or trailing, depending on the CPHA setting used)
|
||||||
until the input serial data on MISO is actually sampled.
|
until the input serial data on MISO is actually sampled.
|
||||||
|
|
||||||
endif # SPI_3_NRF_SPIM
|
|
||||||
|
|
||||||
endif # SPI_3
|
endif # SPI_3
|
||||||
|
|
||||||
if NRFX_SPIM
|
if NRFX_SPIM
|
||||||
|
|
|
@ -295,3 +295,7 @@ SPI_NRFX_SPIS_DEVICE(1);
|
||||||
#ifdef CONFIG_SPI_2_NRF_SPIS
|
#ifdef CONFIG_SPI_2_NRF_SPIS
|
||||||
SPI_NRFX_SPIS_DEVICE(2);
|
SPI_NRFX_SPIS_DEVICE(2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SPI_3_NRF_SPIS
|
||||||
|
SPI_NRFX_SPIS_DEVICE(3);
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue