arm: boards: mps3_an547: Add board support for AN547 on MPS3

Add initial board support for the MPS3 AN547.  The board support is
based on the MPS2+ AN521 board support.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2021-02-13 10:18:55 -06:00 committed by Kumar Gala
commit da903e423e
8 changed files with 622 additions and 0 deletions

View file

@ -0,0 +1,6 @@
# Copyright (c) 2021 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
config BOARD_MPS3_AN547
bool "Arm Cortex-M55 (Corstone-300, SSE-300 w/Ethos-U55) on MPS3 (AN547)"
depends on SOC_MPS3_AN547

View file

@ -0,0 +1,30 @@
# Copyright (c) 2018-2021 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
if BOARD_MPS3_AN547
config BOARD
default "mps3_an547"
if GPIO
config GPIO_CMSDK_AHB
default y
endif # GPIO
if SERIAL
config UART_CMSDK_APB
default y
config UART_INTERRUPT_DRIVEN
default y
endif # SERIAL
config I2C_SBCON
default y
depends on I2C
endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View file

@ -0,0 +1,191 @@
.. _mps3_an547_board:
ARM MPS3 AN547
###############
Overview
********
The mps3_an547 board configuration is used by Zephyr applications that run
on the MPS3 AN547 board. It provides support for the MPS3 AN547 ARM Cortex-M55
CPU and the following devices:
- Nested Vectored Interrupt Controller (NVIC)
- System Tick System Clock (SYSTICK)
- Cortex-M System Design Kit GPIO
- Cortex-M System Design Kit UART
- Ethos-U55 NPU
.. image:: img/mps3_an547.png
:width: 666px
:align: center
:height: 546px
:alt: ARM MPS3 AN547
More information about the board can be found at the `MPS3 FPGA Website`_.
Hardware
********
ARM MPS3 AN547 provides the following hardware components:
- ARM Cortex-M55
- Soft Macro Model (SMM) implementation of SSE-300 subsystem
- Memory
- 8MB BRAM
- 4GB DDR4 SODIMM (by default, upgradeable to 8GB)
- 16GB eMMC
- 8MB QSPI Flash
- Debug
- PJTAG, F-JTAG, SWD, 4-bit trace, 16-bit trace
- Four serial ports over USB
- Interface
- AHB GPIO
- UART
- SPI
- I2C
- I2S
- Color LCD serial interface
- Ethernet
- VGA
- On-board Peripherals
- Color LCD
- 10 LEDs
- 8 Switches
- 2 user push buttons
Supported Features
===================
The mps3_an547 board configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
Other hardware features are not currently supported by the port.
See the `MPS3 FPGA Website`_ for a complete list of MPS3 AN547 board hardware
features.
The default configuration can be found in the defconfig file:
``boards/arm/mps3_an547/mps3_an547_defconfig``.
For mode details refer to `MPS3 AN547 Technical Reference Manual (TRM)`_.
Serial Port
===========
The MPS3 AN547 has six UARTs. The Zephyr console output by default, uses
UART0, which is exposed over the Debug USB interface (J8).
Serial port 0 on the Debug USB interface is the MCC board control console.
Serial port 1 on the Debug USB interface is connected to UART 0.
Serial port 2 on the Debug USB interface is connected to UART 1.
Serial port 3 on the Debug USB interface is connected to UART 2.
Programming and Debugging
*************************
Flashing
========
MPS3 AN547 provides:
- A USB connection to the host computer, which exposes Mass Storage and
CMSIS-DAP, and serial ports.
Building an application
-----------------------
You can build applications in the usual way. Here is an example for
the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: mps3_an547
:goals: build
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 on the corresponding
serial port:
.. code-block:: console
Hello World! mps3_an547
Uploading an application to MPS3 AN547
---------------------------------------
Applications can be in elf, hex or bin format. The binaries are flashed when
the board boots up, using files stored on the on-board Micro SD card. The
Motherboard Configuration Controller (MCC) is responsible for loading the FPGA
image and binaries.
Connect the MPS3 to your host computer using the USB port. You should see a
USB connection exposing a Mass Storage (``V2M-MPS3`` by default).
The update requires 3 steps:
1. Copy application files to ``<MPS3 device name>/SOFTWARE/``.
2. Open ``<MPS3 device name>/MB/HBI0309C/AN547/images.txt``.
3. Update the ``AN547/images.txt`` file as follows:
.. code-block:: bash
TITLE: Versatile Express Images Configuration File
[IMAGES]
TOTALIMAGES: 1 ;Number of Images (Max: 32)
IMAGE0ADDRESS: 0x01000000 ;Please select the required executable program
IMAGE0FILE: \SOFTWARE\zephyr.elf
Reset the board, and you should see the following message on the corresponding
serial port:
.. code-block:: console
Hello World! mps3_an547
.. _MPS3 FPGA Website:
https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/mps3
.. _MPS3 AN547 Technical Reference Manual (TRM):
https://developer.arm.com/-/media/Arm%20Developer%20Community/PDF/DAI0547B_SSE300_PLUS_U55_FPGA_for_mps3.pdf
.. _MPS3 FPGA Prototyping Board Technical Reference Manual (TRM):
https://developer.arm.com/documentation/100765/latest
.. _Cortex M55 Generic User Guide:
https://developer.arm.com/documentation/101051/latest
.. _Corelink SSE-300 Example Subsystem:
https://developer.arm.com/documentation/101772/latest

View file

@ -0,0 +1,192 @@
/*
* Copyright (c) 2019-2021 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
sysclk: system-clock {
compatible = "fixed-clock";
clock-frequency = <25000000>;
#clock-cells = <0>;
};
gpio0: gpio@1100000 {
compatible = "arm,cmsdk-gpio";
reg = <0x1100000 0x1000>;
interrupts = <69 3>;
gpio-controller;
#gpio-cells = <2>;
label = "GPIO_0";
};
gpio1: gpio@1101000 {
compatible = "arm,cmsdk-gpio";
reg = <0x1101000 0x1000>;
interrupts = <70 3>;
gpio-controller;
#gpio-cells = <2>;
label = "GPIO_1";
};
gpio2: gpio@1102000 {
compatible = "arm,cmsdk-gpio";
reg = <0x1102000 0x1000>;
interrupts = <71 3>;
gpio-controller;
#gpio-cells = <2>;
label = "GPIO_2";
};
gpio3: gpio@1103000 {
compatible = "arm,cmsdk-gpio";
reg = <0x1103000 0x1000>;
interrupts = <72 3>;
gpio-controller;
#gpio-cells = <2>;
label = "GPIO_3";
};
eth0: eth@1400000 {
/* Linux has "smsc,lan9115" */
compatible = "smsc,lan9220";
/* Actual reg range is ~0x200 */
reg = <0x1400000 0x100000>;
label = "eth0";
interrupts = <49 3>;
};
i2c_touch: i2c@9200000 {
compatible = "arm,versatile-i2c";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x9200000 0x1000>;
label = "I2C_TOUCH";
};
i2c_audio_conf: i2c@9201000 {
compatible = "arm,versatile-i2c";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x9201000 0x1000>;
label = "I2C_AUDIO_CONF";
};
i2c_shield0: i2c@9203000 {
compatible = "arm,versatile-i2c";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x9203000 0x1000>;
label = "I2C_SHIELD0";
};
i2c_shield1: i2c@9204000 {
compatible = "arm,versatile-i2c";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x9204000 0x1000>;
label = "I2C_SHIELD1";
};
i2c_ddr4_eeprom: i2c@9208000 {
compatible = "arm,versatile-i2c";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x9208000 0x1000>;
label = "DDR4_EEPROM";
};
gpio_led0: mps3_fpgaio@9302000 {
compatible = "arm,mps3-fpgaio-gpio";
reg = <0x9302000 0x4>;
gpio-controller;
#gpio-cells = <1>;
ngpios = <8>;
label = "FPGA_LED0";
};
gpio_button: mps3_fpgaio@9302008 {
compatible = "arm,mps3-fpgaio-gpio";
reg = <0x9302008 0x4>;
gpio-controller;
#gpio-cells = <1>;
ngpios = <2>;
label = "FPGA_BUTTON";
};
gpio_misc: mps3_fpgaio@930204c {
compatible = "arm,mps3-fpgaio-gpio";
reg = <0x930204c 0x4>;
gpio-controller;
#gpio-cells = <1>;
ngpios = <3>;
label = "FPGA_MISC";
};
uart0: uart@9303000 {
compatible = "arm,cmsdk-uart";
reg = <0x9303000 0x1000>;
interrupts = <34 3 33 3>;
interrupt-names = "tx", "rx";
clocks = <&sysclk>;
current-speed = <115200>;
label = "UART_0";
};
uart1: uart@9304000 {
compatible = "arm,cmsdk-uart";
reg = <0x9304000 0x1000>;
interrupts = <36 3 35 3>;
interrupt-names = "tx", "rx";
clocks = <&sysclk>;
current-speed = <115200>;
label = "UART_1";
};
uart2: uart@9305000 {
compatible = "arm,cmsdk-uart";
reg = <0x9305000 0x1000>;
interrupts = <38 3 37 3>;
interrupt-names = "tx", "rx";
clocks = <&sysclk>;
current-speed = <115200>;
label = "UART_2";
};
uart3: uart@9306000 {
compatible = "arm,cmsdk-uart";
reg = <0x9306000 0x1000>;
interrupts = <40 3 39 3>;
interrupt-names = "tx", "rx";
clocks = <&sysclk>;
current-speed = <115200>;
label = "UART_3";
};
uart4: uart@9307000 {
compatible = "arm,cmsdk-uart";
reg = <0x9307000 0x1000>;
interrupts = <42 3 41 3>;
interrupt-names = "tx", "rx";
clocks = <&sysclk>;
current-speed = <115200>;
label = "UART_4";
};
uart5: uart@9308000 {
compatible = "arm,cmsdk-uart";
status = "disabled";
reg = <0x9308000 0x1000>;
interrupt-names = "tx", "rx";
interrupts = <126 3 125 3>;
clocks = <&sysclk>;
current-speed = <115200>;
label = "UART_5";
};

View file

@ -0,0 +1,154 @@
/*
* Copyright (c) 2018-2021 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <arm/armv8.1-m.dtsi>
#include <dt-bindings/i2c/i2c.h>
#include <mem.h>
/ {
compatible = "arm,mps3-an547";
#address-cells = <1>;
#size-cells = <1>;
aliases {
led0 = &led_0;
led1 = &led_1;
sw0 = &user_button_0;
sw1 = &user_button_1;
};
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,sram = &dtcm;
zephyr,flash = &itcm;
};
leds {
compatible = "gpio-leds";
led_0: led_0 {
gpios = <&gpio_led0 0>;
label = "USERLED0";
};
led_1: led_1 {
gpios = <&gpio_led0 1>;
label = "USERLED1";
};
led_2: led_2 {
gpios = <&gpio_led0 2>;
label = "USERLED2";
};
led_3: led_3 {
gpios = <&gpio_led0 3>;
label = "USERLED3";
};
led_4: led_4 {
gpios = <&gpio_led0 4>;
label = "USERLED4";
};
led_5: led_5 {
gpios = <&gpio_led0 5>;
label = "USERLED5";
};
led_6: led_6 {
gpios = <&gpio_led0 6>;
label = "USERLED6";
};
led_7: led_7 {
gpios = <&gpio_led0 7>;
label = "USERLED7";
};
led_8: led_8 {
gpios = <&gpio_led0 8>;
label = "PB1LED";
};
led_9: led_9 {
gpios = <&gpio_led0 9>;
label = "PB2LED";
};
};
gpio_keys {
compatible = "gpio-keys";
user_button_0: button_0 {
label = "USERPB0";
gpios = <&gpio_button 0>;
};
user_button_1: button_1 {
label = "USERPB1";
gpios = <&gpio_button 1>;
};
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-m55";
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
mpu: mpu@e000ed90 {
compatible = "arm,armv8.1m-mpu";
reg = <0xe000ed90 0x40>;
arm,num-mpu-regions = <16>;
};
};
};
/* We utilize the secure addresses, if you subtract 0x10000000
* you'll get the non-secure alias
*/
itcm: itcm@10000000 { /* alias @ 0x0 */
reg = <0x10000000 DT_SIZE_K(512)>;
};
sram: sram@11000000 { /* alias @ 0x01000000 */
compatible = "mmio-sram";
reg = <0x11000000 DT_SIZE_M(2)>;
};
dtcm: dtcm@30000000 { /* alias @ 0x20000000 */
reg = <0x30000000 DT_SIZE_K(512)>;
};
isram: sram@31000000 {/* alias @ 0x21000000 */
compatible = "mmio-sram";
reg = <0x31000000 DT_SIZE_M(4)>;
};
/* DDR4 - 2G, alternates non-secure/secure every 256M */
ddr4: memory@60000000 {
device_type = "memory";
reg = <0x60000000 DT_SIZE_M(256)
0x70000000 DT_SIZE_M(256)
0x80000000 DT_SIZE_M(256)
0x90000000 DT_SIZE_M(256)
0xa0000000 DT_SIZE_M(256)
0xb0000000 DT_SIZE_M(256)
0xc0000000 DT_SIZE_M(256)
0xd0000000 DT_SIZE_M(256)>;
};
soc {
peripheral@50000000 {
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x50000000 0x10000000>;
#include "mps3_an547-common.dtsi"
};
};
};
&nvic {
arm,num-irq-priority-bits = <3>;
};

View file

@ -0,0 +1,22 @@
#
# Copyright (c) 2019-2021 Linaro Limited
#
# SPDX-License-Identifier: Apache-2.0
#
identifier: mps3_an547
name: Arm MPS3-AN547
type: mcu
arch: arm
toolchain:
- gnuarmemb
- zephyr
- xtools
supported:
- gpio
testing:
ignore_tags:
- drivers
- bluetooth
- net
- timer

View file

@ -0,0 +1,27 @@
#
# Copyright (c) 2018-2021 Linaro Limited
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_SOC_SERIES_MPS3=y
CONFIG_SOC_MPS3_AN547=y
CONFIG_BOARD_MPS3_AN547=y
CONFIG_CORTEX_M_SYSTICK=y
CONFIG_RUNTIME_NMI=y
CONFIG_ARM_TRUSTZONE_M=y
CONFIG_ARM_MPU=y
# GPIOs
CONFIG_GPIO=y
# Serial
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CMSDK_APB=y
# Build a Secure firmware image
CONFIG_TRUSTED_EXECUTION_SECURE=y
CONFIG_I2C=y