Skip to content

Commit 6ab2405

Browse files
committed
drivers: pinctrl: nrf: add support for MSPI
Support for new MSPI peripheral where there is no PSEL so pins are setup through CTRLSEL. Signed-off-by: David Jewsbury <[email protected]>
1 parent 7b6ba5c commit 6ab2405

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

drivers/pinctrl/pinctrl_nrf.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,19 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
531531
input = NRF_GPIO_PIN_INPUT_DISCONNECT;
532532
break;
533533
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_exmif) */
534+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_mspi)
535+
/* No PSEL for MSPI, pins only controlled by CTRLSEL */
536+
case NRF_FUN_MSPI_CSN:
537+
case NRF_FUN_MSPI_SCK:
538+
case NRF_FUN_MSPI_DQ0:
539+
case NRF_FUN_MSPI_DQ1:
540+
case NRF_FUN_MSPI_DQ2:
541+
case NRF_FUN_MSPI_DQ3:
542+
nrf_gpio_pin_control_select(psel, NRF_GPIO_PIN_SEL_QSPI);
543+
dir = NRF_GPIO_PIN_DIR_OUTPUT;
544+
input = NRF_GPIO_PIN_INPUT_CONNECT;
545+
break;
546+
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_mspi) */
534547
#if defined(NRF_PSEL_TWIS)
535548
case NRF_FUN_TWIS_SCL:
536549
NRF_PSEL_TWIS(reg, SCL) = psel;

include/zephyr/dt-bindings/pinctrl/nrf-pinctrl.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,18 @@
186186
#define NRF_FUN_TDM_SDOUT 76U
187187
/** TDM MCK */
188188
#define NRF_FUN_TDM_MCK 77U
189+
/** MSPI version 2 Chip select */
190+
#define NRF_FUN_MSPI_CSN 78U
191+
/** MSPI version 2 Clock pin */
192+
#define NRF_FUN_MSPI_SCK 79U
193+
/** MSPI version 2 Data pin 0 */
194+
#define NRF_FUN_MSPI_DQ0 80U
195+
/** MSPI version 2 Data pin 1 */
196+
#define NRF_FUN_MSPI_DQ1 81U
197+
/** MSPI version 2 Data pin 2 */
198+
#define NRF_FUN_MSPI_DQ2 82U
199+
/** MSPI version 2 Data pin 3 */
200+
#define NRF_FUN_MSPI_DQ3 83U
189201

190202
/** @} */
191203

0 commit comments

Comments
 (0)