blob: a482f52ce866da173ceb88f0b55c13aed622f6ee [file] [log] [blame]
Vignesh Raghavendra25205462022-05-25 13:38:50 +05301.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2.. sectionauthor:: Vignesh Raghavendra <vigneshr@ti.com>
3
Bryan Brattlof10d3f172022-12-19 14:29:49 -06004AM62 Platforms
5===============
Vignesh Raghavendra25205462022-05-25 13:38:50 +05306
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
Nishanth Menonb47c9f72023-07-27 13:58:45 -050045.. image:: img/boot_diagram_k3_current.svg
Vignesh Raghavendra25205462022-05-25 13:38:50 +053046
47- Here TIFS acts as master and provides all the critical services. R5/A53
48 requests TIFS to get these services done as shown in the above diagram.
49
50Sources:
51--------
Vignesh Raghavendra25205462022-05-25 13:38:50 +053052
Nishanth Menonee91e482023-07-27 13:58:44 -050053.. include:: k3.rst
54 :start-after: .. k3_rst_include_start_boot_sources
55 :end-before: .. k3_rst_include_end_boot_sources
Vignesh Raghavendra25205462022-05-25 13:38:50 +053056
57Build procedure:
58----------------
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500590. Setup the environment variables:
Vignesh Raghavendra25205462022-05-25 13:38:50 +053060
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050061.. include:: k3.rst
62 :start-after: .. k3_rst_include_start_common_env_vars_desc
63 :end-before: .. k3_rst_include_end_common_env_vars_desc
Vignesh Raghavendra25205462022-05-25 13:38:50 +053064
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050065.. include:: k3.rst
66 :start-after: .. k3_rst_include_start_board_env_vars_desc
67 :end-before: .. k3_rst_include_end_board_env_vars_desc
Vignesh Raghavendra25205462022-05-25 13:38:50 +053068
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050069Set the variables corresponding to this platform:
Vignesh Raghavendra25205462022-05-25 13:38:50 +053070
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050071.. include:: k3.rst
72 :start-after: .. k3_rst_include_start_common_env_vars_defn
73 :end-before: .. k3_rst_include_end_common_env_vars_defn
Neha Malcom Francis507be122023-07-22 00:14:43 +053074.. code-block:: bash
Vignesh Raghavendra25205462022-05-25 13:38:50 +053075
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050076 $ export UBOOT_CFG_CORTEXR=am62x_evm_r5_defconfig
77 $ export UBOOT_CFG_CORTEXA=am62x_evm_a53_defconfig
78 $ export TFA_BOARD=lite
79 $ # we dont use any extra TFA parameters
80 $ unset TFA_EXTRA_ARGS
81 $ export OPTEE_PLATFORM=k3-am62x
82 $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
Vignesh Raghavendra25205462022-05-25 13:38:50 +053083
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050084.. am62x_evm_rst_include_start_build_steps
Vignesh Raghavendra25205462022-05-25 13:38:50 +053085
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500861. Trusted Firmware-A:
Vignesh Raghavendra25205462022-05-25 13:38:50 +053087
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050088.. include:: k3.rst
89 :start-after: .. k3_rst_include_start_build_steps_tfa
90 :end-before: .. k3_rst_include_end_build_steps_tfa
Vignesh Raghavendra25205462022-05-25 13:38:50 +053091
Vignesh Raghavendra25205462022-05-25 13:38:50 +053092
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500932. OP-TEE:
Vignesh Raghavendra25205462022-05-25 13:38:50 +053094
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050095.. include:: k3.rst
96 :start-after: .. k3_rst_include_start_build_steps_optee
97 :end-before: .. k3_rst_include_end_build_steps_optee
98
993. U-Boot:
100
101* 4.1 R5:
102
103.. include:: k3.rst
104 :start-after: .. k3_rst_include_start_build_steps_spl_r5
105 :end-before: .. k3_rst_include_end_build_steps_spl_r5
106
107* 4.2 A53:
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530108
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500109.. include:: k3.rst
110 :start-after: .. k3_rst_include_start_build_steps_uboot
111 :end-before: .. k3_rst_include_end_build_steps_uboot
112.. am62x_evm_rst_include_end_build_steps
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530113
114Target Images
115--------------
Tom Rinifdf45032023-07-25 12:44:16 -0400116In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
117variant (GP, HS-FS, HS-SE) requires a different source for these files.
Neha Malcom Francis507be122023-07-22 00:14:43 +0530118
119 - GP
120
121 * tiboot3-am62x-gp-evm.bin from step 3.1
122 * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2
123
124 - HS-FS
125
126 * tiboot3-am62x-hs-fs-evm.bin from step 3.1
127 * tispl.bin, u-boot.img from step 3.2
128
129 - HS-SE
130
131 * tiboot3-am62x-hs-evm.bin from step 3.1
132 * tispl.bin, u-boot.img from step 3.2
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530133
134Image formats:
135--------------
136
Nishanth Menon96a5f182023-07-27 13:58:52 -0500137- tiboot3.bin
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530138
Nishanth Menon96a5f182023-07-27 13:58:52 -0500139.. image:: img/multi_cert_tiboot3.bin.svg
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530140
141- tispl.bin
142
Nishanth Menon96a5f182023-07-27 13:58:52 -0500143.. image:: img/dm_tispl.bin.svg
Judith Mendez964f9722023-03-31 15:36:15 -0500144
Nikhil M Jaina9b12042023-07-18 14:27:35 +0530145A53 SPL DDR Memory Layout
146-------------------------
147
148This provides an overview memory usage in A53 SPL stage.
149
150.. list-table::
151 :widths: 16 16 16
152 :header-rows: 1
153
154 * - Region
155 - Start Address
156 - End Address
157
158 * - EMPTY
159 - 0x80000000
160 - 0x80080000
161
162 * - TEXT BASE
163 - 0x80080000
164 - 0x800d8000
165
166 * - EMPTY
167 - 0x800d8000
168 - 0x80200000
169
170 * - BMP IMAGE
171 - 0x80200000
172 - 0x80b77660
173
174 * - STACK
175 - 0x80b77660
176 - 0x80b77e60
177
178 * - GD
179 - 0x80b77e60
180 - 0x80b78000
181
182 * - MALLOC
183 - 0x80b78000
184 - 0x80b80000
185
186 * - EMPTY
187 - 0x80b80000
188 - 0x80c80000
189
190 * - BSS
191 - 0x80c80000
192 - 0x80d00000
193
194 * - BLOBS
195 - 0x80d00000
196 - 0x80d00400
197
198 * - EMPTY
199 - 0x80d00400
200 - 0x81000000
201
Judith Mendez964f9722023-03-31 15:36:15 -0500202Switch Setting for Boot Mode
203----------------------------
204
205Boot Mode pins provide means to select the boot mode and options before the
206device is powered up. After every POR, they are the main source to populate
207the Boot Parameter Tables.
208
209The following table shows some common boot modes used on AM62 platform. More
210details can be found in the Technical Reference Manual:
211https://www.ti.com/lit/pdf/spruiv7 under the `Boot Mode Pins` section.
212
213*Boot Modes*
214
215============ ============= =============
216Switch Label SW2: 12345678 SW3: 12345678
217============ ============= =============
218SD 01000000 11000010
219OSPI 00000000 11001110
220EMMC 00000000 11010010
221UART 00000000 11011100
222USB DFU 00000000 11001010
223============ ============= =============
224
225For SW2 and SW1, the switch state in the "ON" position = 1.