Skip to content

Commit

Permalink
[nrf noup] drivers: pinctrl_nrf: Add support for EXMIF pins
Browse files Browse the repository at this point in the history
This is a follow-up to commit 45d827a.

Although routing for those pins is configured via UICR, pinctrl still
needs to be involved so that it is possible to set desired drive mode
for them etc.
Add also the missing RWDS pin.

Upstream PR #: 80042
Applied as a [nrf noup] due to a conflict.

Signed-off-by: Andrzej Głąbek <[email protected]>
  • Loading branch information
anangl authored and jukkar committed Dec 16, 2024
1 parent c6ace4b commit 3f12dd6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/pinctrl/pinctrl_nrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,24 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
input = NRF_GPIO_PIN_INPUT_CONNECT;
break;
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_can) */
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_exmif)
/* Pin routing is controlled by secure domain, via UICR */
case NRF_FUN_EXMIF_CK:
case NRF_FUN_EXMIF_DQ0:
case NRF_FUN_EXMIF_DQ1:
case NRF_FUN_EXMIF_DQ2:
case NRF_FUN_EXMIF_DQ3:
case NRF_FUN_EXMIF_DQ4:
case NRF_FUN_EXMIF_DQ5:
case NRF_FUN_EXMIF_DQ6:
case NRF_FUN_EXMIF_DQ7:
case NRF_FUN_EXMIF_CS0:
case NRF_FUN_EXMIF_CS1:
case NRF_FUN_EXMIF_RWDS:
dir = NRF_GPIO_PIN_DIR_INPUT;
input = NRF_GPIO_PIN_INPUT_DISCONNECT;
break;
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_exmif) */
default:
return -ENOTSUP;
}
Expand Down
2 changes: 2 additions & 0 deletions include/zephyr/dt-bindings/pinctrl/nrf-pinctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@
#define NRF_FUN_CAN_TX 46U
/** CAN RX */
#define NRF_FUN_CAN_RX 47U
/** EXMIF RWDS */
#define NRF_FUN_EXMIF_RWDS 50U
/** GRTC fast clock output */
#define NRF_FUN_GRTC_CLKOUT_FAST 55U
/** GRTC slow clock output */
Expand Down

0 comments on commit 3f12dd6

Please sign in to comment.