summaryrefslogtreecommitdiff
path: root/doc/board/toradex/verdin-am62.rst
blob: 666f0cc1ec91b12c3a9e7846c6dd545c4d952d7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
.. 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
    $ make BINMAN_INDIRS=<path/to/ti-linux-firmware>

Build U-Boot for A53
--------------------

.. code-block:: bash

    $ export ARCH=arm64
    $ export CROSS_COMPILE=aarch64-none-linux-gnu-
    $ make verdin-am62_a53_defconfig
    $ make BL31=<path to ATF dir>/build/k3/lite/release/bl31.bin \
        TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin \
        BINMAN_INDIRS=<path/to/ti-linux-firmware>

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 #