boards: arm: Add AM62x M4F phyBOARD-Lyra

This is a copy of the TI AM62x SK EVM board file to support the
M4F on the phyBOARD-Lyra AM62x, which is PHYTEC's development kit
for the phyCORE-AM62x SoM.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
This commit is contained in:
Daniel Schultz 2023-07-19 23:25:21 +02:00 committed by Carles Cufí
commit 68a3cce5f4
9 changed files with 395 additions and 115 deletions

View file

@ -8,3 +8,7 @@
config BOARD_AM62X_M4_SK
bool "TI AM62x M4 Starter Kit (SK) Evaluation Module (EVM)"
depends on SOC_SERIES_AM62X_M4
config BOARD_AM62X_M4_PHYBOARD_LYRA
bool "PHYTEC AM62x M4 phyBOARD-Lyra"
depends on SOC_SERIES_AM62X_M4

View file

@ -11,3 +11,10 @@ config BOARD
default "am62x_m4_sk"
endif # BOARD_AM62X_M4_SK
if BOARD_AM62X_M4_PHYBOARD_LYRA
config BOARD
default "am62x_m4_phyboard_lyra"
endif # BOARD_AM62X_M4_PHYBOARD_LYRA

View file

@ -0,0 +1,51 @@
/*
* Copyright (C) 2023 PHYTEC Messtechnik GmbH
* Author: Daniel Schultz <d.schultz@phytec.de>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <ti/am62x_m4.dtsi>
/ {
model = "PHYTEC AM62x M4 phyBOARD-Lyra";
compatible = "phytec,am62x-m4-phyboard-lyra", "ti,am625";
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,sram1 = &ddr0;
};
cpus {
cpu@0 {
status = "okay";
clock-frequency = <400000000>;
};
};
ddr0:memory@9CC00000{
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x9CC00000 DT_SIZE_K(4)>;
zephyr,memory-region = "DDR";
};
};
&pinctrl {
mcu_uart0_rx_default: mcu_uart0_rx_default {
pinmux = <K3_PINMUX(0x0014, PIN_INPUT, MUX_MODE_0)>;
};
mcu_uart0_tx_default: mcu_uart0_tx_default {
pinmux = <K3_PINMUX(0x0018, PIN_OUTPUT, MUX_MODE_0)>;
};
};
&uart0 {
current-speed = <115200>;
pinctrl-0 = <&mcu_uart0_rx_default &mcu_uart0_tx_default>;
pinctrl-names = "default";
status = "okay";
};

View file

@ -0,0 +1,7 @@
identifier: am62x_m4_phyboard_lyra
name: PHYTEC AM62x M4 phyBOARD-Lyra
type: mcu
arch: arm
toolchain:
- zephyr
ram: 192

View file

@ -0,0 +1,25 @@
# PHYTEC AM62x M4 phyBOARD-Lyra
#
# Copyright (C) 2023 PHYTEC Messtechnik GmbH
# Author: Daniel Schultz <d.schultz@phytec.de>
#
# SPDX-License-Identifier: Apache-2.0
# Platform Configuration
CONFIG_SOC_SERIES_AM62X_M4=y
CONFIG_SOC_AM62x_M4=y
CONFIG_BOARD_AM62X_M4_PHYBOARD_LYRA=y
CONFIG_CORTEX_M_SYSTICK=y
# Zephyr Kernel Configuration
CONFIG_XIP=n
# Enable Pinctrl
CONFIG_PINCTRL=y
# Serial Driver
CONFIG_SERIAL=y
# Enable Console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

View file

@ -0,0 +1,148 @@
.. _am62x_m4_phyboard_lyra:
AM62x phyBOARD-Lyra M4F Core
############################
Overview
********
The AM62x phyBOARD-Lyra board configuration is used by Zephyr applications
that run on the TI AM62x platform. The board configuration provides support
for the ARM Cortex-M4F MCU core and the following features:
- Nested Vector Interrupt Controller (NVIC)
- System Tick System Clock (SYSTICK)
The board configuration also enables support for the semihosting debugging console.
See the `PHYTEC AM62x Product Page`_ for details.
.. figure:: img/phyCORE-AM62x_Lyra_frontside.webp
:align: center
:alt: AM62x phyBOARD-Lyra
PHYTEC phyBOARD-Lyra with the phyCORE-AM62x SoM
Hardware
********
The AM62x phyBOARD-Lyra kit features the AM62x SoC, which is composed of a
quad Cortex-A53 cluster and a single Cortex-M4 core in the MCU domain. Zephyr
is ported to run on the M4F core and the following listed hardware
specifications are used:
- Low-power ARM Cortex-M4F
- Memory
- 256KB of SRAM
- 2GB of DDR4
- Debug
- XDS110 based JTAG
Supported Features
==================
The am62x_m4_phyboard_lyra configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| PINCTRL | on-chip | pinctrl |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
Other hardware features are not currently supported by the port.
Devices
========
System Clock
------------
This board configuration uses a system clock frequency of 400 MHz.
DDR RAM
-------
The board has 2GB of DDR RAM available. This board configuration
allocates Zephyr 4kB of RAM (only for resource table: 0x9CC00000 to 0x9CC00400).
Serial Port
-----------
This board configuration uses a single serial communication channel with the
MCU domain UART (MCU_UART0).
SD Card
*******
Download PHYTEC's official `WIC`_ as well as `BMAP`_ and flash the WIC file with
an etching software onto an SD-card. This will boot Linux on the A53 application
cores of the SoM. These cores will then load the zephyr binary on the M4 core
using remoteproc.
The default configuration can be found in the defconfig file:
.. code-block:: console
boards/arm/am62x_m4/am62x_m4_phyboard_lyra_defconfig
Flashing
********
The Linux running on the A53 uses the remoteproc framework to manage the M4F co-processor.
Therefore, the testing requires the binary to be copied to the SD card to allow the A53 cores to
load it while booting using remoteproc.
To test the M4F core, we build the `hello_world` sample with the following command.
.. code-block:: console
# From the root of the Zephyr repository
west build -p -b am62x_m4_phyboard_lyra samples/hello_world
This builds the program and the binary is present in the `build/zephyr` directory as `zephyr.elf`.
We now copy this binary onto the SD card in the `/lib/firmware` directory and name it as `am62-mcu-m4f0_0-fw`.
.. code-block:: console
# Mount the SD card at sdcard for example
sudo mount /dev/sdX sdcard
# copy the elf to the /lib/firmware directory
sudo cp --remove-destination zephyr.elf sdcard/lib/firmware/am62-mcu-m4f0_0-fw
The SD card can now be used for booting. The binary will now be loaded onto the M4F core on boot.
To allow the board to boot using the SD card, set the boot pins to the SD Card boot mode. Refer to `phyBOARD SD Card Booting Essentials`_.
After changing the boot mode, stop in U-Boot to enable the M4F co-processor.
.. code-block:: console
setenv overlays k3-am62-phyboard-lyra-rpmsg.dtbo
# Save the overlays variable permanently
saveenv
boot
The board should boot into Linux and the binary will run and print Hello world to the MCU_UART0
port.
.. _PHYTEC AM62x Product Page:
https://www.phytec.com/product/phycore-am62x/
.. _WIC:
https://download.phytec.de/Software/Linux/BSP-Yocto-AM62x/BSP-Yocto-AM62x-PD23.1.0/images/yogurt/phyboard-lyra-am62xx-2/phytec-qt5demo-image-phyboard-lyra-am62xx-2.wic.xz
.. _BMAP:
https://download.phytec.de/Software/Linux/BSP-Yocto-AM62x/BSP-Yocto-AM62x-PD23.1.0/images/yogurt/phyboard-lyra-am62xx-2/phytec-qt5demo-image-phyboard-lyra-am62xx-2.wic.bmap
.. _phyBOARD SD Card Booting Essentials:
https://docs.phytec.com/latest/phycore-am62x/bootingessentials/sdcard.html

View file

@ -0,0 +1,141 @@
.. _am62x_m4_sk:
AM62x-SK M4F Core
#################
Overview
********
The AM62x-SK board configuration is used by Zephyr applications that run on
the TI AM62x platform. The board configuration provides support for the ARM
Cortex-M4F MCU core and the following features:
- Nested Vector Interrupt Controller (NVIC)
- System Tick System Clock (SYSTICK)
The board configuration also enables support for the semihosting debugging console.
See the `TI AM62X Product Page`_ for details.
.. figure:: img/sk_am62_angled.webp
:align: center
:alt: TI AM62x-SK EVM
Texas Instruments AM62x SK EVM
Hardware
********
The AM62x-SK EVM features the AM62x SoC, which is composed of a quad Cortex-A53
cluster and a single Cortex-M4 core in the MCU domain. Zephyr is ported to run on
the M4F core and the following listed hardware specifications are used:
- Low-power ARM Cortex-M4F
- Memory
- 256KB of SRAM
- 2GB of DDR4
- Debug
- XDS110 based JTAG
Supported Features
==================
The am62x_m4_sk configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| PINCTRL | on-chip | pinctrl |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
Other hardware features are not currently supported by the port.
Devices
========
System Clock
------------
This board configuration uses a system clock frequency of 400 MHz.
DDR RAM
-------
The board has 2GB of DDR RAM available. This board configuration
allocates Zephyr 4kB of RAM (only for resource table: 0x9CC00000 to 0x9CC00400).
Serial Port
-----------
This board configuration uses a single serial communication channel with the
MCU domain UART (MCU_UART0).
SD Card
*******
Download TI's official `WIC`_ and flash the WIC file with an etching software
onto an SD-card. This will boot Linux on the A53 application cores of the EVM.
These cores will then load the zephyr binary on the M4 core using remoteproc.
The default configuration can be found in the defconfig file:
.. code-block:: console
boards/arm/am62x_m4/am62x_m4_sk_defconfig
Flashing
********
The board can using remoteproc, and uses the OpenAMP resource table to accomplish this.
The testing requires the binary to be copied to the SD card to allow the A53 cores to load it while booting using remoteproc.
To test the M4F core, we build the `hello_world` sample with the following command.
.. code-block:: console
# From the root of the Zephyr repository
west build -p -b am62x_m4_sk samples/hello_world
This builds the program and the binary is present in the `build/zephyr` directory as `zephyr.elf`.
We now copy this binary onto the SD card in the `/lib/firmware` directory and name it as `am62-mcu-m4f0_0-fw`.
.. code-block:: console
# Mount the SD card at sdcard for example
sudo mount /dev/sdX sdcard
# copy the elf to the /lib/firmware directory
sudo cp --remove-destination zephyr.elf sdcard/lib/firmware/am62-mcu-m4f0_0-fw
The SD card can now be used for booting. The binary will now be loaded onto the M4F core on boot.
To allow the board to boot using the SD card, set the boot pins to the SD Card boot mode. Refer to `EVM Setup Page`_.
After changing the boot mode, the board should go through the boot sequence on powering up.
The binary will run and print Hello world to the MCU_UART0 port.
References
**********
AM62x SK EVM TRM:
https://www.ti.com/lit/ug/spruiv7/spruiv7.pdf
.. _TI AM62X Product Page:
https://www.ti.com/product/AM625
.. _WIC:
https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-PvdSyIiioq/08.06.00.42/tisdk-default-image-am62xx-evm.wic.xz
.. _AM62x SK EVM TRM:
https://www.ti.com/lit/ug/spruiv7/spruiv7.pdf
.. _EVM Setup Page:
https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/08_06_00_18/exports/docs/api_guide_am62x/EVM_SETUP_PAGE.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View file

@ -1,48 +1,27 @@
.. _am62x_m4_sk:
.. _am62x_m4:
AM62x-SK M4F Core
#################
AM62x M4F Core
##############
Overview
********
The AM62x-SK board configuration is used by Zephyr applications that run on
the TI AM62x platform. The board configuration provides support for the ARM
Cortex-M4F MCU core and the following features:
The Texas Instrument AM62x SoC contains a quad Cortex-A53 cluster and a single
Cortex-M4F core in the MCU domain. This chapter describes all boards with support
for the M4F subsystem.
- Nested Vector Interrupt Controller (NVIC)
- System Tick System Clock (SYSTICK)
Currently the following hardware platforms are supported:
The board configuration also enables support for the semihosting debugging console.
.. toctree::
:maxdepth: 1
See the `TI AM62X Product Page`_ for details.
.. figure:: img/sk_am62_angled.webp
:align: center
:alt: TI AM62x-SK EVM
Texas Instruments AM62x SK EVM
Hardware
********
The AM62x-SK EVM features the AM62x SoC, which is composed of a quad Cortex-A53
cluster and a single Cortex-M4 core in the MCU domain. Zephyr is ported to run on
the M4F core and the following listed hardware specifications are used:
- Low-power ARM Cortex-M4F
- Memory
- 256KB of SRAM
- 2GB of DDR4
- Debug
- XDS110 based JTAG
am62x_m4_sk.rst
am62x_m4_phyboard_lyra.rst
Supported Features
==================
The am62x_m4_sk configuration supports the following hardware features:
The AM62x M4F platform supports the following hardware features:
+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
@ -57,85 +36,3 @@ The am62x_m4_sk configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
Other hardware features are not currently supported by the port.
Devices
========
System Clock
------------
This board configuration uses a system clock frequency of 400 MHz.
DDR RAM
-------
The board has 2GB of DDR RAM available. This board configuration
allocates Zephyr 4kB of RAM (only for resource table: 0x9CC00000 to 0x9CC00400).
Serial Port
-----------
This board configuration uses a single serial communication channel with the
MCU domain UART (MCU_UART0).
SD Card
*******
Download TI's official `WIC`_ and flash the WIC file with an etching software
onto an SD-card. This will boot Linux on the A53 application cores of the EVM.
These cores will then load the zephyr binary on the M4 core using remoteproc.
The default configuration can be found in the defconfig file:
.. code-block:: console
boards/arm/am62x_m4/am62x_m4_sk/am62x_m4_sk_defconfig
Flashing
********
The board can using remoteproc, and uses the OpenAMP resource table to accomplish this.
The testing requires the binary to be copied to the SD card to allow the A53 cores to load it while booting using remoteproc.
To test the M4F core, we build the `hello_world` sample with the following command.
.. code-block:: console
# From the root of the Zephyr repository
west build -p -b am62x_m4_sk samples/hello_world
This builds the program and the binary is present in the `build/zephyr` directory as `zephyr.elf`.
We now copy this binary onto the SD card in the `/lib/firmware` directory and name it as `am62-mcu-m4f0_0-fw`.
.. code-block:: console
# Mount the SD card at sdcard for example
sudo mount /dev/sdX sdcard
# copy the elf to the /lib/firmware directory
sudo cp zephyr.elf sdcard/lib/firmware/am62-mcu-m4f0_0-fw
The SD card can now be used for booting. The binary will now be loaded onto the M4F core on boot.
To allow the board to boot using the SD card, set the boot pins to the SD Card boot mode. Refer to `EVM Setup Page`_.
After changing the boot mode, the board should go through the boot sequence on powering up.
The binary will run and print Hello world to the MCU_UART0 port.
References
**********
AM62x SK EVM TRM:
https://www.ti.com/lit/ug/spruiv7/spruiv7.pdf
.. _TI AM62X Product Page:
https://www.ti.com/product/AM625
.. _WIC:
https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-PvdSyIiioq/08.06.00.42/tisdk-default-image-am62xx-evm.wic.xz
.. _AM62x SK EVM TRM:
https://www.ti.com/lit/ug/spruiv7/spruiv7.pdf
.. _EVM Setup Page:
https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/08_06_00_18/exports/docs/api_guide_am62x/EVM_SETUP_PAGE.html