1# TI CC13xx / CC26xx entropy driver configuration
2
3# Copyright (c) 2019 Brett Witherspoon
4# SPDX-License-Identifier: Apache-2.0
5
6config ENTROPY_CC13XX_CC26XX_RNG
7	bool "TI SimpleLink CC13xx / CC26xx True Random Number Generator (TRNG)"
8	default y
9	depends on DT_HAS_TI_CC13XX_CC26XX_TRNG_ENABLED
10	select ENTROPY_HAS_DRIVER
11	select RING_BUFFER
12	help
13	  This option enables the driver for the True Random Number Generator (TRNG)
14	  for TI SimpleLink CC13xx / CC26xx SoCs.
15
16if ENTROPY_CC13XX_CC26XX_RNG
17
18config ENTROPY_CC13XX_CC26XX_POOL_SIZE
19	int "Number of bytes in the entropy pool"
20	default 512
21	help
22	  The size in bytes of the buffer used to store entropy generated by the
23	  hardware. Should be a power of two for high performance.
24
25config ENTROPY_CC13XX_CC26XX_SAMPLES_PER_CYCLE
26	int "Number of samples to generate entropy"
27	range 256 16777216
28	default 240000
29	help
30	  The number of samples used to generate entropy. The time required to
31	  generate 64 bits of entropy is determined by the number of FROs enabled,
32	  the sampling (system) clock frequency, and this value.
33
34config ENTROPY_CC13XX_CC26XX_ALARM_THRESHOLD
35	int "Threshold for detected repeated patterns"
36	range 0 255
37	default 255
38	help
39	  The number of samples detected with repeating patterns before an alarm
40	  event is triggered. The associated FRO is automatically shut down.
41
42config ENTROPY_CC13XX_CC26XX_SHUTDOWN_THRESHOLD
43	int "Threshold for the number of FROs automatically shut down"
44	range 0 24
45	default 0
46	help
47	  The number of FROs allowed to be shutdown before the driver attempts to
48	  take corrective action.
49
50endif # ENTROPY_CC13XX_CC26XX_RNG
51