Skip to content

Commit ee67369

Browse files
slpp95prashanthaescolar
authored andcommitted
boards: beaglebone_ai64: Add BeagleBone AI-64
Add initial BeagleBone AI-64 support. BeagleBone AI-64: https://www.beagleboard.org/boards/beaglebone-ai-64 Signed-off-by: Prashanth S <[email protected]> Signed-off-by: Andrew Davis <[email protected]>
1 parent 963db42 commit ee67369

File tree

8 files changed

+251
-0
lines changed

8 files changed

+251
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (C) 2023 BeagleBoard.org Foundation
2+
# Copyright (C) 2023 S Prashanth
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_BEAGLEBONE_AI64
7+
select SOC_J721E_MAIN_R5F0_0 if BOARD_BEAGLEBONE_AI64_J721E_MAIN_R5F0_0
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* Copyright (C) 2023 BeagleBoard.org Foundation
2+
* Copyright (C) 2023 S Prashanth
3+
* Copyright (c) 2024 Texas Instruments Incorporated
4+
* Andrew Davis <[email protected]>
5+
*
6+
* SPDX-License-Identifier: Apache-2.0
7+
*/
8+
9+
#include <zephyr/dt-bindings/pinctrl/ti-k3-pinctrl.h>
10+
11+
&pinctrl {
12+
uart2_tx_default: uart2_tx_default {
13+
/* 0x1c is address of padconfig register of p8.34 and 14 is mux mode */
14+
pinmux = <K3_PINMUX(0x1c, PIN_OUTPUT, MUX_MODE_14)>;
15+
};
16+
17+
uart2_rx_default: uart2_rx_default {
18+
/* 0x14 is address of padconfig register of p8.22 and 14 is mux mode */
19+
pinmux = <K3_PINMUX(0x14, PIN_INPUT, MUX_MODE_14)>;
20+
};
21+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/* Copyright (C) 2023 BeagleBoard.org Foundation
2+
* Copyright (C) 2023 S Prashanth
3+
* Copyright (c) 2024 Texas Instruments Incorporated
4+
* Andrew Davis <[email protected]>
5+
*
6+
* SPDX-License-Identifier: Apache-2.0
7+
*/
8+
9+
/dts-v1/;
10+
11+
#include <ti/j721e_main_r5.dtsi>
12+
#include "beaglebone_ai64_j721e_main_r5f0_0-pinctrl.dtsi"
13+
#include <freq.h>
14+
15+
/ {
16+
model = "BeagleBoard.org BeagleBone AI-64";
17+
compatible = "beagle,beaglebone-ai64";
18+
19+
chosen {
20+
zephyr,sram = &atcm;
21+
zephyr,console = &uart2;
22+
};
23+
24+
cpus {
25+
cpu@0 {
26+
status = "okay";
27+
};
28+
};
29+
30+
ddr0: memory@a2000000 {
31+
compatible = "mmio-sram";
32+
reg = <0xa2000000 DT_SIZE_M(1)>;
33+
};
34+
35+
rsc_table: memory@a2100000 {
36+
compatible = "zephyr,memory-region", "mmio-sram";
37+
reg = <0xa2100000 DT_SIZE_M(1)>;
38+
zephyr,memory-region = "RSC_TABLE";
39+
};
40+
41+
ddr1: memory@a2200000 {
42+
compatible = "zephyr,memory-region", "mmio-sram";
43+
reg = <0xa2200000 DT_SIZE_M(14)>;
44+
zephyr,memory-region = "DRAM";
45+
};
46+
};
47+
48+
&uart2 {
49+
status = "okay";
50+
pinctrl-0 = <&uart2_tx_default &uart2_rx_default>;
51+
pinctrl-names = "default";
52+
current-speed = <115200>;
53+
};
54+
55+
&systick_timer {
56+
status = "okay";
57+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (C) 2023 BeagleBoard.org Foundation
2+
# Copyright (C) 2023 S Prashanth
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
identifier: beaglebone_ai64/j721e/main_r5f0_0
7+
name: BeagleBone-AI64 R5
8+
type: mcu
9+
arch: arm
10+
ram: 32
11+
toolchain:
12+
- zephyr
13+
- gnuarmemb
14+
- xtools
15+
supported:
16+
- uart
17+
vendor: beagle
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (C) 2023 BeagleBoard.org Foundation
2+
# Copyright (C) 2023 S Prashanth
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# Zephyr Kernel Configuration
7+
CONFIG_XIP=n
8+
9+
# Serial Driver
10+
CONFIG_SERIAL=y
11+
CONFIG_UART_INTERRUPT_DRIVEN=y
12+
13+
# Enable Console
14+
CONFIG_CONSOLE=y
15+
CONFIG_UART_CONSOLE=y
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: beaglebone_ai64
3+
vendor: beagle
4+
socs:
5+
- name: j721e
62.4 KB
Loading
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
.. _beaglebone_ai64:
2+
3+
BeagleBone AI-64
4+
################
5+
6+
Overview
7+
********
8+
9+
BeagleBone AI-64 is a computational platform powered by TI J721E SoC, which is
10+
targeted for automotive applications.
11+
12+
.. figure:: assets/bbai_64.webp
13+
:align: center
14+
:width: 600px
15+
:alt: BeagleBoard.org BeagleBone AI-64
16+
17+
Hardware
18+
********
19+
20+
BeagleBone AI-64 is powered by TI J721E SoC, which has three domains (MAIN,
21+
MCU, WKUP). This document gives overview of Zephyr running on Cortex R5's
22+
in the MAIN domain.
23+
24+
L1 Memory System
25+
----------------
26+
27+
* 16 KB instruction cache.
28+
* 16 KB data cache.
29+
* 64 KB TCM.
30+
31+
Region Address Translation
32+
--------------------------
33+
34+
The RAT module performs a region based address translation. It translates a
35+
32-bit input address into a 48-bit output address. Any input transaction that
36+
starts inside of a programmed region will have its address translated, if the
37+
region is enabled.
38+
39+
VIM Interrupt Controller
40+
------------------------
41+
42+
The VIM aggregates device interrupts and sends them to the R5F CPU(s). The VIM
43+
module supports 512 interrupt inputs per R5F core. Each interrupt can be either
44+
a level or a pulse (both active-high). The VIM has two interrupt outputs per core
45+
IRQ and FIQ.
46+
47+
Supported Features
48+
******************
49+
50+
The board configuration supports,
51+
52+
+-----------+------------+-----------------------+
53+
| Interface | Controller | Driver/Component |
54+
+===========+============+=======================+
55+
| UART | on-chip | serial port-polling |
56+
| | | serial port-interrupt |
57+
+-----------+------------+-----------------------+
58+
59+
Other hardwares features are currently not supported.
60+
61+
Running Zephyr
62+
**************
63+
64+
The J721E does not have a separate flash for the R5 cores. Because of this
65+
the A72 core has to load the program for the R5 cores to the right memory
66+
address, set the PC and start the processor.
67+
This can be done from Linux on the A72 core via remoteproc.
68+
69+
By default the R5's Memory Protection Unit (MPU) only allows for execution of
70+
instructions in the ATCM/BTCM. There is also a couple regions of DRAM memory
71+
carved out for each R5 by Linux. These can be used for IPC (DDR0) and for
72+
data (DDR1). DDR1 can also be used for executable regions after programming
73+
the MPU.
74+
75+
This is the memory mapping from A72 to the memory usable by the R5. Note that
76+
the R5 cores always see their local ATCM at address 0x00000000 and their BTCM
77+
at address 0x41010000. The ATCM/BTCM locations are fixed in hardware, but the
78+
DDR regions are by convention. If you would like to use different DRAM
79+
locations or sizes, you must also update for the same on the A72 software.
80+
(For Linux as the A72 host, this would be changed in Device Tree).
81+
82+
+------------+--------------+--------------+--------------+--------------+--------+
83+
| Region | R5FSS0 Core0 | R5FSS0 Core1 | R5FSS1 Core0 | R5FSS1 Core1 | Size |
84+
+============+==============+==============+==============+==============+========+
85+
| ATCM | 0x05c00000 | 0x05d00000 | 0x05e00000 | 0x05f00000 | 32KB |
86+
+------------+--------------+--------------+--------------+--------------+--------+
87+
| BTCM | 0x05c10000 | 0x05d10000 | 0x05e10000 | 0x05f00000 | 32KB |
88+
+------------+--------------+--------------+--------------+--------------+--------+
89+
| DDR0 | 0xA2000000 | 0xA3000000 | 0xA4000000 | 0xA5000000 | 1MB |
90+
+------------+--------------+--------------+--------------+--------------+--------+
91+
| DDR1 | 0xA2100000 | 0xA3000000 | 0xA4100000 | 0xA5000000 | 15MB |
92+
+------------+--------------+--------------+--------------+--------------+--------+
93+
94+
Steps to build and run an image
95+
-------------------------------
96+
97+
Here is an example for the :zephyr:code-sample:`hello_world` application
98+
targeting one of the Cortex R5F on BeagleBone AI-64:
99+
100+
.. zephyr-app-commands::
101+
:zephyr-app: samples/hello_world
102+
:board: beaglebone_ai64/j721e/main_r5f0_0
103+
:goals: build
104+
105+
To load the image:
106+
107+
| Copy Zephyr image to the /lib/firmware/ directory.
108+
| ``cp build/zephyr/zephyr.elf /lib/firmware/``
109+
|
110+
| Ensure the core is not running.
111+
| ``echo stop > /dev/remoteproc/j7-main-r5f0_0/state``
112+
|
113+
| Configuring the image name to the remoteproc module.
114+
| ``echo zephyr.elf > /dev/remoteproc/j7-main-r5f0_0/firmware``
115+
|
116+
| Once the image name is configured, send the start command.
117+
| ``echo start > /dev/remoteproc/j7-main-r5f0_0/state``
118+
119+
Console
120+
-------
121+
122+
Zephyr on BeagleBone AI-64 J721E Cortex R5 uses UART 2 (Rx p8.22, Tx p8.34)
123+
as console.
124+
125+
References
126+
**********
127+
128+
* `BeagleBone AI-64 Homepage <https://www.beagleboard.org/boards/beaglebone-ai-64>`_
129+
* `J721E TRM <https://www.ti.com/lit/zip/spruil1>`_

0 commit comments

Comments
 (0)