boards: silabs: radio_boards: Add silabs board support for BRD4180B board
Added board support for the Silicon Labs MG21 BRD4180B radio board Signed-off-by: Arunmani Alagarsamy <arunmani.a@capgemini.com>
This commit is contained in:
parent
1f7fe49378
commit
3fd0fe9f14
12 changed files with 432 additions and 0 deletions
18
boards/silabs/radio_boards/slwrb4180b/Kconfig.defconfig
Normal file
18
boards/silabs/radio_boards/slwrb4180b/Kconfig.defconfig
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Copyright (c) 2020 Piotr Mienkowski
|
||||
# Copyright (c) 2020 TriaGnoSys GmbH
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_SLWRB4180B
|
||||
|
||||
config LOG_BACKEND_SWO_FREQ_HZ
|
||||
default 875000
|
||||
depends on LOG_BACKEND_SWO
|
||||
|
||||
if SOC_GECKO_USE_RAIL
|
||||
|
||||
config FPU
|
||||
default y
|
||||
|
||||
endif # SOC_GECKO_USE_RAIL
|
||||
|
||||
endif # BOARD_SLWRB4180B
|
5
boards/silabs/radio_boards/slwrb4180b/Kconfig.slwrb4180b
Normal file
5
boards/silabs/radio_boards/slwrb4180b/Kconfig.slwrb4180b
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2024 Capgemini
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_SLWRB4180B
|
||||
select SOC_PART_NUMBER_EFR32MG21A020F1024IM32
|
10
boards/silabs/radio_boards/slwrb4180b/board.cmake
Normal file
10
boards/silabs/radio_boards/slwrb4180b/board.cmake
Normal file
|
@ -0,0 +1,10 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(jlink "--device=EFR32MG21AxxxF1024")
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
|
||||
board_runner_args(openocd)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
||||
board_runner_args(silabs_commander "--device=EFR32MG21A020F1024IM32")
|
||||
include(${ZEPHYR_BASE}/boards/common/silabs_commander.board.cmake)
|
6
boards/silabs/radio_boards/slwrb4180b/board.yml
Normal file
6
boards/silabs/radio_boards/slwrb4180b/board.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
board:
|
||||
name: slwrb4180b
|
||||
full_name: EFR32xG21 2.4 GHz 20 dBm (SLWRB4180B)
|
||||
vendor: silabs
|
||||
socs:
|
||||
- name: efr32mg21a020f1024im32
|
Binary file not shown.
After Width: | Height: | Size: 6 KiB |
133
boards/silabs/radio_boards/slwrb4180b/doc/index.rst
Normal file
133
boards/silabs/radio_boards/slwrb4180b/doc/index.rst
Normal file
|
@ -0,0 +1,133 @@
|
|||
.. zephyr:board:: slwrb4180b
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The EFR32MG21 Mighty Gecko Radio Board is one of the two
|
||||
radio boards delivered with `EFR32-SLWSTK6006A Website`_. It features a
|
||||
Wireless System-On-Chip (SoC) from the EFR32MG21 family, built on an
|
||||
ARM Cortex®-M33F processor, offering exceptional low-power performance.
|
||||
|
||||
The SLWRB4180B radio board is designed to connect seamlessly with
|
||||
the Wireless Starter Kit Mainboards BRD4001A and BRD4002A
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
- EFR32MG21A020F1024IM32 Mighty Gecko SoC
|
||||
- CPU core: ARM Cortex®-M33 with FPU
|
||||
- Flash memory: 1024 kB
|
||||
- RAM: 96 kB
|
||||
- Transmit power: up to +20 dBm
|
||||
- Operation frequency: 2.4 GHz
|
||||
- Crystals for LFXO (32.768 kHz) and HFXO (38.4 MHz).
|
||||
|
||||
For more information about the EFR32MG21 SoC and BRD4180B board, refer to these
|
||||
documents:
|
||||
|
||||
- `EFR32MG21 Website`_
|
||||
- `EFR32MG21 Datasheet`_
|
||||
- `EFR32xG21 Reference Manual`_
|
||||
- `EFR32-SLWSTK6006A Website`_
|
||||
- `BRD4180B User Guide`_
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
The ``slwrb4180b`` board supports the following hardware features:
|
||||
|
||||
+-----------+------------+-------------------------------------+
|
||||
| Interface | Controller | Driver/Component |
|
||||
+===========+============+=====================================+
|
||||
| MPU | on-chip | memory protection unit |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| NVIC | on-chip | nested vector interrupt controller |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| SYSTICK | on-chip | systick |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| COUNTER | on-chip | rtcc |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| FLASH | on-chip | flash memory |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| GPIO | on-chip | gpio |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| UART | on-chip | serial port-polling; |
|
||||
| | | serial port-interrupt |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| I2C | on-chip | i2c port-polling |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| WATCHDOG | on-chip | watchdog |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
Connections and IOs
|
||||
===================
|
||||
|
||||
In the following table, the column **Name** contains Pin names. For example, PD2
|
||||
means Pin number 2 on PORTD, as used in the board's datasheets and manuals.
|
||||
|
||||
+-------+-------------+-------------------------------------+
|
||||
| Name | Function | Usage |
|
||||
+=======+=============+=====================================+
|
||||
| PD2 | GPIO | LED0 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PD3 | GPIO | LED1 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PB0 | GPIO | Push Button PB0 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PB1 | GPIO | Push Button PB1 |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PD4 | GPIO | Board Controller Enable |
|
||||
| | | EFM_BC_EN |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PA5 | USART1_TX | UART Console EFM_BC_TX US1_TX |
|
||||
+-------+-------------+-------------------------------------+
|
||||
| PA6 | USART1_RX | UART Console EFM_BC_RX US1_RX |
|
||||
+-------+-------------+-------------------------------------+
|
||||
|
||||
The default configuration can be found in
|
||||
:zephyr_file:`boards/silabs/radio_boards/slwrb4180b/slwrb4180b_defconfig`
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
Connect the BRD4001A or BRD4002A mainboard, with the BRD4180B radio module mounted,
|
||||
to your host computer via the USB port.
|
||||
|
||||
Here is an example for the :zephyr:code-sample:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: slwrb4180b
|
||||
:goals: flash
|
||||
|
||||
Open a serial terminal (minicom, putty, etc.) with the following settings:
|
||||
|
||||
- Speed: 115200
|
||||
- Data: 8 bits
|
||||
- Parity: None
|
||||
- Stop bits: 1
|
||||
|
||||
Reset the board and you should see the following message in the terminal:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Hello World! slwrb4180b
|
||||
|
||||
|
||||
.. _EFR32-SLWSTK6006A Website:
|
||||
https://www.silabs.com/products/development-tools/wireless/efr32xg21-wireless-starter-kit
|
||||
|
||||
.. _BRD4180B User Guide:
|
||||
https://www.silabs.com/documents/public/user-guides/ug427-brd4180b-user-guide.pdf
|
||||
|
||||
.. _EFR32MG21 Website:
|
||||
https://www.silabs.com/products/wireless/mesh-networking/efr32mg21-series-2-socs
|
||||
|
||||
.. _EFR32MG21 Datasheet:
|
||||
https://www.silabs.com/documents/public/data-sheets/efr32mg21-datasheet.pdf
|
||||
|
||||
.. _EFR32xG21 Reference Manual:
|
||||
https://www.silabs.com/documents/public/reference-manuals/efr32xg21-rm.pdf
|
5
boards/silabs/radio_boards/slwrb4180b/pre_dt_board.cmake
Normal file
5
boards/silabs/radio_boards/slwrb4180b/pre_dt_board.cmake
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2021 Linaro Limited
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# SPI is implemented via usart so node name isn't spi@...
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-spi_bus_bridge")
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Capgemini
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <dt-bindings/pinctrl/silabs/xg21-pinctrl.h>
|
||||
|
||||
&pinctrl {
|
||||
usart0_default: usart0_default {
|
||||
group0 {
|
||||
pins = <USART0_TX_PA5>;
|
||||
drive-push-pull;
|
||||
output-high;
|
||||
};
|
||||
group1 {
|
||||
pins = <USART0_RX_PA6>;
|
||||
input-enable;
|
||||
silabs,input-filter;
|
||||
};
|
||||
};
|
||||
};
|
183
boards/silabs/radio_boards/slwrb4180b/slwrb4180b.dts
Normal file
183
boards/silabs/radio_boards/slwrb4180b/slwrb4180b.dts
Normal file
|
@ -0,0 +1,183 @@
|
|||
/*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Copyright (c) 2024 Capgemini
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <silabs/efr32mg21a020f1024im32.dtsi>
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
#include "slwrb4180b-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Silicon Labs BRD4180B (Wireless Gecko 21 Radio Board)";
|
||||
compatible = "silabs,slwrb4180b", "silabs,efr32mg21";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &usart0;
|
||||
zephyr,shell-uart = &usart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
};
|
||||
|
||||
/* These aliases are provided for compatibility with samples */
|
||||
aliases {
|
||||
led0 = &led0;
|
||||
led1 = &led1;
|
||||
sw0 = &button0;
|
||||
sw1 = &button1;
|
||||
watchdog0 = &wdog0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led0: led_0 {
|
||||
gpios = <&gpiod 2 0>;
|
||||
label = "LED0";
|
||||
};
|
||||
|
||||
led1: led_1 {
|
||||
gpios = <&gpiod 3 0>;
|
||||
label = "LED1";
|
||||
};
|
||||
};
|
||||
|
||||
buttons {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button0: button_0 {
|
||||
gpios = <&gpiob 0 GPIO_ACTIVE_LOW>;
|
||||
label = "BTN0";
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
};
|
||||
|
||||
button1: button_1 {
|
||||
gpios = <&gpiob 1 GPIO_ACTIVE_LOW>;
|
||||
label = "BTN1";
|
||||
zephyr,code = <INPUT_KEY_1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
clock-frequency = <76800000>;
|
||||
};
|
||||
|
||||
&hfxo {
|
||||
status = "okay";
|
||||
ctune = <129>;
|
||||
precision = <50>;
|
||||
};
|
||||
|
||||
&lfxo {
|
||||
status = "okay";
|
||||
ctune = <79>;
|
||||
precision = <50>;
|
||||
};
|
||||
|
||||
&hfrcodpll {
|
||||
clock-frequency = <DT_FREQ_K(76800)>;
|
||||
clocks = <&hfxo>;
|
||||
dpll-n = <3839>;
|
||||
dpll-m = <1919>;
|
||||
dpll-edge = "fall";
|
||||
dpll-lock = "phase";
|
||||
dpll-autorecover;
|
||||
};
|
||||
|
||||
&em23grpaclk {
|
||||
clocks = <&lfxo>;
|
||||
};
|
||||
|
||||
&em4grpaclk {
|
||||
clocks = <&lfxo>;
|
||||
};
|
||||
|
||||
&rtccclk {
|
||||
clocks = <&lfxo>;
|
||||
};
|
||||
|
||||
&wdog0clk {
|
||||
clocks = <&lfxo>;
|
||||
};
|
||||
|
||||
&wdog1clk {
|
||||
clocks = <&lfxo>;
|
||||
};
|
||||
|
||||
&usart0 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&usart0_default>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rtcc0 {
|
||||
prescaler = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpioa {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiob {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpioc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiod {
|
||||
status = "okay";
|
||||
|
||||
board-controller-enable {
|
||||
gpio-hog;
|
||||
gpios = <4 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
&wdog0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dma0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x00000000 DT_SIZE_K(48)>;
|
||||
};
|
||||
|
||||
slot0_partition: partition@c000 {
|
||||
label = "image-0";
|
||||
reg = <0x0000C000 DT_SIZE_K(472)>;
|
||||
};
|
||||
|
||||
slot1_partition: partition@82000 {
|
||||
label = "image-1";
|
||||
reg = <0x00082000 DT_SIZE_K(472)>;
|
||||
};
|
||||
|
||||
storage_partition: partition@F8000 {
|
||||
label = "storage";
|
||||
reg = <0x000F8000 DT_SIZE_K(32)>;
|
||||
};
|
||||
};
|
||||
};
|
18
boards/silabs/radio_boards/slwrb4180b/slwrb4180b.yaml
Normal file
18
boards/silabs/radio_boards/slwrb4180b/slwrb4180b.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
identifier: slwrb4180b
|
||||
name: EFR32xG21 2.4 GHz 20 dBm Radio Board (SLWRB4180B)
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 96
|
||||
flash: 1024
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- counter
|
||||
- gpio
|
||||
- nvs
|
||||
- uart
|
||||
- dma
|
||||
- watchdog
|
||||
vendor: silabs
|
|
@ -0,0 +1,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_GPIO=y
|
25
boards/silabs/radio_boards/slwrb4180b/support/openocd.cfg
Normal file
25
boards/silabs/radio_boards/slwrb4180b/support/openocd.cfg
Normal file
|
@ -0,0 +1,25 @@
|
|||
if {[info exists env(OPENOCD_INTERFACE)]} {
|
||||
set INTERFACE $env(OPENOCD_INTERFACE)
|
||||
} else {
|
||||
# By default connect over Debug USB port using the J-Link interface
|
||||
set INTERFACE "jlink"
|
||||
}
|
||||
|
||||
source [find interface/$INTERFACE.cfg]
|
||||
|
||||
transport select swd
|
||||
|
||||
set CHIPNAME efr32
|
||||
|
||||
source [find target/efm32.cfg]
|
||||
|
||||
$_TARGETNAME configure -event gdb-attach {
|
||||
echo "Debugger attaching: halting execution"
|
||||
reset halt
|
||||
gdb_breakpoint_override hard
|
||||
}
|
||||
|
||||
$_TARGETNAME configure -event gdb-detach {
|
||||
echo "Debugger detaching: resuming execution"
|
||||
resume
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue