1# Smartbond TRNG configuration
2
3# Copyright (c) 2023 Renesas Electronics Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6
7config ENTROPY_SMARTBOND_TRNG
8	bool "Renesas Smartbond MCU Family True Random Number Generator (TRNG) Driver"
9	default y
10	depends on DT_HAS_RENESAS_SMARTBOND_TRNG_ENABLED
11	select ENTROPY_HAS_DRIVER
12	help
13	  Enable True Random Number Generator (TRNG) driver for Renesas Smartbond MCUs.
14
15if ENTROPY_SMARTBOND_TRNG
16
17config ENTROPY_SMARTBOND_THR_POOL_SIZE
18	int "Thread-mode random number pool size"
19	range ENTROPY_SMARTBOND_THR_THRESHOLD 256
20	default 8
21	help
22	  Buffer length in bytes used to store entropy bytes generated by the
23	  hardware to make them ready for thread mode consumers.
24	  Please note, that size of the pool must be a power of 2.
25
26config ENTROPY_SMARTBOND_THR_THRESHOLD
27	int "Thread-mode random number pool low-water threshold"
28	range 4 255
29	help
30	  Low water-mark threshold in bytes to trigger entropy generation for
31	  thread mode consumers. As soon as the number of available bytes in the
32	  buffer goes below this number hardware entropy generation will be
33	  started.
34
35config ENTROPY_SMARTBOND_ISR_POOL_SIZE
36	int "ISR-mode random number pool size"
37	range ENTROPY_SMARTBOND_ISR_THRESHOLD 256
38	default 16
39	help
40	  Buffer length in bytes used to store entropy bytes generated by the
41	  hardware to make them ready for ISR consumers.
42	  Please note, that size of the pool must be a power of 2.
43
44config ENTROPY_SMARTBOND_ISR_THRESHOLD
45	int "ISR-mode random number pool low-water threshold"
46	range 12 255
47	help
48	  Low water-mark threshold in bytes to trigger entropy generation for
49	  ISR consumers. As soon as the number of available bytes in the
50	  buffer goes below this number hardware entropy generation will be
51	  started.
52
53endif # ENTROPY_SMARTBOND_TRNG
54