Skip to content

Commit

Permalink
[Silabs] Enabled BRD4338A board and configured BTN1 (#28928)
Browse files Browse the repository at this point in the history
* Adds BTN0 and BTN1 support for 917SoC B0 2.0 board

* Restyled by gn

* updated gni

* Restyled by gn

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
2 people authored and pull[bot] committed Feb 22, 2024
1 parent 280b46b commit 1173376
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion scripts/examples/gn_silabs_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ else
fi

# 917 exception. TODO find a more generic way
if [ "$SILABS_BOARD" == "BRD4325B" ] || [ "$SILABS_BOARD" == "BRD4325C" ]; then
if [ "$SILABS_BOARD" == "BRD4325B" ] || [ "$SILABS_BOARD" == "BRD4325C" ] || [ "$SILABS_BOARD" == "BRD4338A" ]; then
echo "Compiling for 917 WiFi SOC"
USE_WIFI=true
optArgs+="chip_device_platform =\"SiWx917\" "
Expand Down
7 changes: 7 additions & 0 deletions src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ void RSI_Board_LED_Set(int, bool);
void RSI_Board_LED_Toggle(int);
void RSI_Wakeupsw_config(void);
void RSI_Wakeupsw_config_gpio0(void);
#ifdef SI917_RADIO_BOARD_V2
void RSI_Wakeupsw_config_gpio11(void);
#endif
void sl_system_init(void);
void soc_pll_config(void);
}
Expand All @@ -58,7 +61,11 @@ CHIP_ERROR SilabsPlatform::Init(void)

// BTN0 and BTN1 init
RSI_Wakeupsw_config();
#ifdef SI917_RADIO_BOARD_V2
RSI_Wakeupsw_config_gpio11();
#else
RSI_Wakeupsw_config_gpio0();
#endif

#if SILABS_LOG_ENABLED
silabsInitLog();
Expand Down
17 changes: 7 additions & 10 deletions third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ template("siwx917_sdk") {
"KVS_MAX_ENTRIES=${kvs_max_entries}",
"${silabs_mcu}=1",
"${silabs_board}=1",
"SL_BOARD_NAME=${silabs_board}",
"__HEAP_SIZE=0",
"PLATFORM_HEADER=\"platform-header.h\"",
"USE_NVM3=1",
Expand Down Expand Up @@ -164,21 +165,17 @@ template("siwx917_sdk") {
]

if (silabs_board == "BRD4325B") {
defines += [
"BRD4325A",
"BRD4325B",
"DUAL_FLASH_EN",
]
defines += [ "DUAL_FLASH_EN" ]
}
if (silabs_board == "BRD4325C") {
if (wifi_soc_common_flash) {
defines += [
"BRD4325C",
"CHIP_917B0 = 1",
"SL_BOARD_NAME=\"BRD4325C\"",
"COMMON_FLASH_EN=1",
"EXECUTION_FROM_RAM",
"SL_BOARD_REV=\"A01\"",
]
if (silabs_board == "BRD4338A") {
defines += [ "SI917_RADIO_BOARD_V2=1" ]
}
}

if (chip_build_libshell) {
Expand Down Expand Up @@ -412,7 +409,7 @@ template("siwx917_sdk") {
]
}

if (silabs_board == "BRD4325C") {
if (wifi_soc_common_flash) {
sources += [
"${sdk_support_root}/matter/si91x/siwx917/BRD4325x/support/src/startup_common_RS1xxxx.c",
"${wifi_sdk_root}/components/siwx917_soc/drivers/middleware/nvm3/src/sl_si91x_common_flash_intf.c",
Expand Down
10 changes: 10 additions & 0 deletions third_party/silabs/silabs_board.gni
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ declare_args() {
chip_enable_ble_rs911x = false

wifi_soc = false
wifi_soc_common_flash = false

#Disable MQTT by default
enable_dic = false
Expand Down Expand Up @@ -111,12 +112,21 @@ if (silabs_board == "BRD4304A") {
disable_lcd = true
show_qr_code = false
wifi_soc = true
wifi_soc_common_flash = true
} else if (silabs_board == "BRD4325G") {
silabs_family = "SiWx917-common"
silabs_mcu = "SiWG917M111MGTBA"
disable_lcd = true
show_qr_code = false
wifi_soc = true
wifi_soc_common_flash = true
} else if (silabs_board == "BRD4338A") {
silabs_family = "SiWx917-common"
silabs_mcu = "SiWG917M111MGTBA"
disable_lcd = true
show_qr_code = false
wifi_soc = true
wifi_soc_common_flash = true
} else if (silabs_board == "BRD4180A") {
assert(
false,
Expand Down

0 comments on commit 1173376

Please sign in to comment.