@@ -99,6 +99,15 @@ static const nrf_gpio_pin_drive_t drive_modes[NRF_DRIVE_COUNT] = {
99
99
#define NRF_PSEL_TWIS (reg , line ) ((NRF_TWIS_Type *)reg)->PSEL.line
100
100
#endif
101
101
102
+ #if DT_HAS_COMPAT_STATUS_OKAY (nordic_nrf_grtc ) || defined(CONFIG_NRFX_GRTC )
103
+ #if DT_NODE_HAS_PROP (DT_NODELABEL (grtc ), clkout_fast_frequency_hz )
104
+ #define NRF_GRTC_CLKOUT_FAST 1
105
+ #endif
106
+ #if DT_NODE_HAS_PROP (DT_NODELABEL (grtc ), clkout_32k )
107
+ #define NRF_GRTC_CLKOUT_SLOW 1
108
+ #endif
109
+ #endif
110
+
102
111
int pinctrl_configure_pins (const pinctrl_soc_pin_t * pins , uint8_t pin_cnt ,
103
112
uintptr_t reg )
104
113
{
@@ -345,6 +354,24 @@ int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt,
345
354
input = NRF_GPIO_PIN_INPUT_DISCONNECT ;
346
355
break ;
347
356
#endif /* defined(NRF_PSEL_QSPI) */
357
+ #if defined(NRF_GRTC_CLKOUT_FAST )
358
+ case NRF_FUN_GRTC_CLKOUT_FAST :
359
+ #if NRF_GPIO_HAS_SEL && defined(GPIO_PIN_CNF_CTRLSEL_GRTC )
360
+ nrf_gpio_pin_control_select (psel , NRF_GPIO_PIN_SEL_GRTC );
361
+ #endif
362
+ dir = NRF_GPIO_PIN_DIR_OUTPUT ;
363
+ input = NRF_GPIO_PIN_INPUT_DISCONNECT ;
364
+ break ;
365
+ #endif /* defined(NRF_GRTC_CLKOUT_FAST) */
366
+ #if defined(NRF_GRTC_CLKOUT_SLOW )
367
+ case NRF_FUN_GRTC_CLKOUT_32K :
368
+ #if NRF_GPIO_HAS_SEL && defined(GPIO_PIN_CNF_CTRLSEL_GRTC )
369
+ nrf_gpio_pin_control_select (psel , NRF_GPIO_PIN_SEL_GRTC );
370
+ #endif
371
+ dir = NRF_GPIO_PIN_DIR_OUTPUT ;
372
+ input = NRF_GPIO_PIN_INPUT_DISCONNECT ;
373
+ break ;
374
+ #endif /* defined(NRF_GRTC_CLKOUT_SLOW) */
348
375
#if DT_HAS_COMPAT_STATUS_OKAY (nordic_nrf_can )
349
376
/* Pin routing is controlled by secure domain, via UICR */
350
377
case NRF_FUN_CAN_TX :
0 commit comments