@@ -94,6 +94,10 @@ static const nrf_gpio_pin_drive_t drive_modes[NRF_DRIVE_COUNT] = {
9494#define NRF_PSEL_QSPI (reg , line ) ((NRF_QSPI_Type *)reg)->PSEL.line
9595#endif
9696
97+ #if DT_HAS_COMPAT_STATUS_OKAY (nordic_nrf_tdm )
98+ #define NRF_PSEL_TDM (reg , line ) ((NRF_TDM_Type *)reg)->PSEL.line
99+ #endif
100+
97101int pinctrl_configure_pins (const pinctrl_soc_pin_t * pins , uint8_t pin_cnt ,
98102 uintptr_t reg )
99103{
@@ -336,6 +340,47 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
336340 input = NRF_GPIO_PIN_INPUT_DISCONNECT ;
337341 break ;
338342#endif /* defined(NRF_PSEL_QSPI) */
343+ #if defined(NRF_PSEL_TDM )
344+ case NRF_FUN_TDM_SCK_M :
345+ NRF_PSEL_TDM (reg , SCK ) = psel ;
346+ write = 0U ;
347+ dir = NRF_GPIO_PIN_DIR_OUTPUT ;
348+ input = NRF_GPIO_PIN_INPUT_DISCONNECT ;
349+ break ;
350+ case NRF_FUN_TDM_SCK_S :
351+ NRF_PSEL_TDM (reg , SCK ) = psel ;
352+ dir = NRF_GPIO_PIN_DIR_INPUT ;
353+ input = NRF_GPIO_PIN_INPUT_CONNECT ;
354+ break ;
355+ case NRF_FUN_TDM_FSYNC_M :
356+ NRF_PSEL_TDM (reg , FSYNC ) = psel ;
357+ write = 0U ;
358+ dir = NRF_GPIO_PIN_DIR_OUTPUT ;
359+ input = NRF_GPIO_PIN_INPUT_DISCONNECT ;
360+ break ;
361+ case NRF_FUN_TDM_FSYNC_S :
362+ NRF_PSEL_TDM (reg , FSYNC ) = psel ;
363+ dir = NRF_GPIO_PIN_DIR_INPUT ;
364+ input = NRF_GPIO_PIN_INPUT_CONNECT ;
365+ break ;
366+ case NRF_FUN_TDM_SDIN :
367+ NRF_PSEL_TDM (reg , SDIN ) = psel ;
368+ dir = NRF_GPIO_PIN_DIR_INPUT ;
369+ input = NRF_GPIO_PIN_INPUT_CONNECT ;
370+ break ;
371+ case NRF_FUN_TDM_SDOUT :
372+ NRF_PSEL_TDM (reg , SDOUT ) = psel ;
373+ write = 0U ;
374+ dir = NRF_GPIO_PIN_DIR_OUTPUT ;
375+ input = NRF_GPIO_PIN_INPUT_DISCONNECT ;
376+ break ;
377+ case NRF_FUN_TDM_MCK :
378+ NRF_PSEL_TDM (reg , MCK ) = psel ;
379+ write = 0U ;
380+ dir = NRF_GPIO_PIN_DIR_OUTPUT ;
381+ input = NRF_GPIO_PIN_INPUT_DISCONNECT ;
382+ break ;
383+ #endif /* defined(NRF_PSEL_TDM) */
339384#if DT_HAS_COMPAT_STATUS_OKAY (nordic_nrf_can )
340385 /* Pin routing is controlled by secure domain, via UICR */
341386 case NRF_FUN_CAN_TX :
0 commit comments