1# Timer driver configuration options
2# Copyright (c) 2024 Nordic Semiconductor ASA
3
4menuconfig NRF_GRTC_TIMER
5	bool "nRF GRTC Timer"
6	default y
7	depends on DT_HAS_NORDIC_NRF_GRTC_ENABLED
8	select TICKLESS_CAPABLE
9	select TIMER_HAS_64BIT_CYCLE_COUNTER
10	select NRFX_GRTC
11	help
12	  This module implements a kernel device driver for the nRF Global Real
13	  Time Counter NRF_GRTC and provides the standard "system clock driver"
14	  interfaces.
15
16if NRF_GRTC_TIMER
17
18config NRF_GRTC_ALWAYS_ON
19	bool
20	help
21	  Always keep the SYSCOUNTER active even if the CPU is in sleep mode.
22
23config NRF_GRTC_TIMER_APP_DEFINED_INIT
24	bool "Application defines GRTC initialization"
25	help
26	  Application defines the initialization procedure and time of the GRTC
27	  drivers, rather than leaving it up to SYS_INIT.
28
29config NRF_GRTC_START_SYSCOUNTER
30	bool "Start SYSCOUNTER on driver init"
31	select NRF_GRTC_TIMER_CLOCK_MANAGEMENT
32	help
33	  Start the SYSCOUNTER when initializing the GRTC. This should only be
34	  handled by one processor in the system.
35
36config NRF_GRTC_TIMER_CLOCK_MANAGEMENT
37	bool
38	help
39	  Compile additional driver code for enabling management functionality of
40	  the GRTC. Usually this is only needed by the processor that is starting
41	  the SYSCOUNTER, but can be shared by multiple processors in the system.
42
43config NRF_GRTC_SYSCOUNTER_SLEEP_MINIMUM_LATENCY
44	int
45	default 1000
46	depends on POWEROFF
47	help
48	  The value (in us) ensures that the wakeup event will not fire
49	  too early. In other words, applying SYSCOUNTER sleep state for less than
50	  NRF_GRTC_SYSCOUNTER_SLEEP_MINIMUM_LATENCY period makes no sense.
51
52config NRF_GRTC_TIMER_AUTO_KEEP_ALIVE
53	bool
54	default y if NRF_GRTC_START_SYSCOUNTER
55	help
56	  This feature prevents the SYSCOUNTER from sleeping when any core is in
57	  active state.
58
59endif # NRF_GRTC_TIMER
60