From f01eedac1b3d98456e10c882df60d00d59051e72 Mon Sep 17 00:00:00 2001 From: Serhii Salamakha Date: Wed, 19 Jun 2024 10:24:01 +0300 Subject: [PATCH] [Telink] Update set ble mac address for w91 and b9x --- .github/workflows/chef.yaml | 2 +- .github/workflows/examples-telink.yaml | 2 +- config/telink/chip-module/Kconfig.defaults | 6 ++++-- src/platform/telink/BLEManagerImpl.cpp | 10 ++-------- src/platform/telink/tlsr9118bdk40d_3m_flash.overlay | 3 ++- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 1787cace30b0ba..bbeb41e600559e 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -110,7 +110,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 5ae5db00ac820fcbbcda9d7e71f0133240aa2c87" + run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8" - name: CI Examples Telink shell: bash run: | diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 3fc35f5b095eb0..ed959d2b73f79a 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -57,7 +57,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 5ae5db00ac820fcbbcda9d7e71f0133240aa2c87" + run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py ab81a585fca6a83b30e1f4e58a021113d6a3acb8" - name: Build example Telink (B92 retention) Air Quality Sensor App run: | diff --git a/config/telink/chip-module/Kconfig.defaults b/config/telink/chip-module/Kconfig.defaults index 0ecfff47cd3db3..ea5a6822b74cb5 100644 --- a/config/telink/chip-module/Kconfig.defaults +++ b/config/telink/chip-module/Kconfig.defaults @@ -137,10 +137,12 @@ config BT_BUF_ACL_TX_SIZE default 251 config BT_RX_STACK_SIZE - default 810 + default 810 if BT_B9X + default 2048 if BT_W91 config BT_HCI_TX_STACK_SIZE - default 640 + default 640 if BT_B9X + default 2048 if BT_W91 config BT_DEVICE_NAME_GATT_WRITABLE bool diff --git a/src/platform/telink/BLEManagerImpl.cpp b/src/platform/telink/BLEManagerImpl.cpp index 90277a1a623d27..fa8611982d8b03 100644 --- a/src/platform/telink/BLEManagerImpl.cpp +++ b/src/platform/telink/BLEManagerImpl.cpp @@ -45,12 +45,9 @@ #include #include -// TODO: need common mac_init solution for B9X & W91 -#ifndef CONFIG_BOARD_TLSR9118BDK40D extern "C" { -#include +extern __attribute__((noinline)) void telink_bt_blc_mac_init(uint8_t *bt_mac); } -#endif #if defined(CONFIG_PM) && !defined(CONFIG_CHIP_ENABLE_PM_DURING_BLE) #include @@ -120,10 +117,7 @@ CHIP_ERROR InitBLEMACAddress() int error = 0; bt_addr_le_t addr; -// TODO: need common mac_init solution for B9X & W91 -#ifndef CONFIG_BOARD_TLSR9118BDK40D - b9x_bt_blc_mac_init(addr.a.val); -#endif + telink_bt_blc_mac_init(addr.a.val); if (BT_ADDR_IS_STATIC(&addr.a)) // in case of Random static address, create a new id { diff --git a/src/platform/telink/tlsr9118bdk40d_3m_flash.overlay b/src/platform/telink/tlsr9118bdk40d_3m_flash.overlay index 3e42145fb44370..02cd3b6582c8e0 100644 --- a/src/platform/telink/tlsr9118bdk40d_3m_flash.overlay +++ b/src/platform/telink/tlsr9118bdk40d_3m_flash.overlay @@ -7,6 +7,7 @@ /delete-node/ partition@88000; /delete-node/ partition@f0000; /delete-node/ partition@f4000; + /delete-node/ partition@fe000; boot_partition: partition@0 { label = "mcuboot"; reg = <0x00000000 0x20000>; @@ -27,7 +28,7 @@ label = "image-1"; reg = <0x118000 0xe8000>; }; - reserved_partition: partition@200000 { + vendor_partition: partition@200000 { label = "vendor-data"; reg = <0x200000 0x100000>; };