boards: Add MG100

Add Laird Connectivity MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
This commit is contained in:
Ryan Erickson 2022-09-09 08:55:08 -05:00 committed by Carles Cufí
commit 52cfe2838c
11 changed files with 668 additions and 0 deletions

8
boards/arm/mg100/Kconfig Normal file
View file

@ -0,0 +1,8 @@
# Copyright (c) 2022 Laird Connectivity
# SPDX-License-Identifier: Apache-2.0
config BOARD_ENABLE_DCDC
bool "DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_MG100

View file

@ -0,0 +1,6 @@
# Copyright (c) 2022 Laird Connectivity
# SPDX-License-Identifier: Apache-2.0
config BOARD_MG100
bool "MG100"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,24 @@
# Copyright (c) 2022 Laird Connectivity
# SPDX-License-Identifier: Apache-2.0
if BOARD_MG100
config BOARD
default "mg100"
config MODEM
default NETWORKING
config MODEM_HL7800
default NETWORKING
config NORDIC_QSPI_NOR
default BOOTLOADER_MCUBOOT
config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE
default 4096 if NORDIC_QSPI_NOR
config BT_CTLR
default BT
endif # BOARD_MG100

View file

@ -0,0 +1,8 @@
# Copyright (c) 2022 Laird Connectivity
# SPDX-License-Identifier: Apache-2.0
board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000")
board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View file

@ -0,0 +1,249 @@
.. _mg100:
Laird Connectivity Sentrius™ MG100 Gateway
##########################################
Overview
********
The Sentrius™ MG100 Gateway offers a compact, out of box Bluetooth to low power cellular gateway
solution.
Based on the Pinnacle 100 socket modem, the Sentrius™ MG100 gateway captures data from any
Bluetooth 5 modules or devices and sends it to the cloud via a global low power cellular
(LTE-M/NB-IoT) connection. The MG100 seamlessly incorporates a powerful Cortex M4F controller,
full Bluetooth 5 connectivity, and dual-mode LTE-M/NB-IoT capabilities. The MG100 has full regulatory
and network certifications and End Device carrier approvals.
Develop your application directly on the integrated Cortex M4F microcontroller using Zephyr RTOS,
enabling your application development with a secure, open source RTOS with more than just kernel
services. Remotely debug your fleet of devices with the `Memfault Platform`_. Take advantage of the
Zephyr community and Laird Connectivitys multi featured Out of Box (OOB) sample source code
covering all aspects of the product's capabilities and hardware interfaces. The MG100 also delivers
complete antenna flexibility with internal or external antenna options available, and the optional
battery backup provides uninterrupted reporting of remote Bluetooth sensor data.
More information about the board can be found at the `MG100 website`_.
The MG100 hardware provides support for the Nordic Semiconductor `nRF52840`_ ARM Cortex-M4F CPU,
`Sierra Wireless HL7800`_
and the following devices:
* :abbr:`ADC (Analog to Digital Converter)`
* CLOCK
* FLASH
* :abbr:`GPIO (General Purpose Input Output)`
* :abbr:`I2C (Inter-Integrated Circuit)`
* :abbr:`MPU (Memory Protection Unit)`
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
* :abbr:`PWM (Pulse Width Modulation)`
* RADIO (Bluetooth Low Energy and 802.15.4)
* :abbr:`RTC (nRF RTC System Clock)`
* :abbr:`SPI (Serial Peripheral Interface)`
* :abbr:`UART (Universal asynchronous receiver-transmitter)`
* :abbr:`WDT (Watchdog Timer)`
* :abbr:`QSPI (Quad Serial Peripheral Interface)`
* :abbr:`LIS3DH (ST Micro 3-axis MEMS accelerometer)`
* :abbr:`HL7800 (Sierra Wireless HL7800 LTE-M1/NB-IoT modem)`
* :abbr:`SD Card`
.. figure:: img/mg100.jpg
:align: center
:alt: MG100
MG100 (450-00054-K1)
Hardware
********
Supported Features
==================
The MG100 board configuration supports the following
hardware features:
+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================+
| ADC | on-chip | adc |
+-----------+------------+----------------------+
| CLOCK | on-chip | clock_control |
+-----------+------------+----------------------+
| FLASH | on-chip | flash |
+-----------+------------+----------------------+
| GPIO | on-chip | gpio |
+-----------+------------+----------------------+
| I2C(M) | on-chip | i2c |
+-----------+------------+----------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+----------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+----------------------+
| PWM | on-chip | pwm |
+-----------+------------+----------------------+
| RADIO | on-chip | Bluetooth, |
| | | ieee802154 |
+-----------+------------+----------------------+
| RTC | on-chip | system clock |
+-----------+------------+----------------------+
| SPI(M/S) | on-chip | spi |
+-----------+------------+----------------------+
| UART | on-chip | serial |
+-----------+------------+----------------------+
| WDT | on-chip | watchdog |
+-----------+------------+----------------------+
| QSPI | on-chip | qspi/MX25R64(8MB) |
+-----------+------------+----------------------+
| LIS3DH | I2C(M) | sensor/lis3dh |
+-----------+------------+----------------------+
| HL7800 | UART | HL7800 modem driver |
+-----------+------------+----------------------+
| SDMMC | SPI(M) | SD Card via SPI |
+-----------+------------+----------------------+
See `MG100 website`_ for a complete list
of MG100 hardware features.
Connections and IOs
===================
LED
---
* LED1 (red) = P1.7
* LED2 (blue) = P1.6
* LED3 (green) = P1.5
Push buttons
------------
* BUTTON1 = P0.3
External flash memory
---------------------
A 64Mbit external flash memory part is available for storage of application
images and data. Refer to the `Macronix MX25R6435F datasheet`_ for further
details.
The flash memory is connected to the on-board QSPI device controller.
* MX25R64 = QSPI
SCK = P0.19
IO0 = P0.20
IO1 = P0.21
IO2 = P0.22
IO3 = P0.23
CSN = P0.17
LIS3DH Motion Sensor
--------------------
Motion sensor to detect if the gateway moves.
IRQ IO = P0.28
I2C SDA = P0.26
I2C SCL = P0.27
SD Card
-------
SD card used to store large amounts of data.
SPI CS = P0.29
SPI SCK = P1.09
SPI MOSI = P0.11
SPI MISO = P0.12
Programming and Debugging
*************************
Applications for the ``mg100`` board configuration can be
built and flashed in the usual way. (see :ref:`build_an_application`
and :ref:`application_run` for more details)
The `Laird Connectivity USB-SWD Programming Kit`_ contains all the necessary
hardware to enable programming and debugging an MG100.
Flashing
========
Follow the instructions in the :ref:`nordic_segger` page to install
and configure all the necessary software. Further information can be
found in :ref:`nordic_segger_flashing`. Then build and flash
applications as usual (see :ref:`build_an_application` and
:ref:`application_run` for more details).
Here is an example for the :ref:`hello_world` application.
First, run your favorite terminal program to listen for output.
.. note:: On the MG100,
the USB connector should be used to access the UART console.
.. code-block:: console
$ minicom -D <tty_device> -b 115200
Replace :code:`<tty_device>` with the port where the board MG100
can be found. For example, under Linux, :code:`/dev/ttyUSB0`.
Then build and flash the application in the usual way.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: mg100
:goals: build flash
Debugging
=========
Refer to the :ref:`nordic_segger` page to learn about debugging Nordic boards with a
Segger IC.
Software
********
MG100 Out-of-Box Demo Software
==============================
The MG100 ships with an out of the box software demo.
Check out the `BLE Gateway OOB Demo`_ source code and documentation.
Testing Bluetooth on the MG100
==============================
Many of the Bluetooth examples will work on the MG100.
Try them out:
* :ref:`ble_peripheral`
* :ref:`bluetooth-eddystone-sample`
* :ref:`bluetooth-ibeacon-sample`
Testing the LEDs and buttons in the MG100
====================================================
There are 2 samples that allow you to test that the buttons (switches) and LEDs on
the board are working properly with Zephyr:
.. code-block:: console
samples/basic/blinky
samples/basic/button
You can build and flash the examples to make sure Zephyr is running correctly on
your board. The button and LED definitions can be found in
:zephyr_file:`boards/arm/mg100/mg100.dts`.
References
**********
.. target-notes::
.. _MG100 website: https://www.lairdconnect.com/iot-devices/iot-gateways/sentrius-mg100-gateway-lte-mnb-iot-and-bluetooth-5
.. _nRF52840 Product Specification: https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.1.pdf
.. _Sierra Wireless HL7800: https://source.sierrawireless.com/devices/hl-series/hl7800/#sthash.641qTTwA.dpbs
.. _J-Link Software and documentation pack: https://www.segger.com/jlink-software.html
.. _BLE Gateway OOB Demo: https://github.com/LairdCP/Pinnacle-100-Firmware-Manifest
.. _Macronix MX25R6435F datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7913/MX25R6435F,%20Wide%20Range,%2064Mb,%20v1.5.pdf
.. _Laird Connectivity USB-SWD Programming Kit: https://www.lairdconnect.com/wireless-modules/programming-kits/usb-swd-programming-kit
.. _Memfault Platform: https://docs.memfault.com/docs/mcu/pinnacle-100-guide
.. _nRF52840: https://www.nordicsemi.com/products/nrf52840

View file

@ -0,0 +1,101 @@
/*
* Copyright (c) 2022 Nordic Semiconductor
* Copyright (c) 2022 Laird Connectivity
* SPDX-License-Identifier: Apache-2.0
*/
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_RTS, 0, 5)>,
<NRF_PSEL(UART_CTS, 0, 7)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_RTS, 0, 5)>,
<NRF_PSEL(UART_CTS, 0, 7)>;
low-power-enable;
};
};
uart1_default: uart1_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 14)>,
<NRF_PSEL(UART_RX, 0, 16)>,
<NRF_PSEL(UART_RTS, 0, 13)>,
<NRF_PSEL(UART_CTS, 0, 15)>;
};
};
uart1_sleep: uart1_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 14)>,
<NRF_PSEL(UART_RX, 0, 16)>,
<NRF_PSEL(UART_RTS, 0, 13)>,
<NRF_PSEL(UART_CTS, 0, 15)>;
low-power-enable;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
<NRF_PSEL(TWIM_SCL, 0, 27)>;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
<NRF_PSEL(TWIM_SCL, 0, 27)>;
low-power-enable;
};
};
spi2_default: spi2_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 9)>,
<NRF_PSEL(SPIM_MOSI, 0, 11)>,
<NRF_PSEL(SPIM_MISO, 0, 12)>;
};
};
spi2_sleep: spi2_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 9)>,
<NRF_PSEL(SPIM_MOSI, 0, 11)>,
<NRF_PSEL(SPIM_MISO, 0, 12)>;
low-power-enable;
};
};
qspi_default: qspi_default {
group1 {
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>,
<NRF_PSEL(QSPI_IO0, 0, 20)>,
<NRF_PSEL(QSPI_IO1, 0, 21)>,
<NRF_PSEL(QSPI_IO2, 0, 22)>,
<NRF_PSEL(QSPI_IO3, 0, 23)>,
<NRF_PSEL(QSPI_CSN, 0, 17)>;
};
};
qspi_sleep: qspi_sleep {
group1 {
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>,
<NRF_PSEL(QSPI_IO0, 0, 20)>,
<NRF_PSEL(QSPI_IO1, 0, 21)>,
<NRF_PSEL(QSPI_IO2, 0, 22)>,
<NRF_PSEL(QSPI_IO3, 0, 23)>,
<NRF_PSEL(QSPI_CSN, 0, 17)>;
low-power-enable;
};
};
};

217
boards/arm/mg100/mg100.dts Normal file
View file

@ -0,0 +1,217 @@
/*
* Copyright (c) 2022 Laird Connectivity
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "mg100-pinctrl.dtsi"
/ {
model = "MG100";
compatible = "lairdconnect,mg100";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,ieee802154 = &ieee802154;
};
leds {
compatible = "gpio-leds";
led1: led_1 {
gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
label = "Red LED";
};
led2: led_2 {
gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
led3: led_3 {
gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
label = "Green LED";
};
};
buttons {
compatible = "gpio-keys";
button1: button_1 {
gpios = <&gpio0 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Push button switch";
};
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led1;
led1 = &led2;
led2 = &led3;
sw0 = &button1;
mcuboot-button0 = &button1;
mcuboot-led0 = &led1;
watchdog0 = &wdt0;
};
};
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&uart0 {
compatible = "nordic,nrf-uart";
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&uart1 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
hw-flow-control;
pinctrl-0 = <&uart1_default>;
pinctrl-1 = <&uart1_sleep>;
pinctrl-names = "default", "sleep";
hl7800 {
compatible = "swir,hl7800";
status = "okay";
mdm-reset-gpios = <&gpio1 15 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
mdm-wake-gpios = <&gpio1 13 (GPIO_OPEN_SOURCE | GPIO_ACTIVE_HIGH)>;
mdm-pwr-on-gpios = <&gpio1 2 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
mdm-fast-shutd-gpios = <&gpio1 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
mdm-vgpio-gpios = <&gpio1 11 0>;
mdm-uart-dsr-gpios = <&gpio0 25 0>;
mdm-uart-cts-gpios = <&gpio0 15 0>;
mdm-gpio6-gpios = <&gpio1 12 0>;
};
};
&i2c0 {
compatible = "nordic,nrf-twim";
status = "okay";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
lis2dh@19 {
compatible = "st,lis3dh", "st,lis2dh";
status = "okay";
reg = <0x19>;
irq-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
anym-on-int1;
};
};
&spi2 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi2_default>;
pinctrl-1 = <&spi2_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
sdhc0: sdhc@0 {
compatible = "zephyr,mmc-spi-slot";
reg = <0>;
spi-max-frequency = <8000000>;
};
};
&qspi {
status = "okay";
pinctrl-0 = <&qspi_default>;
pinctrl-1 = <&qspi_sleep>;
pinctrl-names = "default", "sleep";
mx25r64: mx25r6435f@0 {
compatible = "nordic,qspi-nor";
reg = <0>;
writeoc = "pp4io";
readoc = "read4io";
sck-frequency = <8000000>;
jedec-id = [ c2 28 17 ];
size = <67108864>;
has-dpd;
t-enter-dpd = <10000>;
t-exit-dpd = <35000>;
};
};
&ieee802154 {
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* 96K */
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x00018000>;
};
/* 896K */
slot0_partition: partition@18000 {
label = "image-0";
reg = <0x00018000 0x000E0000>;
};
/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/NVS
* if enabled. 32K
*/
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};
&mx25r64 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* 896K */
slot1_partition: partition@0 {
label = "image-1";
reg = <0x00000000 0x000E0000>;
};
/* 128K */
scratch_partition: partition@E0000 {
label = "image-scratch";
reg = <0x000E0000 0x00020000>;
};
/* 7MB */
lfs_partition: partition@100000 {
label = "lfs_storage";
reg = <0x00100000 0x00700000>;
};
};
};

View file

@ -0,0 +1,20 @@
identifier: mg100
name: mg100
type: mcu
arch: arm
ram: 256
flash: 1024
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- ble
- counter
- gpio
- i2c
- pwm
- spi
- watchdog
- netif:modem

View file

@ -0,0 +1,28 @@
# Copyright (c) 2022 Laird Connectivity
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_MG100=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable GPIO
CONFIG_GPIO=y
# Enable uart driver
CONFIG_SERIAL=y
# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# Additional board options
CONFIG_GPIO_AS_PINRESET=y
# 32KHz clock source
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
CONFIG_PINCTRL=y

View file

@ -0,0 +1,7 @@
# Copyright (c) 2022 Nordic Semiconductor
# SPDX-License-Identifier: Apache-2.0
# Suppress "unique_unit_address_if_enabled" to handle the following overlaps:
# - power@40000000 & clock@40000000 & bprot@40000000
# - acl@4001e000 & flash-controller@4001e000
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")