Skip to content

Commit df7f104

Browse files
kboronski-antcarlescufi
authored andcommitted
boards: arm: efr32bg27_brd2602: Initial support
Adds initial support for efr32bg27_brd2602 - Thunderboard-style board. Supported features are: * counter * gpio * uart Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
1 parent bb98f48 commit df7f104

File tree

14 files changed

+262
-2
lines changed

14 files changed

+262
-2
lines changed

boards/arm/efr32_thunderboard/Kconfig.board

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ config BOARD_EFR32BG_SLTB010A
77
bool "SiLabs EFR32BG-SLTB010A (Thunderboard EFR32BG22)"
88
depends on SOC_SERIES_EFR32BG22
99
select SOC_PART_NUMBER_EFR32BG22C224F512IM40
10+
11+
config BOARD_EFR32BG27_BRD2602A
12+
bool "SiLabs EFR32BG27C140F768IM40 (EFR32BG27 +8 dBm Dev Kit Board)"
13+
depends on SOC_SERIES_EFR32BG27
14+
select SOC_PART_NUMBER_EFR32BG27C140F768IM40

boards/arm/efr32_thunderboard/Kconfig.defconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,19 @@ config BOARD
1010

1111
endif # BOARD_EFR32BG_SLTB010A
1212

13+
if BOARD_EFR32BG27_BRD2602A
14+
15+
config BOARD
16+
default "efr32bg27_brd2602a"
17+
18+
endif # BOARD_EFR32BG27_BRD2602A
19+
1320
config CMU_HFXO_FREQ
1421
default 40000000
1522

1623
config CMU_LFXO_FREQ
1724
default 32768
25+
<<<<<<< HEAD
1826

1927
if BT
2028

@@ -34,3 +42,5 @@ endchoice
3442
endif # BT
3543

3644
endif # BOARD_EFR32BG_SLTB010A
45+
=======
46+
>>>>>>> 4a57ca65b7 (boards: arm: efr32bg27_brd2602: Initial support)
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* Copyright (c) 2023 Antmicro <www.antmicro.com>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
/* TODO: Adapt GPIO to BG27 instead of using BG22 DTSi */
9+
#include <silabs/efr32bg27.dtsi>
10+
#include <silabs/efr32bg22-pinctrl.dtsi>
11+
#include "thunderboard.dtsi"
12+
13+
/ {
14+
model = "Silicon Labs EFR32BG27C140F768IM40 Thunderboard-style board";
15+
compatible = "silabs,efr32bg27c140f768im40", "silabs,efr32bg27";
16+
17+
/* These aliases are provided for compatibility with samples */
18+
aliases {
19+
led0 = &led0;
20+
sw0 = &button0;
21+
i2c-pin = &i2c_pin;
22+
spi-flash0 = &mx25r80;
23+
spi0 = &usart0;
24+
watchdog0 = &wdog0;
25+
};
26+
27+
leds {
28+
compatible = "gpio-leds";
29+
led0: led_0 {
30+
gpios = <&gpioa GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
31+
label = "LED 0";
32+
};
33+
};
34+
};
35+
36+
&flash0 {
37+
partitions {
38+
/* Reserve 32 kB for the bootloader */
39+
boot_partition: partition@0 {
40+
label = "mcuboot";
41+
reg = <0x0 0x00008000>;
42+
read-only;
43+
};
44+
45+
/* Reserve 320 kB for the application in slot 0 */
46+
slot0_partition: partition@8000 {
47+
label = "image-0";
48+
reg = <0x00008000 0x00050000>;
49+
};
50+
51+
/* Reserve 320 kB for the application in slot 1 */
52+
slot1_partition: partition@58000 {
53+
label = "image-1";
54+
reg = <0x00058000 0x00050000>;
55+
};
56+
57+
/* Reserve 32 kB for the scratch partition */
58+
scratch_partition: partition@a8000 {
59+
label = "image-scratch";
60+
reg = <0x000a8000 0x00008000>;
61+
};
62+
63+
/* Set 64Kb of storage at the end of the 768KB of flash */
64+
storage_partition: partition@b0000 {
65+
label = "storage";
66+
reg = <0x000b0000 0x00010000>;
67+
};
68+
69+
};
70+
};
71+
72+
73+
&usart0 {
74+
interrupts = <16 0>, <17 0>;
75+
interrupt-names = "rx", "tx";
76+
};
77+
78+
&usart1 {
79+
interrupts = <18 0>, <19 0>;
80+
interrupt-names = "rx", "tx";
81+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
identifier: efr32bg27_brd2602a
2+
name: EFR32BG27_BRD2602A
3+
type: mcu
4+
arch: arm
5+
ram: 64
6+
flash: 768
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
- xtools
11+
supported:
12+
- counter
13+
- gpio
14+
- uart
15+
testing:
16+
ignore_tags:
17+
- net
18+
- bluetooth
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_ARM_MPU=y
4+
CONFIG_SOC_SERIES_EFR32BG27=y
5+
CONFIG_BOARD_EFR32BG27_BRD2602A=y
6+
CONFIG_CONSOLE=y
7+
CONFIG_UART_CONSOLE=y
8+
CONFIG_SERIAL=y
9+
CONFIG_CORTEX_M_SYSTICK=y
10+
CONFIG_GPIO=y
11+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=76800000
12+
CONFIG_CMU_HFCLK_HFXO=y
13+
CONFIG_SOC_GECKO_EMU_DCDC=y
14+
CONFIG_SOC_GECKO_EMU_DCDC_MODE_ON=y
15+
CONFIG_HW_STACK_PROTECTION=y
16+
CONFIG_CMU_HFCLK_HFRCO=y
17+
CONFIG_PINCTRL=y

drivers/gpio/gpio_gecko.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@
2626
#define GET_GECKO_GPIO_INDEX(id) DT_INST_PROP(id, peripheral_id)
2727
#else
2828
#if defined(CONFIG_SOC_SERIES_EFR32BG22) || \
29+
defined(CONFIG_SOC_SERIES_EFR32BG27) || \
2930
defined(CONFIG_SOC_SERIES_EFR32MG21) || \
3031
defined(CONFIG_SOC_SERIES_EFR32MG24)
3132
#define GECKO_GPIO_PORT_ADDR_SPACE_SIZE sizeof(GPIO_PORT_TypeDef)
3233
#else
3334
#define GECKO_GPIO_PORT_ADDR_SPACE_SIZE sizeof(GPIO_P_TypeDef)
34-
#endif /* defined(CONFIG_SOC_SERIES_EFM32HG) || defined(CONFIG_SOC_SERIES_EFM32WG) */
35+
#endif
3536
/* Assumption for calculating gpio index:
3637
* 1. Address space of the first GPIO port is the address space for GPIO port A
3738
*/

dts/arm/silabs/efr32bg27.dtsi

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (c) 2023 Antmicro <www.antmicro.com>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "efr32bg2x.dtsi"
8+
#include <mem.h>
9+
10+
/ {
11+
soc {
12+
stimer0: stimer@50048000 {
13+
compatible = "silabs,gecko-stimer";
14+
reg = <0x50048000 0x3054>;
15+
interrupts = <12 0>;
16+
clock-frequency = <32768>;
17+
prescaler = <1>;
18+
status = "disabled";
19+
};
20+
};
21+
};
22+
23+
&sram0 {
24+
reg = <0x20000000 DT_SIZE_K(64)>;
25+
};
26+
27+
&flash0 {
28+
reg = <0x08000000 DT_SIZE_K(768)>;
29+
};
30+
31+
&gpio {
32+
interrupts = <30 2 31 2>;
33+
};
34+
35+
&i2c0 {
36+
interrupts = <32 0>;
37+
};
38+
39+
&i2c1 {
40+
interrupts = <33 0>;
41+
};
42+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Silicon Labs EFR32BG27 (Blue Gecko) MCU configuration options
2+
3+
# Copyright (c) 2023 Antmicro <www.antmicro.com>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config GPIO_GECKO
7+
default y
8+
9+
config SOC_FLASH_GECKO
10+
default n
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Silicon Labs EFR32BG27 (Blue Gecko) MCU configuration options
2+
3+
# Copyright (c) 2023 Antmicro <www.antmicro.com>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_SERIES_EFR32BG27
7+
8+
config SOC_SERIES
9+
default "efr32bg27"
10+
11+
config SOC_PART_NUMBER
12+
default "EFR32BG27C140F768IM40" if SOC_PART_NUMBER_EFR32BG27C140F768IM40
13+
14+
config NUM_IRQS
15+
# must be >= the highest interrupt number used
16+
default 66
17+
18+
config PM
19+
select COUNTER
20+
21+
source "soc/arm/silabs_exx32/efr32bg27/Kconfig.defconfig.efr32bg27"
22+
23+
endif # SOC_SERIES_EFR32BG27
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Silicon Labs EFR32BG27 (Blue Gecko) MCU
2+
3+
# Copyright (c) Antmicro 2023 <www.antmicro.com>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config SOC_SERIES_EFR32BG27
7+
bool "EFR32BG27 Series MCU"
8+
select ARM
9+
select ARMV8_M_DSP
10+
select ARM_TRUSTZONE_M
11+
select CPU_CORTEX_M33
12+
select CPU_HAS_ARM_MPU
13+
select CPU_HAS_ARM_SAU
14+
select CPU_HAS_FPU
15+
select HAS_SILABS_GECKO
16+
select HAS_SWO
17+
select SOC_FAMILY_EXX32
18+
select SOC_GECKO_CMU
19+
select SOC_GECKO_CORE
20+
select SOC_GECKO_DEV_INIT
21+
help
22+
Enable support for EFR32BG27 Blue Gecko MCU series

0 commit comments

Comments
 (0)