Skip to content

Commit 4b7993c

Browse files
committed
[nrf noup] drivers: pinctrl: Add SDP MSPI pin configuration
Configure SDP MSPI pins to switch their control to VPR core Signed-off-by: Jakub Zymelka <[email protected]>
1 parent 473c7da commit 4b7993c

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

drivers/pinctrl/pinctrl_nrf.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ static const nrf_gpio_pin_drive_t drive_modes[NRF_DRIVE_COUNT] = {
9494
#define NRF_PSEL_QSPI(reg, line) ((NRF_QSPI_Type *)reg)->PSEL.line
9595
#endif
9696

97+
#if defined(CONFIG_SOC_NRF54L15_CPUAPP)
98+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller) || defined(CONFIG_MSPI_NRFE)
99+
#define NRF_PSEL_SDP_MSPI(psel) \
100+
nrf_gpio_pin_control_select(psel, NRF_GPIO_PIN_SEL_VPR);
101+
#endif
102+
#endif
103+
97104
int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
98105
uintptr_t reg)
99106
{
@@ -347,6 +354,28 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
347354
input = NRF_GPIO_PIN_INPUT_CONNECT;
348355
break;
349356
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_can) */
357+
#if defined(CONFIG_SOC_NRF54L15_CPUAPP)
358+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller)
359+
case NRF_FUN_SDP_MSPI_CS0:
360+
case NRF_FUN_SDP_MSPI_CS1:
361+
case NRF_FUN_SDP_MSPI_CS2:
362+
case NRF_FUN_SDP_MSPI_CS3:
363+
case NRF_FUN_SDP_MSPI_CS4:
364+
case NRF_FUN_SDP_MSPI_SCK:
365+
case NRF_FUN_SDP_MSPI_DQ0:
366+
case NRF_FUN_SDP_MSPI_DQ1:
367+
case NRF_FUN_SDP_MSPI_DQ2:
368+
case NRF_FUN_SDP_MSPI_DQ3:
369+
case NRF_FUN_SDP_MSPI_DQ4:
370+
case NRF_FUN_SDP_MSPI_DQ5:
371+
case NRF_FUN_SDP_MSPI_DQ6:
372+
case NRF_FUN_SDP_MSPI_DQ7:
373+
NRF_PSEL_SDP_MSPI(psel);
374+
dir = NRF_GPIO_PIN_DIR_OUTPUT;
375+
input = NRF_GPIO_PIN_INPUT_CONNECT;
376+
break;
377+
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller) */
378+
#endif /* CONFIG_SOC_NRF54L15_CPUAPP */
350379
default:
351380
return -ENOTSUP;
352381
}

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,34 @@
162162
#define NRF_FUN_CAN_TX 46U
163163
/** CAN RX */
164164
#define NRF_FUN_CAN_RX 47U
165+
/** SDP_MSPI CK */
166+
#define NRF_FUN_SDP_MSPI_SCK 48U
167+
/** SDP_MSPI DQ0 */
168+
#define NRF_FUN_SDP_MSPI_DQ0 49U
169+
/** SDP_MSPI DQ1 */
170+
#define NRF_FUN_SDP_MSPI_DQ1 50U
171+
/** SDP_MSPI DQ2 */
172+
#define NRF_FUN_SDP_MSPI_DQ2 51U
173+
/** SDP_MSPI DQ3 */
174+
#define NRF_FUN_SDP_MSPI_DQ3 52U
175+
/** SDP_MSPI DQ4 */
176+
#define NRF_FUN_SDP_MSPI_DQ4 53U
177+
/** SDP_MSPI DQ5 */
178+
#define NRF_FUN_SDP_MSPI_DQ5 54U
179+
/** SDP_MSPI DQ6 */
180+
#define NRF_FUN_SDP_MSPI_DQ6 55U
181+
/** SDP_MSPI DQ7 */
182+
#define NRF_FUN_SDP_MSPI_DQ7 56U
183+
/** SDP_MSPI CS0 */
184+
#define NRF_FUN_SDP_MSPI_CS0 57U
185+
/** SDP_MSPI CS1 */
186+
#define NRF_FUN_SDP_MSPI_CS1 58U
187+
/** SDP_MSPI CS2 */
188+
#define NRF_FUN_SDP_MSPI_CS2 59U
189+
/** SDP_MSPI CS3 */
190+
#define NRF_FUN_SDP_MSPI_CS3 60U
191+
/** SDP_MSPI CS4 */
192+
#define NRF_FUN_SDP_MSPI_CS4 61U
165193

166194
/** @} */
167195

0 commit comments

Comments
 (0)