Skip to content

Commit cd46813

Browse files
s07641069haiwentelinkpre-commit-ci[bot]damien0x0023restyled-commits
authored
[Telink] Update board support, DFU, factory data and platform configuration (project-chip#74059)
* telink: tl3238x: add new soc. - add tl3238x into matter. telink: tl3238x: adjust boot setting . - close bootstrap and bootvalitdate. - adjust rf settings. - add 2m partition for customer. - setting different discriminator. - add dual mode logic. - enable ota. telink: tl3238x: enlarge the ble thread stack. - after change the ble controller , the thread need to enlarge in pm mode. telink: tl3238x: open ota and lzma for contact-sensor. - open ota and add lzma. telink: tl3238x: enlarge malloc. - enlarge heap size for tl3238x. telink: tl3238x: enlarge ble thread - enlarge ble thread stack for jenkins alarm to 100%. * Develop tl3238x develop merge v1.0.1.0 (project-chip#417) - Optimized the RAM layout(default IRAM 96k, DRAM 64K). - Optimized the 802.15.4 driver in Zephyr and power consumption in Matter ICD mode. - Implemented retention deep sleep mode drivers for ADC and I2C under Zephyr. - Adjusted the clock speed support under different power mode, default retention deep sleep mode is 48MHz, fully power mode is 96MHz. - Supported TL9268M full power mode. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [Telink] validate slot0 for only once. * telink: tl3238x: update multiple operation lists for mass production (project-chip#438) - Add ota event callback . - Increase maximum group number per fabric . - Increase the ISR_STACK_SIZE to 1024 . - Increase the SYSTEM_WORKQUEUE_STACK_SIZE to 2048 . - Increase the HEAP_MEM_POOL_SIZE to 1280 . - Increase the COMMON_LIBC_MALLOC_ARENA_SIZE to 20716 . - Increase the NET_IF_MCAST_IPV6_ADDR_COUNT to 47 . - Increase the TL_BLE_CTRL_THREAD_STACK_SIZE to 1536 . - Increase the OPENTHREAD_THREAD_STACK_SIZE to 4096 . - Increase the OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE to 2048 . - Increase the OPENTHREAD_IP6_MAX_EXT_MCAST_ADDRS to 40 . - Increase the NET_RX_STACK_SIZE to 2048 . * fix typo * [Telink] Update build environment and steps - adjust CMakeLists for more SoCs - add boards/.conf for tl3238x - move kconfig from example prj.conf to board.conf - reduce CHIP MAIN_STACK_SIZE and OT message buffer size for tl3218x_retention - include ext_pm.h for tl323x - restyled by cland-format - update zephyr - update tl_ble_sdk - disable reduntant CI actions * Fix OpenThread path selection based on CONFIG_OPENTHREAD_TELINK_LIBRARY (project-chip#3) * Update Telink OpenThread Path Selection fixes the incorrect OpenThread repository selection logic in Telink platform builds: - Explicitly set ZEPHYR_OPENTHREAD_MODULE_DIR to use standard openthread path when CONFIG_OPENTHREAD_TELINK_LIBRARY is not enabled - Replace the directory-existence check with CONFIG_OPENTHREAD_TELINK_LIBRARY based path selection - Ensures build logs always print the correct git revision information matching the actually used OpenThread repository Now builds correctly distinguish between: - CONFIG_OPENTHREAD_TELINK_LIBRARY=y: uses modules/lib/openthread_telink_lib - CONFIG_OPENTHREAD_TELINK_LIBRARY=n: uses modules/lib/openthread - update zephyr revision * [Telink] Update Telink Zephyr and BLE SDK and add OTA Manual Process Script 1. SDK updates: - update zephyr from f243cd36e52a5bb370f0b6accaa1da29a825b842 to 30c10f8e319254d3771ab18bfb929019a2a7e38d - update ble sdk from 200420569e5588abdd0c3d92f9e3e518e1fc8778 to f50d422d780efb73af939650ef7b8c6bf5a0b99b 2. Fixes: - revert incorrect modifications to pwm_b9x, pwm_tlx 3. Add OTA manual process tool: - Add scripts/tools/telink/manual_process.py to manually generate Telink Matter OTA FW - supports all SoC families (2/4MB) with chip-specific LZMA compression pipelines - implements flexible input modes: .config parsing, manual parameters, --already-signed, --only-lzma - path-agnostic design with hardcoded tool paths for re-use in other environment Restyled by autopep8 Restyled by isort * Tl develop v1.5.1 fix tercel (project-chip#5) telink: TL721X: fix tl721x and change setting. - adopt the same setting as tl3238x . - add config for openthread(put some code into ramcode) . - add normal partition and lzma partition. - update matter ci. Signed-off-by: Haiwen Xia <haiwen.xia@telink-semi.com> * telink: add dual mode configs and TL3238C-EVK40D board overlay - Add TL3238C-EVK40D overlay for lighting-app 4MB dual mode - Add tl3238x_4m_flash_dual_mode.conf (lighting-app, DUAL_MODE=2) - Add tl3238x_retention_dual_mode.conf (light-switch-app, DUAL_MODE=1) - Default single-mode configs to DUAL_MODE=0 with LZMA enabled - Guard Zigbee merge with CONFIG_DUAL_MODE in CMakeLists.txt - Add build guide READMEs for both apps - Set device serial numbers in board configs - Update Zephyr revision in CI workflow Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * [Telink] Check matter network state when power-on (project-chip#469) * [Telink] Check if the thread dataset and fabirc were successfully written. Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com> * Telink: update and feature integration for tl323x/tl721x - set isComissioningStarted to false in OnCommissioningSessionEstablishmentError to fix commissioning session state error. This is a quick fix from project-chip#72700. - add dual mode configs for tl323x and TL3238C-EVK40D board overlay - update Telink BLE SDK revision from c4fdeaa0f3387543b9ec5f351ed74b3047988d00 to 46322e5b570e2a68373b18d4f08811acadd1266c - update hal_telink to improve flash protection for 4MB flash on TL323X. - update zephyr revision to e08fc42546e58d808bfd39f35c8df296f5617a44 - adjust and unify telink boards *.conf/*.overlay process flow for TL323X/721X - add TL323X/721X build README files and clarify TL721X does NOT support dual mode yet Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * Telink: add drafts of SDK release note, version file, Getting Started guide and reorganize READMEs (project-chip#8) * Telink: add SDK release note, version file and reorganize READMEs Establish the Telink Matter SDK documentation baseline for release preparation: - Add TELINK_VERSION (1.0.1.0) to identify the Telink SDK release paired with the upstream Matter master f4a8cf9. - Add tl_matter_sdk_release_node.md with supported boards, build targets and resource usage (RAM/ROM/firmware size) for the TL323X and TL721X Matter (OTA + LZMA) configurations. - Rename the upstream README to MATTER_README and promote the Telink README to README.md, so GitHub shows the Telink SDK docs on the repository landing page; add a cross-link to the upstream README. No source code changes. Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * Restyled by prettier-markdown * add telink technical words into github wordlist Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * change *readme.txt to *readme.md Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * Restyled by prettier-markdown * Restyled by prettier-markdown * Telink: add platform docs structure, Getting Started guide and firmware packaging script - Add docs/platforms/telink/ (index + Getting Started) following the per-vendor layout of other Matter platforms; register in docs/platforms/index.md. - Move tl_matter_sdk_release_note.md to docs/platforms/telink/releases/telink_release_notes.md (working copy) and add a versioned snapshot keyed to the tl_v1.0.1-beta-v1.5.1.0 tag. - Add scripts/tools/telink/package_telink_firmware.sh for TL3238X/TL7218X build/extract/readme/zip; it snapshots the release note into telink_release_notes_<tl_v*.tag>.md from the nearest git tag. - Update README.md links to the new doc locations. No source code changes. Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * Restyled by prettier-markdown * Restyled by shellharden * Restyled by shfmt * docs: add missing mis-spelling word - devicetree Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> --------- Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> Co-authored-by: Restyled.io <commits@restyled.io> * telink: add TL5218X platform support and update CI (project-chip#12) Add TL5218X (TL521X) SoC platform support to the Matter Telink platform, including build configurations, flash overlays, packaging scripts, and CI workflow updates. Platform support: - Add TL5218X platform config headers (CHIPDevicePlatformConfig.h, CHIPPlatformConfig.h, SystemPlatformConfig.h) with memory and thread stack size adjustments. - Add flash overlays for 2MB and 4MB flash variants, including LZMA compression and backup overlays. - Add FactoryDataParser/Provider updates and suppress sensitive DAC key/certificate debug logs to avoid leaking cryptographic material. Build configurations: - Add lighting-app and lock-app board configs for tl5218x and tl5218x_retention, including OTA, dual-mode OTA, and LZMA variants. - Update config/telink Kconfig.defaults and CMakeLists.txt for TL5218X. - Add README documentation for tl5218x lighting-app and retention builds. - Note that tl5218x_retention porting is not complete Build system: - Update scripts/build/builders/telink.py and targets.py to recognize TL5218X build targets. - Update package_telink_firmware.sh with TL5218X packaging support. - Update update_zephyr.py to support Zephyr PR ref fetching. CI: - Update examples-telink.yaml with TL5218X build targets and BLE SDK revision (2488b5b8bd5122f68d087ba2cd5a8f0c74572b8f). - Update Zephyr revision reference for TL521X builds. Signed-off-by: Hao Wu <hao.wu@telink-semi.com> Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> Co-authored-by: Hao Wu <hao.wu@telink-semi.com> * telink: add BLE/Thread concurrent mode and Channel Sounding reflector (project-chip#16) Add support for running BLE concurrently with an active Thread network on TL7218X and TL3238X, and integrate a Channel Sounding (CS) RAS reflector for TL7218X. Introduces CHIP_CONCURRENT_MODE Kconfig option that keeps the BLE controller alive after Thread commissioning. Key additions: - BLE idle mode and tl_dual_mode_start coordination for TLX RF coexistence - CS reflector implementation (CsReflector) for TL7218X - Concurrent board configs for TL3238X and TL7218X with README docs - CI: bump Zephyr to 8e3ccc0, BLE SDK to 088fca4 - Disable Cirque workflow (otbr-agent/ot-rcp upstream mismatch) Depends on Zephyr PR telink-semi/tl_zephyr#789. CI (examples-telink.yaml) passed. --------- Signed-off-by: Hao Wu <hao.wu@telink-semi.com> Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> Co-authored-by: Hao Wu <hao.wu@telink-semi.com> Co-authored-by: Restyled.io <commits@restyled.io> * [telink] Update v1.2.0 release notes with latest build data, add TL521X and concurrent/CS targets (project-chip#21) * docs(telink): update release notes for v1.2.0-alpha, clean up legacy platforms - Update TL323X/TL721X resource usage tables with latest build data - Add TL521X 4M flash dual-mode lighting-app data - Add concurrent mode and concurrent+CS targets for TL323X/TL721X - Remove legacy platforms (B91/B92/W91/TL321X) from all docs - Rename build_and_update_matter_notes.py to generate_and_update_matter_notes.py - Update README.md, README_BUILD_SCRIPT.md and release notes accordingly - Restyled by prettier-markdown - Restyled by ruff - Restyled by isort - fix py scripts - update fetch ble sdk --------- Signed-off-by: Hao Wu <hao.wu@telink-semi.com> Co-authored-by: Restyled.io <commits@restyled.io> * docs: telink: update release documentation for rc1 (project-chip#14) * docs: telink: update release documentation - add rc1 version draft Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * Restyled by prettier-markdown * doc: remove doc content for all chips except TL323X and TL721X README.md docs/platforms/telink/releases/telink_release_notes.md docs/platforms/telink/telink_getting_started.md Signed-off-by: Hao Wu <hao.wu@telink-semi.com> * doc: review the previous modifications. Improve the logic of the getting-started and release_notes docs. Improve the README content. Signed-off-by: Laiyue Wang <laiyue.wang@telink-semi.com> * doc: update release documentation - minor changes Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * Restyled by prettier-markdown * docs: update telink documents - release note - getting started guide Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * Restyled by prettier-markdown --------- Follow-up fix ============= Correct TL323X chip version from A0 to A0/A1 in the Telink release notes. --------- Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> Signed-off-by: Hao Wu <hao.wu@telink-semi.com> Signed-off-by: Laiyue Wang <laiyue.wang@telink-semi.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Hao Wu <hao.wu@telink-semi.com> Co-authored-by: Laiyue Wang <laiyue.wang@telink-semi.com> * [Telink] Update Zephyr SDK references to tl_zephyr (project-chip#29) * telink: update Zephyr SDK references to tl_zephyr Prepare for the GitHub repo renames: update CI-critical references (.github/workflows/examples-telink.yaml, chip-build-telink Dockerfiles) and Telink documentation links from telink-semi/zephyr to telink-semi/tl_zephyr. Historical release notes (docs/platforms/telink/releases/) are left unchanged (GitHub 301 redirects cover them).. Also updates self references from telink-semi/connectedhomeip to telink-semi/tl_matter. * style: prettier-format markdown tables after repo rename The zephyr -> tl_zephyr repository rename lengthened URLs in markdown tables. Re-run prettier (same version and config as the Restyled prettier-markdown restyler) on the markdown files touched by the rename so table column widths are aligned again. * workflows: update tl_zephyr and tl_ble_sdk - update tl_zephyr from 6825a2f00ba6de9adce66f32f55c8b457c46948c to 5cd959604f6ab5ff6af81c46b3a8b9324040f718 - update tl_ble_sdk from 53eb98b32ea79ed7ab38f5daabde0a78a7880cd9 to 9135c8eddb7caf72256c911b0ef113fb4037b1b4 Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * telink: fix getting-started clone directory after tl_matter rename Address CodeRabbit review feedback on the repo rename. - docs/platforms/telink/telink_getting_started.md: clone tl_matter into the connectedhomeip directory so the subsequent cd connectedhomeip step keeps working after the repository rename. - scripts/tools/telink/update_zephyr.py: make the remote argument optional nargs so its tl_zephyr default actually takes effect when the argument is omitted. Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> --------- Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> * telink: update Zephyr revision for TL521x split (project-chip#47) * telink: replace SOC_RISCV_TELINK_TLX with SOC_FAMILY_TELINK_TLX after Zephyr SoC family split The Zephyr SoC family split (soc/telink/tlx) removed the legacy SOC_RISCV_TELINK_TLX umbrella symbol and introduced SOC_FAMILY_TELINK_TLX, which is selected by every TLX sub-series (TL321X/TL323X/TL521X/TL721X/TL5X). Without this change, the build_mcuboot custom target was skipped on all TLX-family SoCs when CONFIG_BOOTLOADER_MCUBOOT=y (e.g. OTA builds), causing mcuboot.bin to be missing and the post-build merge step to fail with FileNotFoundError. B91/B92 (TLSR family) were unaffected because SOC_RISCV_TELINK_B9X was not renamed. Files updated: - config/telink/chip-module/CMakeLists.txt: guard build_mcuboot and process_binaries on SOC_FAMILY_TELINK_TLX - config/telink/chip-module/Kconfig.defaults: BLE ctrl defaults block and TELINK_TLX_MBEDTLS_HW_ACCELERATION default * telink: update Zephyr reference to dev-tlk_v4.1 branch Switch the Zephyr revision used by the Telink examples workflow from pull/802/head to the dev-tlk_v4.1 branch, which now contains the latest commit of the TL521x SoC split and subsequent updates. Tracking the dev-tlk_v4.1 branch keeps CI testing the latest Zephyr changes until the next stable tag is cut. --------- Signed-off-by: Hao Wu <hao.wu@telink-semi.com> * [Telink] Enable APP_SET_DEVICE_INFO_PROVIDER for All Clusters Minimal (project-chip#40) * [Telink] Enable APP_SET_DEVICE_INFO_PROVIDER for All Clusters Minimal Application example * [Telink] Compile DFUOverSMP.cpp in chip-module for all applications The air-quality-sensor-app failed to link on tlsr9528a_retention with undefined references to DFUOverSMP symbols, because its CMakeLists.txt lacked the DFUOverSMP.cpp source rule that other examples had. Compile examples/platform/telink/util/src/DFUOverSMP.cpp in the common Telink chip-module so that every application using AppTaskCommon.cpp links DFU over SMP support automatically when CONFIG_MCUMGR_TRANSPORT_BT is enabled, and drop the now-redundant per-application rules. * Revert "[Telink] Compile DFUOverSMP.cpp in chip-module for all applications" This reverts commit 76bd90a. * [Telink] Use 4mb flash overlay for (B92) All Clusters Minimal App * [Telink] Compile DFUOverSMP.cpp in chip-module for all applications The air-quality-sensor-app failed to link on tlsr9528a_retention with undefined references to DFUOverSMP symbols, because its CMakeLists.txt lacked the DFUOverSMP.cpp source rule that other examples had. Compile examples/platform/telink/util/src/DFUOverSMP.cpp in the common Telink chip-module so that every application using AppTaskCommon.cpp links DFU over SMP support automatically when CONFIG_MCUMGR_TRANSPORT_BT is enabled, and drop the now-redundant per-application rules. * fix typo --------- Co-authored-by: Damien Ji <yinghao.ji@telink-semi.com> * telink: update tl_zephyr revision for zigbee-to-matter switch (project-chip#51) Update the tl_zephyr revision used by the Telink examples workflow from d6a8aa968e5fb97c0b63e2b436aced9084614c65 to e87fbee38775b103bd676f8412e6a9d651f08d6b (HEAD of the dev-tlk_v4.1 branch). The new revision adds: - soc: telink_tl521x: reset radio at boot for zigbee-to-matter switch (project-chip#836): add an RF reset sequence in soc_early_init_hook (only when PM and MCUboot are disabled) to support switching from Zigbee to Matter for lighting devices on TL521X, mirroring the existing telink_tl323x logic. Signed-off-by: Hao Wu <hao.wu@telink-semi.com> * docs: telink: finalize v1.4.0 release notes and docs (project-chip#50) - Add the v1.4.0 release notes and update the landing page to the v1.4.0 release, supporting TL521X (A0) with lighting-app only. - Switch from the beta tag tl_v1.4.0-beta-v1.5 to the official tl_v1.4.0-v1.5 and set the release type to Release. - Expand the README (EN and CN) with typical applications, support information, and contribution guidance sections. - Rework the getting-started guide with updated prerequisites, build and flashing instructions, appendices, and FAQs. - Update the tl_zephyr revision to ec302e9 and the BLE SDK to de6f125c. - Update repo links from telink-semi/connectedhomeip to telink-semi/tl_matter. --------- Signed-off-by: Hao Wu <hao.wu@telink-semi.com> Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> Co-authored-by: Damien Ji <yinghao.ji@telink-semi.com> Co-authored-by: Restyled.io <commits@restyled.io> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix spellcheck & code-lints * reduce number of builds for all PRs * fix code-lints * fix typo * clean code * fix builds * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix builds * fix docs build * remove partial secure programming * remove todo * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add tl7218x_4m_flash_lzma.overlay * update hashes * fix builds * fix builds * fix builds * fix w91 NET_RX_STACK_SIZE with PM * extend boot_partition for tl7218 lzma target * update Zephyr hash * revert wrong changes * [Telink] Update builds to docker version 214 * update tl3238x 2Mb LZMA flash layout * fixes for tl3238x SoC * [Telink] fixes after bot review * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Haiwen Xia <haiwen.xia@telink-semi.com> Signed-off-by: Damien Ji <yinghao.ji@telink-semi.com> Signed-off-by: Fengtai Xie <fengtai.xie@telink-semi.com> Signed-off-by: Hao Wu <hao.wu@telink-semi.com> Signed-off-by: Laiyue Wang <laiyue.wang@telink-semi.com> Co-authored-by: haiwen.xia <haiwen.xia@telink-semi.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Damien Ji <yinghao.ji@telink-semi.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Hao Wu <hao.wu@telink-semi.com> Co-authored-by: Laiyue Wang <laiyue.wang@telink-semi.com>
1 parent feccb59 commit cd46813

106 files changed

Lines changed: 4010 additions & 293 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/.wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ DeviceNetworkProvisioningDelegate
437437
DeviceNetworkProvisioningDelegateImpl
438438
DevicePairingDelegate
439439
DeviceTemperatureConfiguration
440+
devicetree
440441
Devkit
441442
DevKitC
442443
DevKitM
@@ -1576,6 +1577,7 @@ TKIP
15761577
TLS
15771578
tlsr
15781579
TLV
1580+
TLX
15791581
tmp
15801582
tngvndl
15811583
TODO

.github/workflows/chef.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ jobs:
165165
if: github.actor != 'restyled-io[bot]'
166166

167167
container:
168-
image: ghcr.io/project-chip/chip-build-telink:211
168+
image: ghcr.io/project-chip/chip-build-telink:214
169169
volumes:
170170
- "/:/runner-root-volume"
171171
options: --user root
@@ -179,7 +179,7 @@ jobs:
179179
platform: telink
180180
# - name: Update Zephyr to specific revision (for developers purpose)
181181
# shell: bash
182-
# run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 1f4804a19fe7ba792bfc315948043d5515e74cd2"
182+
# run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 9f6d24607560e3cd8197775d159f9bceaea2a865"
183183
- name: CI Examples Telink
184184
shell: bash
185185
run: |

.github/workflows/examples-telink.yaml

Lines changed: 100 additions & 98 deletions
Large diffs are not rendered by default.

config/telink/app/bootloader.conf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Enable this option in case if restoring the slot0 partition is expected from slot1
1818
# partition in case if slot0 is not bootable or damaged
19-
CONFIG_BOOT_BOOTSTRAP=y
19+
CONFIG_BOOT_BOOTSTRAP=n
2020

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

2828
# Enable this option in case if the whole slot0 image need to be validated
2929
# With disabled option the only image magic is validated
30-
CONFIG_BOOT_VALIDATE_SLOT0=y
30+
CONFIG_BOOT_VALIDATE_SLOT0=n
31+
CONFIG_BOOT_VALIDATE_SLOT0_ONCE=y
3132

3233
# Required for Zephyr 3.3 and replased with CONFIG_BOOT_MAX_IMG_SECTORS_AUTO in new versions
3334
# Maximum number of image sectors supported by the bootloader.
@@ -42,4 +43,10 @@ CONFIG_BOOT_MAX_IMG_SECTORS=512
4243
# - DEBUG, LOG_LEVEL_DBG
4344
CONFIG_MCUBOOT_LOG_LEVEL_INF=y
4445

46+
# Enable support LZMA compression
47+
CONFIG_COMPRESS_LZMA=n
48+
4549
CONFIG_PICOLIBC=y
50+
51+
# Disabling the banner is to allow cmd tool to better parse the chip ID, avoid interface.
52+
CONFIG_BOOT_BANNER=n

config/telink/app/bootloader_compress_lzma.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ CONFIG_BOOT_UPGRADE_ONLY=y
2020

2121
# Enable this option in case if the whole slot0 image need to be validated
2222
# With disabled option the only image magic is validated
23-
CONFIG_BOOT_VALIDATE_SLOT0=y
23+
CONFIG_BOOT_VALIDATE_SLOT0=n
24+
CONFIG_BOOT_VALIDATE_SLOT0_ONCE=y
2425

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

4748
CONFIG_PICOLIBC=y
49+
50+
# Disabling the banner is to allow cmd tool to better parse the chip ID, avoid interface.
51+
CONFIG_BOOT_BANNER=n

config/telink/chip-module/CMakeLists.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ matter_add_flags(-DMBEDTLS_USER_CONFIG_FILE=<${CONFIG_MBEDTLS_CFG_FILE}>)
7272
if (CONFIG_OPENTHREAD_TELINK_LIBRARY)
7373
set(ZEPHYR_OPENTHREAD_MODULE_DIR ${ZEPHYR_BASE}/../modules/lib/openthread_telink_lib CACHE STRING INTERNAL)
7474
message(STATUS "OpenThread used as precompiled Telink library, path: ${ZEPHYR_OPENTHREAD_MODULE_DIR}")
75+
else()
76+
set(ZEPHYR_OPENTHREAD_MODULE_DIR ${ZEPHYR_BASE}/../modules/lib/openthread CACHE STRING INTERNAL)
77+
message(STATUS "OpenThread used from source, path: ${ZEPHYR_OPENTHREAD_MODULE_DIR}")
7578
endif()
7679

7780
if (CONFIG_CHIP_OPENTHREAD_CONFIG)
@@ -205,7 +208,7 @@ add_dependencies(process_binaries ${ZEPHYR_FINAL_EXECUTABLE})
205208
# Define 'build_mcuboot' target for building the MCUBoot bootloader
206209
# ==============================================================================
207210
208-
if (CONFIG_BOOTLOADER_MCUBOOT AND (CONFIG_SOC_RISCV_TELINK_B9X OR CONFIG_SOC_RISCV_TELINK_TLX))
211+
if (CONFIG_BOOTLOADER_MCUBOOT AND (CONFIG_SOC_RISCV_TELINK_B9X OR CONFIG_SOC_FAMILY_TELINK_TLX))
209212
add_custom_target(build_mcuboot ALL
210213
COMMAND
211214
west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr
@@ -237,9 +240,20 @@ if (CONFIG_CHIP_OTA_IMAGE_BUILD)
237240
endif()
238241
239242
# ==============================================================================
240-
# Define 'dfu-smp-image' target for building DFU over BT SMP image
243+
# DFU over BT SMP support: compile the DFUOverSMP source, common for all
244+
# Telink applications, and define 'dfu-smp-image' target for building
245+
# the DFU over BT SMP image
241246
# ==============================================================================
242247
248+
if (CONFIG_MCUMGR_TRANSPORT_BT)
249+
zephyr_library()
250+
zephyr_library_sources(${CHIP_ROOT}/examples/platform/telink/util/src/DFUOverSMP.cpp)
251+
target_include_directories(${ZEPHYR_CURRENT_LIBRARY} PRIVATE
252+
${CHIP_ROOT}/examples/platform/telink/util/include
253+
)
254+
zephyr_library_link_libraries(MCUBOOT_BOOTUTIL chip)
255+
endif()
256+
243257
if (CONFIG_CHIP_DFU_OVER_BT_SMP_BUILD)
244258
file(WRITE "${PROJECT_BINARY_DIR}/empty.txt" "")
245259
chip_ota_image(dfu-smp-image

config/telink/chip-module/Kconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ config CHIP_DFU_OVER_BT_SMP
8484
select MCUMGR_MGMT_NOTIFICATION_HOOKS
8585
select MCUMGR_GRP_IMG_UPLOAD_CHECK_HOOK
8686
select MCUMGR_GRP_IMG_STATUS_HOOKS
87+
default y if BOARD_TL3238X || BOARD_TL3238X_RETENTION
88+
default y if BOARD_TLSR9528A || BOARD_TLSR9528A_RETENTION
89+
default n
8790
help
8891
Enables Device Firmware Upgrade over Bluetooth LE with SMP and configures
8992
the set of options related to that feature.
@@ -249,8 +252,9 @@ config CHIP_USE_MARS_SENSOR
249252
default n
250253

251254
config CHIP_PERSISTENT_SUBSCRIPTIONS
252-
default n if BOARD_TL7218X_RETENTION
253-
default y
255+
default y if BOARD_TL3238X || BOARD_TL3238X_RETENTION
256+
default y if BOARD_TLSR9528A || BOARD_TLSR9528A_RETENTION
257+
default n
254258
# selecting experimental for this feature since there is an issue with multiple controllers.
255259
select EXPERIMENTAL
256260

config/telink/chip-module/Kconfig.defaults

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,30 @@ config POSIX_MAX_FDS
6262
# Application stack size
6363
config MAIN_STACK_SIZE
6464
default 4864 if SOC_RISCV_TELINK_W91 || SOC_RISCV_TELINK_B91
65-
default 3560 if PM
66-
default 4096
65+
default 3560 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_B92
66+
default 3240
6767

6868
config INIT_STACKS
6969
default y
7070

7171
config IDLE_STACK_SIZE
72-
default 560 if PM || SOC_RISCV_TELINK_W91
72+
default 560
7373

7474
config ISR_STACK_SIZE
7575
default 800 if PM || SOC_RISCV_TELINK_W91
76+
default 1024
7677

7778
config SYSTEM_WORKQUEUE_STACK_SIZE
7879
default 1024 if PM && !SOC_RISCV_TELINK_W91
80+
default 2048 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
7981

8082
config HEAP_MEM_POOL_SIZE
81-
default 1796 if SOC_RISCV_TELINK_TL721X
83+
default 1796 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
8284
default 1280
8385

8486
config COMMON_LIBC_MALLOC_ARENA_SIZE
85-
default 26584 if SOC_RISCV_TELINK_TL721X
87+
default 30720 if (SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X) && CHIP_CONCURRENT_MODE
88+
default 26584 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
8689
default 29448 if SOC_RISCV_TELINK_W91
8790
default 20716
8891

@@ -94,6 +97,7 @@ config NET_IF_UNICAST_IPV6_ADDR_COUNT
9497
default 6
9598

9699
config NET_IF_MCAST_IPV6_ADDR_COUNT
100+
default 47 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
97101
default 8 if PM
98102
default 15
99103

@@ -103,20 +107,20 @@ config NET_IF_IPV6_PREFIX_COUNT
103107
# Network buffers
104108
config NET_PKT_RX_COUNT
105109
default 16 if SOC_RISCV_TELINK_W91
106-
default 4 if PM
110+
default 4 if PM || SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
107111
default 8
108112

109113
config NET_PKT_TX_COUNT
110114
default 16 if SOC_RISCV_TELINK_W91
111-
default 4 if PM
115+
default 4 if PM || SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
112116
default 8
113117

114118
config NET_BUF_RX_COUNT
115-
default 12 if PM && !SOC_RISCV_TELINK_W91
119+
default 12 if (PM && !SOC_RISCV_TELINK_W91) || SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
116120
default 32
117121

118122
config NET_BUF_TX_COUNT
119-
default 12 if PM && !SOC_RISCV_TELINK_W91
123+
default 12 if (PM && !SOC_RISCV_TELINK_W91) || SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
120124
default 32
121125

122126
config GPIO
@@ -164,12 +168,15 @@ config BT_MAX_CONN
164168
default 1
165169

166170
config BT_L2CAP_TX_MTU
171+
default 103 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
167172
default 247
168173

169174
config BT_BUF_ACL_RX_SIZE
175+
default 107 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
170176
default 251
171177

172178
config BT_BUF_ACL_TX_SIZE
179+
default 107 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
173180
default 251
174181

175182
config BT_BUF_EVT_RX_COUNT
@@ -192,10 +199,10 @@ config BT_DEVICE_NAME_GATT_WRITABLE
192199
config BT_HOST_CRYPTO
193200
default n
194201

195-
if SOC_RISCV_TELINK_B9X || SOC_RISCV_TELINK_TLX
202+
if SOC_RISCV_TELINK_B9X || SOC_FAMILY_TELINK_TLX
196203

197204
config TL_BLE_CTRL_THREAD_STACK_SIZE
198-
default 1536 if SOC_RISCV_TELINK_TL721X
205+
default 1536 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
199206
default 712
200207

201208
config TL_BLE_CTRL_MASTER_MAX_NUM
@@ -213,7 +220,7 @@ choice TL_BLE_CTRL_MAC_TYPE
213220
default TL_BLE_CTRL_MAC_TYPE_RANDOM_STATIC
214221
endchoice
215222

216-
endif # SOC_RISCV_TELINK_B9X || SOC_RISCV_TELINK_TLX
223+
endif # SOC_RISCV_TELINK_B9X || SOC_FAMILY_TELINK_TLX
217224

218225
endif # BT
219226

@@ -229,12 +236,12 @@ config PWM
229236

230237
endif
231238

232-
if BOARD_TL7218X_RETENTION
239+
if BOARD_TL7218X_RETENTION || BOARD_TL3238X_RETENTION || BOARD_TL3238X || BOARD_TL5218X_RETENTION || BOARD_TL5218X
233240
config SOC_SERIES_RISCV_TELINK_TLX_NON_RETENTION_RAM_CODE
234241
default n if PM
235242

236243
config TELINK_TLX_MATTER_RETENTION_LAYOUT
237-
default y if PM
244+
default y if PM || BOARD_TL3238X || BOARD_TL5218X
238245

239246
config PWM
240247
default n if PM
@@ -243,7 +250,7 @@ endif
243250

244251
# Board non-retention config
245252
if BOARD_TLSR9118BDK40D || BOARD_TLSR9118BDK40D_V1 || \
246-
BOARD_TLSR9528A || BOARD_TLSR9518ADK80D || BOARD_TL7218X
253+
BOARD_TLSR9528A || BOARD_TLSR9518ADK80D || BOARD_TL3238X || BOARD_TL5218X || BOARD_TL7218X
247254
config PWM
248255
default y
249256
endif
@@ -290,6 +297,7 @@ config NVS_LOOKUP_CACHE
290297
default y
291298

292299
config NVS_LOOKUP_CACHE_SIZE
300+
default 400 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
293301
default 2048 if !PM || SOC_RISCV_TELINK_W91
294302

295303
# Set multiplicator of Name Value Storage (NVS) as 1 to reach NVS sector size 4KB
@@ -339,16 +347,28 @@ config OPENTHREAD_CSMABACKOFF_OPTIMIZATION
339347
help
340348
Skip the first CSMA backoff period when sending data requests over IEEE 802.15.4.
341349

350+
config OPENTHREAD_SED_RAM_CODE
351+
bool "Place OpenThread SED standby code in RAM"
352+
depends on OPENTHREAD_MTD
353+
default y if PM && SOC_RISCV_TELINK_TL721X
354+
default n
355+
help
356+
Move SED standby critical path code to Retention RAM to reduce wakeup latency and power.
357+
342358
config IEEE802154_TLX_OPTIMIZATION
343359
bool "Optimize 802.15.4 RF performance for TLX SoCs"
360+
default y if PM && (SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X)
344361
default n
345362
help
346363
Improve RF performance in IEEE 802.15.4 communication on TLX SoCs.
347364

348365
config OPENTHREAD_THREAD_STACK_SIZE
349366
default 2400 if PM
367+
default 4096 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
350368

351369
config OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE
370+
default 2048 if PM && (SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X)
371+
default 608 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
352372
default 640
353373

354374
config OPENTHREAD_SLAAC
@@ -357,11 +377,14 @@ config OPENTHREAD_SLAAC
357377
config OPENTHREAD_MANUAL_START
358378
default y
359379

380+
# 6 is the max rf level by Vant
360381
config OPENTHREAD_DEFAULT_TX_POWER
361-
default 3 if PM
382+
default 3 if PM && (SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X)
383+
default 11 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X || SOC_RISCV_TELINK_TL521X
362384
default 9
363385

364386
config OPENTHREAD_IP6_MAX_EXT_MCAST_ADDRS
387+
default 40 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X
365388
default 2 if PM
366389
default 8
367390

@@ -375,11 +398,12 @@ endif # NET_L2_OPENTHREAD
375398

376399
config NET_TX_STACK_SIZE
377400
default 1200 if SOC_RISCV_TELINK_W91
378-
default 600 if PM
401+
default 600
379402

380403
config NET_RX_STACK_SIZE
381404
default 2048 if SOC_RISCV_TELINK_W91
382405
default 664 if PM
406+
default 2048 if SOC_RISCV_TELINK_TL323X || SOC_RISCV_TELINK_TL721X
383407

384408
# Disable certain parts of Zephyr IPv6 stack
385409
config NET_IPV6_NBR_CACHE
@@ -509,6 +533,10 @@ config NET_CONTEXT_RECV_PKTINFO
509533
bool
510534
default y
511535

536+
config TELINK_TLX_MBEDTLS_HW_ACCELERATION
537+
bool "Use Telink TLx platform mbedtls HW acceleration"
538+
default y if SOC_FAMILY_TELINK_TLX
539+
512540
# Disable not used shell modules
513541

514542
config SHELL_WILDCARD

docs/platforms/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ nxp/index
1616
openthread/index
1717
silabs/index
1818
stm32/index
19+
telink/index
1920
ti/index
2021
```
2122

@@ -30,4 +31,5 @@ ti/index
3031
- [OpenThread](./openthread/index.md)
3132
- [Silabs](./silabs/index.md)
3233
- [STM32](./stm32/index.md)
34+
- [Telink](./telink/index.md)
3335
- [TI](./ti/index.md)
237 KB
Loading

0 commit comments

Comments
 (0)