From 986957199cf4fe3d7bdf5da9d66806f14f3b60fb Mon Sep 17 00:00:00 2001 From: srningap Date: Wed, 13 Sep 2023 15:56:48 +0530 Subject: [PATCH] Adds wifi-sdk 3.1.0 and required changes for it --- src/platform/silabs/rs911x/BLEManagerImpl.cpp | 1 + src/platform/silabs/rs911x/rsi_ble_config.h | 8 +++++ src/platform/silabs/rs911x/wfx_sl_ble_init.c | 2 +- third_party/silabs/SiWx917_sdk.gni | 34 +++++++++++-------- third_party/silabs/wifi_sdk | 2 +- 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp index 9b2b543a330055..d7477b1fa7b494 100644 --- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp +++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp @@ -130,6 +130,7 @@ void sl_ble_event_handling_task(void) // Requests the connection parameters change with the remote device rsi_ble_conn_params_update(event_msg.resp_enh_conn.dev_addr, BLE_MIN_CONNECTION_INTERVAL_MS, BLE_MAX_CONNECTION_INTERVAL_MS, BLE_SLAVE_LATENCY_MS, BLE_TIMEOUT_MS); + rsi_ble_set_data_len(event_msg.resp_enh_conn.dev_addr, RSI_BLE_TX_OCTETS, RSI_BLE_TX_TIME); } break; case RSI_BLE_DISCONN_EVENT: { diff --git a/src/platform/silabs/rs911x/rsi_ble_config.h b/src/platform/silabs/rs911x/rsi_ble_config.h index 1b6040542ba674..bb75266c14b712 100644 --- a/src/platform/silabs/rs911x/rsi_ble_config.h +++ b/src/platform/silabs/rs911x/rsi_ble_config.h @@ -60,6 +60,14 @@ #define ADD_DEVICE_TO_WHITELIST (0x01) #define DELETE_DEVICE_FROM_WHITELIST (0x02) +#define CLEAR_ACCEPTLIST (0x00) +#define ADD_DEVICE_TO_ACCEPTLIST (0x01) +#define DELETE_DEVICE_FROM_ACCEPTLIST (0x02) + +#define RSI_BLE_TX_OCTETS 251 +#define RSI_BLE_TX_TIME 2120 +#define RSI_BLE_CS_DATA_LENGTH 240 + #define ALL_PHYS (0x00) #define RSI_BLE_DEV_ADDR_RESOLUTION_ENABLE (0) diff --git a/src/platform/silabs/rs911x/wfx_sl_ble_init.c b/src/platform/silabs/rs911x/wfx_sl_ble_init.c index 1344847962b5d1..3f141da98c3a50 100644 --- a/src/platform/silabs/rs911x/wfx_sl_ble_init.c +++ b/src/platform/silabs/rs911x/wfx_sl_ble_init.c @@ -354,7 +354,7 @@ uint32_t rsi_ble_add_matter_service(void) uuid_t custom_service = { RSI_BLE_MATTER_CUSTOM_SERVICE_UUID }; custom_service.size = RSI_BLE_MATTER_CUSTOM_SERVICE_SIZE; custom_service.val.val16 = RSI_BLE_MATTER_CUSTOM_SERVICE_VALUE_16; - uint8_t data[230] = { RSI_BLE_MATTER_CUSTOM_SERVICE_DATA }; + uint8_t data[RSI_BLE_CS_DATA_LENGTH] = { RSI_BLE_MATTER_CUSTOM_SERVICE_DATA }; static const uuid_t custom_characteristic_RX = { .size = RSI_BLE_CUSTOM_CHARACTERISTIC_RX_SIZE, .reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_RESERVED }, diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index 79fbf8516347c6..0cfa450b0fa906 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -75,16 +75,22 @@ template("siwx917_sdk") { # siwx917_soc component "${wifi_sdk_root}/components/siwx917_soc/core/config", "${wifi_sdk_root}/components/siwx917_soc/inc", + "${wifi_sdk_root}/components/siwx917_soc/boards/config/brd4325b", + "${wifi_sdk_root}/components/siwx917_soc/boards/inc", + "${wifi_sdk_root}/components/siwx917_soc/core/chip/inc", + "${wifi_sdk_root}/components/siwx917_soc/core/config", "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver", "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver/config", "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver/CMSIS/Driver/Include", + "${wifi_sdk_root}/components/siwx917_soc/drivers/service/nvm3/inc", "${wifi_sdk_root}/components/siwx917_soc/drivers/systemlevel/inc", "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/inc", "${wifi_sdk_root}/components/siwx917_soc/drivers/rom_driver/inc", "${wifi_sdk_root}/components/siwx917_soc/drivers/unified_api/inc", "${wifi_sdk_root}/components/siwx917_soc/drivers/unified_api/config", - "${wifi_sdk_root}/components/siwx917_soc/boards/brd4325x/inc", - "${wifi_sdk_root}/components/siwx917_soc/wifi_inc", + "${wifi_sdk_root}/components/siwx917_soc/hal/inc", + "${wifi_sdk_root}/components/siwx917_soc/platform_connectivity/inc", + "${wifi_sdk_root}/components/siwx917_soc/platform_connectivity/wifi_inc", # wifi component "${wifi_sdk_root}/components/protocol/wifi/inc", @@ -170,6 +176,7 @@ template("siwx917_sdk") { "FLASH_PAGE_SIZE", "SL_NVM3_PRESENT", "ROM_WIRELESS", + "BRD4325A", #TODO: should be removed after SoC macro clean-up ] if (silabs_board == "BRD4325B") { @@ -326,14 +333,13 @@ template("siwx917_sdk") { # si91x_support component "${wifi_sdk_root}/components/si91x_support/src/sl_utility.c", - "${wifi_sdk_root}/components/siwx917_soc/boards/brd4325x/src/rsi_board.c", + "${wifi_sdk_root}/components/siwx917_soc/boards/src/rsi_board.c", "${wifi_sdk_root}/components/siwx917_soc/core/chip/src/rsi_deepsleep_soc.c", + "${wifi_sdk_root}/components/siwx917_soc/core/chip/src/rsi_system_config.c", "${wifi_sdk_root}/components/siwx917_soc/core/chip/src/system_si91x.c", "${wifi_sdk_root}/components/siwx917_soc/core/config/src/rsi_nvic_priorities_config.c", "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver/UDMA.c", "${wifi_sdk_root}/components/siwx917_soc/drivers/cmsis_driver/USART.c", - "${wifi_sdk_root}/components/siwx917_soc/drivers/ipmu/ipmu_apis.c", - "${wifi_sdk_root}/components/siwx917_soc/drivers/ipmu/rsi_system_config_9117.c", "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/src/clock_update.c", "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/src/rsi_egpio.c", "${wifi_sdk_root}/components/siwx917_soc/drivers/peripheral_drivers/src/rsi_udma.c", @@ -347,13 +353,13 @@ template("siwx917_sdk") { "${wifi_sdk_root}/components/siwx917_soc/drivers/systemlevel/src/rsi_temp_sensor.c", "${wifi_sdk_root}/components/siwx917_soc/drivers/systemlevel/src/rsi_ulpss_clk.c", "${wifi_sdk_root}/components/siwx917_soc/drivers/unified_api/src/sl_si91x_usart.c", - "${wifi_sdk_root}/components/siwx917_soc/rsi_hal_mcu_m4_ram.c", - "${wifi_sdk_root}/components/siwx917_soc/rsi_hal_mcu_m4_rom.c", - "${wifi_sdk_root}/components/siwx917_soc/sl_platform.c", - "${wifi_sdk_root}/components/siwx917_soc/sl_platform_wireless.c", - "${wifi_sdk_root}/components/siwx917_soc/sl_si91x_bus.c", - "${wifi_sdk_root}/components/siwx917_soc/sl_si91x_timer.c", - "${wifi_sdk_root}/components/siwx917_soc/sli_siwx917_soc.c", + "${wifi_sdk_root}/components/siwx917_soc/platform_connectivity/rsi_hal_mcu_m4_ram.c", + "${wifi_sdk_root}/components/siwx917_soc/platform_connectivity/rsi_hal_mcu_m4_rom.c", + "${wifi_sdk_root}/components/siwx917_soc/platform_connectivity/sl_platform.c", + "${wifi_sdk_root}/components/siwx917_soc/platform_connectivity/sl_platform_wireless.c", + "${wifi_sdk_root}/components/siwx917_soc/platform_connectivity/sl_si91x_bus.c", + "${wifi_sdk_root}/components/siwx917_soc/platform_connectivity/sl_si91x_timer.c", + "${wifi_sdk_root}/components/siwx917_soc/platform_connectivity/sli_siwx917_soc.c", # modified hal "${efr32_sdk_root}/platform/emdrv/nvm3/src/nvm3_default_common_linker.c", @@ -372,7 +378,7 @@ template("siwx917_sdk") { "${sdk_support_root}/matter/si91x/siwx917/${sdk_support_board}/autogen/sl_event_handler.c", "${sdk_support_root}/matter/si91x/siwx917/${sdk_support_board}/support/hal/rsi_hal_mcu_m4.c", "${sdk_support_root}/matter/si91x/siwx917/${sdk_support_board}/support/hal/rsi_hal_mcu_platform_init.c", - "${wifi_sdk_root}/components/siwx917_soc/drivers/middleware/nvm3/src/sl_si91x_nvm3_hal_flash.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/service/nvm3/src/sl_si91x_nvm3_hal_flash.c", # mbedtls "${chip_root}/third_party/mbedtls/repo/library/aes.c", @@ -422,7 +428,7 @@ template("siwx917_sdk") { if (wifi_soc_common_flash) { sources += [ "${sdk_support_root}/matter/si91x/siwx917/${sdk_support_board}/support/src/startup_common_RS1xxxx.c", - "${wifi_sdk_root}/components/siwx917_soc/drivers/middleware/nvm3/src/sl_si91x_common_flash_intf.c", + "${wifi_sdk_root}/components/siwx917_soc/drivers/service/nvm3/src/sl_si91x_common_flash_intf.c", ] } diff --git a/third_party/silabs/wifi_sdk b/third_party/silabs/wifi_sdk index 0f0cdcdc249b8d..f84bf6683b124b 160000 --- a/third_party/silabs/wifi_sdk +++ b/third_party/silabs/wifi_sdk @@ -1 +1 @@ -Subproject commit 0f0cdcdc249b8de03cb57b5095b290125f42030c +Subproject commit f84bf6683b124b62475cd456869c6db7c21ae24e