Skip to content

Commit 43a600e

Browse files
dnltznashif
authored andcommitted
board: phytec: Add phyBOARD-Electra
Add PHYTEC's phyBOARD-Electra kit with the phyCORE-AM64x System on Module (SOM). This board only supports the M4F core, UART and GPIO right now, since other drivers are still missing. Signed-off-by: Daniel Schultz <[email protected]>
1 parent d30cbe9 commit 43a600e

File tree

8 files changed

+262
-0
lines changed

8 files changed

+262
-0
lines changed

MAINTAINERS.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3647,6 +3647,7 @@ TI K3 Platforms:
36473647
- dnltz
36483648
files:
36493649
- boards/phytec/phyboard_lyra/
3650+
- boards/phytec/phyboard_electra/
36503651
- boards/ti/*am62*/
36513652
- drivers/*/*ti_k3*
36523653
- dts/bindings/*/ti,k3*
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# PHYTEC phyBOARD-Electra AM64x
2+
#
3+
# Copyright (c) 2024 PHYTEC Messtechnik GmbH
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
config BOARD_PHYBOARD_ELECTRA
8+
select SOC_AM6442_M4 if BOARD_PHYBOARD_ELECTRA_AM6442_M4
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: phyboard_electra
3+
vendor: phytec
4+
socs:
5+
- name: am6442
95.7 KB
Loading
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
.. _phyboard_electra_am64xx_m4:
2+
3+
phyBOARD-Electra AM64x M4F Core
4+
###############################
5+
6+
Overview
7+
********
8+
9+
The AM64x phyBOARD-Electra board configuration is used by Zephyr applications
10+
that run on the TI AM64x platform. The board configuration provides support
11+
for the ARM Cortex-M4F MCU core and the following features:
12+
13+
- Nested Vector Interrupt Controller (NVIC)
14+
- System Tick System Clock (SYSTICK)
15+
16+
The board configuration also enables support for the semihosting debugging console.
17+
18+
See the `PHYTEC AM64x Product Page`_ for details.
19+
20+
.. figure:: img/phyCORE-AM64x_Electra_frontside.webp
21+
:align: center
22+
:alt: phyBOARD-Electra AM64x
23+
24+
PHYTEC phyBOARD-Electra with the phyCORE-AM64x SoM
25+
26+
Hardware
27+
********
28+
The AM64x phyBOARD-Electra kit features the AM64x SoC, which is composed of a
29+
dual Cortex-A53 cluster and two dual Cortex-R5F cores in the MAIN domain as
30+
well as a single Cortex-M4 core in the MCU domain. Zephyr is ported to run on
31+
the M4F core and the following listed hardware specifications are used:
32+
33+
- Low-power ARM Cortex-M4F
34+
- Memory
35+
36+
- 256KB of SRAM
37+
- 2GB of DDR4
38+
39+
- Debug
40+
41+
- XDS110 based JTAG
42+
43+
Supported Features
44+
==================
45+
46+
The phyboard_electra/am6442/m4 configuration supports the following hardware features:
47+
48+
+-----------+------------+-------------------------------------+
49+
| Interface | Controller | Driver/Component |
50+
+===========+============+=====================================+
51+
| NVIC | on-chip | nested vector interrupt controller |
52+
+-----------+------------+-------------------------------------+
53+
| SYSTICK | on-chip | systick |
54+
+-----------+------------+-------------------------------------+
55+
| PINCTRL | on-chip | pinctrl |
56+
+-----------+------------+-------------------------------------+
57+
| UART | on-chip | serial |
58+
+-----------+------------+-------------------------------------+
59+
| GPIO | on-chip | gpio |
60+
+-----------+------------+-------------------------------------+
61+
62+
Other hardware features are not currently supported by the port.
63+
64+
Devices
65+
========
66+
System Clock
67+
------------
68+
69+
This board configuration uses a system clock frequency of 400 MHz.
70+
71+
DDR RAM
72+
-------
73+
74+
The board has 2GB of DDR RAM available. This board configuration
75+
allocates Zephyr 4kB of RAM (only for resource table: 0xa4100000 to 0xa4100400).
76+
77+
Serial Port
78+
-----------
79+
80+
This board configuration uses a single serial communication channel with the
81+
MCU domain UART (MCU_UART0).
82+
83+
GPIO
84+
----
85+
86+
The phyCORE-AM64x has a heartbeat LED connected to gpio6. It's configured
87+
to build and run the `basic/blinky` sample.
88+
89+
SD Card
90+
*******
91+
92+
Download PHYTEC's official `WIC`_ as well as `BMAP`_ and flash the WIC file with
93+
an etching software onto an SD-card. This will boot Linux on the A53 application
94+
cores of the SoM. These cores will then load the zephyr binary on the M4 core
95+
using remoteproc.
96+
97+
The default configuration can be found in
98+
:zephyr_file:`boards/phytec/phyboard_electra/phyboard_electra_am6442_m4_defconfig`
99+
100+
Flashing
101+
********
102+
103+
The Linux running on the A53 uses the remoteproc framework to manage the M4F co-processor.
104+
Therefore, the testing requires the binary to be copied to the SD card to allow the A53 cores to
105+
load it while booting using remoteproc.
106+
107+
To test the M4F core, we build the :ref:`hello_world` sample with the following command.
108+
109+
.. zephyr-app-commands::
110+
:board: phyboard_electra/am6442/m4
111+
:zephyr-app: samples/hello_world
112+
:goals: build
113+
114+
This builds the program and the binary is present in the `build/zephyr` directory as `zephyr.elf`.
115+
116+
We now copy this binary onto the SD card in the `/lib/firmware` directory and name it as `am64-mcu-m4f0_0-fw`.
117+
118+
.. code-block:: console
119+
120+
# Mount the SD card at sdcard for example
121+
sudo mount /dev/sdX sdcard
122+
# copy the elf to the /lib/firmware directory
123+
sudo cp --remove-destination zephyr.elf sdcard/lib/firmware/am64-mcu-m4f0_0-fw
124+
125+
The SD card can now be used for booting. The binary will now be loaded onto the M4F core on boot.
126+
127+
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`_.
128+
129+
The board should boot into Linux and the binary will run and print Hello world to the MCU_UART0
130+
port.
131+
132+
133+
.. _PHYTEC AM64x Product Page:
134+
https://www.phytec.com/product/phycore-am64x/
135+
136+
.. _WIC:
137+
https://download.phytec.de/Software/Linux/BSP-Yocto-AM64x/BSP-Yocto-Ampliphy-AM64x-PD23.2.1/images/ampliphy/phyboard-electra-am64xx-2/phytec-headless-image-phyboard-electra-am64xx-2.wic.xz
138+
139+
.. _BMAP:
140+
https://download.phytec.de/Software/Linux/BSP-Yocto-AM64x/BSP-Yocto-Ampliphy-AM64x-PD23.2.1/images/ampliphy/phyboard-electra-am64xx-2/phytec-headless-image-phyboard-electra-am64xx-2.wic.bmap
141+
142+
.. _phyBOARD SD Card Booting Essentials:
143+
https://docs.phytec.com/projects/yocto-phycore-am64x/en/bsp-yocto-ampliphy-am64x-pd23.2.1/bootingessentials/sdcard.html
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Copyright (C) 2024 PHYTEC Messtechnik GmbH
3+
* Author: Daniel Schultz <[email protected]>
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/dts-v1/;
9+
10+
#include <ti/am64x_m4.dtsi>
11+
12+
/ {
13+
model = "PHYTEC phyBOARD-Electra AM64x M4";
14+
compatible = "phytec,phyboard-electra-am64xx-m4", "ti,am6442";
15+
16+
chosen {
17+
zephyr,sram = &sram0;
18+
zephyr,console = &uart0;
19+
zephyr,shell-uart = &uart0;
20+
zephyr,sram1 = &ddr0;
21+
};
22+
23+
aliases {
24+
led0 = &heartbeat_led;
25+
};
26+
27+
cpus {
28+
cpu@0 {
29+
status = "okay";
30+
clock-frequency = <DT_FREQ_M(400)>;
31+
};
32+
};
33+
34+
ddr0:memory@a4100000 {
35+
compatible = "zephyr,memory-region", "mmio-sram";
36+
reg = <0xa4100000 DT_SIZE_K(4)>;
37+
zephyr,memory-region = "DDR";
38+
};
39+
40+
leds: leds {
41+
compatible = "gpio-leds";
42+
heartbeat_led: led_0 {
43+
gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
44+
label = "Heartbeat LED";
45+
};
46+
};
47+
};
48+
49+
&pinctrl {
50+
mcu_uart0_rx_default: mcu_uart0_rx_default {
51+
pinmux = <K3_PINMUX(0x028, PIN_INPUT, MUX_MODE_0)>;
52+
};
53+
mcu_uart0_tx_default: mcu_uart0_tx_default {
54+
pinmux = <K3_PINMUX(0x002C, PIN_OUTPUT, MUX_MODE_0)>;
55+
};
56+
mcu_gpio0_led_default: mcu_gpio0_led_default {
57+
pinmux = <K3_PINMUX(0x0018, PIN_OUTPUT, MUX_MODE_7)>;
58+
};
59+
};
60+
61+
&uart0 {
62+
current-speed = <115200>;
63+
pinctrl-0 = <&mcu_uart0_rx_default &mcu_uart0_tx_default>;
64+
pinctrl-names = "default";
65+
status = "okay";
66+
};
67+
68+
&gpio0 {
69+
pinctrl-0 = <&mcu_gpio0_led_default>;
70+
pinctrl-names = "default";
71+
status = "okay";
72+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
identifier: phyboard_electra/am6442/m4
2+
name: PHYTEC phyBOARD-Electra AM64x M4
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zephyr
7+
ram: 192
8+
vendor: phytec
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# PHYTEC AM64x M4 phyBOARD-Electra
2+
#
3+
# Copyright (C) 2024 PHYTEC Messtechnik GmbH
4+
# Author: Daniel Schultz <[email protected]>
5+
#
6+
# SPDX-License-Identifier: Apache-2.0
7+
8+
# Platform Configuration
9+
CONFIG_CORTEX_M_SYSTICK=y
10+
11+
# Zephyr Kernel Configuration
12+
CONFIG_XIP=n
13+
14+
# Enable Pinctrl
15+
CONFIG_PINCTRL=y
16+
17+
# Serial Driver
18+
CONFIG_SERIAL=y
19+
20+
# GPIO Driver
21+
CONFIG_GPIO=y
22+
23+
# Enable Console
24+
CONFIG_CONSOLE=y
25+
CONFIG_UART_CONSOLE=y

0 commit comments

Comments
 (0)