blob: 157e85886b9b79abebda6720d4dde4b30abfb72f [file] [edit]
# Copyright (c) 2022 Nordic Semiconductor ASA
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0
config OPENTHREAD
bool "OpenThread Support"
imply FLASH
imply FLASH_MAP
imply MPU_ALLOW_FLASH_WRITE
select SETTINGS if FLASH
select OPENTHREAD_SETTINGS_RAM if !FLASH
select CPP
select REBOOT
select ENTROPY_GENERATOR
help
This option enables the OpenThread library
if OPENTHREAD
config OPENTHREAD_SYS_INIT
bool "Initialize OpenThread stack during system initialization"
default y
depends on !NET_L2_OPENTHREAD
help
This option initializes the OpenThread automatically by calling the openthread_init()
function during system initialization.
config OPENTHREAD_SYS_INIT_PRIORITY
int "OpenThread system initialization priority"
default 40
depends on OPENTHREAD_SYS_INIT
help
This option sets the priority of the OpenThread system initialization.
choice OPENTHREAD_IMPLEMENTATION
prompt "OpenThread origin selection"
help
Select OpenThread stack to use for build. Custom OpenThread implementations
can be added to the application Kconfig.
config OPENTHREAD_SOURCES
bool "OpenThread from sources"
help
Build Zephyr's OpenThread port from sources.
endchoice
config OPENTHREAD_MANUAL_START
bool "Start OpenThread stack manually"
help
If enabled, OpenThread stack will have to be configured and
started manually, with respective API calls or CLI/NCP commands.
Otherwise, OpenThread will configure the network parameters and try to
join the Thread network automatically during initialization (using
credentials stored in persistent storage, obtained during
commissioning or pre-commissioned with other Kconfig options,
depending on configuration used).
menu "Logging"
menuconfig OPENTHREAD_DEBUG
bool "OpenThread stack logging support"
help
This option enables logging support for OpenThread.
choice OPENTHREAD_LOG_LEVEL_CHOICE
prompt "OpenThread stack log level"
depends on OPENTHREAD_DEBUG
help
This option selects log level for OpenThread stack.
config OPENTHREAD_LOG_LEVEL_CRIT
bool "Critical"
config OPENTHREAD_LOG_LEVEL_WARN
bool "Warning"
config OPENTHREAD_LOG_LEVEL_NOTE
bool "Notice"
config OPENTHREAD_LOG_LEVEL_INFO
bool "Informational"
config OPENTHREAD_LOG_LEVEL_DEBG
bool "Debug"
endchoice # OPENTHREAD_LOG_LEVEL_CHOICE
config OPENTHREAD_LOG_LEVEL
int
default 1 if OPENTHREAD_LOG_LEVEL_CRIT
default 2 if OPENTHREAD_LOG_LEVEL_WARN
default 3 if OPENTHREAD_LOG_LEVEL_NOTE
default 4 if OPENTHREAD_LOG_LEVEL_INFO
default 5 if OPENTHREAD_LOG_LEVEL_DEBG
default 0
help
Log level for OpenThread stack.
config OPENTHREAD_PLATFORM_LOG_LEVEL
int
default 1 if OPENTHREAD_LOG_LEVEL_CRIT
default 2 if OPENTHREAD_LOG_LEVEL_WARN
default 3 if OPENTHREAD_LOG_LEVEL_NOTE || OPENTHREAD_LOG_LEVEL_INFO
default 4 if OPENTHREAD_LOG_LEVEL_DEBG
default 0
help
Log level for OpenThread Zephyr platform.
endmenu # "Logging"
menu "Zephyr optimizations"
config OPENTHREAD_THREAD_PREEMPTIVE
bool "Set Openthread thread to be preemptive"
config OPENTHREAD_THREAD_PRIORITY
int "OpenThread thread priority"
default 0 if OPENTHREAD_THREAD_PREEMPTIVE
default 8
config OPENTHREAD_THREAD_STACK_SIZE
int "OpenThread thread stack size"
default 6144 if OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER
default 6240 if (OPENTHREAD_COMMISSIONER || OPENTHREAD_JOINER) && MPU_STACK_GUARD && FPU_SHARING && CPU_CORTEX_M
default 3168 if MPU_STACK_GUARD && FPU_SHARING && CPU_CORTEX_M
default 3072
config OPENTHREAD_PKT_LIST_SIZE
int "List size for IPv6 packet buffering"
default 10
config OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE
int "OpenThread radio transmit workqueue stack size"
default 608 if MPU_STACK_GUARD && FPU_SHARING && CPU_CORTEX_M
default 512
config OPENTHREAD_RADIO_WORKQUEUE_PRIORITY
int "OpenThread radio transmit workqueue priority"
default 0 if OPENTHREAD_THREAD_PREEMPTIVE
default 7
endmenu # "Zephyr optimizations"
config OPENTHREAD_SHELL
bool "OpenThread shell"
depends on SHELL
config MBEDTLS_PROMPTLESS
default y if OPENTHREAD_SECURITY_DEFAULT_CONFIG
choice OPENTHREAD_SECURITY_CONFIG
prompt "OpenThread security configuration"
default OPENTHREAD_SECURITY_DEFAULT_CONFIG
config OPENTHREAD_SECURITY_CUSTOM_CONFIG
bool "Custom configuration"
help
Security settings will be controlled directly by the user.
Enabling this setting will give access to full control of Mbed TLS
configuration.
config OPENTHREAD_SECURITY_DEFAULT_CONFIG
bool "Default configuration"
help
Use the OpenThread Mbed TLS configuration pre-defined security scheme.
endchoice # OPENTHREAD_SECURITY
config OPENTHREAD_CRYPTO_PSA
bool "PSA Crypto API"
default y
select PSA_CRYPTO
select OPENTHREAD_PLATFORM_KEY_REF if !OPENTHREAD_COPROCESSOR_RCP
imply OPENTHREAD_PLATFORM_KEYS_EXPORTABLE_ENABLE
help
Use PSA Crypto API as backend for cryptographic operations instead
of legacy Mbed TLS.
if OPENTHREAD_SECURITY_DEFAULT_CONFIG
config OPENTHREAD_CRYPTO_PSA_CONFIG
bool
default y if OPENTHREAD_CRYPTO_PSA
imply SECURE_STORAGE if !BUILD_WITH_TFM
select PSA_WANT_KEY_TYPE_AES
select PSA_WANT_ALG_ECB_NO_PADDING
select PSA_WANT_KEY_TYPE_HMAC
select PSA_WANT_ALG_HMAC
select PSA_WANT_ALG_CCM
select PSA_WANT_ALG_SHA_256
select PSA_WANT_ALG_CMAC
select PSA_WANT_ALG_JPAKE if OPENTHREAD_COMMISSIONER_JOINER
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT if OPENTHREAD_COMMISSIONER_JOINER || \
OPENTHREAD_ECDSA
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT if OPENTHREAD_COMMISSIONER_JOINER || \
OPENTHREAD_ECDSA
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE if OPENTHREAD_COMMISSIONER_JOINER || \
OPENTHREAD_ECDSA
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE if OPENTHREAD_COMMISSIONER_JOINER || \
OPENTHREAD_ECDSA
select PSA_WANT_ECC_SECP_R1_256 if OPENTHREAD_COMMISSIONER_JOINER || \
OPENTHREAD_SRP
select PSA_WANT_ALG_ECDSA if OPENTHREAD_ECDSA
select PSA_WANT_ALG_DETERMINISTIC_ECDSA if OPENTHREAD_ECDSA
select PSA_WANT_ALG_ECDH if OPENTHREAD_ECDSA
select PSA_WANT_ALG_TLS12_PRF if OPENTHREAD_COMMISSIONER_JOINER
select PSA_WANT_ALG_TLS12_ECJPAKE_TO_PMS if OPENTHREAD_COMMISSIONER_JOINER
select PSA_WANT_ALG_HKDF if OPENTHREAD_TREL
select PSA_WANT_ALG_HKDF_EXTRACT if OPENTHREAD_TREL
select PSA_WANT_ALG_HKDF_EXPAND if OPENTHREAD_TREL
config OPENTHREAD_CRYPTO_LEGACY_MBEDTLS_CONFIG
bool
default y if !OPENTHREAD_CRYPTO_PSA
select MBEDTLS_CIPHER_AES_ENABLED
select MBEDTLS_CIPHER_CCM_ENABLED
select MBEDTLS_SHA256
select MBEDTLS_ENTROPY_C
select MBEDTLS_CMAC
select MBEDTLS_CIPHER
select MBEDTLS_ECJPAKE_C if OPENTHREAD_COMMISSIONER_JOINER
select MBEDTLS_ECP_C if OPENTHREAD_COMMISSIONER_JOINER || OPENTHREAD_ECDSA
select MBEDTLS_ECP_DP_SECP256R1_ENABLED if OPENTHREAD_COMMISSIONER_JOINER || \
OPENTHREAD_SRP
select MBEDTLS_ECDH_C if OPENTHREAD_ECDSA
select MBEDTLS_ECDSA_C if OPENTHREAD_ECDSA
select MBEDTLS_ECDSA_DETERMINISTIC if OPENTHREAD_ECDSA
select MBEDTLS_ECP_NIST_OPTIM if OPENTHREAD_COMMISSIONER_JOINER
select MBEDTLS_CTR_DRBG_C if OPENTHREAD_COMMISSIONER_JOINER
select MBEDTLS_HMAC_DRBG_C if OPENTHREAD_COMMISSIONER_JOINER || \
OPENTHREAD_SRP
config OPENTHREAD_MBEDTLS_TLS_CONFIG
bool
default y
select MBEDTLS
select MBEDTLS_ENABLE_HEAP
select MBEDTLS_MD_C
select MBEDTLS_ASN1_PARSE_C
select MBEDTLS_SSL_PROTO_TLS1_2 if OPENTHREAD_COMMISSIONER_JOINER
select MBEDTLS_SSL_PROTO_DTLS if OPENTHREAD_COMMISSIONER_JOINER
select MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED if OPENTHREAD_COMMISSIONER_JOINER
select MBEDTLS_X509_CRT_PARSE_C if OPENTHREAD_ECDSA
select MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED if OPENTHREAD_ECDSA
select MBEDTLS_PK_WRITE_C if OPENTHREAD_ECDSA
help
TLS configuration of Mbed TLS.
endif # OPENTHREAD_SECURITY_DEFAULT_CONFIG
config OPENTHREAD_MBEDTLS_LIB_NAME
string "mbedtls lib name"
default "mbedTLS"
help
This option allows to specify one or more mbedtls library files to be
linked with OpenThread. Separate multiple values with space " ".
config OPENTHREAD_COPROCESSOR
bool "OpenThread Co-Processor"
select OPENTHREAD_MANUAL_START
select RING_BUFFER
select UART_INTERRUPT_DRIVEN
help
Enable Co-Processor in OpenThread stack.
if OPENTHREAD_COPROCESSOR
choice OPENTHREAD_COPROCESSOR_CHOICE
prompt "OpenThread Co-Processor type"
help
This option selects Thread network co-processor type
config OPENTHREAD_COPROCESSOR_NCP
bool "NCP - Network Co-Processor"
config OPENTHREAD_COPROCESSOR_RCP
bool "RCP - Radio Co-Processor"
endchoice # OPENTHREAD_COPROCESSOR_CHOICE
config OPENTHREAD_COPROCESSOR_UART_RING_BUFFER_SIZE
int "Set Co-Processor UART ring buffer size"
default 4096
help
TX buffer size for the OpenThread Co-Processor UART.
config OPENTHREAD_COPROCESSOR_UART_ASYNC
bool "Use async UART API for OpenThread Co-Processor"
depends on UART_ASYNC_API
help
Enable use of Zephyr's asynchronous UART API for the OpenThread
Co-Processor interface. When disabled, the interrupt-driven UART API
is used instead.
config OPENTHREAD_COPROCESSOR_UART_RX_BUFFER_SIZE
int "Set Co-Processor UART RX buffer size"
depends on OPENTHREAD_COPROCESSOR_UART_ASYNC
range 0 4096
default 256
help
RX buffer size for the OpenThread Co-Processor UART when using
the asynchronous UART API.
config OPENTHREAD_COPROCESSOR_VENDOR_HOOK_SOURCE
string "Path to vendor hook source file"
help
Provides path to compile vendor hook file.
endif # OPENTHREAD_COPROCESSOR
config OPENTHREAD_PLATFORM_INFO
string "Platform information for OpenThread"
default "ZEPHYR"
help
Platform information for OpenThread
config OPENTHREAD_CUSTOM_PARAMETERS
string "Custom Parameters to pass to OpenThread build system"
default ""
help
This option is intended for advanced users only.
Pass additional parameters that do not have corresponding Kconfig
options to the OpenThread build system. Separate multiple values with
space " ", for example:
"OPENTHREAD_CONFIG_JOINER_ENABLE=1 OPENTHREAD_CONFIG_JOINER_MAX_CANDIDATES=3"
config OPENTHREAD_NUM_MESSAGE_BUFFERS
int "The number of message buffers in the buffer pool"
default 512 if OPENTHREAD_ZEPHYR_BORDER_ROUTER
default 128
help
"The number of message buffers in the buffer pool."
config OPENTHREAD_MESSAGE_BUFFER_SIZE
int "The size of a message buffer in bytes"
default 128
help
"The size of a message buffer in bytes"
config OPENTHREAD_PLATFORM_MESSAGE_MANAGEMENT
bool "Use platform message management"
help
The message pool is managed by platform defined logic.
config OPENTHREAD_MAX_STATECHANGE_HANDLERS
int "The maximum number of state-changed callback handlers"
default 2
help
The maximum number of state-changed callback handlers
set using otSetStateChangedCallback.
config OPENTHREAD_TMF_ADDRESS_CACHE_ENTRIES
int "The number of EID-to-RLOC cache entries"
default 20
help
The number of EID-to-RLOC cache entries.
config OPENTHREAD_TMF_ADDRESS_CACHE_MAX_SNOOP_ENTRIES
int "The maximum number of EID-to-RLOC cache entries"
default 2
help
The maximum number of EID-to-RLOC cache entries that can be used for
"snoop optimization" where an entry is created by inspecting a received
message.
config OPENTHREAD_LOG_PREPEND_LEVEL_ENABLE
bool "Prepending the log level to all OpenThread log messages"
help
When enabled the OpenThread logs will be prepended with the appropriate
log level prefix i.e. [CRIT], [WARN], [NOTE], [INFO], [DEBG].
config OPENTHREAD_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE
bool "Software ACK timeout logic"
default y
help
Set y if the radio supports AckTime event
config OPENTHREAD_MAC_SOFTWARE_RETRANSMIT_ENABLE
bool "Software retransmission logic"
default y
help
Set y if the radio supports tx retry logic with collision avoidance (CSMA)
config OPENTHREAD_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE
bool "Software CSMA backoff logic"
default y
help
Set y to enable software CSMA backoff. The option can be disabled if
the radio has hardware support for this feature (IEEE802154_HW_CSMA).
config OPENTHREAD_PLATFORM_KEYS_EXPORTABLE_ENABLE
bool "Make MAC keys exportable"
depends on OPENTHREAD_PLATFORM_KEY_REF
help
Enable the creation of exportable MAC keys in the OpenThread Key Manager.
config OPENTHREAD_INTERFACE_EARLY_UP
bool "Make OpenThread interface ready as soon as Thread is enabled"
help
When enabled, OpenThread interface will be marked ready (operational
UP) as soon as Thread has been enabled. This means the interface will
be ready to transmit application packets during the Mesh Link
Establishment phase.
Otherwise, OpenThread interface will be marked operational UP only
after the device joins a Thread network.
config OPENTHREAD_PLATFORM_PKT_TXTIME
bool
default y if NET_PKT_TXTIME
help
Enable packet TX time support. This is needed for when the application
wants to set the exact time when the packet should be sent.
config OPENTHREAD_PLATFORM_CARRIER_FUNCTIONS
bool
default y if OPENTHREAD_DIAG && IEEE802154_CARRIER_FUNCTIONS
help
Enable support for functions such as modulated carrier and continuous carrier.
config OPENTHREAD_PLATFORM_USEC_TIMER
bool
default y if (OPENTHREAD_CSL_RECEIVER && !OPENTHREAD_THREAD_VERSION_1_1) || OPENTHREAD_WAKEUP_END_DEVICE
help
Enable microsecond backoff timer implemented in platform.
DT_CHOSEN_ZEPHYR_OPENTHREAD_COUNTER := zephyr,openthread-counter
config OPENTHREAD_ALARM_COUNTER
bool
default y
depends on $(dt_chosen_enabled,$(DT_CHOSEN_ZEPHYR_OPENTHREAD_COUNTER)) && OPENTHREAD_PLATFORM_USEC_TIMER
select COUNTER
help
Enable counter driver APIs for microsecond precision for timers in alarm implemented in platform.
menu "OpenThread Border Router"
config OPENTHREAD_ZEPHYR_BORDER_ROUTER
bool "Adds support for Border Router functionality"
select NET_ROUTING
help
Enable support for Border Router using Openthread's implementation.
if OPENTHREAD_ZEPHYR_BORDER_ROUTER
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_VENDOR_NAME
string "Base name from which mDNS host name will be derived."
default "Zephyr-OTBR"
help
This value represents part of the mDNS host that will be register within OpenThread
Border Router.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_BASE_SERVICE_NAME
string "Base name from which a service instance name will be derived."
default "Zephyr-BorderRouter"
help
This value represents part of a service instance name which will be registered
within OpenThread Border Router.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_MODEL_NAME
string "Name of the Border Agent product model"
default "BorderRouter"
help
This value represents Border Agent's product model.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_MAX_UDP_SERVICES
int "The maximum number of pollable UDP sockets to be registered in platform code."
default 5
help
This configuration defines the maximum number of pollable UDP sockets
to be used within platform UDP module.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_MAX_MDNS_SERVICES
int "The maximum number of pollable mDNS sockets to be registered in platform code."
default 1 if NET_IPV6 && !NET_IPV4
default 2 if NET_IPV6 && NET_IPV4
help
This configuration defines the maximum number of pollable mDNS sockets
to be used within platform mDNS module.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_TREL_SERVICES
int "The maximum number of pollable TREL sockets to be registered in platform code."
default 1
help
This configuration defines the maximum number of pollable TREL sockets
to be used within platform TREL module.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_DHCP6_PD_SERVICES
int "The maximum number of pollable DHCP6_PD sockets to be registered in platform code."
default 1
help
This configuration defines the maximum number of pollable DHCP6_PD sockets
to be used within platform DHCP6_PD module.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_NAT64_SERVICES
int "The maximum number of pollable RAW IPV4 sockets to be registered in platform code."
depends on OPENTHREAD_NAT64_TRANSLATOR
default 1
help
This configuration defines the maximum number of pollable RAW IPV4 sockets
to be used within platform Infrastructure Interface module.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_MSG_POOL_NUM
int "Maximum entries of backbone message pool."
default 10
help
This value represents the maximum number of messages from backbone interface
that could be stored without being processed.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_MDNS_BUFFER_THRESHOLD
int "Threshold value to determine if an mDNS packet will be processed"
default 40
help
This value is used to calculate if OpenThread mDNS module should
accept an incoming message or not. It is used to determine if
number of available OT message buffers will drop under a certain
threshold if the mDNS packet is accepted and processed.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_IPV4
bool "Border Router has IPV4 capabilities"
default y
select NET_DHCPV4
depends on NET_IPV4 && NET_UDP
help
This configuration enables IPV4 communication.
config OPENTHREAD_ZEPHYR_BORDER_ROUTER_NAT64_TRANSLATOR
bool "Border Router NAT64 translator"
default y
select OPENTHREAD_NAT64_TRANSLATOR
select OPENTHREAD_NAT64_BORDER_ROUTING
select NET_PKT_FILTER
select NET_PKT_FILTER_IPV4_HOOK
depends on OPENTHREAD_ZEPHYR_BORDER_ROUTER_IPV4
help
This configuration enables NAT64 translator from OpenThread.
endif # OPENTHREAD_ZEPHYR_BORDER_ROUTER
endmenu # "OpenThread Border Router"
menu "OpenThread stack features"
rsource "Kconfig.features"
endmenu
menu "Thread Network configuration"
rsource "Kconfig.thread"
endmenu
endif # OPENTHREAD