1menu "Timer Support"
2
3config TIMER
4	bool "Enable driver model for timer drivers"
5	depends on DM
6	help
7	  Enable driver model for timer access. It uses the same API as
8	  lib/time.c, but now implemented by the uclass. The first timer
9	  will be used. The timer is usually a 32 bits free-running up
10	  counter. There may be no real tick, and no timer interrupt.
11
12config SPL_TIMER
13	bool "Enable driver model for timer drivers in SPL"
14	depends on TIMER && SPL
15	help
16	  Enable support for timer drivers in SPL. These can be used to get
17	  a timer value when in SPL, or perhaps for implementing a delay
18	  function. This enables the drivers in drivers/timer as part of an
19	  SPL build.
20
21config TPL_TIMER
22	bool "Enable driver model for timer drivers in TPL"
23	depends on TIMER && TPL
24	help
25	  Enable support for timer drivers in TPL. These can be used to get
26	  a timer value when in TPL, or perhaps for implementing a delay
27	  function. This enables the drivers in drivers/timer as part of an
28	  TPL build.
29
30config VPL_TIMER
31	bool "Enable driver model for timer drivers in VPL"
32	depends on TIMER && VPL
33	default y if TPL_TIMER
34	help
35	  Enable support for timer drivers in VPL. These can be used to get
36	  a timer value when in VPL, or perhaps for implementing a delay
37	  function. This enables the drivers in drivers/timer as part of an
38	  TPL build.
39
40config TIMER_EARLY
41	bool "Allow timer to be used early in U-Boot"
42	depends on TIMER
43	# initr_bootstage() requires a timer and is called before initr_dm()
44	# so only the early timer is available
45	default y if X86 && BOOTSTAGE
46	help
47	  In some cases the timer must be accessible before driver model is
48	  active. Examples include when using CONFIG_TRACE to trace U-Boot's
49	  execution before driver model is set up. Enable this option to
50	  use an early timer. These functions must be supported by your timer
51	  driver: timer_early_get_count() and timer_early_get_rate().
52
53config ALTERA_TIMER
54	bool "Altera timer support"
55	depends on TIMER
56	help
57	  Select this to enable a timer for Altera devices. Please find
58	  details on the "Embedded Peripherals IP User Guide" of Altera.
59
60config ANDES_PLMT_TIMER
61	bool
62	depends on RISCV_MMODE || SPL_RISCV_MMODE
63	help
64	  The Andes PLMT block holds memory-mapped mtime register
65	  associated with timer tick.
66
67config ARC_TIMER
68	bool "ARC timer support"
69	depends on TIMER && ARC && CLK
70	help
71	  Select this to enable built-in ARC timers.
72	  ARC cores may have up to 2 built-in timers: timer0 and timer1,
73	  usually at least one of them exists. Either of them is supported
74	  in U-Boot.
75
76config ARM_TWD_TIMER
77	bool "ARM timer watchdog (TWD) timer support"
78	depends on TIMER && CLK
79	help
80	  Select this to enable support for the ARM global timer watchdog timer.
81
82config AST_TIMER
83	bool "Aspeed ast2400/ast2500 timer support"
84	depends on TIMER
85	default y if ARCH_ASPEED
86	help
87	  Select this to enable timer for Aspeed ast2400/ast2500 devices.
88	  This is a simple sys timer driver, it is compatible with lib/time.c,
89	  but does not support any interrupts. Even though SoC has 8 hardware
90	  counters, they are all treated as a single device by this driver.
91	  This is mostly because they all share several registers which
92	  makes it difficult to completely separate them.
93
94config ATCPIT100_TIMER
95	bool "ATCPIT100 timer support"
96	depends on TIMER
97	help
98	  Select this to enable a ATCPIT100 timer which will be embedded
99	  in AE3XX, AE250 boards.
100
101config ATMEL_PIT_TIMER
102	bool "Atmel periodic interval timer support"
103	depends on TIMER
104	help
105	  Select this to enable a periodic interval timer for Atmel devices,
106	  it is designed to offer maximum accuracy and efficient management,
107	  even for systems with long response time.
108
109config SPL_ATMEL_PIT_TIMER
110	bool "Atmel periodic interval timer support in SPL"
111	depends on SPL_TIMER
112	help
113	  Select this to enable a periodic interval timer for Atmel devices,
114	  it is designed to offer maximum accuracy and efficient management,
115	  even for systems with long response time.
116	  Select this to be available in SPL.
117
118config ATMEL_TCB_TIMER
119	bool "Atmel timer counter support"
120	depends on TIMER
121	depends on ARCH_AT91
122	help
123	  Select this to enable the use of the timer counter as a monotonic
124	  counter.
125
126config SPL_ATMEL_TCB_TIMER
127	bool "Atmel timer counter support in SPL"
128	depends on SPL_TIMER
129	depends on ARCH_AT91
130	help
131	  Select this to enable the use of the timer counter as a monotonic
132	  counter in SPL.
133
134config CADENCE_TTC_TIMER
135	bool "Cadence TTC (Triple Timer Counter)"
136	depends on TIMER
137	help
138	  Enables support for the cadence ttc driver. This driver is present
139	  on Xilinx Zynq and ZynqMP SoCs.
140
141config DESIGNWARE_APB_TIMER
142	bool "Designware APB Timer"
143	depends on TIMER
144	help
145	  Enables support for the Designware APB Timer driver. This timer is
146	  present on Altera SoCFPGA SoCs.
147
148config FTTMR010_TIMER
149	bool "Faraday Technology timer support"
150	depends on TIMER
151	help
152	  Select this to enable support for the timer found on
153	  devices using Faraday Technology's IP.
154
155config GXP_TIMER
156	bool "HPE GXP Timer"
157	depends on TIMER
158	help
159	  Enables support for the GXP Timer driver. This timer is
160	  present on HPE GXP SoCs.
161
162config MPC83XX_TIMER
163	bool "MPC83xx timer support"
164	depends on TIMER
165	help
166	  Select this to enable support for the timer found on
167	  devices based on the MPC83xx family of SoCs.
168
169config RENESAS_OSTM_TIMER
170	bool "Renesas RZ/A1 R7S72100 OSTM Timer"
171	depends on TIMER
172	help
173	  Enables support for the Renesas OSTM Timer driver.
174	  This timer is present on Renesas RZ/A1 R7S72100 SoCs.
175
176config X86_TSC_TIMER_FREQ
177	int "x86 TSC timer frequency in Hz"
178	depends on X86_TSC_TIMER
179	default 1000000000
180	help
181	  Sets the estimated CPU frequency in Hz when TSC is used as the
182	  early timer and the frequency can neither be calibrated via some
183	  hardware ways, nor got from device tree at the time when device
184	  tree is not available yet.
185
186config NOMADIK_MTU_TIMER
187	bool "Nomadik MTU Timer"
188	depends on TIMER
189	help
190	  Enables support for the Nomadik Multi Timer Unit (MTU),
191	  used in ST-Ericsson Ux500 SoCs.
192	  The MTU provides 4 decrementing free-running timers.
193	  At the moment, only the first timer is used by the driver.
194
195config NPCM_TIMER
196	bool "Nuvoton NPCM timer support"
197	depends on TIMER
198	help
199	  Select this to enable a timer on Nuvoton NPCM SoCs.
200	  NPCM timer module has 5 down-counting timers, only the first timer
201	  is used to implement timer ops. No support for early timer and
202	  boot timer.
203
204config OMAP_TIMER
205	bool "Omap timer support"
206	depends on TIMER
207	help
208	  Select this to enable an timer for Omap devices.
209
210config ORION_TIMER
211	bool "Orion timer support"
212	depends on TIMER
213	default y if ARCH_KIRKWOOD || (ARCH_MVEBU && ARMADA_32BIT)
214	select TIMER_EARLY if ARCH_MVEBU
215	help
216	  Select this to enable an timer for Orion and Armada devices
217	  like Armada XP etc.
218
219config RISCV_TIMER
220	bool "RISC-V timer support"
221	depends on TIMER && RISCV
222	help
223	  Select this to enable support for a generic RISC-V S-Mode timer
224	  driver.
225
226config ROCKCHIP_TIMER
227	bool "Rockchip timer support"
228	depends on TIMER
229	help
230	  Select this to enable support for the timer found on
231	  Rockchip devices.
232
233config SANDBOX_TIMER
234	bool "Sandbox timer support"
235	depends on SANDBOX && TIMER
236	help
237	  Select this to enable an emulated timer for sandbox. It gets
238	  time from host os.
239
240config ARM_GLOBAL_TIMER
241	bool "ARM Cortex A9 global timer support"
242	depends on TIMER
243	depends on ARM
244	default y if ARCH_STI
245	help
246	  Select this to enable global timer found on ARM Cortex A9
247	  based devices.
248
249config SP804_TIMER
250	bool "ARM SP804 timer support"
251	depends on TIMER
252	help
253	  ARM SP804 dual timer IP support
254
255config STM32_TIMER
256	bool "STM32 timer support"
257	depends on TIMER
258	help
259	  Select this to enable support for the timer found on
260	  STM32 devices.
261
262config TEGRA_TIMER
263	bool "Tegra timer support"
264	depends on TIMER
265	select TIMER_EARLY
266	help
267	  Select this to enable support for the timer found on
268	  Tegra devices.
269
270config X86_TSC_TIMER
271	bool "x86 Time-Stamp Counter (TSC) timer support"
272	depends on TIMER && X86
273	help
274	  Select this to enable Time-Stamp Counter (TSC) timer for x86.
275
276config X86_TSC_READ_BASE
277	bool "Read the TSC timer base on start-up"
278	depends on X86_TSC_TIMER
279	help
280	  On x86 platforms the TSC timer tick starts at the value 0 on reset.
281	  This it makes no sense to read the timer on boot and use that as the
282	  base, since we will miss some time taken to load U-Boot, etc. This
283	  delay is controlled by the SoC and we cannot reduce it, but for
284	  bootstage we want to record the time since reset as accurately as
285	  possible.
286
287	  The only exception is when U-Boot is used as a secondary bootloader,
288	  where this option should be enabled.
289
290config TPL_X86_TSC_TIMER_NATIVE
291	bool "x86 TSC timer uses native calibration"
292	depends on TPL && X86_TSC_TIMER
293	help
294	  Selects native timer calibration for TPL and don't include the other
295	  methods in the code. This helps to reduce code size in TPL and works
296	  on fairly modern Intel chips. Code-size reductions is about 700
297	  bytes.
298
299config MTK_TIMER
300	bool "MediaTek timer support"
301	depends on TIMER
302	help
303	  Select this to enable support for the timer found on
304	  MediaTek devices.
305
306config MCHP_PIT64B_TIMER
307	bool "Microchip 64-bit periodic interval timer support"
308	depends on TIMER
309	help
310	  Select this to enable support for Microchip 64-bit periodic
311	  interval timer.
312
313config IMX_GPT_TIMER
314	bool "NXP i.MX GPT timer support"
315	depends on TIMER
316	help
317	  Select this to enable support for the timer found on
318	  NXP i.MX devices.
319
320config XILINX_TIMER
321	bool "Xilinx timer support"
322	depends on TIMER
323	select REGMAP
324	select SPL_REGMAP if SPL
325	help
326	  Select this to enable support for the timer found on
327	  any Xilinx boards (axi timer).
328
329endmenu
330