Skip to content

Commit

Permalink
boards: silabs: add EK2703A support
Browse files Browse the repository at this point in the history
Based on board files for DK2601B. The EFR32xG24 Explorer Kit
(xG24-EK2703A) is similar to the DK2601B but does not have any
sensors onboard.

(cherry picked from commit 32e39c1)

Original-Signed-off-by: Daniel Fuchs <[email protected]>
GitOrigin-RevId: 32e39c1
Cr-Build-Id: 8727132810977714241
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8727132810977714241
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: I2e656737eccb5f4dee79664589a11f3451c97ba2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6112213
Commit-Queue: ChromeOS Prod (Robot) <[email protected]>
Tested-by: ChromeOS Prod (Robot) <[email protected]>
Bot-Commit: ChromeOS Prod (Robot) <[email protected]>
  • Loading branch information
Daniel Fuchs authored and Chromeos LUCI committed Dec 30, 2024
1 parent 47a1360 commit fdb918d
Show file tree
Hide file tree
Showing 14 changed files with 546 additions and 0 deletions.
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 Norik Systems
# SPDX-License-Identifier: Apache-2.0

zephyr_library()
zephyr_library_sources(board.c)
16 changes: 16 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EFR32XG24 EK2703A board

# Copyright (c) 2022, Silicon Labs
# SPDX-License-Identifier: Apache-2.0

if BOARD_XG24_EK2703A

config BOARD_XG24_EK2703A
select GPIO
select BOARD_LATE_INIT_HOOK

module = BOARD_EFR32MG24
module-str = Board Control
source "subsys/logging/Kconfig.template.log_config"

endif # BOARD_XG24_EK2703A
26 changes: 26 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (c) 2021, Sateesh Kotapati
# SPDX-License-Identifier: Apache-2.0

if BOARD_XG24_EK2703A

config CMU_HFXO_FREQ
default 39000000

config CMU_LFXO_FREQ
default 32768

if SOC_GECKO_USE_RAIL

config FPU
default y

endif # SOC_GECKO_USE_RAIL

if BT

config COMMON_LIBC_MALLOC_ARENA_SIZE
default 8192

endif # BT

endif # BOARD_XG24_EK2703A
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/Kconfig.xg24_ek2703a
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2021, Sateesh Kotapati
# SPDX-License-Identifier: Apache-2.0

config BOARD_XG24_EK2703A
select SOC_PART_NUMBER_EFR32MG24B210F1536IM48
28 changes: 28 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/board.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2021 Sateesh Kotapati
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/printk.h>
#include <zephyr/logging/log.h>

LOG_MODULE_REGISTER(efr32xg24_ek2703a, CONFIG_BOARD_EFR32MG24_LOG_LEVEL);

void board_late_init_hook(void)
{
int ret;

static struct gpio_dt_spec wake_up_gpio_dev =
GPIO_DT_SPEC_GET(DT_NODELABEL(wake_up_trigger), gpios);

if (!gpio_is_ready_dt(&wake_up_gpio_dev)) {
LOG_ERR("Wake-up GPIO device was not found!\n");
}
ret = gpio_pin_configure_dt(&wake_up_gpio_dev, GPIO_OUTPUT_ACTIVE);
if (ret < 0) {
LOG_ERR("Failed to configure wake-up GPIO!\n");
}
}
8 changes: 8 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2021, Sateesh Kotapati
# SPDX-License-Identifier: Apache-2.0

board_runner_args(jlink "--device=EFR32MG24BxxxF1536" "--reset-after-load")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

board_runner_args(silabs_commander "--device=EFR32MG24B210F1536IM48")
include(${ZEPHYR_BASE}/boards/common/silabs_commander.board.cmake)
6 changes: 6 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: xg24_ek2703a
full_name: EFR32xG24 Explorer Kit (xG24-EK2703A)
vendor: silabs
socs:
- name: efr32mg24b210f1536im48
163 changes: 163 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
.. zephyr:board:: xg24_ek2703a
Overview
********

The EFR32xG24 Explorer Kit (xG24-EK2703A) contains
a Wireless System-On-Chip from the EFR32MG24 family built on an
ARM Cortex®-M33 processor with excellent low power capabilities.

Hardware
********

- EFR32MG24B210F1536IM48-B Mighty Gecko SoC
- CPU core: ARM Cortex®-M33 with FPU
- Flash memory: 1536 kB
- RAM: 256 kB
- Transmit power: up to +10 dBm
- Operation frequency: 2.4 GHz
- Crystals for LFXO (32.768 kHz) and HFXO (39 MHz).

For more information about the EFR32MG24 SoC and BRD2703A board, refer to these
documents:

- `EFR32MG24 Website`_
- `EFR32MG24 Datasheet`_
- `EFR32xG24 Reference Manual`_
- `BRD2703A User Guide`_

Supported Features
==================

The ``xg24_ek2703a`` 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 | stimer |
+-----------+------------+-------------------------------------+
| FLASH | on-chip | flash memory |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | semailbox |
+-----------+------------+-------------------------------------+
| WATCHDOG | on-chip | watchdog |
+-----------+------------+-------------------------------------+
| I2C(M/S) | on-chip | i2c |
+-----------+------------+-------------------------------------+
| RADIO | on-chip | bluetooth |
+-----------+------------+-------------------------------------+

Other hardware features are currently not supported by the port.

Connections and IOs
===================

In the following table, the column **Name** contains Pin names. For example, PA2
means Pin number 2 on PORTA, as used in the board's datasheets and manuals.

+-------+-------------+-------------------------------------+
| Name | Function | Usage |
+=======+=============+=====================================+
| PA4 | GPIO | LED0 |
+-------+-------------+-------------------------------------+
| PA7 | GPIO | LED1 |
+-------+-------------+-------------------------------------+
| PB2 | GPIO | Push Button 0 |
+-------+-------------+-------------------------------------+
| PB3 | GPIO | Push Button 1 |
+-------+-------------+-------------------------------------+
| PA5 | USART0_TX | UART Console VCOM_TX US0_TX |
+-------+-------------+-------------------------------------+
| PA6 | USART0_RX | UART Console VCOM_RX US0_RX |
+-------+-------------+-------------------------------------+

The default configuration can be found in
:zephyr_file:`boards/silabs/dev_kits/xg24_ek2703a/xg24_ek2703a_defconfig`

System Clock
============

The EFR32MG24 SoC is configured to use the 39 MHz external oscillator on the
board.

Serial Port
===========

The EFR32MG24 SoC has one USART and two EUSARTs.
USART0 is connected to the board controller and is used for the console.

Programming and Debugging
*************************

.. note::
Before using the kit the first time, you should update the J-Link firmware
in Simplicity Studio.

Flashing
========

The sample application :zephyr:code-sample:`hello_world` is used for this example.
Build the Zephyr kernel and application:

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: xg24_ek2703a
:goals: build

Connect the xg24_ek2703a to your host computer using the USB port and you
should see a USB connection.

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'll see the following message on the corresponding serial port
terminal session:

.. code-block:: console
Hello World! xg24_ek2703a
Bluetooth
=========

To use the BLE function, run the command below to retrieve necessary binary
blobs from the SiLabs HAL repository.

.. code-block:: console
west blobs fetch hal_silabs
Then build the Zephyr kernel and a Bluetooth sample with the following
command. The :zephyr:code-sample:`bluetooth_observer` sample application is used in
this example.

.. zephyr-app-commands::
:zephyr-app: samples/bluetooth/observer
:board: xg24_ek2703a
:goals: build

.. _EFR32MG24 Website:
https://www.silabs.com/wireless/zigbee/efr32mg24-series-2-socs#

.. _EFR32MG24 Datasheet:
https://www.silabs.com/documents/public/data-sheets/efr32mg24-datasheet.pdf

.. _EFR32xG24 Reference Manual:
https://www.silabs.com/documents/public/reference-manuals/efr32xg24-rm.pdf

.. _BRD2703A User Guide:
https://www.silabs.com/documents/public/user-guides/ug533-xg24-ek2703a.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2022, Antmicro
# SPDX-License-Identifier: Apache-2.0

description: GPIO Wake Up Trigger for EFR32MG24

compatible: "silabs,gecko-wake-up-trigger"

include: base.yaml

properties:
gpios:
type: phandle-array
required: true
description: |
GPIO used as wake up trigger from EM4 sleep
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/pre_dt_board.cmake
Original file line number Diff line number Diff line change
@@ -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")
30 changes: 30 additions & 0 deletions boards/silabs/dev_kits/xg24_ek2703a/xg24_ek2703a-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2024 Silicon Laboratories Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/silabs/xg24-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;
};
};

i2c0_default: i2c0_default {
group0 {
pins = <I2C0_SCL_PC4>, <I2C0_SDA_PC5>;
drive-open-drain;
bias-pull-up;
};
};
};
Loading

0 comments on commit fdb918d

Please sign in to comment.