Skip to content

Commit b7a1dcd

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 492f7c8 commit b7a1dcd

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
@@ -103,6 +103,13 @@ static const nrf_gpio_pin_drive_t drive_modes[NRF_DRIVE_COUNT] = {
103103
#endif
104104
#endif
105105

106+
#if defined(CONFIG_SOC_NRF54L15_CPUAPP)
107+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller) || defined(CONFIG_MSPI_NRFE)
108+
#define NRF_PSEL_SDP_MSPI(psel) \
109+
nrf_gpio_pin_control_select(psel, NRF_GPIO_PIN_SEL_VPR);
110+
#endif
111+
#endif
112+
106113
int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
107114
uintptr_t reg)
108115
{
@@ -392,6 +399,28 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
392399
input = NRF_GPIO_PIN_INPUT_DISCONNECT;
393400
break;
394401
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_exmif) */
402+
#if defined(CONFIG_SOC_NRF54L15_CPUAPP)
403+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller)
404+
case NRF_FUN_SDP_MSPI_CS0:
405+
case NRF_FUN_SDP_MSPI_CS1:
406+
case NRF_FUN_SDP_MSPI_CS2:
407+
case NRF_FUN_SDP_MSPI_CS3:
408+
case NRF_FUN_SDP_MSPI_CS4:
409+
case NRF_FUN_SDP_MSPI_SCK:
410+
case NRF_FUN_SDP_MSPI_DQ0:
411+
case NRF_FUN_SDP_MSPI_DQ1:
412+
case NRF_FUN_SDP_MSPI_DQ2:
413+
case NRF_FUN_SDP_MSPI_DQ3:
414+
case NRF_FUN_SDP_MSPI_DQ4:
415+
case NRF_FUN_SDP_MSPI_DQ5:
416+
case NRF_FUN_SDP_MSPI_DQ6:
417+
case NRF_FUN_SDP_MSPI_DQ7:
418+
NRF_PSEL_SDP_MSPI(psel);
419+
dir = NRF_GPIO_PIN_DIR_OUTPUT;
420+
input = NRF_GPIO_PIN_INPUT_CONNECT;
421+
break;
422+
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller) */
423+
#endif /* CONFIG_SOC_NRF54L15_CPUAPP */
395424
default:
396425
return -ENOTSUP;
397426
}

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

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

172200
/** @} */
173201

0 commit comments

Comments
 (0)