blob: 4e68c2018a50bb1cfea91259c6142ea8668638dd [file] [log] [blame]
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +05301.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2.. sectionauthor:: Vignesh Raghavendra <vigneshr@ti.com>
3
4Texas Instruments AM62 Platforms
5================================
6
7Introduction:
8-------------
9The AM62 SoC family is the follow on AM335x built on the K3 Multicore
10SoC architecture platform, providing ultra-low-power modes, dual
11display, multi-sensor edge compute, security and other BOM-saving
12integrations. The AM62 SoC targets a broad market to enable
13applications such as Industrial HMI, PLC/CNC/Robot control, Medical
14Equipment, Building Automation, Appliances and more.
15
16Some highlights of this SoC are:
17
18* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster.
19 Pin-to-pin compatible options for single and quad core are available.
20* Cortex-M4F for general-purpose or safety usage.
21* Dual display support, providing 24-bit RBG parallel interface and
22 OLDI/LVDS-4 Lane x2, up to 200MHz pixel clock support for 2K display
23 resolution.
24* Selectable GPU support, up to 8GFLOPS, providing better user experience
25 in 3D graphic display case and Android.
26* PRU(Programmable Realtime Unit) support for customized programmable
27 interfaces/IOs.
28* Integrated Giga-bit Ethernet switch supporting up to a total of two
29 external ports (TSN capable).
30* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3x eMMC and SD, GPMC for
31 NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio,
32 1x CSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals.
33* Dedicated Centralized System Controller for Security, Power, and
34 Resource Management.
35* Multiple low power modes support, ex: Deep sleep, Standby, MCU-only,
36 enabling battery powered system design.
37
38More details can be found in the Technical Reference Manual:
39https://www.ti.com/lit/pdf/spruiv7
40
41Boot Flow:
42----------
43Below is the pictorial representation of boot flow:
44
45.. code-block:: text
46
47 +------------------------------------------------------------------------+
48 | TIFS | Main R5 | A53 |
49 +------------------------------------------------------------------------+
50 | +--------+ | | |
51 | | Reset | | | |
52 | +--------+ | | |
53 | : | | |
54 | +--------+ | +-----------+ | |
55 | | *ROM* |----------|-->| Reset rls | | |
56 | +--------+ | +-----------+ | |
57 | | | | : | |
58 | | ROM | | : | |
59 | |services| | : | |
60 | | | | +-------------+ | |
61 | | | | | *R5 ROM* | | |
62 | | | | +-------------+ | |
63 | | |<---------|---|Load and auth| | |
64 | | | | | tiboot3.bin | | |
65 | +--------+ | +-------------+ | |
66 | | |<---------|---| Load sysfw | | |
67 | | | | | part to TIFS| | |
68 | | | | | core | | |
69 | | | | +-------------+ | |
70 | | | | : | |
71 | | | | : | |
72 | | | | : | |
73 | | | | +-------------+ | |
74 | | | | | *R5 SPL* | | |
75 | | | | +-------------+ | |
76 | | | | | DDR | | |
77 | | | | | config | | |
78 | | | | +-------------+ | |
79 | | | | | Load | | |
80 | | | | | tispl.bin | | |
81 | | | | +-------------+ | |
82 | | | | | Load R5 | | |
83 | | | | | firmware | | |
84 | | | | +-------------+ | |
85 | | |<---------|---| Start A53 | | |
86 | | | | | and jump to | | |
87 | | | | | DM fw image | | |
88 | | | | +-------------+ | |
89 | | | | | +-----------+ |
90 | | |----------|-----------------------|---->| Reset rls | |
91 | | | | | +-----------+ |
92 | | TIFS | | | : |
93 | |Services| | | +-----------+ |
94 | | |<---------|-----------------------|---->|*ATF/OPTEE*| |
95 | | | | | +-----------+ |
96 | | | | | : |
97 | | | | | +-----------+ |
98 | | |<---------|-----------------------|---->| *A53 SPL* | |
99 | | | | | +-----------+ |
100 | | | | | | Load | |
101 | | | | | | u-boot.img| |
102 | | | | | +-----------+ |
103 | | | | | : |
104 | | | | | +-----------+ |
105 | | |<---------|-----------------------|---->| *U-Boot* | |
106 | | | | | +-----------+ |
107 | | | | | | prompt | |
108 | | |----------|-----------------------|-----+-----------+-----|
109 | +--------+ | | |
110 | | | |
111 +------------------------------------------------------------------------+
112
113- Here TIFS acts as master and provides all the critical services. R5/A53
114 requests TIFS to get these services done as shown in the above diagram.
115
116Sources:
117--------
1181. SYSFW:
119 Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git
120 Branch: master
121
1222. ATF:
123 Tree: https://github.com/ARM-software/arm-trusted-firmware.git
124 Branch: master
125
1263. OPTEE:
127 Tree: https://github.com/OP-TEE/optee_os.git
128 Branch: master
129
1304. U-Boot:
131 Tree: https://source.denx.de/u-boot/u-boot
132 Branch: master
133
1345. TI Linux Firmware:
135 Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git
136 Branch: ti-linux-firmware
137
138Build procedure:
139----------------
1401. ATF:
141
142.. code-block:: text
143
144 $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=lite SPD=opteed
145
1462. OPTEE:
147
148.. code-block:: text
149
150 $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- CROSS_COMPILE64=aarch64-none-linux-gnu-
151
1523. U-Boot:
153
154* 3.1 R5:
155
156.. code-block:: text
157
158 $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig O=/tmp/r5
159 $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5
160 $ cd <k3-image-gen>
161 $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=<path to ti-linux-firmware>/ti-sysfw/ti-fs-firmware-am62x-gp.bin
162
163Use the tiboot3.bin generated from last command
164
165* 3.2 A53:
166
167.. code-block:: text
168
169 $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig O=/tmp/a53
170 $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=<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 DM=<path to ti-linux-firmware>/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53
171
172Target Images
173--------------
174Copy the below images to an SD card and boot:
175 - tiboot3.bin from step 3.1
176 - tispl.bin, u-boot.img from 3.2
177
178Image formats:
179--------------
180
181- tiboot3.bin:
182
183.. code-block:: text
184
185 +-----------------------+
186 | X.509 |
187 | Certificate |
188 | +-------------------+ |
189 | | | |
190 | | R5 | |
191 | | u-boot-spl.bin | |
192 | | | |
193 | +-------------------+ |
194 | | | |
195 | |TIFS with board cfg| |
196 | | | |
197 | +-------------------+ |
198 | | | |
199 | | | |
200 | | FIT header | |
201 | | +---------------+ | |
202 | | | | | |
203 | | | DTB 1...N | | |
204 | | +---------------+ | |
205 | +-------------------+ |
206 +-----------------------+
207
208- tispl.bin
209
210.. code-block:: text
211
212 +-----------------------+
213 | |
214 | FIT HEADER |
215 | +-------------------+ |
216 | | | |
217 | | A53 ATF | |
218 | +-------------------+ |
219 | | | |
220 | | A53 OPTEE | |
221 | +-------------------+ |
222 | | | |
223 | | R5 DM FW | |
224 | +-------------------+ |
225 | | | |
226 | | A53 SPL | |
227 | +-------------------+ |
228 | | | |
229 | | SPL DTB 1...N | |
230 | +-------------------+ |
231 +-----------------------+