blob: 99bdc0348692ff170e03930e1bf49f311b7dc8dc [file] [log] [blame]
Bryan Brattlofcf2e2b12024-03-12 15:20:30 -05001.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2.. sectionauthor:: Bryan Brattlof <bb@ti.com>
3
4AM62Px Platforms
5================
6
7The AM62Px is an extension of the existing Sitara AM62x low-cost family
8of application processors built for Automotive and Linux Application
9development. Scalable Arm Cortex-A53 performance and embedded features,
10such as: multi high-definition display support, 3D-graphics
11acceleration, 4K video acceleration, and extensive peripherals make the
12AM62Px well-suited for a broad range of automation and industrial
13application, including automotive digital instrumentation, automotive
14displays, industrial HMI, and more.
15
16Some highlights of AM62P SoC are:
17
18* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster.
19 Dual/Single core variants are provided in the same package to allow HW
20 compatible designs.
21
22* One Device manager Cortex-R5F for system power and resource
23 management, and one Cortex-R5F for Functional Safety or
24 general-purpose usage.
25
26* One 3D GPU up to 50 GLFOPS
27
28* H.264/H.265 Video Encode/Decode.
29
30* Display support: 3x display support over OLDI/LVDS (1x OLDI-DL, 1x or
31 2x OLDI-SL), DSI, or DPI. Up to 3840x1080 @ 60fps resolution
32
33* Integrated Giga-bit Ethernet switch supporting up to a total of two
34 external ports (TSN capable).
35
36* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3xMMC and SD, GPMC for
37 NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio,
38 1xCSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals.
39
40* Dedicated Centralized Hardware Security Module with support for secure
41 boot, debug security and crypto acceleration and trusted execution
42 environment.
43
44* One 32-bit DDR Subsystem that supports LPDDR4, DDR4 memory types.
45
46* Multiple low power modes support, ex: Deep sleep, Standby, MCU-only,
47 enabling battery powered system design.
48
49For those interested, more details about this SoC can be found in the
50Technical Reference Manual here: https://www.ti.com/lit/pdf/spruj83
51
52Boot Flow:
53----------
54
55The bootflow is exactly the same as all SoCs in the am62xxx extended SoC
56family. Below is the pictorial representation:
57
Dhruva Golec6bfa972024-08-05 19:59:34 +053058.. image:: img/boot_diagram_am62.svg
Bryan Brattlofcf2e2b12024-03-12 15:20:30 -050059 :alt: Boot flow diagram
60
61- Here TIFS acts as master and provides all the critical services. R5/A53
62 requests TIFS to get these services done as shown in the above diagram.
63
64Sources:
65--------
66
67.. include:: ../ti/k3.rst
68 :start-after: .. k3_rst_include_start_boot_sources
69 :end-before: .. k3_rst_include_end_boot_sources
70
Dhruva Gole4a395e92024-08-05 19:59:32 +053071.. include:: ../ti/k3.rst
72 :start-after: .. k3_rst_include_start_boot_firmwares
73 :end-before: .. k3_rst_include_end_tifsstub
74
Bryan Brattlofcf2e2b12024-03-12 15:20:30 -050075Build procedure:
76----------------
77
780. Setup the environment variables:
79
80.. include:: ../ti/k3.rst
81 :start-after: .. k3_rst_include_start_common_env_vars_desc
82 :end-before: .. k3_rst_include_end_common_env_vars_desc
83
84.. include:: ../ti/k3.rst
85 :start-after: .. k3_rst_include_start_board_env_vars_desc
86 :end-before: .. k3_rst_include_end_board_env_vars_desc
87
88Set the variables corresponding to this platform:
89
90.. include:: ../ti/k3.rst
91 :start-after: .. k3_rst_include_start_common_env_vars_defn
92 :end-before: .. k3_rst_include_end_common_env_vars_defn
93
94.. code-block:: bash
95
96 $ export UBOOT_CFG_CORTEXR=am62px_evm_r5_defconfig
97 $ export UBOOT_CFG_CORTEXA=am62px_evm_a53_defconfig
98 $ export TFA_BOARD=lite
99 $ # we dont use any extra TFA parameters
100 $ unset TFA_EXTRA_ARGS
101 $ export OPTEE_PLATFORM=k3-am62x
102 $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
103
104.. am62px_evm_rst_include_start_build_steps
105
1061. Trusted Firmware-A:
107
108.. include:: ../ti/k3.rst
109 :start-after: .. k3_rst_include_start_build_steps_tfa
110 :end-before: .. k3_rst_include_end_build_steps_tfa
111
112
1132. OP-TEE:
114
115.. include:: ../ti/k3.rst
116 :start-after: .. k3_rst_include_start_build_steps_optee
117 :end-before: .. k3_rst_include_end_build_steps_optee
118
1193. U-Boot:
120
121* 3.1 R5:
122
123.. include:: ../ti/k3.rst
124 :start-after: .. k3_rst_include_start_build_steps_spl_r5
125 :end-before: .. k3_rst_include_end_build_steps_spl_r5
126
127* 3.2 A53:
128
129.. include:: ../ti/k3.rst
130 :start-after: .. k3_rst_include_start_build_steps_uboot
131 :end-before: .. k3_rst_include_end_build_steps_uboot
132.. am62px_evm_rst_include_end_build_steps
133
134Target Images
135--------------
136
137In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
138variant (HS-FS, HS-SE) requires a different source for these files.
139
140 - HS-FS
141
142 * tiboot3-am62px-hs-fs-evm.bin from step 3.1
143 * tispl.bin, u-boot.img from step 3.2
144
145 - HS-SE
146
147 * tiboot3-am62px-hs-evm.bin from step 3.1
148 * tispl.bin, u-boot.img from step 3.2
149
150Image formats:
151--------------
152
153- tiboot3.bin
154
155.. image:: img/multi_cert_tiboot3.bin.svg
156 :alt: tiboot3.bin image format
157
158- tispl.bin
159
Dhruva Golec6bfa972024-08-05 19:59:34 +0530160.. image:: img/tifsstub_dm_tispl.bin.svg
Bryan Brattlofcf2e2b12024-03-12 15:20:30 -0500161 :alt: tispl.bin image format
162
Jonathan Humphreysf4c161f2024-06-14 11:35:45 -0500163OSPI:
164-----
165ROM supports booting from OSPI from offset 0x0.
166
167Flashing images to OSPI:
168
169Below commands can be used to download tiboot3.bin, tispl.bin, and u-boot.img,
170over tftp and then flash those to OSPI at their respective addresses.
171
172.. prompt:: bash =>
173
174 sf probe
175 tftp ${loadaddr} tiboot3.bin
176 sf update $loadaddr 0x0 $filesize
177 tftp ${loadaddr} tispl.bin
178 sf update $loadaddr 0x80000 $filesize
179 tftp ${loadaddr} u-boot.img
180 sf update $loadaddr 0x280000 $filesize
181
182Flash layout for OSPI:
183
184.. image:: img/ospi_sysfw2.svg
185 :alt: OSPI flash partition layout
186
Bryan Brattlofcf2e2b12024-03-12 15:20:30 -0500187A53 SPL DDR Memory Layout
188-------------------------
189
190.. am62px_evm_rst_include_start_ddr_mem_layout
191
192This provides an overview memory usage in A53 SPL stage.
193
194.. list-table::
195 :widths: 16 16 16
196 :header-rows: 1
197
198 * - Region
199 - Start Address
200 - End Address
201
202 * - EMPTY
203 - 0x80000000
204 - 0x80080000
205
206 * - TEXT BASE
207 - 0x80080000
208 - 0x800d8000
209
210 * - EMPTY
211 - 0x800d8000
212 - 0x80200000
213
214 * - BMP IMAGE
215 - 0x80200000
216 - 0x80b77660
217
218 * - STACK
219 - 0x80b77660
220 - 0x80b77e60
221
222 * - GD
223 - 0x80b77e60
224 - 0x80b78000
225
226 * - MALLOC
227 - 0x80b78000
228 - 0x80b80000
229
230 * - EMPTY
231 - 0x80b80000
232 - 0x80c80000
233
234 * - BSS
235 - 0x80c80000
236 - 0x80d00000
237
238 * - BLOBS
239 - 0x80d00000
240 - 0x80d00400
241
242 * - EMPTY
243 - 0x80d00400
244 - 0x81000000
245.. am62px_evm_rst_include_end_ddr_mem_layout
246
247Switch Setting for Boot Mode
248----------------------------
249
250Boot Mode pins provide means to select the boot mode and options before the
251device is powered up. After every POR, they are the main source to populate
252the Boot Parameter Tables.
253
254The following table shows some common boot modes used on AM62Px
255platforms. More details can be found in the Technical Reference Manual:
256https://www.ti.com/lit/pdf/spruj83 under the `Boot Mode Pins` section.
257
258.. note::
259
260 This device is very new. Currently only UART boot is available while
261 we continue to add support for the other bootmodes.
262
263.. list-table:: Boot Modes
264 :widths: 16 16 16
265 :header-rows: 1
266
267 * - Switch Label
268 - SW2: 12345678
269 - SW3: 12345678
270
271 * - SD
272 - 01000000
273 - 11000010
274
275 * - OSPI
276 - 00000000
277 - 11001110
278
279 * - EMMC
280 - 00000000
281 - 11010010
282
283 * - UART
284 - 00000000
285 - 11011100
286
287 * - USB DFU
288 - 00000000
289 - 11001010
290
291For SW2 and SW1, the switch state in the "ON" position = 1.
292
293Debugging U-Boot
294----------------
295
296See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
297detailed setup information.
298
299.. warning::
300
301 **OpenOCD support after**: v0.12.0
302
303 While support for the entire K3 generation including the am62xxx
304 extended family was added before v0.12.0, the tcl scripts for the
305 am62px have been accepted and will be available in the next release of
306 OpenOCD. It may be necessary to build OpenOCD from source depending on
307 the version your distribution has packaged.
308
309.. include:: k3.rst
310 :start-after: .. k3_rst_include_start_openocd_connect_XDS110
311 :end-before: .. k3_rst_include_end_openocd_connect_XDS110
312
313To start OpenOCD and connect to the board
314
315.. code-block:: bash
316
317 openocd -f board/ti_am62pevm.cfg