summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2023-01-22 23:59:26 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2023-07-11 12:10:09 +0200
commit004fd632d5de4b78cd4420366715f3dd5e993918 (patch)
tree41d0d28038028ea57a0521c52402049e880ad297 /doc
parent66584d04f82465300e60218fd053424c9b142aa1 (diff)
board: toradex: add verdin am62 support
This adds initial support for the Toradex Verdin AM62 Quad 1GB WB IT V1.0A module. They are strapped to boot from their on-module eMMC. U-Boot supports booting from the on-module eMMC only, DFU support is disabled for now due to missing AM62x USB support. Boot sequence is: SYSFW ---> R5 SPL (both in tiboot3.bin) ---> ATF (TF-A) ---> OP-TEE ---> A53 SPL (part of tispl.bin) ---> U-boot proper (u-boot.img) Upstream-Status: Pending V2 has been sent [1] and a re-based V3 will be sent once the upstream TI stuff sufficiently stabilizes. [1] https://lore.kernel.org/all/20230612205444.363727-4-marcel@ziswiler.com Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/board/toradex/verdin-am62.rst167
1 files changed, 167 insertions, 0 deletions
diff --git a/doc/board/toradex/verdin-am62.rst b/doc/board/toradex/verdin-am62.rst
new file mode 100644
index 0000000000..d375eae548
--- /dev/null
+++ b/doc/board/toradex/verdin-am62.rst
@@ -0,0 +1,167 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later
+.. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+
+Verdin AM62 Module
+==================
+
+Quick Start
+-----------
+
+- Get the binary-only SYSFW
+- Get binary-only TI Linux firmware
+- Build the ARM trusted firmware binary
+- Build the OPTEE binary
+- Build U-Boot for the R5
+- Build U-Boot for the A53
+- Flash to eMMC
+- Boot
+
+For an overview of the TI AM62 SoC boot flow please head over to:
+.. file:: ../ti/am62x_sk.rst
+
+Get the SYSFW
+-------------
+
+.. code-block:: bash
+
+ $ echo "Downloading SYSFW..."
+ $ git clone git://git.ti.com/k3-image-gen/k3-image-gen.git
+
+Get the TI Linux Firmware
+-------------
+
+.. code-block:: bash
+
+ $ echo "Downloading TI Linux Firmware..."
+ $ git clone -b ti-linux-firmware git://git.ti.com/processor-firmware/ti-linux-firmware.git
+
+Get and Build the ARM Trusted Firmware (Trusted Firmware A)
+-----------------------------------------------------------
+
+.. code-block:: bash
+
+ $ echo "Downloading and building TF-A..."
+ $ git clone https://github.com/ARM-software/arm-trusted-firmware.git
+ $ cd arm-trusted-firmware
+
+Then build ATF (TF-A):
+
+.. code-block:: bash
+
+ $ export ARCH=aarch64
+ $ export CROSS_COMPILE=aarch64-none-linux-gnu-
+ $ make PLAT=k3 TARGET_BOARD=lite SPD=opteed
+
+Get and Build OPTEE
+-------------------
+
+.. code-block:: bash
+
+ $ echo "Downloading and building OPTEE..."
+ $ git clone https://github.com/OP-TEE/optee_os.git
+ $ cd optee_os
+
+Then build OPTEE:
+
+.. code-block:: bash
+
+ $ export CROSS_COMPILE=arm-none-linux-gnueabihf-
+ $ export CROSS_COMPILE64=aarch64-none-linux-gnu-
+ $ make PLATFORM=k3 CFG_ARM64_core=y
+
+Build U-Boot for R5
+-------------------
+
+.. code-block:: bash
+
+ $ export ARCH=arm
+ $ export CROSS_COMPILE=arm-none-linux-gnueabihf-
+ $ make verdin-am62_r5_defconfig O=/tmp/r5
+ $ make O=/tmp/r5
+ $ cd ../k3-image-gen
+ $ make SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=../ti-linux-firmware/ti-sysfw/ti-fs-firmware-am62x-gp.bin
+ $ cp tiboot3-am62x-gp-evm.bin ../tiboot3.bin
+
+Build U-Boot for A53
+--------------------
+
+.. code-block:: bash
+
+ $ export ARCH=arm64
+ $ export CROSS_COMPILE=aarch64-none-linux-gnu-
+ $ make verdin-am62_a53_defconfig O=/tmp/a53
+ $ make ATF=$PWD/../arm-trusted-firmware/build/k3/lite/release/bl31.bin TEE=$PWD/../optee_os/out/arm-plat-k3/core/tee-pager_v2.bin DM=$PWD/../ti-linux-firmware/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53
+ $ cp /tmp/a53/tispl.bin ../
+ $ cp /tmp/a53/u-boot.img ../
+
+Note: Relative paths to the artefacts are known to not work.
+
+Flash to eMMC
+-------------
+
+.. code-block:: bash
+
+ => mmc dev 0 1
+ => fatload mmc 1 ${loadaddr} tiboot3.bin
+ => mmc write ${loadaddr} 0x0 0x400
+ => fatload mmc 1 ${loadaddr} tispl.bin
+ => mmc write ${loadaddr} 0x400 0x1000
+ => fatload mmc 1 ${loadaddr} u-boot.img
+ => mmc write ${loadaddr} 0x1400 0x2000
+
+Boot
+----
+
+Output:
+
+.. code-block:: bash
+
+U-Boot SPL 2023.07-rc3-00028-g43a3a728223 (Jun 05 2023 - 15:12:37 +0200)
+SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.1--v09.00.01 (Kool Koala)')
+SPL initial stack usage: 13360 bytes
+Trying to boot from MMC1
+Starting ATF on ARM64 core...
+
+NOTICE: BL31: v2.9(release):v2.9.0-73-g463655cc8
+NOTICE: BL31: Built : 14:51:42, Jun 5 2023
+I/TC:
+I/TC: OP-TEE version: 3.21.0-168-g322cf9e33 (gcc version 12.2.1 20221205 (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24))) #2 Mon Jun 5 13:04:15 UTC 2023 aarch64
+I/TC: WARNING: This OP-TEE configuration might be insecure!
+I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
+I/TC: Primary CPU initializing
+I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.1--v09.00.01 (Kool Koala)')
+I/TC: HUK Initialized
+I/TC: Primary CPU switching to normal world boot
+
+U-Boot SPL 2023.07-rc3-00028-g43a3a728223 (Jun 05 2023 - 15:15:01 +0200)
+SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.1--v09.00.01 (Kool Koala)')
+SPL initial stack usage: 1840 bytes
+Trying to boot from MMC1
+
+
+U-Boot 2023.07-rc3-00028-g43a3a728223-dirty (Jun 05 2023 - 15:15:01 +0200)
+
+SoC: AM62X SR1.0 GP
+DRAM: 1 GiB
+Core: 141 devices, 28 uclasses, devicetree: separate
+MMC: mmc@fa10000: 0, mmc@fa00000: 1
+Loading Environment from MMC... OK
+In: serial@2800000
+Out: serial@2800000
+Err: serial@2800000
+Model: Toradex 0069 Verdin AM62 Quad 1GB WB IT V1.0A
+Serial#: 14917624
+Carrier: Toradex Verdin Development Board V1.1A, Serial# 10754333
+am65_cpsw_nuss ethernet@8000000: K3 CPSW: nuss_ver: 0x6BA01103 cpsw_ver: 0x6BA81103 ale_ver: 0x00290105 Ports:2 mdio_freq:1000000
+Setting variant to wifi
+Net:
+Warning: ethernet@8000000port@1 MAC addresses don't match:
+Address in ROM is 1c:63:49:07:f5:13
+Address in environment is 00:14:2d:e3:9f:f8
+eth0: ethernet@8000000port@1 [PRIME]
+Warning: ethernet@8000000port@2 MAC addresses don't match:
+Address in ROM is 1c:63:49:07:f5:13
+Address in environment is 00:14:2d:f3:9f:f8
+, eth1: ethernet@8000000port@2
+Hit any key to stop autoboot: 0
+Verdin AM62 #