1.. zephyr:board:: beaglebone_ai64 2 3Overview 4******** 5 6BeagleBone AI-64 is a computational platform powered by TI J721E SoC, which is 7targeted for automotive applications. 8 9Hardware 10******** 11 12BeagleBone AI-64 is powered by TI J721E SoC, which has three domains (MAIN, 13MCU, WKUP). This document gives overview of Zephyr running on Cortex R5's 14in the MAIN domain. 15 16L1 Memory System 17---------------- 18 19* 16 KB instruction cache. 20* 16 KB data cache. 21* 64 KB TCM. 22 23Region Address Translation 24-------------------------- 25 26The RAT module performs a region based address translation. It translates a 2732-bit input address into a 48-bit output address. Any input transaction that 28starts inside of a programmed region will have its address translated, if the 29region is enabled. 30 31VIM Interrupt Controller 32------------------------ 33 34The VIM aggregates device interrupts and sends them to the R5F CPU(s). The VIM 35module supports 512 interrupt inputs per R5F core. Each interrupt can be either 36a level or a pulse (both active-high). The VIM has two interrupt outputs per core 37IRQ and FIQ. 38 39Supported Features 40****************** 41 42The board configuration supports, 43 44+-----------+------------+-----------------------+ 45| Interface | Controller | Driver/Component | 46+===========+============+=======================+ 47| UART | on-chip | serial port-polling | 48| | | serial port-interrupt | 49+-----------+------------+-----------------------+ 50 51Other hardwares features are currently not supported. 52 53Running Zephyr 54************** 55 56The J721E does not have a separate flash for the R5 cores. Because of this 57the A72 core has to load the program for the R5 cores to the right memory 58address, set the PC and start the processor. 59This can be done from Linux on the A72 core via remoteproc. 60 61By default the R5's Memory Protection Unit (MPU) only allows for execution of 62instructions in the ATCM/BTCM. There is also a couple regions of DRAM memory 63carved out for each R5 by Linux. These can be used for IPC (DDR0) and for 64data (DDR1). DDR1 can also be used for executable regions after programming 65the MPU. 66 67This is the memory mapping from A72 to the memory usable by the R5. Note that 68the R5 cores always see their local ATCM at address 0x00000000 and their BTCM 69at address 0x41010000. The ATCM/BTCM locations are fixed in hardware, but the 70DDR regions are by convention. If you would like to use different DRAM 71locations or sizes, you must also update for the same on the A72 software. 72(For Linux as the A72 host, this would be changed in Device Tree). 73 74+------------+--------------+--------------+--------------+--------------+--------+ 75| Region | R5FSS0 Core0 | R5FSS0 Core1 | R5FSS1 Core0 | R5FSS1 Core1 | Size | 76+============+==============+==============+==============+==============+========+ 77| ATCM | 0x05c00000 | 0x05d00000 | 0x05e00000 | 0x05f00000 | 32KB | 78+------------+--------------+--------------+--------------+--------------+--------+ 79| BTCM | 0x05c10000 | 0x05d10000 | 0x05e10000 | 0x05f00000 | 32KB | 80+------------+--------------+--------------+--------------+--------------+--------+ 81| DDR0 | 0xA2000000 | 0xA3000000 | 0xA4000000 | 0xA5000000 | 1MB | 82+------------+--------------+--------------+--------------+--------------+--------+ 83| DDR1 | 0xA2100000 | 0xA3000000 | 0xA4100000 | 0xA5000000 | 15MB | 84+------------+--------------+--------------+--------------+--------------+--------+ 85 86Steps to build and run an image 87------------------------------- 88 89Here is an example for the :zephyr:code-sample:`hello_world` application 90targeting one of the Cortex R5F on BeagleBone AI-64: 91 92.. zephyr-app-commands:: 93 :zephyr-app: samples/hello_world 94 :board: beaglebone_ai64/j721e/main_r5f0_0 95 :goals: build 96 97To load the image: 98 99| Copy Zephyr image to the /lib/firmware/ directory. 100| ``cp build/zephyr/zephyr.elf /lib/firmware/`` 101| 102| Ensure the core is not running. 103| ``echo stop > /dev/remoteproc/j7-main-r5f0_0/state`` 104| 105| Configuring the image name to the remoteproc module. 106| ``echo zephyr.elf > /dev/remoteproc/j7-main-r5f0_0/firmware`` 107| 108| Once the image name is configured, send the start command. 109| ``echo start > /dev/remoteproc/j7-main-r5f0_0/state`` 110 111Console 112------- 113 114Zephyr on BeagleBone AI-64 J721E Cortex R5 uses UART 2 (Rx p8.22, Tx p8.34) 115as console. 116 117References 118********** 119 120* `BeagleBone AI-64 Homepage <https://www.beagleboard.org/boards/beaglebone-ai-64>`_ 121* `J721E TRM <https://www.ti.com/lit/zip/spruil1>`_ 122