forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathKconfig.defaults
532 lines (395 loc) · 12.1 KB
/
Kconfig.defaults
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
#
# Copyright (c) 2023-2024 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 CHIP
config CHIP_PROJECT_CONFIG
string "Project configuration file for Matter"
default "include/CHIPProjectConfig.h"
config ZEPHYR_VERSION_3_3
bool "Using Zephyr version 3.3"
default n
config LOG
default y
if LOG
choice LOG_MODE
default LOG_MODE_MINIMAL
endchoice
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
config SHELL
default y if CHIP_LIB_SHELL
config PTHREAD_IPC
bool
default n
config POSIX_MAX_FDS
int
default 16
# Application stack size
config MAIN_STACK_SIZE
default 3240 if PM || SOC_RISCV_TELINK_TL321X
default 4608 if SOC_RISCV_TELINK_W91 && !ZEPHYR_VERSION_3_3
default 4096
config INIT_STACKS
default y
config IDLE_STACK_SIZE
default 512 if PM || SOC_RISCV_TELINK_TL321X
config ISR_STACK_SIZE
default 576 if PM
default 528 if SOC_RISCV_TELINK_TL321X
config SYSTEM_WORKQUEUE_STACK_SIZE
default 616 if PM
config HEAP_MEM_POOL_SIZE
default 256 if ZEPHYR_VERSION_3_3
default 1280
config COMMON_LIBC_MALLOC_ARENA_SIZE
default 20716 if SOC_SERIES_RISCV_TELINK_B9X_RETENTION || (SOC_RISCV_TELINK_TL321X && ZEPHYR_VERSION_3_3)
default 16384 if SOC_RISCV_TELINK_TL721X || (SOC_RISCV_TELINK_TL321X && !ZEPHYR_VERSION_3_3)
default 12288
config NET_IPV6_MLD
default n if PM
default y
config NET_IF_MCAST_IPV6_ADDR_COUNT
default 8 if PM
default 15
# Network buffers
config NET_PKT_RX_COUNT
default 4 if PM || SOC_RISCV_TELINK_TL321X
default 8
config NET_PKT_TX_COUNT
default 4 if PM || SOC_RISCV_TELINK_TL321X
default 8
config NET_BUF_RX_COUNT
default 12 if PM || SOC_RISCV_TELINK_TL321X
default 32
config NET_BUF_TX_COUNT
default 12 if PM || SOC_RISCV_TELINK_TL321X
default 32
config GPIO
default y
# Bluetooth Low Energy configs
config BT
default y
if BT
config BT_PERIPHERAL
default y
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 103 if SOC_RISCV_TELINK_TL321X
default 247
config BT_BUF_ACL_RX_SIZE
default 107 if SOC_RISCV_TELINK_TL321X
default 251
config BT_BUF_ACL_TX_SIZE
default 107 if SOC_RISCV_TELINK_TL321X
default 251
config BT_BUF_EVT_RX_COUNT
default 4
config BT_BUF_ACL_RX_COUNT
default 4
config BT_GATT_CACHING
default n
config BT_RX_STACK_SIZE
default 1352 if BT_B9X || BT_TLX
default 2048 if BT_W91
config BT_HCI_TX_STACK_SIZE
default 640 if BT_B9X || BT_TLX
default 2048 if BT_W91
config BT_DEVICE_NAME_GATT_WRITABLE
default n
if SOC_RISCV_TELINK_B9X || SOC_RISCV_TELINK_TLX
config TL_BLE_CTRL_THREAD_STACK_SIZE
default 648 if ZEPHYR_VERSION_3_3
default 680
config TL_BLE_CTRL_MASTER_MAX_NUM
default 0
config TL_BLE_CTRL_SLAVE_MAX_NUM
default 1
config TL_BLE_CTRL_RF_POWER
default 3 if PM
default 8 if BT_TLX
default 9
choice TL_BLE_CTRL_MAC_TYPE
default TL_BLE_CTRL_MAC_TYPE_RANDOM_STATIC
endchoice
endif # SOC_RISCV_TELINK_B9X || SOC_RISCV_TELINK_TLX
endif # BT
if BOARD_TLSR9528A_RETENTION || BOARD_TLSR9518ADK80D_RETENTION
config SOC_SERIES_RISCV_TELINK_B9X_NON_RETENTION_RAM_CODE
default y if PM
config TELINK_B9X_MATTER_RETENTION_LAYOUT
default y if PM
config PWM
default n
endif
if BOARD_TL7218X_RETENTION || BOARD_TL3218X_RETENTION || BOARD_TL3218X
config SOC_SERIES_RISCV_TELINK_TLX_NON_RETENTION_RAM_CODE
default n if PM
config TELINK_TLX_MATTER_RETENTION_LAYOUT
default y if PM || BOARD_TL3218X
config PWM
default n if PM
endif
# Board non-retention config
if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1 || \
BOARD_TLSR9528A || BOARD_TLSR9518ADK80D || BOARD_TL3218X || BOARD_TL7218X
config PWM
default y
endif
# Config dynamic interrupts to have posibility to switch between BLE/Thread radio drivers
config DYNAMIC_INTERRUPTS
default y
config CHIP_OTA_REQUESTOR
default y
config MCUBOOT_SIGNATURE_KEY_FILE
default "bootloader/mcuboot/root-ec-p256.pem" if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1
depends on BOOTLOADER_MCUBOOT
# In current config/zephyr/Kconfig
# next deprecated values are selected
# warning: Deprecated symbol CPLUSPLUS is enabled.
# warning: Deprecated symbol LIB_CPLUSPLUS is enabled.
# new one are:
# CONFIG_CPP
# CONFIG_LIBCPP_IMPLEMENTATION
# See https://docs.zephyrproject.org/latest/releases/release-notes-3.3.html
# Since not only Telink is using Zephyr just suppress warnings
config WARN_DEPRECATED
default n
# Reboot system when fault happened
config TELINK_SOC_REBOOT_ON_FAULT
default y
config NVS_LOOKUP_CACHE
default y
config NVS_LOOKUP_CACHE_SIZE
default 400 if SOC_RISCV_TELINK_TL321X
default 2048 if !PM
# Set multiplicator of Name Value Storage (NVS) as 1 to reach NVS sector size 4KB
# nvs_sector_size = flash_page_size * mult = 4KB * 1 = 4KB
config SETTINGS_NVS_SECTOR_SIZE_MULT
default 1
# Enable OpenThread
config NET_L2_OPENTHREAD
default y if !WIFI
if NET_L2_OPENTHREAD
config CHIP_OPENTHREAD_CONFIG
string "Custom OpenThread configuration file"
default "../../platform/telink/project_include/OpenThreadConfig.h"
choice CHIP_THREAD_DEVICE_ROLE
prompt "Thread network device role"
default CHIP_THREAD_DEVICE_ROLE_ROUTER
config CHIP_THREAD_DEVICE_ROLE_ROUTER
depends on !PM
bool "thread device router"
config CHIP_THREAD_DEVICE_ROLE_END_DEVICE
depends on !PM
bool "thread end device"
config CHIP_THREAD_DEVICE_ROLE_SLEEPY_END_DEVICE
bool "thread sleepy end device"
endchoice
choice OPENTHREAD_DEVICE_TYPE
default OPENTHREAD_FTD if CHIP_THREAD_DEVICE_ROLE_ROUTER
default OPENTHREAD_MTD if CHIP_THREAD_DEVICE_ROLE_END_DEVICE || CHIP_THREAD_DEVICE_ROLE_SLEEPY_END_DEVICE
endchoice
config CHIP_ENABLE_ICD_SUPPORT
default y if CHIP_THREAD_DEVICE_ROLE_SLEEPY_END_DEVICE
config OPENTHREAD_THREAD_STACK_SIZE
default 2400 if PM || SOC_RISCV_TELINK_TL321X
config OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE
default 432 if PM
default 608
config OPENTHREAD_SLAAC
default y
config OPENTHREAD_MANUAL_START
default y
config OPENTHREAD_DEFAULT_TX_POWER
default 3 if PM
default 9
config OPENTHREAD_IP6_MAX_EXT_MCAST_ADDRS
default 2 if PM
default 8
endif # NET_L2_OPENTHREAD
config NET_TX_STACK_SIZE
default 554 if PM || SOC_RISCV_TELINK_TL321X
config NET_RX_STACK_SIZE
default 554 if PM || SOC_RISCV_TELINK_TL321X
# Disable certain parts of Zephyr IPv6 stack
config NET_IPV6_NBR_CACHE
default n
config NET_MAX_CONN
default 1 if !WIFI
config NET_MAX_CONTEXTS
default 1 if !WIFI
config NET_CONFIG_INIT_TIMEOUT
default 0
config CHIP_WIFI
bool "Enable Telink Wi-Fi support"
default y if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1
select WIFI_W91
select WIFI
select NET_STATISTICS
select NET_IPV6_ND # enable Neighbor Discovery to handle Router Advertisements
select NET_IPV6_NBR_CACHE
select NET_STATISTICS_USER_API
imply MBEDTLS_ENTROPY_C
imply MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
if CHIP_WIFI
config DEFAULT_WIFI_SSID
string "Default WiFi SSID"
depends on CHIP_WIFI
default ""
help
The SSID of network to connect to if no WiFi station configuration exists in NV storage
at the time the device boots.
This option is for testing only and should be disabled in production releases
config DEFAULT_WIFI_PASSWORD
string "Default WiFi Password"
depends on CHIP_WIFI
default ""
help
The password for the default WiFi network.
This option is for testing only and should be disabled in production releases.
config CHIP_WIFI_CONNECTION_RECOVERY_MINIMUM_INTERVAL
int "Define the minimum connection recovery time interval in milliseconds"
depends on CHIP_WIFI
default 500
help
Specifies the minimum connection recovery interval (in milliseconds).
config CHIP_WIFI_CONNECTION_RECOVERY_MAXIMUM_INTERVAL
int "Define the maximum connection recovery time interval in milliseconds"
depends on CHIP_WIFI
default 3600000 # 1 hour
help
Specifies the maximum connection recovery interval (in milliseconds).
config CHIP_WIFI_CONNECTION_RECOVERY_MAX_RETRIES_NUMBER
int "Define the maximum amount of connection recovery occurrences"
depends on CHIP_WIFI
default 0
help
Specifies the maximum number of connection recovery attempts.
If set to 0, no limitation is applied and attempts
to recover the connection are performed indefinitely.
config CHIP_WIFI_CONNECTION_RECOVERY_JITTER
int "Define the connection recovery jitter in milliseconds"
depends on CHIP_WIFI
default 2000
help
Specifies the maximum connection recovery jitter interval (in milliseconds).
Once the wait time reaches the current maximum value (defined by CHIP_WIFI_CONNECTION_RECOVERY_MAXIMUM_INTERVAL),
a random jitter interval is added to it to avoid periodicity. The random jitter is selected
within range [-JITTER; +JITTER].
config NET_MGMT_EVENT_STACK_SIZE
default 1128 if ZEPHYR_VERSION_3_3
default 1250
if !ZEPHYR_VERSION_3_3
config IPC_SERVICE_BACKEND_ICMSG_WQ_STACK_SIZE
int "Size of RX work queue stack"
default 2304 if TELINK_W91_IPC_DISPATCHER
endif
endif # CHIP_WIFI
config CHIP_ENABLE_PAIRING_AUTOSTART
bool "Open commissioning window on boot"
default y
help
Opens the commissioning window automatically at application boot time if
the node is not yet commissioned.
# Configure MBEDTLS lib
config MBEDTLS
default y
config MBEDTLS_CIPHER_AES_ENABLED
default y
config MBEDTLS_CIPHER_CCM_ENABLED
default y
config MBEDTLS_PK_WRITE_C
default y
config MBEDTLS_ECP_C
default y
config MBEDTLS_ECP_DP_SECP256R1_ENABLED
default y
config MBEDTLS_ECDH_C
default y
config MBEDTLS_ECDSA_C
default y
config MBEDTLS_PKCS5_C
default y
config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
default y
if !ZEPHYR_VERSION_3_3
config MBEDTLS_ENTROPY_POLL_ZEPHYR
bool "Provide entropy data to Mbed TLS through entropy driver or random generator"
default y
config MBEDTLS_HKDF_C
bool "HMAC-based Extract-and-Expand Key Derivation Function"
default y
config MBEDTLS_X509_CSR_WRITE_C
bool "X.509 Certificate Signing Requests writing"
default y
endif # !ZEPHYR_VERSION_3_3
config GETOPT_LONG
default y if ZEPHYR_VERSION_3_3
# Disable not used shell modules
config SHELL_WILDCARD
default n
config SHELL_VT100_COLORS
default n
config SHELL_STATS
default n
config KERNEL_SHELL
default n
config SENSOR_SHELL
default n
config DEVICE_SHELL
default n
config DATE_SHELL
default n
config DEVMEM_SHELL
default n
config MCUBOOT_SHELL
default n
config FLASH_SHELL
default n
config HWINFO_SHELL
default n
config PWM_SHELL
default n
config OPENTHREAD_SHELL
default n
# Thread analyzer
config THREAD_ANALYZER
default n
select THREAD_ANALYZER_AUTO
config THREAD_ANALYZER_AUTO_INTERVAL
default 5
depends on THREAD_ANALYZER_AUTO
config THREAD_ANALYZER_LOG_LEVEL
default 3 # info
depends on THREAD_ANALYZER
endif