Skip to content

Commit f785eb8

Browse files
jaz1-nordicanangl
authored andcommitted
[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]> (cherry picked from commit 2540f7b)
1 parent 1bdb98d commit f785eb8

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
@@ -108,6 +108,13 @@ static const nrf_gpio_pin_drive_t drive_modes[NRF_DRIVE_COUNT] = {
108108
#endif
109109
#endif
110110

111+
#if defined(CONFIG_SOC_NRF54L15_CPUAPP)
112+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller) || defined(CONFIG_MSPI_NRFE)
113+
#define NRF_PSEL_SDP_MSPI(psel) \
114+
nrf_gpio_pin_control_select(psel, NRF_GPIO_PIN_SEL_VPR);
115+
#endif
116+
#endif
117+
111118
int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
112119
uintptr_t reg)
113120
{
@@ -420,6 +427,28 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
420427
input = NRF_GPIO_PIN_INPUT_CONNECT;
421428
break;
422429
#endif /* defined(NRF_PSEL_TWIS) */
430+
#if defined(CONFIG_SOC_NRF54L15_CPUAPP)
431+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller)
432+
case NRF_FUN_SDP_MSPI_CS0:
433+
case NRF_FUN_SDP_MSPI_CS1:
434+
case NRF_FUN_SDP_MSPI_CS2:
435+
case NRF_FUN_SDP_MSPI_CS3:
436+
case NRF_FUN_SDP_MSPI_CS4:
437+
case NRF_FUN_SDP_MSPI_SCK:
438+
case NRF_FUN_SDP_MSPI_DQ0:
439+
case NRF_FUN_SDP_MSPI_DQ1:
440+
case NRF_FUN_SDP_MSPI_DQ2:
441+
case NRF_FUN_SDP_MSPI_DQ3:
442+
case NRF_FUN_SDP_MSPI_DQ4:
443+
case NRF_FUN_SDP_MSPI_DQ5:
444+
case NRF_FUN_SDP_MSPI_DQ6:
445+
case NRF_FUN_SDP_MSPI_DQ7:
446+
NRF_PSEL_SDP_MSPI(psel);
447+
dir = NRF_GPIO_PIN_DIR_OUTPUT;
448+
input = NRF_GPIO_PIN_INPUT_CONNECT;
449+
break;
450+
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller) */
451+
#endif /* CONFIG_SOC_NRF54L15_CPUAPP */
423452
default:
424453
return -ENOTSUP;
425454
}

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,34 @@
172172
#define NRF_FUN_GRTC_CLKOUT_FAST 55U
173173
/** GRTC slow clock output */
174174
#define NRF_FUN_GRTC_CLKOUT_32K 56U
175+
/** SDP_MSPI CK */
176+
#define NRF_FUN_SDP_MSPI_SCK 57U
177+
/** SDP_MSPI DQ0 */
178+
#define NRF_FUN_SDP_MSPI_DQ0 58U
179+
/** SDP_MSPI DQ1 */
180+
#define NRF_FUN_SDP_MSPI_DQ1 59U
181+
/** SDP_MSPI DQ2 */
182+
#define NRF_FUN_SDP_MSPI_DQ2 60U
183+
/** SDP_MSPI DQ3 */
184+
#define NRF_FUN_SDP_MSPI_DQ3 61U
185+
/** SDP_MSPI DQ4 */
186+
#define NRF_FUN_SDP_MSPI_DQ4 62U
187+
/** SDP_MSPI DQ5 */
188+
#define NRF_FUN_SDP_MSPI_DQ5 63U
189+
/** SDP_MSPI DQ6 */
190+
#define NRF_FUN_SDP_MSPI_DQ6 64U
191+
/** SDP_MSPI DQ7 */
192+
#define NRF_FUN_SDP_MSPI_DQ7 65U
193+
/** SDP_MSPI CS0 */
194+
#define NRF_FUN_SDP_MSPI_CS0 66U
195+
/** SDP_MSPI CS1 */
196+
#define NRF_FUN_SDP_MSPI_CS1 67U
197+
/** SDP_MSPI CS2 */
198+
#define NRF_FUN_SDP_MSPI_CS2 68U
199+
/** SDP_MSPI CS3 */
200+
#define NRF_FUN_SDP_MSPI_CS3 69U
201+
/** SDP_MSPI CS4 */
202+
#define NRF_FUN_SDP_MSPI_CS4 70U
175203

176204
/** @} */
177205

0 commit comments

Comments
 (0)