Browse Source
Add initial support for the SK-AM64 MCU domain Cortex-M4F core. SK-AM64: https://www.ti.com/tool/SK-AM64B Signed-off-by: Andrew Davis <afd@ti.com>pull/86944/merge
8 changed files with 264 additions and 0 deletions
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
# Texas Instruments SK-AM64 |
||||
# |
||||
# Copyright (c) 2025 Texas Instruments Incorporated |
||||
# |
||||
# SPDX-License-Identifier: Apache-2.0 |
||||
|
||||
config BOARD_SK_AM64 |
||||
select SOC_AM6442_M4 if BOARD_SK_AM64_AM6442_M4 |
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
board: |
||||
name: sk_am64 |
||||
full_name: SK-AM64 |
||||
vendor: ti |
||||
socs: |
||||
- name: am6442 |
After Width: | Height: | Size: 36 KiB |
@ -0,0 +1,120 @@
@@ -0,0 +1,120 @@
|
||||
.. zephyr:board:: sk_am64 |
||||
|
||||
Overview |
||||
******** |
||||
|
||||
The SK-AM64 board configuration is used by Zephyr applications that run on |
||||
the TI AM64x 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 AM64 Product Page`_ for details. |
||||
|
||||
Hardware |
||||
******** |
||||
The SK-AM64 EVM features the AM64 SoC, which is composed of a dual 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 |
||||
================== |
||||
|
||||
.. zephyr:board-supported-hw:: |
||||
|
||||
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: 0xa4100000 to 0xa4100400). |
||||
|
||||
Serial Port |
||||
----------- |
||||
|
||||
This board configuration uses a single serial communication channel with the |
||||
MCU domain UART (MCU_UART0). |
||||
|
||||
GPIO |
||||
---- |
||||
|
||||
The SK-AM64 has a heartbeat LED connected to MCU_GPIO0_6. It's configured |
||||
to build and run the :zephyr:code-sample:`blinky` sample. |
||||
|
||||
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 |
||||
:zephyr_file:`boards/ti/sk_am64/sk_am64_am6442_m4_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 :zephyr:code-sample:`hello_world` sample with the following command. |
||||
|
||||
.. code-block:: console |
||||
|
||||
# From the root of the Zephyr repository |
||||
west build -p -b sk_am64/am6442/m4 samples/hello_world |
||||
|
||||
This builds the program and the binary is present in the :file:`build/zephyr` directory as |
||||
:file:`zephyr.elf`. |
||||
|
||||
We now copy this binary onto the SD card in the :file:`/lib/firmware` directory and name it as |
||||
:file:`am64-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/am64-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 `SK-AM64B EVM User's Guide`_. |
||||
|
||||
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 |
||||
********** |
||||
|
||||
.. _TI AM64 Product Page: |
||||
https://www.ti.com/product/AM6442 |
||||
|
||||
.. _WIC: |
||||
https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-yXgchBCk98/10.01.10.04/tisdk-default-image-am64xx-evm-10.01.10.04.rootfs.wic.xz |
||||
|
||||
.. _SK-AM64B EVM User's Guide: |
||||
https://www.ti.com/lit/ug/spruj64/spruj64.pdf |
||||
|
||||
.. _build OpenOCD from source: |
||||
https://docs.u-boot.org/en/latest/board/ti/k3.html#building-openocd-from-source |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
/* |
||||
* Copyright (c) 2025 Texas Instruments Incorporated |
||||
* Andrew Davis <afd@ti.com> |
||||
* |
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
|
||||
#include <zephyr/dt-bindings/pinctrl/ti-k3-pinctrl.h> |
||||
|
||||
&pinctrl { |
||||
mcu_uart0_rx_default: mcu_uart0_rx_default { |
||||
pinmux = <K3_PINMUX(0x028, PIN_INPUT, MUX_MODE_0)>; /* (A9) MCU_UART0_RXD */ |
||||
}; |
||||
|
||||
mcu_uart0_tx_default: mcu_uart0_tx_default { |
||||
pinmux = <K3_PINMUX(0x002C, PIN_OUTPUT, MUX_MODE_0)>; /* (A8) MCU_UART0_TXD */ |
||||
}; |
||||
|
||||
mcu_gpio0_led_default: mcu_gpio0_led_default { |
||||
pinmux = <K3_PINMUX(0x0014, PIN_INPUT, MUX_MODE_7)>; /* (A7) MCU_GPIO0_5 */ |
||||
}; |
||||
}; |
@ -0,0 +1,80 @@
@@ -0,0 +1,80 @@
|
||||
/* |
||||
* Copyright (c) 2024 Texas Instruments Incorporated |
||||
* Andrew Davis <afd@ti.com> |
||||
* |
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
*/ |
||||
|
||||
/dts-v1/; |
||||
|
||||
#include <ti/am64x_m4.dtsi> |
||||
#include "sk_am64_am6442_m4-pinctrl.dtsi" |
||||
|
||||
/ { |
||||
model = "TI AM64x STARTER KIT (SK) M4"; |
||||
compatible = "ti,am64x_m4_sk", "ti,am6442"; |
||||
|
||||
chosen { |
||||
zephyr,sram = &sram0; |
||||
zephyr,console = &uart0; |
||||
zephyr,shell-uart = &uart0; |
||||
zephyr,ipc = &ipc0; |
||||
zephyr,ipc_shm = &ddr0; |
||||
}; |
||||
|
||||
aliases { |
||||
led0 = &heartbeat_led; |
||||
}; |
||||
|
||||
cpus { |
||||
cpu@0 { |
||||
status = "okay"; |
||||
clock-frequency = <DT_FREQ_M(400)>; |
||||
}; |
||||
}; |
||||
|
||||
ddr0: memory@a4000000 { |
||||
compatible = "mmio-sram"; |
||||
reg = <0xa4000000 DT_SIZE_M(1)>; |
||||
}; |
||||
|
||||
rsc_table: memory@a4100000 { |
||||
compatible = "zephyr,memory-region", "mmio-sram"; |
||||
reg = <0xa4100000 DT_SIZE_K(4)>; |
||||
zephyr,memory-region = "RSC_TABLE"; |
||||
}; |
||||
|
||||
ddr1: memory@a4200000 { |
||||
compatible = "zephyr,memory-region", "mmio-sram"; |
||||
reg = <0xa4200000 (DT_SIZE_M(15) - DT_SIZE_K(4))>; |
||||
zephyr,memory-region = "DDR"; |
||||
}; |
||||
|
||||
leds: leds { |
||||
compatible = "gpio-leds"; |
||||
|
||||
heartbeat_led: led_0 { |
||||
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; |
||||
label = "Heartbeat LED"; |
||||
}; |
||||
}; |
||||
|
||||
ipc0: ipc { |
||||
compatible = "zephyr,mbox-ipm"; |
||||
mboxes = <&mbox6 0>, <&mbox6 1>; |
||||
mbox-names = "tx", "rx"; |
||||
}; |
||||
}; |
||||
|
||||
&uart0 { |
||||
current-speed = <115200>; |
||||
pinctrl-0 = <&mcu_uart0_rx_default &mcu_uart0_tx_default>; |
||||
pinctrl-names = "default"; |
||||
status = "okay"; |
||||
}; |
||||
|
||||
&gpio0 { |
||||
pinctrl-0 = <&mcu_gpio0_led_default>; |
||||
pinctrl-names = "default"; |
||||
status = "okay"; |
||||
}; |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
identifier: sk_am64/am6442/m4 |
||||
name: TI AM64X M4 Starter Kit (SK) |
||||
type: mcu |
||||
arch: arm |
||||
toolchain: |
||||
- zephyr |
||||
ram: 192 |
||||
vendor: ti |
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
# Copyright (c) 2024 Texas Instruments Incorporated |
||||
# Andrew Davis <afd@ti.com> |
||||
# |
||||
# SPDX-License-Identifier: Apache-2.0 |
||||
|
||||
# Platform Configuration |
||||
CONFIG_CORTEX_M_SYSTICK=y |
||||
|
||||
# Zephyr Kernel Configuration |
||||
CONFIG_XIP=n |
||||
|
||||
# Serial Driver |
||||
CONFIG_SERIAL=y |
||||
|
||||
# GPIO Driver |
||||
CONFIG_GPIO=y |
||||
|
||||
# Enable Console |
||||
CONFIG_CONSOLE=y |
||||
CONFIG_UART_CONSOLE=y |
Loading…
Reference in new issue