2019-11-01 20:45:29 +08:00
|
|
|
# TI CC13xx / CC26xx entropy driver configuration
|
|
|
|
|
2019-04-26 07:07:31 +08:00
|
|
|
# Copyright (c) 2019 Brett Witherspoon
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
config ENTROPY_CC13XX_CC26XX_RNG
|
|
|
|
bool "TI SimpleLink CC13xx / CC26xx True Random Number Generator (TRNG)"
|
|
|
|
depends on SOC_SERIES_CC13X2_CC26X2
|
|
|
|
select ENTROPY_HAS_DRIVER
|
|
|
|
select RING_BUFFER
|
|
|
|
help
|
|
|
|
This option enables the driver for the True Random Number Generator (TRNG)
|
|
|
|
for TI SimpleLink CC13xx / CC26xx SoCs.
|
|
|
|
|
|
|
|
if ENTROPY_CC13XX_CC26XX_RNG
|
|
|
|
|
|
|
|
config ENTROPY_CC13XX_CC26XX_POOL_SIZE
|
|
|
|
int "Number of bytes in the entropy pool"
|
|
|
|
default 512
|
|
|
|
help
|
|
|
|
The size in bytes of the buffer used to store entropy generated by the
|
|
|
|
hardware. Should be a power of two for high performance.
|
|
|
|
|
|
|
|
config ENTROPY_CC13XX_CC26XX_SAMPLES_PER_CYCLE
|
|
|
|
int "Number of samples to generate entropy"
|
|
|
|
range 256 16777216
|
|
|
|
default 240000
|
|
|
|
help
|
|
|
|
The number of samples used to generate entropy. The time required to
|
|
|
|
generate 64 bits of entropy is determined by the number of FROs enabled,
|
|
|
|
the sampling (system) clock frequency, and this value.
|
|
|
|
|
|
|
|
config ENTROPY_CC13XX_CC26XX_ALARM_THRESHOLD
|
|
|
|
int "Threshold for detected repeated patterns"
|
|
|
|
range 0 255
|
|
|
|
default 255
|
|
|
|
help
|
|
|
|
The number of samples detected with repeating patterns before an alarm
|
|
|
|
event is triggered. The associated FRO is automatically shut down.
|
|
|
|
|
|
|
|
config ENTROPY_CC13XX_CC26XX_SHUTDOWN_THRESHOLD
|
|
|
|
int "Threshold for the number of FROs automatically shut down"
|
|
|
|
range 0 24
|
|
|
|
default 0
|
|
|
|
help
|
|
|
|
The number of FROs allowed to be shutdown before the driver attempts to
|
|
|
|
take corrective action.
|
|
|
|
|
|
|
|
endif # ENTROPY_CC13XX_CC26XX_RNG
|