@@ -14,11 +14,13 @@ menuconfig SPI_NRFX
1414
1515if SPI_NRFX
1616
17- # In most Nordic SoCs the SPI and TWI peripherals with the same instance
18- # number share certain resources and cannot be used at the same time.
19- # In nRF52810 there are only single instances of these peripherals and
20- # they are arranged in a different way so this limitation does not apply.
21- if SPI_0 && (!I2C_0 || SOC_NRF52810)
17+ # In most Nordic SoCs, SPI and TWI peripherals with the same instance number
18+ # share certain resources and therefore cannot be used at the same time
19+ # (in nRF91 Series this limitation concerns UART peripherals as well).
20+ # In nRF52810 though, there are only single instances of these peripherals
21+ # and they are arranged in a different way, so this limitation does not apply.
22+ if SPI_0 && (SOC_NRF52810 || \
23+ (!I2C_0 && !(SOC_SERIES_NRF91X && UART_0_NRF_UARTE)))
2224
2325choice
2426 prompt "SPI Port 0 Driver type"
@@ -63,10 +65,12 @@ config SPI_0_NRF_ORC
6365
6466endif # SPI_0_NRF_SPI || SPI_0_NRF_SPIM || SPI_0_NRF_SPIS
6567
66- endif # SPI_0 && (!I2C_0 || SOC_NRF52810)
68+ endif # SPI_0 && (SOC_NRF52810 || ...
6769
68- # Nordic TWIx1 and SPIx1 instances can not be used at the same time.
69- if SPI_1 && !I2C_1
70+ # In Nordic SoCs, SPI and TWI peripherals with the same instance number
71+ # share certain resources and therefore cannot be used at the same time
72+ # (in nRF91 Series this limitation concerns UART peripherals as well).
73+ if SPI_1 && !I2C_1 && !(SOC_SERIES_NRF91X && UART_1_NRF_UARTE)
7074
7175choice
7276 prompt "SPI Port 1 Driver type"
@@ -111,9 +115,12 @@ config SPI_1_NRF_ORC
111115
112116endif # SPI_1_NRF_SPI || SPI_1_NRF_SPIM || SPI_1_NRF_SPIS
113117
114- endif # SPI_1 && !I2C_1
118+ endif # SPI_1 && !I2C_1 && !(SOC_SERIES_NRF91X && UART_1_NRF_UARTE)
115119
116- if SPI_2
120+ # In Nordic SoCs, SPI and TWI peripherals with the same instance number
121+ # share certain resources and therefore cannot be used at the same time
122+ # (in nRF91 Series this limitation concerns UART peripherals as well).
123+ if SPI_2 && !I2C_2 && !(SOC_SERIES_NRF91X && UART_2_NRF_UARTE)
117124
118125choice
119126 prompt "SPI Port 2 Driver type"
@@ -158,9 +165,12 @@ config SPI_2_NRF_ORC
158165
159166endif # SPI_2_NRF_SPI || SPI_2_NRF_SPIM || SPI_2_NRF_SPIS
160167
161- endif # SPI_2
168+ endif # SPI_2 && !I2C_2 && !(SOC_SERIES_NRF91X && UART_2_NRF_UARTE)
162169
163- if SPI_3
170+ # In Nordic SoCs, SPI and TWI peripherals with the same instance number
171+ # share certain resources and therefore cannot be used at the same time
172+ # (in nRF91 Series this limitation concerns UART peripherals as well).
173+ if SPI_3 && !I2C_3 && !(SOC_SERIES_NRF91X && UART_3_NRF_UARTE)
164174
165175choice
166176 prompt "SPI Port 3 Driver type"
@@ -206,7 +216,7 @@ config SPI_3_NRF_RX_DELAY
206216 edge of SCK (leading or trailing, depending on the CPHA setting used)
207217 until the input serial data on MISO is actually sampled.
208218
209- endif # SPI_3
219+ endif # SPI_3 && !I2C_3 && !(SOC_SERIES_NRF91X && UART_3_NRF_UARTE)
210220
211221if NRFX_SPIM
212222
0 commit comments