blob: 71c8889bd5e63b4a716e6b9ed27bd898d591cb00 [file] [edit]
#
# Copyright (c) 2024-2025 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# The purpose of this file is to define new default values of settings used when building Matter samples.
# This file only changes defaults and thus all symbols here must be promptless
# and safeguarded so that they only are applied when building Matter.
if SOC_FAMILY_NXP_RW || SOC_FAMILY_MCXW
if CHIP
rsource "Kconfig.features"
# See config/common/cmake/Kconfig for full definition
config CHIP_DEVICE_VENDOR_NAME
default "NXP Semiconductors"
config CHIP_ZEPHYR_USE_POSIX_DEFAULT_SOURCE
default n
config CHIP_OPERATIONAL_TIME_SAVE_INTERVAL
default 1
config CHIP_ENABLE_WIFI_STATION
default y if CHIP_WIFI
config CHIP_SYSTEM_THREAD_LOCAL_STORAGE
default n
config CHIP_SYSTEM_USE_ZEPHYR_SOCKET_EXTENSIONS
default n
config CHIP_TASK_PRIORITY
default 5
config CHIP_TASK_STACK_SIZE
default 16384 if CHIP_SE05X # Increase is due to the additional middle-ware APDU buffers and Zephyr
default 10240
config MAX_EVENT_QUEUE_SIZE
default 64
config CHIP_MRP_LOCAL_ACTIVE_RETRY_INTERVAL
default 800 if NET_L2_OPENTHREAD
default 2000
config CHIP_MRP_LOCAL_IDLE_RETRY_INTERVAL
default 800 if NET_L2_OPENTHREAD
default 2000
config CHIP_INET_ENABLE_TCP_ENDPOINT
default n
config CHIP_ENABLE_READ_CLIENT
default y
config CHIP_BUILD_NL_FAULT_INJECTION
default n if CHIP_BUILD_TESTS
if CHIP_FACTORY_DATA
config CHIP_DEVICE_VENDOR_ID
default 4151 # 0x1037
config CHIP_DEVICE_MANUFACTURING_DATE
default "2023-01-01"
config CHIP_DEVICE_PRODUCT_ID
default 41510 if SOC_SERIES_RW6XX
endif # CHIP_FACTORY_DATA
config CHIP_MALLOC_SYS_HEAP
default y if !ARCH_POSIX
# See config/zephyr/Kconfig for full definition
config CHIP_FACTORY_RESET_ERASE_SETTINGS
bool
default y
config CHIP_OTA_REQUESTOR
bool
select BOOTLOADER_MCUBOOT
config BOOTLOADER_MCUBOOT
bool
select IMG_MANAGER
select STREAM_FLASH
select STREAM_FLASH_ERASE
config NET_L2_OPENTHREAD
default n
config LOG
default y
if LOG
choice LOG_MODE
default LOG_MODE_MINIMAL if !NET_L2_OPENTHREAD
default LOG_MODE_DEFERRED
endchoice
if LOG_MODE_DEFERRED
config LOG_BACKEND_UART
default y
config SHELL_LOG_BACKEND
default n
config LOG_RUNTIME_DEFAULT_LEVEL
default 4 #debug
endif # LOG_MODE_DEFERRED
config LOG_BUFFER_SIZE
default 6144 if NET_L2_OPENTHREAD
choice MATTER_LOG_LEVEL_CHOICE
default MATTER_LOG_LEVEL_DBG
endchoice
config CHIP_APP_LOG_LEVEL
default 4 # debug
config LOG_DEFAULT_LEVEL
default 1 # error
config CHIP_LOG_SIZE_OPTIMIZATION
default y
endif # LOG
config PRINTK_SYNC
default y
config ASSERT
default y
config ASSERT_NO_COND_INFO
default y
config ASSERT_NO_MSG_INFO
default y
config HW_STACK_PROTECTION
default y
config FPU
default y
config SHELL
default y
config PTHREAD_IPC
bool
default n
config POSIX_MAX_FDS
int
default 8
# Application stack size
config MAIN_STACK_SIZE
default 16384 if CHIP_SE05X # Increase is due to the additional middle-ware APDU buffers and Zephyr
default 6144 if NET_L2_OPENTHREAD
default 3072
# AEAD ITS transform module encryption key provider
choice SECURE_STORAGE_ITS_TRANSFORM_AEAD_KEY_PROVIDER
default SECURE_STORAGE_ITS_TRANSFORM_AEAD_KEY_PROVIDER_ENTRY_UID_HASH if SOC_SERIES_MCXW7XX
endchoice
config INIT_STACKS
default y
config NET_MGMT_EVENT_STACK_SIZE
default 1024
config NET_MGMT_EVENT_QUEUE_SIZE
default 20
config NET_IPV6_MLD
default y
config NET_IF_MCAST_IPV6_ADDR_COUNT
default 14
config NET_IF_MAX_IPV4_COUNT
default 2
config NET_IF_MAX_IPV6_COUNT
default 2
config NET_TC_TX_COUNT
default 1
config NET_TC_RX_COUNT
default 1
config NET_TC_THREAD_PRIO_CUSTOM
default y
choice NET_TC_THREAD_TYPE
default NET_TC_THREAD_PREEMPTIVE
endchoice
config NET_TCP_WORKER_PRIO
default -16
config NET_TC_TX_THREAD_BASE_PRIO
default 3
config NET_TC_RX_THREAD_BASE_PRIO
default 3
config NET_TC_TX_SKIP_FOR_HIGH_PRIO
default y
config NET_CONTEXT_PRIORITY
default y
config NET_CONTEXT_RECV_PKTINFO
default y
# Network buffers
config NET_PKT_RX_COUNT
default 14
config NET_PKT_TX_COUNT
default 14
config NET_BUF_RX_COUNT
default 36
config NET_BUF_TX_COUNT
default 36
config NET_BUF_DATA_SIZE
default 256
if NET_L2_OPENTHREAD
config HDLC_RCP_IF
default y if SOC_FAMILY_NXP_RW
config OPENTHREAD_THREAD_STACK_SIZE
default 6144
# Use the platform-provided heap
config OPENTHREAD_EXTERNAL_HEAP
default y
# Enable ping sender feature
config OPENTHREAD_PING_SENDER
default y
# Enable SLAAC feature for IPv6 address auto-configuration
config OPENTHREAD_SLAAC
default y
# Number of message buffers in the buffer pool
config OPENTHREAD_NUM_MESSAGE_BUFFERS
default 30 if SOC_SERIES_MCXW7XX
default 256
# Enable IPv6 fragmentation support
config OPENTHREAD_IP6_FRAGM
default y
# Enable CSL Receiver support
config OPENTHREAD_CSL_RECEIVER
default y if SOC_SERIES_MCXW7XX
# CSL receiver wake up margin in microseconds
config OPENTHREAD_CSL_RECEIVE_TIME_AHEAD
default 2500 if SOC_SERIES_MCXW7XX
# CSL transmitter request time ahead
config OPENTHREAD_CSL_REQUEST_TIME_AHEAD
default 2500 if SOC_SERIES_MCXW7XX
# Minimum receiving time before start of MHR
config OPENTHREAD_MIN_RECEIVE_ON_AHEAD
default 320 if SOC_SERIES_MCXW7XX
# Minimum receiving time after start of MHR
config OPENTHREAD_MIN_RECEIVE_ON_AFTER
default 64 if SOC_SERIES_MCXW7XX
# Software transmission security logic
config OPENTHREAD_MAC_SOFTWARE_TX_SECURITY_ENABLE
default n if SOC_SERIES_MCXW7XX
# Enable Domain Unicast Address feature
config OPENTHREAD_DUA
default y if SOC_SERIES_MCXW7XX
# Enable Multicast Listener Registration support
config OPENTHREAD_MLR
default y if SOC_SERIES_MCXW7XX
if OPENTHREAD_DEBUG
choice OPENTHREAD_LOG_LEVEL_CHOICE
default OPENTHREAD_LOG_LEVEL_DEBG
endchoice
endif # OPENTHREAD_DEBUG
# Zephyr auto-starts OpenThread by default (creates a default network,
# and attaches as a Leader). This causes Matter commissioning to start
# from an already-attached state, triggering a costly re-attach
# (~28s delay). Enabling manual start forces OT to begin in a detached
# state and lets Matter control bring-up, reducing OT join time to ~3s.
config OPENTHREAD_MANUAL_START
default y
choice OPENTHREAD_STACK_VERSION
default OPENTHREAD_THREAD_VERSION_1_4
endchoice
config OPENTHREAD_PARENT_SEARCH
default y
if OPENTHREAD_PARENT_SEARCH
config OPENTHREAD_PARENT_SEARCH_RSS_THRESHOLD
default -45
endif # OPENTHREAD_PARENT_SEARCH
config OPENTHREAD_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH
default y
config CHIP_USE_OT_ENDPOINT
default y
endif # NET_L2_OPENTHREAD
# Bluetooth Low Energy configs
config BT
default y
config BT_PERIPHERAL
default y
config BT_CENTRAL
default n
config BT_PERIPHERAL_PREF_MIN_INT
default 36
config BT_PERIPHERAL_PREF_MAX_INT
default 36
# Increase BT timeout to 5 s to improve connection reliability and avoid fast drop outs.
config BT_PERIPHERAL_PREF_TIMEOUT
default 500
config BT_GAP_AUTO_UPDATE_CONN_PARAMS
default y
# Decrease connection parameters update time, as some Matter controllers request
# enabling IP networking faster than BT connection parameters are updated, what may result
# in commissioning instabilities.
config BT_CONN_PARAM_UPDATE_TIMEOUT
default 1000
config BT_GATT_DYNAMIC_DB
default y
config BT_DEVICE_NAME_DYNAMIC
default y
config BT_DEVICE_NAME_MAX
default 15
config BT_MAX_CONN
default 1
config BT_L2CAP_TX_MTU
default 247
config BT_BUF_ACL_RX_SIZE
default 251
config BT_BUF_ACL_TX_SIZE
default 251
config BT_RX_STACK_SIZE
default 2560 if NET_L2_OPENTHREAD
default 2048 if NO_OPTIMIZATIONS && DEBUG
default 1700
config BT_LONG_WQ_STACK_SIZE
default 2560
config BT_DEVICE_NAME_GATT_WRITABLE
bool
default n
config HCI_NXP_ENABLE_AUTO_SLEEP
default n
config CHIP_OTA_REQUESTOR
default n
if CHIP_OTA_REQUESTOR
config CHIP_OTA_REQUESTOR_BUFFER_SIZE
default 256
endif # CHIP_OTA_REQUESTOR
config CHIP_DEVICE_SOFTWARE_VERSION
default 1
# Enable extended discovery
config CHIP_EXTENDED_DISCOVERY
default y
config NVS_LOOKUP_CACHE
default y
config NVS_LOOKUP_CACHE_SIZE
default 1024
if CHIP_WIFI
choice NXP_WIFI_PART
default NXP_RW610 if SOC_SERIES_RW6XX
endchoice
# Disable unnecessary features to save code size
# Saves 365kB of flash
config NXP_WIFI_SOFTAP_SUPPORT
default n
# Saves 61kB of flash
config NXP_WIFI_CSI
default n
# Saves 45kB of flash
config WIFI_NM_WPA_SUPPLICANT_ADVANCED_FEATURES
default n
config NXP_WIFI_MON_TASK_STACK_SIZE
default 1024
config NXP_WIFI_WLCMGR_TASK_STACK_SIZE
default 2048
config NXP_WIFI_TX_TASK_STACK_SIZE
default 1024
config NXP_WIFI_SCAN_TASK_STACK_SIZE
default 1024
config ZVFS_OPEN_MAX
default 30
choice SCHED_ALGORITHM
default SCHED_MULTIQ
endchoice
config WIFI_NM_MAX_MANAGED_INTERFACES
default 2
config WIFI_NM_WPA_SUPPLICANT_WQ_PRIO
default 3
config WIFI_NM_WPA_SUPPLICANT_PRIO
default 3
choice WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_CHOICE
default WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF
endchoice
choice WIFI_NM_WPA_SUPPLICANT_CRYPTO_BACKEND
default WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT
endchoice
config WIFI_NM_WPA_SUPPLICANT_THREAD_STACK_SIZE
default 6144
config WIFI_NM_WPA_SUPPLICANT_WQ_STACK_SIZE
default 5120
config WIFI_NM_WPA_SUPPLICANT_INF_MON
default n
config NET_TCP_WORKQ_STACK_SIZE
default 2048
# align these numbers to match the OpenThread config
config NET_IF_UNICAST_IPV6_ADDR_COUNT
default 6
config NET_IF_MCAST_IPV6_ADDR_COUNT
default 8
config NET_SOCKETS_POLL_MAX
default 14
config NET_IPV4_FRAGMENT_MAX_COUNT
default 3
config NET_IPV4_FRAGMENT_MAX_PKT
default 7
config NET_IPV4_FRAGMENT_TIMEOUT
default 3
config NET_IPV6_FRAGMENT_MAX_COUNT
default 3
config NET_IPV6_FRAGMENT_MAX_PKT
default 8
config NET_IPV6_FRAGMENT_TIMEOUT
default 3
# options managed by IP4/IP6 simultaneous support
# IPv6 Neighbor Discovery table sizing for dense networks. Where many routers
# advertise continuously (an "RA storm"), each is pinned in the neighbor cache
# as a non-evictable router entry; size the tables above the expected router
# count so peers are never evicted under churn.
# Neighbor cache: must hold all routers plus active peers without eviction.
config NET_IPV6_MAX_NEIGHBORS
default 32
# Route table: must hold all advertised routes plus the in-use route.
config NET_MAX_ROUTES
default 16
# Default-router list: track all advertising routers.
config NET_MAX_ROUTERS
default 16
# On-link prefixes (SLAAC): headroom for more than one advertised prefix.
config NET_IF_IPV6_PREFIX_COUNT
default 4
config NET_MAX_CONN
default 10
config ETH_DRIVER
default n
endif
config SHELL_STACK_SIZE
default 2048 if OPENTHREAD_LOG_LEVEL_DEBG
default 1536
config LOG_PROCESS_THREAD_STACK_SIZE
default 1536
config HEAP_MEM_POOL_SIZE
default 25600 if SOC_SERIES_MCXW7XX
default 122880
config CHIP_MALLOC_SYS_HEAP_SIZE
default 8192 if SOC_SERIES_MCXW7XX # 8 kB
default 28672 # 28 kB
config SYSTEM_WORKQUEUE_STACK_SIZE
default 3072 if NET_L2_OPENTHREAD
default 2048 if CHIP_WIFI
choice LIBC_IMPLEMENTATION
default PICOLIBC
endchoice
if CHIP_ETHERNET
config NET_SOCKETS_POLL_MAX
default 7
endif
# Configure MBEDTLS lib
config MBEDTLS
default y
config MBEDTLS_PSA_KEY_SLOT_COUNT
default 64
config MBEDTLS_USER_CONFIG_ENABLE
default n
config MBEDTLS_ENTROPY_C
default y
config MBEDTLS_SSL_MAX_CONTENT_LEN
default 768 if SOC_SERIES_MCXW7XX
default 8192
config MBEDTLS_ENABLE_HEAP
default y
config MBEDTLS_HEAP_SIZE
default 8192 if SOC_SERIES_MCXW7XX
default 15360
config MBEDTLS_CTR_DRBG_C
default y
config MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS
default y
choice CHIP_CRYPTO
default CHIP_CRYPTO_PSA
endchoice
if CHIP_CRYPTO_PSA
config MBEDTLS_PSA_CRYPTO_STORAGE_C
default y
config SECURE_STORAGE
default y
endif # CHIP_CRYPTO_PSA
config WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA
default y if WIFI_NM_WPA_SUPPLICANT && CHIP_CRYPTO_PSA
config ENTROPY_GENERATOR
default y if MCUX_ELS_PKC
if SHELL
config SHELL_MINIMAL
default y
config SHELL_HELP
default y
config KERNEL_SHELL
default y
config REBOOT
default y
# Disable not used shell modules
config DEVICE_SHELL
default n
config SHELL_WILDCARD
default n
config SHELL_VT100_COLORS
default n
config SHELL_STATS
default n
config SENSOR_SHELL
default n
config DATE_SHELL
default n
config DEVMEM_SHELL
default n
config MCUBOOT_SHELL
default n
config FLASH_SHELL
default n
endif # SHELL
choice POSIX_AEP_CHOICE
prompt "POSIX Subprofile"
default POSIX_AEP_CHOICE_NONE
endchoice
config CHIP_SE05X
select SE05X_LIB
select I2C
select PINCTRL
endif # CHIP
endif # SOC_FAMILY_NXP_RW || SOC_FAMILY_MCXW