drivers: pinctrl: nrf: add support for CAN TX/RX
So that we can configure CAN pins. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
3731a137e7
commit
0d4d4e7754
2 changed files with 15 additions and 0 deletions
|
@ -360,6 +360,17 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
|
|||
input = NRF_GPIO_PIN_INPUT_DISCONNECT;
|
||||
break;
|
||||
#endif /* defined(NRF_PSEL_QSPI) */
|
||||
#if DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_can)
|
||||
/* Pin routing is controlled by secure domain, via UICR */
|
||||
case NRF_FUN_CAN_TX:
|
||||
dir = NRF_GPIO_PIN_DIR_OUTPUT;
|
||||
input = NRF_GPIO_PIN_INPUT_DISCONNECT;
|
||||
break;
|
||||
case NRF_FUN_CAN_RX:
|
||||
dir = NRF_GPIO_PIN_DIR_INPUT;
|
||||
input = NRF_GPIO_PIN_INPUT_CONNECT;
|
||||
break;
|
||||
#endif /* DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_can) */
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
|
|
@ -147,6 +147,10 @@
|
|||
#define NRF_FUN_EXMIF_CS0 44U
|
||||
/** EXMIF CS1 */
|
||||
#define NRF_FUN_EXMIF_CS1 45U
|
||||
/** CAN TX */
|
||||
#define NRF_FUN_CAN_TX 46U
|
||||
/** CAN RX */
|
||||
#define NRF_FUN_CAN_RX 47U
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue