mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH v2 33/33] Documentation: boards: k3: add AM62lx documentation
Date: Thu, 05 Jun 2025 14:42:58 +0200	[thread overview]
Message-ID: <20250605-arm-k3-am62l-v2-33-53257d4b2dd2@pengutronix.de> (raw)
In-Reply-To: <20250605-arm-k3-am62l-v2-0-53257d4b2dd2@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 Documentation/boards/ti-k3-am62lx.rst | 79 +++++++++++++++++++++++++++++++++++
 Documentation/boards/ti-k3.rst        | 23 ++++++++++
 2 files changed, 102 insertions(+)

diff --git a/Documentation/boards/ti-k3-am62lx.rst b/Documentation/boards/ti-k3-am62lx.rst
new file mode 100644
index 0000000000000000000000000000000000000000..3cd7a6debf137c4e2eed700e7a570b0a23740f9e
--- /dev/null
+++ b/Documentation/boards/ti-k3-am62lx.rst
@@ -0,0 +1,79 @@
+.. _ti_k3_am62lx:
+
+TI K3 AM62lx based boards
+=========================
+
+The TI AM62lx is SoC in the line of TI K3 64-bit ARM SoCs.
+
+The boot process of the TI AM62x SoCs is a two step process. The first stage boot loader
+is loaded by the ROM code and executed on the Cortex-A53 processor. This stage contains
+some firmware files and a BL1 which is responsible for setting up the initial clocks,
+power domains and DRAM. When this is done the BL1 branches back to the ROM which loads
+the second stage which contains the TF-A BL31, barebox proper and optionally OP-TEE.
+
+Building TF-A
+-------------
+
+The Arm Trusted Firmware is built from https://github.com/ARM-software/arm-trusted-firmware.git::
+
+  make CROSS_COMPILE=$CROSS_COMPILE_64 ARCH=aarch64 PLAT=k3 SPD=opteed \
+        TARGET_BOARD=am62l
+  cp build/k3/am62l/release/bl1.bin $BAREBOX_SOURCE/firmware/am62lx-bl1.bin
+  cp build/k3/am62l/release/bl31.bin $BAREBOX_SOURCE/firmware/am62lx-bl31.bin
+
+.. note::
+
+  As time of writing the AM62lx support is not yet supported in upstream TF-A. Build from
+  https://github.com/TexasInstruments/arm-trusted-firmware.git 11.00.11 instead.
+
+Bulding OP-TEE
+--------------
+
+OP-TEE is built from https://github.com/OP-TEE/optee_os.git::
+
+  make CROSS_COMPILE64=$CC64 CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y \
+        PLATFORM=k3-am62lx
+  cp out/arm-plat-k3/core/tee-raw.bin $BAREBOX_SOURCE/firmware/am62lx-bl32.bin
+
+OP-TEE is optional. barebox will continue without OP-TEE when the file
+does not exist. In that case drop the ``SPD=opteed`` option above when building the TF-A
+
+.. note::
+
+  As time of writing the AM62lx OP-TEE support has not yet landed in a release. Use the
+  master branch for building OP-TEE
+
+Building barebox
+----------------
+
+The am62lx images are built as part of the ``multi_v8_defconfig``::
+
+  export ARCH=arm CROSS_COMPILE=CROSS_COMPILE_64
+  make multi_v8_defconfig
+  make
+  cp images/barebox-am62lx-evm-tiboot3.img $TI_BOOT/tiboot3.bin
+  cp images/barebox-am62lx-evm.img $TI_BOOT/tispl.bin
+
+USB DFU boot
+------------
+K3 Boards can be booted via USB DFU. When in USB boot mode the initial stage can be uploaded
+using ``dfu-util``::
+
+  dfu-util -D images/barebox-am62lx-evm-tiboot3.img -a 0
+
+This will start the initial stage which then expects the following stage which can
+be uploaded with ``dfu-util`` as well::
+
+  dfu-util -D images/barebox-am62lx-evm.img -a 0
+
+eMMC boot
+---------
+K3 boards can boot from eMMC boot partitions. In this mode the ROM reads the tiboot3.bin
+raw from the active boot partition. In this mode barebox expects the FIP image with the
+following stages in the same boot partition at offset 1MiB. There is a barebox update handler
+which takes a combined image consisting of tiboot3.bin and the FIP image to allow for a
+failsafe update. This image can't be generated by the barebox build system though. It has
+to be generated by a build system or manually::
+
+  dd if=images/barebox-am62lx-evm-tiboot3.img of=barebox-am62lx-evm-emmc.img
+  dd if=images/barebox-am62lx-evm.img of=barebox-am62lx-evm-emmc.img bs=1024 seek=512
diff --git a/Documentation/boards/ti-k3.rst b/Documentation/boards/ti-k3.rst
new file mode 100644
index 0000000000000000000000000000000000000000..937752e4bb933cf0ec57f8b3411ef930d6737d24
--- /dev/null
+++ b/Documentation/boards/ti-k3.rst
@@ -0,0 +1,23 @@
+TI K3 based boards
+==================
+
+The TI K3 is a line of 64-bit ARM SoCs. The build and boot process differs between the
+different SoC types. This document contains the general prerequisites for all K3 SoCs.
+Refer to the section for the actual SoC type for building and booting barebox.
+
+Prerequisites
+-------------
+
+There are several binary blobs required for building barebox for TI K3 SoCs. Find them
+in git://git.ti.com/processor-firmware/ti-linux-firmware.git. The repository is assumed
+to be checked out at ``firmware/ti-linux-firmware``. Alternatively the barebox repository
+has a ti-linux-firmware submodule which checks out at the correct place. The K3 SoCs boot
+from a FAT partition on SD/eMMC cards. During the next steps the files are copied to
+``$TI_BOOT``. This is assumed to be an empty directory. After the build process copy its
+contents to a FAT filesystem on an SD/eMMC card.
+
+TI K3 SoC specific documentation
+================================
+
+* :ref:`ti_k3_am62x`
+* :ref:`ti_k3_am62lx`

-- 
2.39.5




      parent reply	other threads:[~2025-06-05 13:13 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 12:42 [PATCH v2 00/33] ARM: K3: add support for AM62L Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 01/33] scripts/k3img: make more flexible Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 02/33] images: K3: rename %.k3img target to %.k3_am62x_img Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 03/33] ARM: K3: prepare support for other SoCs Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 04/33] ARM: dts: add k3-am62l dts(i) files Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 05/33] ARM: dts: am62l: Fix assigned-clock-parents Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 06/33] ARM: K3: add am62lx base support Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 07/33] ARM: Makefile: descend into mach-* for cleaning Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 08/33] ARM: k3: rename yaml files from am625 to am62x Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 09/33] firmware: add ti-linux-firmware submodule Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 10/33] scripts/ti-board-config.py: fix length Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 11/33] ARM: k3: add yaml files for AM62l Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 12/33] k3: ringacc: pass ringrt address in struct k3_ringacc_init_data Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 13/33] drivers: soc: ti: k3-ringacc: handle absence of tisci Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 14/33] drivers: soc: ti: k3-ringacc: fix k3_ringacc_ring_reset_sci Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 15/33] dma: ti: k3-psil: Add PSIL data for AM62L Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 16/33] dma: ti: k3-udma: Refactor common bits for AM62L support Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 17/33] dma: ti: k3-udma-common: Update common code for AM62L DMAs Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 18/33] dma: ti: k3-udma-am62l: Add AM62L support DMA drivers Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 19/33] ARM: dts: am62l: Add ethernet ports Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 20/33] ARM: dts: am62l evm: " Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 21/33] ARM: k3: am62l: add barebox specific am62l.dtsi Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 22/33] net: davinci_mdio: Use fallback clock rate Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 23/33] firmware: arm_scmi: Add support for clock parents Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 24/33] clk: add struct clk_parent_data Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 25/33] clk: arm_scmi: implement clock parent setting Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 26/33] ARM: dts: am62l3-evm: add MMC aliases Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 27/33] dma: ti: k3-udma: limit asel to am625 Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 28/33] gpio: increase ARCH_NR_GPIOS to 512 Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 29/33] ARM: dts: k3-am62l: reserve memory for TF-A and OP-TEE Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 30/33] ARM: k3: add AM62l3 EVM board support Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 31/33] ARM: K3: am62l: add serial aliases Sascha Hauer
2025-06-05 12:42 ` [PATCH v2 32/33] Documentation: boards: k3: split generic and am62x specific documentation Sascha Hauer
2025-06-05 12:42 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250605-arm-k3-am62l-v2-33-53257d4b2dd2@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox