Skip to content

Commit 17ddd44

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 7702a1b commit 17ddd44

File tree

2 files changed

+59
-2
lines changed

2 files changed

+59
-2
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
{
@@ -374,6 +381,28 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
374381
input = NRF_GPIO_PIN_INPUT_CONNECT;
375382
break;
376383
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_can) */
384+
#if defined(CONFIG_SOC_NRF54L15_CPUAPP)
385+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller)
386+
case NRF_FUN_SDP_MSPI_CS0:
387+
case NRF_FUN_SDP_MSPI_CS1:
388+
case NRF_FUN_SDP_MSPI_CS2:
389+
case NRF_FUN_SDP_MSPI_CS3:
390+
case NRF_FUN_SDP_MSPI_CS4:
391+
case NRF_FUN_SDP_MSPI_SCK:
392+
case NRF_FUN_SDP_MSPI_DQ0:
393+
case NRF_FUN_SDP_MSPI_DQ1:
394+
case NRF_FUN_SDP_MSPI_DQ2:
395+
case NRF_FUN_SDP_MSPI_DQ3:
396+
case NRF_FUN_SDP_MSPI_DQ4:
397+
case NRF_FUN_SDP_MSPI_DQ5:
398+
case NRF_FUN_SDP_MSPI_DQ6:
399+
case NRF_FUN_SDP_MSPI_DQ7:
400+
NRF_PSEL_SDP_MSPI(psel);
401+
dir = NRF_GPIO_PIN_DIR_OUTPUT;
402+
input = NRF_GPIO_PIN_INPUT_CONNECT;
403+
break;
404+
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller) */
405+
#endif /* CONFIG_SOC_NRF54L15_CPUAPP */
377406
default:
378407
return -ENOTSUP;
379408
}

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

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,37 @@
163163
/** CAN RX */
164164
#define NRF_FUN_CAN_RX 47U
165165
/** GRTC fast clock output */
166-
#define NRF_FUN_GRTC_CLKOUT_FAST 55U
166+
#define NRF_FUN_GRTC_CLKOUT_FAST 48U
167167
/** GRTC slow clock output */
168-
#define NRF_FUN_GRTC_CLKOUT_32K 56U
168+
#define NRF_FUN_GRTC_CLKOUT_32K 49U
169+
/** SDP_MSPI CK */
170+
#define NRF_FUN_SDP_MSPI_SCK 50U
171+
/** SDP_MSPI DQ0 */
172+
#define NRF_FUN_SDP_MSPI_DQ0 51U
173+
/** SDP_MSPI DQ1 */
174+
#define NRF_FUN_SDP_MSPI_DQ1 52U
175+
/** SDP_MSPI DQ2 */
176+
#define NRF_FUN_SDP_MSPI_DQ2 53U
177+
/** SDP_MSPI DQ3 */
178+
#define NRF_FUN_SDP_MSPI_DQ3 54U
179+
/** SDP_MSPI DQ4 */
180+
#define NRF_FUN_SDP_MSPI_DQ4 55U
181+
/** SDP_MSPI DQ5 */
182+
#define NRF_FUN_SDP_MSPI_DQ5 56U
183+
/** SDP_MSPI DQ6 */
184+
#define NRF_FUN_SDP_MSPI_DQ6 57U
185+
/** SDP_MSPI DQ7 */
186+
#define NRF_FUN_SDP_MSPI_DQ7 58U
187+
/** SDP_MSPI CS0 */
188+
#define NRF_FUN_SDP_MSPI_CS0 59U
189+
/** SDP_MSPI CS1 */
190+
#define NRF_FUN_SDP_MSPI_CS1 60U
191+
/** SDP_MSPI CS2 */
192+
#define NRF_FUN_SDP_MSPI_CS2 61U
193+
/** SDP_MSPI CS3 */
194+
#define NRF_FUN_SDP_MSPI_CS3 62U
195+
/** SDP_MSPI CS4 */
196+
#define NRF_FUN_SDP_MSPI_CS4 63U
169197

170198
/** @} */
171199

0 commit comments

Comments
 (0)