diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 0a0e52c604..8acee7c3b9 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -115,7 +115,12 @@ source_set("siwx917-matter-shell") { config("siwx917-common-config") { defines = [ "OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout_sec}" ] - libs = [ "${sdk_support_root}/matter/provision/lib/libProvision_si917.a" ] + if (sl_si91x_crypto_flavor == "psa") { + libs = + [ "${sdk_support_root}/matter/provision/lib/libProvisionPSA_si917.a" ] + } else { + libs = [ "${sdk_support_root}/matter/provision/lib/libProvision_si917.a" ] + } if (!disable_lcd) { include_dirs = [ "${silabs_common_plat_dir}/display" ] diff --git a/examples/platform/silabs/provision/ProvisionStorageDefault.cpp b/examples/platform/silabs/provision/ProvisionStorageDefault.cpp index 661189ef90..09f103592d 100644 --- a/examples/platform/silabs/provision/ProvisionStorageDefault.cpp +++ b/examples/platform/silabs/provision/ProvisionStorageDefault.cpp @@ -17,7 +17,6 @@ #include "AttestationKey.h" #include "ProvisionStorage.h" #include -#include #include #include #include @@ -26,15 +25,20 @@ #include #include #include +#include #include -#include #include #ifdef SLI_SI91X_MCU_INTERFACE #include +#else +#include +#include #endif #ifdef SL_PROVISION_GENERATOR extern void setNvm3End(uint32_t addr); +#elif !SL_MATTER_GN_BUILD +#include #endif extern uint8_t linker_nvm_end[]; @@ -535,7 +539,7 @@ CHIP_ERROR Storage::GetDeviceAttestationCert(MutableByteSpan & value) return err; } -#ifdef SLI_SI91X_MCU_INTERFACE +#if defined(SLI_SI91X_MCU_INTERFACE) && defined(SL_MBEDTLS_USE_TINYCRYPT) CHIP_ERROR Storage::SetDeviceAttestationKey(const ByteSpan & value) { return SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_Creds_KeyId, value.data(), value.size()); @@ -573,7 +577,7 @@ CHIP_ERROR Storage::SignWithDeviceAttestationKey(const ByteSpan & message, Mutab } } -#else // SLI_SI91X_MCU_INTERFACEX_MCU_INTERFACEX_MCU_INTERFACE +#else CHIP_ERROR Storage::SetDeviceAttestationKey(const ByteSpan & value) { @@ -696,15 +700,6 @@ CHIP_ERROR Storage::GetTestEventTriggerKey(MutableByteSpan & keySpan) } // namespace Provision -void MigrateUint32(uint32_t old_key, uint32_t new_key) -{ - uint32_t value = 0; - if (SilabsConfig::ConfigValueExists(old_key) && (CHIP_NO_ERROR == SilabsConfig::ReadConfigValue(old_key, value))) - { - SilabsConfig::WriteConfigValue(new_key, value); - } -} - void MigrateDacProvider(void) { constexpr uint32_t kOldKey_Creds_KeyId = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x21); @@ -716,14 +711,14 @@ void MigrateDacProvider(void) constexpr uint32_t kOldKey_Creds_CD_Offset = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x27); constexpr uint32_t kOldKey_Creds_CD_Size = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x28); - MigrateUint32(kOldKey_Creds_KeyId, SilabsConfig::kConfigKey_Creds_KeyId); - MigrateUint32(kOldKey_Creds_Base_Addr, SilabsConfig::kConfigKey_Creds_Base_Addr); - MigrateUint32(kOldKey_Creds_DAC_Offset, SilabsConfig::kConfigKey_Creds_DAC_Offset); - MigrateUint32(kOldKey_Creds_DAC_Size, SilabsConfig::kConfigKey_Creds_DAC_Size); - MigrateUint32(kOldKey_Creds_PAI_Offset, SilabsConfig::kConfigKey_Creds_PAI_Offset); - MigrateUint32(kOldKey_Creds_PAI_Size, SilabsConfig::kConfigKey_Creds_PAI_Size); - MigrateUint32(kOldKey_Creds_CD_Offset, SilabsConfig::kConfigKey_Creds_CD_Offset); - MigrateUint32(kOldKey_Creds_CD_Size, SilabsConfig::kConfigKey_Creds_CD_Size); + MigrationManager::MigrateUint32(kOldKey_Creds_KeyId, SilabsConfig::kConfigKey_Creds_KeyId); + MigrationManager::MigrateUint32(kOldKey_Creds_Base_Addr, SilabsConfig::kConfigKey_Creds_Base_Addr); + MigrationManager::MigrateUint32(kOldKey_Creds_DAC_Offset, SilabsConfig::kConfigKey_Creds_DAC_Offset); + MigrationManager::MigrateUint32(kOldKey_Creds_DAC_Size, SilabsConfig::kConfigKey_Creds_DAC_Size); + MigrationManager::MigrateUint32(kOldKey_Creds_PAI_Offset, SilabsConfig::kConfigKey_Creds_PAI_Offset); + MigrationManager::MigrateUint32(kOldKey_Creds_PAI_Size, SilabsConfig::kConfigKey_Creds_PAI_Size); + MigrationManager::MigrateUint32(kOldKey_Creds_CD_Offset, SilabsConfig::kConfigKey_Creds_CD_Offset); + MigrationManager::MigrateUint32(kOldKey_Creds_CD_Size, SilabsConfig::kConfigKey_Creds_CD_Size); } } // namespace Silabs diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index 6bdef4162a..a7bfe1456c 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -188,7 +188,7 @@ template("siwx917_sdk") { "SL_HEAP_SIZE=32768", "SL_WIFI=1", "CCP_SI917_BRINGUP=1", - "SL_COMPONENT_CATALOG_PRESENT", + "SL_COMPONENT_CATALOG_PRESENT=1", "RS911X_WIFI=1", "RSI_WLAN_ENABLE", "SLI_SI91X_ENABLE_OS=1", @@ -226,7 +226,7 @@ template("siwx917_sdk") { "SL_SI91X_SI917_RAM_MEM_CONFIG=3", "SL_SI91x_DUAL_INTERRUPTS_ERRATA=1", "EXT_IRQ_COUNT=75", - "FLASH_PAGE_SIZE=1", + "FLASH_PAGE_SIZE=4096", "DEBUG_ENABLE=1", "ENABLE_DEBUG_MODULE=1", "SI91X_SYSRTC_PRESENT=1", @@ -240,6 +240,16 @@ template("siwx917_sdk") { "configUSE_POSIX_ERRNO=1", "NVM3_LOCK_OVERRIDE=1", "SL_MEMORY_POOL_LIGHT=1", + "SL_CODE_COMPONENT_CORE=core", + "SLI_SI91X_MCU_EXTERNAL_LDO_FOR_PSRAM=1", + "CLOCK_ROMDRIVER_PRESENT=1", + "ULPSS_CLOCK_ROMDRIVER_PRESENT=1", + "SL_SI91X_BOARD_INIT=1", + "CRC_ROMDRIVER_PRESENT=1", + "TIMER_ROMDRIVER_PRESENT=1", + "UDMA_ROMDRIVER_PRESENT=1", + "PLL_ROMDRIVER_PRESENT=1", + "SL_MATTER_GN_BUILD=1", ] if (silabs_log_enabled && chip_logging) { diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 4d4656a5c2..87d0b0bc07 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -432,6 +432,7 @@ template("efr32_sdk") { "SL_RAIL_UTIL_PA_CONFIG_HEADER=", "RADIO_CONFIG_DMP_SUPPORT=1", "SL_MATTER_BLE_EXTENDED_ADV=${sl_matter_ble_extended_adv}", + "SL_MATTER_GN_BUILD=1", "SL_MEMORY_POOL_LIGHT=1", "SL_OPENTHREAD_STACK_FEATURES_CONFIG_FILE=\"sl_openthread_features_config.h\"", "SL_CSL_TIMEOUT=${sl_ot_csl_timeout_sec}", diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 04d6c602dd..9e983904a6 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 04d6c602dd76c8ed1619436c840b3726cb030a6e +Subproject commit 9e983904a64d2f74280cd48b65ffd4457abd64f7