Skip to content

Commit

Permalink
riscv: telink: add compile support for tl3218x .
Browse files Browse the repository at this point in the history
- fix retention ram.

Signed-off-by: Haiwen Xia <[email protected]>
  • Loading branch information
haiwentelink committed Jan 13, 2025
1 parent 130ab82 commit 8a6ad65
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
platform: telink
- name: Update Zephyr to specific revision (for developers purpose)
shell: bash
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py origin/develop_customer"
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py origin/develop_customer_fix_retention"
- name: CI Examples Telink
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
gh-context: ${{ toJson(github) }}

- name: Update Zephyr to specific revision (for developers purpose)
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py origin/develop_customer"
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py origin/develop_customer_fix_retention"

- name: Build example Telink (B92 retention) Air Quality Sensor App
# Run test for master and s07641069 PRs
Expand Down
6 changes: 2 additions & 4 deletions config/telink/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ config HEAP_MEM_POOL_SIZE

# need to enlarge to 21000 , to pass TC_RR_1.1
config COMMON_LIBC_MALLOC_ARENA_SIZE
default 14336 if SOC_SERIES_RISCV_TELINK_B9X_RETENTION
default 13824 if SOC_RISCV_TELINK_TL321X && SOC_SERIES_RISCV_TELINK_TLX_RETENTION
default 21000 if SOC_RISCV_TELINK_TL321X || SOC_SERIES_RISCV_TELINK_B9X_RETENTION
default 12288

config NET_IPV6_MLD
Expand Down Expand Up @@ -167,8 +166,7 @@ config BT_GATT_CACHING
#endif

config BT_RX_STACK_SIZE
default 1352 if BT_B9X
default 1010 if BT_TLX
default 1352 if BT_B9X || BT_TLX
default 2048 if BT_W91

config BT_HCI_TX_STACK_SIZE
Expand Down
16 changes: 1 addition & 15 deletions src/platform/telink/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,10 @@ struct ChipDeviceEvent;
#define CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_TIME 1
#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS

#if defined CONFIG_SOC_RISCV_TELINK_TL321X || defined CONFIG_SOC_SERIES_RISCV_TELINK_B9X_RETENTION
#if defined CONFIG_IEEE802154_TLX_OPTIMIZATION && CONFIG_IEEE802154_TLX_OPTIMIZATION
#define CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_HEAP 0
#define CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_POOL 1
#else /* !CONFIG_IEEE802154_TLX_OPTIMIZATION */
#if defined(CONFIG_SOC_RISCV_TELINK_TL321X) || defined(CONFIG_SOC_SERIES_RISCV_TELINK_B9X_RETENTION)
#define CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_HEAP 1
#define CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_POOL 0
#endif /* CONFIG_IEEE802154_TLX_OPTIMIZATION */
#define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1
#endif

#if defined CONFIG_SOC_RISCV_TELINK_TL321X
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX 1024
#elif defined CONFIG_SOC_SERIES_RISCV_TELINK_B9X_RETENTION
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX 1280
#endif

Expand All @@ -66,11 +56,7 @@ struct ChipDeviceEvent;

// Reduce packet buffer pool size (default 15) to reduce ram consumption
#if defined CONFIG_PM || defined CONFIG_SOC_RISCV_TELINK_TL321X
#if defined CONFIG_IEEE802154_TLX_OPTIMIZATION && CONFIG_IEEE802154_TLX_OPTIMIZATION
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 6
#else /* !CONFIG_IEEE802154_TLX_OPTIMIZATION */
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 0
#endif /* CONFIG_IEEE802154_TLX_OPTIMIZATION */
#else
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 8
#endif
Expand Down

0 comments on commit 8a6ad65

Please sign in to comment.