Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c038765
telink: tl3238x: add new soc.
haiwentelink Nov 26, 2025
546850d
telink: tl3238x: adjust boot setting .
haiwentelink Nov 28, 2025
65f4ef5
telink: tl3238x: add partition and dual mode logic.
haiwentelink Nov 28, 2025
0b3a526
telink: tl3238x: enlarge the ble thread stack.
haiwentelink Dec 19, 2025
5f95409
[Telink] Add BLE layer re-initialization if BLE was previously shut d…
serhiiSalamakha Dec 18, 2025
cb6a4aa
[Telink] Add persistent subscriptions by default (#42452)
interfer Dec 22, 2025
7e61f49
telink: tl3238x: open ota and lzma for contact-sensor.
haiwentelink Dec 25, 2025
6bb3ce0
telink: tl3238x: enlarge malloc.
haiwentelink Dec 25, 2025
1195c99
telink: tl3238x: enlarge ble thread .
haiwentelink Dec 26, 2025
ffdf490
telink: tl3238x: adjust rf settings and clean code .
haiwentelink Jan 6, 2026
b992f92
telink: tl3238x: adjust openthread queue .
haiwentelink Jan 7, 2026
4ee7b59
telink: tl3238x: clean code .
haiwentelink Jan 8, 2026
b0535dc
telink: tl3238x: add lowpower settings .
haiwentelink Jan 9, 2026
2deebc6
telink: tl3238x: add the config of dual mode .
haiwentelink Jan 13, 2026
e098525
telink: tl3238x: add applicaton for switch .
haiwentelink Jan 13, 2026
23558b6
telink: tl3238x: add the flash partition table .
haiwentelink Jan 13, 2026
51df158
telink: tl3238x: add auto-switch mode for dual mode .
haiwentelink Jan 13, 2026
c8a0f15
telink: tl3238x: fix ota mode .
haiwentelink Jan 15, 2026
fdd8001
telink: tl3238x: open the tlx optimization mode .
haiwentelink Jan 15, 2026
0da6e6e
telink: tl3238x: open the tlx optimization mode .
haiwentelink Jan 20, 2026
40a440d
telink: tl3238x: add 2m partition for no lzma mode.
haiwentelink Jan 21, 2026
6cd6d1c
telink: tl3238x: open dfu over smp by default.
haiwentelink Jan 22, 2026
6b18c4b
telink: tl3238x: add openthread patch file.
haiwentelink Jan 23, 2026
a9cc6ed
[Telink] Register DeviceInfoProvider before Server::Init (#42665)
s07641069 Jan 15, 2026
297ec45
telink: tl3238x: fix the auto switch logic.
haiwentelink Jan 24, 2026
e853879
Develop tl3238x develop production (#414)
haiwentelink Jan 28, 2026
ce25e1a
telink: tl3238x: clean code .
haiwentelink Jan 29, 2026
ef56245
telink: tl3238x: fix expose chipId via ble.
damien0x0023 Jan 29, 2026
88a36b6
riscv: telink: Adjust the format
fengtai-telink Jan 29, 2026
182898f
telink: tl3238x: clean code .
haiwentelink Jan 29, 2026
379bc2d
telink: tl3238x: fix tl3238c 4m mode for lzma .
haiwentelink Feb 4, 2026
8309471
telink: tl3238x: submit contact sensor mode .
haiwentelink Feb 4, 2026
7bf78cc
telink: tl3238x: fix dfu mode for contact sensor mode .
haiwentelink Feb 4, 2026
dbe8d97
riscv: telink: fix dnss exception trigger when dfu-ota
fengtai-telink Feb 5, 2026
9c63585
telink: tl3238x: fix the logic jump from zigbee for auto-switch mode .
haiwentelink Feb 6, 2026
d7ff28d
telink: tl3238x: update the auto switch logic in OTBR share mode .
haiwentelink Feb 7, 2026
b926f78
[Telink] add BLE extended advertising (#43277)
s07641069 Feb 25, 2026
b10de1e
telink: tl3238x: release descriptor space for users.
haiwentelink Mar 18, 2026
33976a6
telink: tl3238x: add and fix some config
fengtai-telink Mar 11, 2026
aeb2966
telink: tl3238x: reduce fc time
fengtai-telink Mar 26, 2026
0534150
telink: tl3238x: enlarge ble stack.
haiwentelink Mar 26, 2026
5aeed00
tl323x: Merge SBoot or ZB FW (#428)
damien0x0023 Mar 27, 2026
07397fe
telink: tl3238x: update multiple operation lists for mass production …
fengtai-telink Apr 15, 2026
56b7328
telink: tl3238x: ota resume optimization for non-supporting ecosystems
fengtai-telink Apr 10, 2026
f745698
telink: 3238x: improve the speed of factory_reset.
haiwentelink Apr 15, 2026
56aac5e
[Telink] Fix CNET 4.12 thread switching
interfer Apr 20, 2026
99fa85e
Restyled by clang-format
restyled-commits Apr 20, 2026
0ddd85c
[Telink] Fix TC-OPCREDS-3.6 test (#43028)
s07641069 Feb 11, 2026
6ff99bb
telink: 3238x: fix incorrect factory reset logic for commissioned dev…
wuhaoTelink Apr 27, 2026
121ca49
[common][platform][openthread] Fix race condition during Thread stack…
pulin1103 May 21, 2026
5fcb8ed
[Telink] Fix OTA_EXTRA_ARGS config apply (#72034)
s07641069 May 13, 2026
1765175
Fix OpenThread path selection based on CONFIG_OPENTHREAD_TELINK_LIBRA…
damien0x0023 Jun 1, 2026
3142988
[Telink] Check matter network state when power-on (#469)
fengtai-telink Jun 17, 2026
71a8601
telink: tl3238x: add commissioning flag and fix compilations (#471)
fengtai-telink Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
with:
gh-context: ${{ toJson(github) }}

# - name: Update Zephyr version 4.1.0 (develop) to specific revision (for developers purpose)
# run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 86fb5f1142c99e04abc923f4c0aa5fafb2ea9ace"
- name: Update Zephyr version 4.1.0 (develop) to specific revision (for developers purpose)
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3a3683860df05a6e9d441a66f50097c9c03258bb"

- name: Build tools required for Factory Data
# Run test for master and all PRs
Expand Down
14 changes: 12 additions & 2 deletions config/telink/app/bootloader.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# Enable this option in case if restoring the slot0 partition is expected from slot1
# partition in case if slot0 is not bootable or damaged
CONFIG_BOOT_BOOTSTRAP=y
CONFIG_BOOT_BOOTSTRAP=n

# Enable this option in case if SWAP_MOVE logic need to be used
CONFIG_BOOT_SWAP_USING_MOVE=y
Expand All @@ -27,7 +27,8 @@ CONFIG_BOOT_SWAP_USING_SCRATCH=n

# Enable this option in case if the whole slot0 image need to be validated
# With disabled option the only image magic is validated
CONFIG_BOOT_VALIDATE_SLOT0=y
CONFIG_BOOT_VALIDATE_SLOT0=n
CONFIG_BOOT_VALIDATE_SLOT0_ONCE=y

# Required for Zephyr 3.3 and replased with CONFIG_BOOT_MAX_IMG_SECTORS_AUTO in new versions
# Maximum number of image sectors supported by the bootloader.
Expand All @@ -43,3 +44,12 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512
CONFIG_MCUBOOT_LOG_LEVEL_INF=y

CONFIG_PICOLIBC=y

# Disabling the banner is to allow cmd tool to better parse the chip ID, avoid interface.
CONFIG_BOOT_BANNER=n

CONFIG_BOOT_IMG_HASH_DIRECTLY_ON_STORAGE=y

# CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
# CONFIG_BOOT_SIGNATURE_KEY_FILE="ecdsa_private_key.pem"
# CONFIG_BOOT_SIGNATURE_KEY_FILE=""
12 changes: 11 additions & 1 deletion config/telink/app/bootloader_compress_lzma.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ CONFIG_BOOT_UPGRADE_ONLY=y

# Enable this option in case if the whole slot0 image need to be validated
# With disabled option the only image magic is validated
CONFIG_BOOT_VALIDATE_SLOT0=y
CONFIG_BOOT_VALIDATE_SLOT0=n
CONFIG_BOOT_VALIDATE_SLOT0_ONCE=y

# Required for Zephyr 3.3 and replased with CONFIG_BOOT_MAX_IMG_SECTORS_AUTO in new versions
# Maximum number of image sectors supported by the bootloader.
Expand All @@ -45,3 +46,12 @@ CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_COMPRESS_LZMA=y

CONFIG_PICOLIBC=y

# Disabling the banner is to allow cmd tool to better parse the chip ID, avoid interface.
CONFIG_BOOT_BANNER=n

CONFIG_BOOT_IMG_HASH_DIRECTLY_ON_STORAGE=y

# CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
# CONFIG_BOOT_SIGNATURE_KEY_FILE="ecdsa_private_key.pem"
# CONFIG_BOOT_SIGNATURE_KEY_FILE=""
97 changes: 93 additions & 4 deletions config/telink/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ matter_add_flags(-DMBEDTLS_USER_CONFIG_FILE=<${CONFIG_MBEDTLS_CFG_FILE}>)

if (CONFIG_OPENTHREAD_TELINK_LIBRARY)
set(ZEPHYR_OPENTHREAD_MODULE_DIR ${ZEPHYR_BASE}/../modules/lib/openthread_telink_lib CACHE STRING INTERNAL)
message(STATUS "OpenThread used as precompiled Telink library, path: ${ZEPHYR_OPENTHREAD_MODULE_DIR}")
message(STATUS "OpenThread used as precompiled Telink library, path: ${ZEPHYR_OPENTHREAD_MODULE_DIR}")
else()
set(ZEPHYR_OPENTHREAD_MODULE_DIR ${ZEPHYR_BASE}/../modules/lib/openthread CACHE STRING INTERNAL)
message(STATUS "OpenThread used from source, path: ${ZEPHYR_OPENTHREAD_MODULE_DIR}")
endif()

if (CONFIG_CHIP_OPENTHREAD_CONFIG)
Expand Down Expand Up @@ -114,6 +117,7 @@ matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_EN
matter_add_gn_arg_bool ("chip_enable_factory_data" CONFIG_CHIP_FACTORY_DATA)
matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_WIFI_W91)
matter_add_gn_arg_bool ("chip_mdns_platform" CONFIG_NET_L2_OPENTHREAD)
matter_add_gn_arg_bool ("chip_persist_subscriptions" CONFIG_CHIP_PERSISTENT_SUBSCRIPTIONS)

if (CONFIG_CHIP_ENABLE_ICD_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_lit" CONFIG_CHIP_ICD_LIT_SUPPORT)
Expand Down Expand Up @@ -169,12 +173,45 @@ endif()
# Define 'process_binaries' target for collecting final binary to flash
# ==============================================================================

set(BLOCK_SIZE "1024")

if(CONFIG_SOC_RISCV_TELINK_TL323X)
set(SOC "TL323X")

# Calculate the offset of zigbee partition relative to slot0 start
dt_nodelabel(slot0_partition_path NODELABEL "slot0_partition")
dt_reg_addr(slot0_start PATH ${slot0_partition_path})
dt_reg_size(slot0_size PATH ${slot0_partition_path})
message(STATUS "slot0_start: ${slot0_start}")
message(STATUS "slot0_size: ${slot0_size}")

dt_nodelabel(zb_partition_path NODELABEL "slot0_zb_partition")
dt_reg_addr(zb_start PATH ${zb_partition_path})
message(STATUS "zb_start: ${zb_start}")

math(EXPR zb_offset_bytes "${zb_start} - ${slot0_start}" OUTPUT_FORMAT DECIMAL)

math(EXPR ZB_FW_OFFSET_DECIMAL "${zb_offset_bytes} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
message(STATUS "ZB_FW_OFFSET_DECIMAL: ${ZB_FW_OFFSET_DECIMAL}")

set(ZB_FILE_PATH "${ZEPHYR_BASE}/${SOC}_FW/ZB/Zigbee-SampleDemo.bin")

set(SBOOT_FILE_PATH "${ZEPHYR_BASE}/${SOC}_FW/SBOOT/Secure_Bootloader.bin")
math(EXPR SKIP_BYTES_DECIMAL "${CONFIG_MCUBOOT_START_OFFSET} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
message(STATUS "SKIP_BYTES_DECIMAL: ${SKIP_BYTES_DECIMAL}")

endif()

add_custom_target(
process_binaries ALL
COMMAND ${Python3_EXECUTABLE} ${CHIP_ROOT}/scripts/tools/telink/process_binaries.py
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
add_dependencies(process_binaries ${ZEPHYR_FINAL_EXECUTABLE})
if(EXISTS ${ZB_FILE_PATH} AND CONFIG_BOOTLOADER_MCUBOOT AND (CONFIG_SOC_RISCV_TELINK_B9X OR CONFIG_SOC_RISCV_TELINK_TLX))
add_dependencies(process_binaries west_sign)
else()
add_dependencies(process_binaries ${ZEPHYR_FINAL_EXECUTABLE})
endif()

# ==============================================================================
# Define 'build_mcuboot' target for building the MCUBoot bootloader
Expand All @@ -184,10 +221,62 @@ if (CONFIG_BOOTLOADER_MCUBOOT AND (CONFIG_SOC_RISCV_TELINK_B9X OR CONFIG_SOC_RIS
add_custom_target(build_mcuboot ALL
COMMAND
west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr
-- -DOVERLAY_CONFIG=${GLOBAL_BOOT_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE="${GLOBAL_BOOT_DTC_OVERLAY_FILE};${FLASH_DTC_OVERLAY_FILE};${USB_BOOT_DTC_OVERLAY_FILE};${MARS_BOOT_DTC_OVERLAY_FILE}"
-- -DCONFIG_DUAL_MODE=${CONFIG_DUAL_MODE} -DOVERLAY_CONFIG=${GLOBAL_BOOT_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE="${GLOBAL_BOOT_DTC_OVERLAY_FILE};${FLASH_DTC_OVERLAY_FILE};${USB_BOOT_DTC_OVERLAY_FILE};${MARS_BOOT_DTC_OVERLAY_FILE}"
COMMAND
dd if=${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin of=${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/mcuboot_for_sign.bin bs=${BLOCK_SIZE} skip=${SKIP_BYTES_DECIMAL} conv=notrunc
COMMAND
cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin ${PROJECT_BINARY_DIR}/mcuboot.bin
cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/mcuboot_for_sign.bin ${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin
COMMAND
cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/mcuboot_for_sign.bin ${PROJECT_BINARY_DIR}/mcuboot_for_sign.bin
)
message(STATUS "mcuboot_for_sign.bin is for external signing.")

if (EXISTS ${SBOOT_FILE_PATH})
add_custom_target(merge_sboot ALL
COMMAND
dd if=/dev/zero bs=${BLOCK_SIZE} count=${SKIP_BYTES_DECIMAL} | tr '\\000' '\\377' > ${PROJECT_BINARY_DIR}/bootloader_merged.bin
COMMAND
dd if=${SBOOT_FILE_PATH} of=${PROJECT_BINARY_DIR}/bootloader_merged.bin conv=notrunc
COMMAND
dd if=${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin of=${PROJECT_BINARY_DIR}/bootloader_merged.bin bs=${BLOCK_SIZE} seek=${SKIP_BYTES_DECIMAL} conv=notrunc
COMMAND
cp ${PROJECT_BINARY_DIR}/bootloader_merged.bin ${PROJECT_BINARY_DIR}/mcuboot.bin
)
message(WARNING "merged secure boot to mcuboot..")
else()
# Since there is no secure boot, no offset is needed.
# Simultaneously check if CONFIG_MCUBOOT_START_OFFSET is 0x0.
add_custom_target(merge_sboot ALL
cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin ${PROJECT_BINARY_DIR}/mcuboot.bin
)
message(WARNING "File ${SBOOT_FILE_PATH} does not exist.")
endif()
add_dependencies(merge_sboot build_mcuboot)

if (EXISTS ${ZB_FILE_PATH})
add_custom_target(merge_zigbee ALL
COMMAND
cp ${PROJECT_BINARY_DIR}/zephyr.bin ${PROJECT_BINARY_DIR}/zephyr.matter.bin # store matter firmware
COMMAND
dd if=/dev/zero bs=${BLOCK_SIZE} count=${ZB_FW_OFFSETZB_FW_OFFSET} | tr '\\000' '\\377' > ${PROJECT_BINARY_DIR}/dm_merged.bin
COMMAND
dd if=${PROJECT_BINARY_DIR}/zephyr.matter.bin of=${PROJECT_BINARY_DIR}/dm_merged.bin conv=notrunc
COMMAND
dd if=${ZB_FILE_PATH} of=${PROJECT_BINARY_DIR}/dm_merged.bin bs=${BLOCK_SIZE} seek=${ZB_FW_OFFSET_DECIMAL} conv=notrunc
COMMAND
cp ${PROJECT_BINARY_DIR}/dm_merged.bin ${PROJECT_BINARY_DIR}/zephyr.bin
COMMAND
cp ${PROJECT_BINARY_DIR}/dm_merged.bin ${PROJECT_BINARY_DIR}/unsign_merged.bin # store unsign merged firmware
)
add_custom_target(west_sign ALL
COMMAND
west sign -t imgtool -p ${ZEPHYR_BASE}/../bootloader/mcuboot/scripts/imgtool.py -d ${PROJECT_BINARY_DIR}/.. -- --key ${ZEPHYR_BASE}/../${CONFIG_MCUBOOT_SIGNATURE_KEY_FILE} --slot-size ${slot0_size}
)
add_dependencies(merge_zigbee ${ZEPHYR_FINAL_EXECUTABLE})
add_dependencies(west_sign merge_zigbee)
else()
message(WARNING "File ${ZB_FILE_PATH} does not exist. merge_zigbee target will not be created.")
endif()
endif()

# ==============================================================================
Expand Down
57 changes: 57 additions & 0 deletions config/telink/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,63 @@ config CHIP_USE_MARS_SENSOR
depends on SOC_RISCV_TELINK_B9X && (BOARD_TLSR9518ADK80D || BOARD_TLSR9518ADK80D_RETENTION)
default n

config CHIP_PERSISTENT_SUBSCRIPTIONS
default n if BOARD_TL3218X_RETENTION
default y
# selecting experimental for this feature since there is an issue with multiple controllers.
select EXPERIMENTAL

config CHIP_MAX_FABRICS
int "Maximum number of Matter fabrics"
default 3 if BOARD_TL3218X_RETENTION
default 5
help
The maximum number of Matter fabrics that device can be joined to.

if CHIP_PERSISTENT_SUBSCRIPTIONS

config CHIP_MAX_ACTIVE_CASE_CLIENTS
int "Maximum number of outgoing CASE sessions"
default CHIP_MAX_FABRICS
help
The maximum number of outgoing CASE sessions that can be simultaneously handled by the end device.

config CHIP_MAX_ACTIVE_DEVICES
int "Maximum number of simultaneous connections over CASE"
default CHIP_MAX_FABRICS
help
The maximum number of devices to which the Server implementers will be able to
concurrently connect over CASE and interact with.

config CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL
int "Minimum subscription resumption interval in seconds"
default 20
depends on CHIP_PERSISTENT_SUBSCRIPTIONS
help
The minimum interval in seconds before resuming a subscription that timed out.

config CHIP_SUBSCRIPTION_RESUMPTION_RETRY_MULTIPLIER
int "The multiplier for subscription resumption retry in seconds"
default 40
depends on CHIP_PERSISTENT_SUBSCRIPTIONS
help
The multiplier per subscription resumption retry attempt that is multiplied by the index of Fibonacci sequence
and added to CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL to obtain final wait time for next retry.
endif

config TFLM_FEATURE
bool "Enable the TFLM micro speech feature"
default n

config SECURE_PROGRAMMING
bool "Enable reading DAC and keys from the DAC partition"
depends on CHIP_FACTORY_DATA
default n

config EXPOSE_CHIP_ID_VIA_BLE
bool "Enable CHIP-ID via ble"
default n

config DEFERRED_ATTR_STORAGE
bool "Defer the storage time of attributes"
default n
Loading
Loading