|
| 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