Skip to content

Commit 037d036

Browse files
jaz1-nordicadamkondraciuk
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 e30ee52 commit 037d036

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

drivers/pinctrl/pinctrl_nrf.c

+29
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ static const nrf_gpio_pin_drive_t drive_modes[NRF_DRIVE_COUNT] = {
112112
#define NRF_PSEL_TDM(reg, line) ((NRF_TDM_Type *)reg)->PSEL.line
113113
#endif
114114

115+
#if defined(CONFIG_SOC_NRF54L15_CPUAPP)
116+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller) || defined(CONFIG_MSPI_NRFE)
117+
#define NRF_PSEL_SDP_MSPI(psel) \
118+
nrf_gpio_pin_control_select(psel, NRF_GPIO_PIN_SEL_VPR);
119+
#endif
120+
#endif
121+
115122
int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
116123
uintptr_t reg)
117124
{
@@ -465,6 +472,28 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
465472
input = NRF_GPIO_PIN_INPUT_CONNECT;
466473
break;
467474
#endif /* defined(NRF_PSEL_TWIS) */
475+
#if defined(CONFIG_SOC_NRF54L15_CPUAPP)
476+
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller)
477+
case NRF_FUN_SDP_MSPI_CS0:
478+
case NRF_FUN_SDP_MSPI_CS1:
479+
case NRF_FUN_SDP_MSPI_CS2:
480+
case NRF_FUN_SDP_MSPI_CS3:
481+
case NRF_FUN_SDP_MSPI_CS4:
482+
case NRF_FUN_SDP_MSPI_SCK:
483+
case NRF_FUN_SDP_MSPI_DQ0:
484+
case NRF_FUN_SDP_MSPI_DQ1:
485+
case NRF_FUN_SDP_MSPI_DQ2:
486+
case NRF_FUN_SDP_MSPI_DQ3:
487+
case NRF_FUN_SDP_MSPI_DQ4:
488+
case NRF_FUN_SDP_MSPI_DQ5:
489+
case NRF_FUN_SDP_MSPI_DQ6:
490+
case NRF_FUN_SDP_MSPI_DQ7:
491+
NRF_PSEL_SDP_MSPI(psel);
492+
dir = NRF_GPIO_PIN_DIR_OUTPUT;
493+
input = NRF_GPIO_PIN_INPUT_CONNECT;
494+
break;
495+
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrfe_mspi_controller) */
496+
#endif /* CONFIG_SOC_NRF54L15_CPUAPP */
468497
default:
469498
return -ENOTSUP;
470499
}

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

+28
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
/** TDM SCK in master mode */
176204
#define NRF_FUN_TDM_SCK_M 71U
177205
/** TDM SCK in slave mode */

0 commit comments

Comments
 (0)