Dev/BeagleBone/BeagleYAI: Difference between revisions
Line 10: | Line 10: | ||
The complete [https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j722s/processors.html list of processors] and [https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j722s/hosts.html cores]. Note that a physical processor can have multiple Host IDs (cores) depending on context and domain. | The complete [https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j722s/processors.html list of processors] and [https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j722s/hosts.html cores]. Note that a physical processor can have multiple Host IDs (cores) depending on context and domain. | ||
According to chat GPT (which is wrong), "The BeagleY-AI board uses the TDA4VM SoC in the HS-SE variant". | According to chat GPT (which is wrong), <s>"The BeagleY-AI board uses the TDA4VM SoC in the HS-SE variant"</s>. | ||
: The HS-SE (High Security - Single Edition) variant is focused on applications where data security and confidentiality are critical. | : The HS-SE (High Security - Single Edition) variant is focused on applications where data security and confidentiality are critical. | ||
: The HS-FS (High Security - Functional Safety) variant is more geared toward functional safety requirements. | : The HS-FS (High Security - Functional Safety) variant is more geared toward functional safety requirements. | ||
The BeagleY-AI board uses a TDA4AEN and not a TDA4VM, and it is a HS-FS variant. | The BeagleY-AI board uses an AM67A which is a TDA4AEN variant and not a TDA4VM, and it is a HS-FS variant. | ||
=== Memory === | === Memory === |
Revision as of 01:05, 20 March 2025
Description
Processor
- The board has a TI AM67A (from the Jacinto J722S TDA4AEN familly) SOC with
- - four Arm Cortex-A53 cores (main cores, 1.4Ghz)
- - two C7x DSP cores
- - one user Arm Cortex-R5F core (MCU channel with FFI, 800Mhz)
- - two additional Arm Cortex-R5F cores (Device management and Run-time management).
- IMG BXS-4-64 GPU (OpenGL ES3.2 and Vulkan 1.2 API support)
The complete list of processors and cores. Note that a physical processor can have multiple Host IDs (cores) depending on context and domain.
According to chat GPT (which is wrong), "The BeagleY-AI board uses the TDA4VM SoC in the HS-SE variant".
- The HS-SE (High Security - Single Edition) variant is focused on applications where data security and confidentiality are critical.
- The HS-FS (High Security - Functional Safety) variant is more geared toward functional safety requirements.
The BeagleY-AI board uses an AM67A which is a TDA4AEN variant and not a TDA4VM, and it is a HS-FS variant.
Memory
- 4Go LPDDR4
- EEPROM (FT24C32A) on I2C0
- microSD Card
The Boot process
Overview
From chapter "9.2. Understanding bootloaders in Processor SDK J722S (RTOS/Linux) and Processor SDK Linux for AM67A, chapter 3.1.1.1 - U-Boot - General Information :
- The boot process on the J722S processor requires two different U-Boot images and some firmwares, which will run on different cores.
Information is a little bit confused, maybe because there may be different ways to achieve the boot process.
You may find the documentation within U-Boot sources to be pretty complete : https://docs.u-boot.org/en/latest/board/ti/j722s_evm.html
- Note that it does not directly targets the BeagleY-AI board but the J722S-EVM one
- tiboot3.bin
- The first "Secondary Program Loader" (SPL) that the ROM bootloader will load and execute on the MCU R5F Core0
- It seems to be an agregate of an U-Boot image (u-boot-spl.bin) and the TIFS firmware (sysfw)
- It will try to load two images : "tifs.bin" (embedded) and "tispl.bin" (from SD card)
- tifs.bin
- TI Foundational Security (TIFS)
- This firmware image is also called "SYSFW" and is included inside tiboot3.bin.
- It is used for the "Secure Management Services" (SMS), to be run on the corresponding R5F MCU.
- tispl.bin
- The second "Secondary Program Loader" (SPL). This one will run on one of the A53 cores.
- This image includes the "ARM Trusted Firmware" (ATF or Trusted Firmware-A) and the "Trusted Execution Environment" (TEE, provided by OP-TEE).
- It also includes the "Device Management" (DM) firmware which will run on one of the R5F cores. It provides the services refered to as Resource Management (RM) and Power Management (PM).
- And then the "SPL" proper, which may be a reduced U-Boot image, commonly refered to as the "first-stage bootloader" which will mainly initialise the A53 core, the DDR memory, and the required subsystems so that the full U-Boot image can run.
- uboot.img
- This is the final U-Boot image, also called "second-stage bootloader", which will also run on one of the A53 cores.
- This one will provide a prompt and load the Linux kernel.
Where to get more information
Credits : I started finding useful and accurate information on this post on medium by Olof Astrand : Building u-boot and the linux kernel for the beagleY AI board, though these rely on TI SDK, which I'd like to avoid as much as possible, both in order to understand everything, make things clear as what code is required (or binary blobs if any) and avoid huge unnecessary amounts of data which usually comes whith such SDK bundles.
Anyway, this post references some useful sources :
- Texas Instruments System Controller Interface (TISCI)
- Processor SDK RTOS J722S
- Processor SDK Linux Software Developer’s Guide, mainly chapter 3 : Foundational Components.
TI even provides access to the sources of these documentations : https://github.com/TexasInstruments/processor-sdk-doc !!
This patchset by Jacob Stiffler for Yocto also provides information : https://lore.kernel.org/all/1535138718-6772-2-git-send-email-j-stiffler@ti.com/T/
- Trusted Firmware-A : https://trustedfirmware-a.readthedocs.io/en/latest/index.html (and Trusted Firmware-A related section in processor SDK documentation for Linux on AM67A)
- OP-TEE : https://optee.readthedocs.io/en/latest/ (and OP-TEE related section in processor SDK documentation for Linux on AM67A)
Sources
TI
- git://git.ti.com/ti-u-boot/ti-u-boot.git (or use the one from openbeagle.org)
- git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
- git://git.ti.com/processor-firmware/ti-linux-firmware.git
- branch : ti-linux-firmware
- Note that a very small subset is required from this 2.4Go repository (see below in "Build the images" section).
Sources, branches and tags are referenced in the Linux Release Specific Release Notes
BeagleBone
- https://openbeagle.org/beagleboard/u-boot.git - tag "v2023.04-ti-09.02.00.009-BeagleY-AI"
- tag : v2025.04-rc3-BeagleY-AI
Others
- tag : lts-v2.12.1
- tag : 4.5.0
Also refer to the Linux Release Specific Release Notes for branches and tags.
Build the images
The sources which proved most usefull in order to rebuild all the images (all but ti firmwares ...) :
- https://docs.u-boot.org/en/latest/board/ti/j722s_evm.html
- https://openbeagle.org/beagleboard/repos-arm64/-/blob/main/bb-u-boot-beagley-ai/suite/bookworm/debian/rules
Compiler
The AM67A processor has R5 and A53 cores.
- The R5 cores need a 32bits compiler : arm-linux-gnueabi
CC32="arm-linux-gnueabi-"
- The A53 ones need a 64bits compiler : aarch64-linux-gnu
CC64="aarch64-linux-gnu-"
U-Boot config
You'll need "ARM Trusted Firmware" (see above for sources and git tag I used)
TFA_BOARD=lite TFA_EXTRA_ARGS="SPD=opteed" make CROSS_COMPILE=${CC64} ARCH=aarch64 PLAT=k3 ${TFA_EXTRA_ARGS} TARGET_BOARD=${TFA_BOARD} bl31
Result is "build/k3/${TFA_BOARD}/release/bl31.bin"
You'll also need a "Trusted Execution Environnment" (see above for sources and git tag I used)
OPTEE_PLATFORM=k3-j722s OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y CFG_ARM64_core=y" make -j 12 CROSS_COMPILE=${CC32} CROSS_COMPILE64=${CC64} ${OPTEE_EXTRA_ARGS} PLATFORM=${OPTEE_PLATFORM}
Result is "core/tee-pager_v2.bin" which is in the output dir (either the one specified with "O=" option or under "out/.../").
And a last one : some ti firmwares found in TI's Linux firmware repository (see above for sources and git tag I used). If you don't want to keep the 2.4Go of firmwares, keep at most these ones :
- ti-linux-firmware/ti-dm/j722s/*
- ti-linux-firmware/ti-ipc/j722s/*
- ti-linux-firmware/ti-sysfw/ti-fs-firmware-j722s-hs-*
- ti-linux-firmware/ti-sysfw/cert.bin
And set this variable according to where you put them :
LNX_FW_PATH="..../ti-linux-firmware/"
And at last, the U-Boot part (remember that you will need two uboot images, once again, see above for the sources and tag I used) :
- One for the R5 core :
make ARCH=arm am67a_beagley_ai_r5_defconfig make ARCH=arm -j 12 CROSS_COMPILE=${CC32} BINMAN_INDIRS=${LNX_FW_PATH}
- this one provides "tiboot3-j722s-hs-fs-evm.bin" which will be "tiboot3.bin"
- And one for the A53 cores :
- Set bl31 and bl32 variables to the results of ARM Trusted firmware (bl31) and Trusted Execution Environment (bl32) compilation
bl31="...../build/k3/${TFA_BOARD}/release/bl31.bin" bl32="...../core/tee-pager_v2.bin" make ARCH=arm am67a_beagley_ai_a53_defconfig make ARCH=arm -j 12 CROSS_COMPILE=${CC64} BINMAN_INDIRS=${LNX_FW_PATH} BL31=${bl31} TEE=${bl32}
- this one provides both "tispl.bin" and "u-boot.img".
Linux
- Device tree : arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
- Kernel config file : https://git.beagleboard.org/beagleboard/linux/-/blob/d89bfdd19e7161ddba4ce4f5e34425ae6020a6db/arch/arm64/configs/bb.org_defconfig
Liens officiels
Pinout
- Tag connect clip : https://www.printables.com/model/879533-beagley-ai-tagconnect-clip-10pin
Debug port Connection
Onboard connector
Despite what some have published about everywhere on the Web (even within official beagleboard online documentation), the connector IS NOT a JST connector. Some stupid guy made a confusion between the name of the footprint on the schematics or in the BOM and the name of the manufacturer.
The official BOM gives all the information :
- Manufacturer : MTCONN
- Manufacturer part number : MTWF63-103SRN-01163
Where to find mating connector
I did not find the exact connector reference on MTCONN website, but they have another one which seems to be the same one : https://www.mtconntech.com/wafer-conn-2-product/ which reference is "WTB10-XX-02-2" ... but I do not know where to get these, much less the mating connector.
Some googling gave me another manufacturer with a compatible reference : Wurth Elektronik.
What's nice with Wurth Elektronik is that they have an efficient website, with all the information, and their references are easy to order using Mouser or Digikey for example.
Here are the references/links for all the parts :
- WR-WTB 1.00 mm SMT Male Vertical Shrouded Header
- WR-WTB 1.00 mm Female Terminal Housing
- WR-WTB 1.00 mm Female Crimp Terminal
- WR-WTB Pre-crimped wire
- And even the WR-WTB Manual Crimping Tool
Choose the number of positions you need (3 for the debug port, but there's also a 2 positions and a 4 positions connector on the BeagleY-AI board), and either ask for samples or look for the corresponding parts reference number on your preferred components supplier.
Links
- BeagleBoard linux git repository : https://git.beagleboard.org/beagleboard/linux
- BeagleY-AI design and detailed specifications : https://docs.beagle.cc/boards/beagley/ai/03-design.html
- Building u-boot and the linux kernel for the beagleY AI board
- BeagleY-AI Review - Part 1 and BeagleY-AI Review - Part 2 on element 14 community.