boards: arm: add initial support for efr32bg22_brd4184b

This adds basic support for 'B' revision of the Silicon Labs EFR32BG
BRD4184 (Thunderboard BG22) board. Due to missing drivers, some of the
on-board peripherals are currently unsupported:

- Silicon Labs Si7021 relative humidity and temperature sensor
- Vishay VEML6035 ambient light sensor
- Knowles SPK0641HT4H-1 MEMS microphones
- TDK InvenSense ICM-20648 6-axis inertial sensor

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
This commit is contained in:
Piotr Dymacz 2023-06-19 12:34:00 +02:00 committed by Fabio Baltieri
commit e4eadfa784
9 changed files with 149 additions and 55 deletions

View file

@ -8,6 +8,11 @@ config BOARD_EFR32BG22_BRD4184A
depends on SOC_SERIES_EFR32BG22 depends on SOC_SERIES_EFR32BG22
select SOC_PART_NUMBER_EFR32BG22C224F512IM40 select SOC_PART_NUMBER_EFR32BG22C224F512IM40
config BOARD_EFR32BG22_BRD4184B
bool "SiLabs EFR32BG22-BRD4184B (Thunderboard EFR32BG22)"
depends on SOC_SERIES_EFR32BG22
select SOC_PART_NUMBER_EFR32BG22C224F512IM40
config BOARD_EFR32BG27_BRD2602A config BOARD_EFR32BG27_BRD2602A
bool "SiLabs EFR32BG27-BRD2602A (EFR32BG27 +8 dBm Dev Kit Board)" bool "SiLabs EFR32BG27-BRD2602A (EFR32BG27 +8 dBm Dev Kit Board)"
depends on SOC_SERIES_EFR32BG27 depends on SOC_SERIES_EFR32BG27

View file

@ -10,6 +10,13 @@ config BOARD
endif # BOARD_EFR32BG22_BRD4184A endif # BOARD_EFR32BG22_BRD4184A
if BOARD_EFR32BG22_BRD4184B
config BOARD
default "efr32bg22_brd4184b"
endif # BOARD_EFR32BG22_BRD4184B
if BOARD_EFR32BG27_BRD2602A if BOARD_EFR32BG27_BRD2602A
config BOARD config BOARD

View file

@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
if(CONFIG_BOARD_EFR32BG22_BRD4184A) if(CONFIG_BOARD_EFR32BG22_BRD4184A OR CONFIG_BOARD_EFR32BG22_BRD4184B)
board_runner_args(jlink "--device=EFR32BG22C224F512IM40" "--reset-after-load") board_runner_args(jlink "--device=EFR32BG22C224F512IM40" "--reset-after-load")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

View file

@ -0,0 +1,58 @@
/*
* Copyright (c) 2021 Sateesh Kotapati
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "thunderboard.dtsi"
/ {
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
sw0 = &button0;
spi-flash0 = &mx25r80;
spi0 = &usart0;
watchdog0 = &wdog0;
/* If enabled, MCUboot uses this for recovery mode entrance */
mcuboot-led0 = &led0;
mcuboot-button0 = &button0;
};
chosen {
zephyr,code-partition = &slot0_partition;
};
};
&flash0 {
partitions {
/* Reserve 48 KiB for the bootloader */
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x0000c000>;
read-only;
};
/* Reserve 224 KiB for the application in slot 0 */
slot0_partition: partition@c000 {
label = "image-0";
reg = <0x0000c000 0x00038000>;
};
/* Reserve 224 KiB for the application in slot 1 */
slot1_partition: partition@44000 {
label = "image-1";
reg = <0x00044000 0x00038000>;
};
/* Set 16 KiB of storage at the end of the 512 KiB of flash */
storage_partition: partition@7c000 {
label = "storage";
reg = <0x0007c000 0x00004000>;
};
};
};
&sw_imu_enable {
enable-gpios = <&gpiob GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
};

View file

@ -7,69 +7,18 @@
/dts-v1/; /dts-v1/;
#include <silabs/efr32bg22.dtsi> #include <silabs/efr32bg22.dtsi>
#include <silabs/efr32bg2x-pinctrl.dtsi> #include <silabs/efr32bg2x-pinctrl.dtsi>
#include "thunderboard.dtsi" #include "efr32bg22_brd4184.dtsi"
/ { / {
model = "Silicon Labs EFR32BG BRD4184A (aka Thunderboard BG22)"; model = "Silicon Labs EFR32BG BRD4184A (aka Thunderboard BG22)";
compatible = "silabs,efr32bg22c224f512im40", "silabs,efr32bg_brd4184", compatible = "silabs,efr32bg22c224f512im40", "silabs,efr32bg_brd4184a",
"silabs,efr32bg22"; "silabs,efr32bg22";
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
sw0 = &button0;
spi-flash0 = &mx25r80;
spi0 = &usart0;
watchdog0 = &wdog0;
/* If enabled, MCUboot uses this for recovery mode entrance */
mcuboot-led0 = &led0;
mcuboot-button0 = &button0;
};
chosen {
zephyr,code-partition = &slot0_partition;
};
};
&flash0 {
partitions {
/* Reserve 48 KiB for the bootloader */
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x0000c000>;
read-only;
};
/* Reserve 224 KiB for the application in slot 0 */
slot0_partition: partition@c000 {
label = "image-0";
reg = <0x0000c000 0x00038000>;
};
/* Reserve 224 KiB for the application in slot 1 */
slot1_partition: partition@44000 {
label = "image-1";
reg = <0x00044000 0x00038000>;
};
/* Set 16 KiB of storage at the end of the 512 KiB of flash */
storage_partition: partition@7c000 {
label = "storage";
reg = <0x0007c000 0x00004000>;
};
};
}; };
&sw_sensor_enable { &sw_sensor_enable {
enable-gpios = <&gpioa GECKO_PIN(4) GPIO_ACTIVE_HIGH>; enable-gpios = <&gpioa GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
}; };
&sw_mic_enable { &sw_mic_enable {
enable-gpios = <&gpioa GECKO_PIN(0) GPIO_ACTIVE_HIGH>; enable-gpios = <&gpioa GECKO_PIN(0) GPIO_ACTIVE_HIGH>;
}; };
&sw_imu_enable {
enable-gpios = <&gpiob GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
};

View file

@ -0,0 +1,33 @@
/*
* Copyright (c) 2021 Sateesh Kotapati
* Copyright (c) 2023 Piotr Dymacz
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <silabs/efr32bg22.dtsi>
#include <silabs/efr32bg2x-pinctrl.dtsi>
#include "efr32bg22_brd4184.dtsi"
/ {
model = "Silicon Labs EFR32BG BRD4184B (aka Thunderboard BG22)";
compatible = "silabs,efr32bg22c224f512im40", "silabs,efr32bg_brd4184b",
"silabs,efr32bg22";
};
&button0 {
gpios = <&gpiob GECKO_PIN(3) GPIO_ACTIVE_LOW>;
};
&led0 {
gpios = <&gpioa GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
};
&sw_sensor_enable {
enable-gpios = <&gpioc GECKO_PIN(6) GPIO_ACTIVE_HIGH>;
};
&sw_mic_enable {
enable-gpios = <&gpioc GECKO_PIN(7) GPIO_ACTIVE_HIGH>;
};

View file

@ -0,0 +1,20 @@
identifier: efr32bg22_brd4184b
name: EFR32BG22-BRD4184B
type: mcu
arch: arm
ram: 32
flash: 512
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- counter
- gpio
- uart
- i2c
- spi
testing:
ignore_tags:
- net
- bluetooth

View file

@ -0,0 +1,22 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARM_MPU=y
CONFIG_SOC_SERIES_EFR32BG22=y
CONFIG_BOARD_EFR32BG22_BRD4184B=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_GPIO=y
CONFIG_SOC_GECKO_EMU_DCDC=y
CONFIG_SOC_GECKO_EMU_DCDC_MODE_ON=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_PINCTRL=y
# Used if SysTick is enabled, ignored for BURTC
# (BURTC uses TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=76800000
# Use BURTC as system clock source
CONFIG_GECKO_BURTC_TIMER=y
CONFIG_CMU_BURTCCLK_LFXO=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1024

View file

@ -214,7 +214,7 @@ manifest:
groups: groups:
- hal - hal
- name: hal_silabs - name: hal_silabs
revision: 5fbe78d3676b5500585f8e4534a8e56e7dae74a8 revision: fbb47a4067c460a2c26917ff34189fb4f32f654f
path: modules/hal/silabs path: modules/hal/silabs
groups: groups:
- hal - hal