blob: 637985cb096e5ccb226af3cc8964e5ba5458b5fb [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
Nishanth Menon4981d9a2023-07-27 13:59:00 -050041Platform information:
42
43* https://www.ti.com/tool/SK-AM62B
44
Vignesh Raghavendra25205462022-05-25 13:38:50 +053045Boot Flow:
46----------
47Below is the pictorial representation of boot flow:
48
Nishanth Menonb47c9f72023-07-27 13:58:45 -050049.. image:: img/boot_diagram_k3_current.svg
Vignesh Raghavendra25205462022-05-25 13:38:50 +053050
51- Here TIFS acts as master and provides all the critical services. R5/A53
52 requests TIFS to get these services done as shown in the above diagram.
53
54Sources:
55--------
Vignesh Raghavendra25205462022-05-25 13:38:50 +053056
Nishanth Menonee91e482023-07-27 13:58:44 -050057.. include:: k3.rst
58 :start-after: .. k3_rst_include_start_boot_sources
59 :end-before: .. k3_rst_include_end_boot_sources
Vignesh Raghavendra25205462022-05-25 13:38:50 +053060
61Build procedure:
62----------------
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500630. Setup the environment variables:
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_common_env_vars_desc
67 :end-before: .. k3_rst_include_end_common_env_vars_desc
Vignesh Raghavendra25205462022-05-25 13:38:50 +053068
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050069.. include:: k3.rst
70 :start-after: .. k3_rst_include_start_board_env_vars_desc
71 :end-before: .. k3_rst_include_end_board_env_vars_desc
Vignesh Raghavendra25205462022-05-25 13:38:50 +053072
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050073Set the variables corresponding to this platform:
Vignesh Raghavendra25205462022-05-25 13:38:50 +053074
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050075.. include:: k3.rst
76 :start-after: .. k3_rst_include_start_common_env_vars_defn
77 :end-before: .. k3_rst_include_end_common_env_vars_defn
Neha Malcom Francis507be122023-07-22 00:14:43 +053078.. code-block:: bash
Vignesh Raghavendra25205462022-05-25 13:38:50 +053079
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050080 $ export UBOOT_CFG_CORTEXR=am62x_evm_r5_defconfig
81 $ export UBOOT_CFG_CORTEXA=am62x_evm_a53_defconfig
82 $ export TFA_BOARD=lite
83 $ # we dont use any extra TFA parameters
84 $ unset TFA_EXTRA_ARGS
85 $ export OPTEE_PLATFORM=k3-am62x
86 $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
Vignesh Raghavendra25205462022-05-25 13:38:50 +053087
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050088.. am62x_evm_rst_include_start_build_steps
Vignesh Raghavendra25205462022-05-25 13:38:50 +053089
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500901. Trusted Firmware-A:
Vignesh Raghavendra25205462022-05-25 13:38:50 +053091
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050092.. include:: k3.rst
93 :start-after: .. k3_rst_include_start_build_steps_tfa
94 :end-before: .. k3_rst_include_end_build_steps_tfa
Vignesh Raghavendra25205462022-05-25 13:38:50 +053095
Vignesh Raghavendra25205462022-05-25 13:38:50 +053096
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500972. OP-TEE:
Vignesh Raghavendra25205462022-05-25 13:38:50 +053098
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050099.. include:: k3.rst
100 :start-after: .. k3_rst_include_start_build_steps_optee
101 :end-before: .. k3_rst_include_end_build_steps_optee
102
1033. U-Boot:
104
105* 4.1 R5:
106
107.. include:: k3.rst
108 :start-after: .. k3_rst_include_start_build_steps_spl_r5
109 :end-before: .. k3_rst_include_end_build_steps_spl_r5
110
111* 4.2 A53:
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530112
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500113.. include:: k3.rst
114 :start-after: .. k3_rst_include_start_build_steps_uboot
115 :end-before: .. k3_rst_include_end_build_steps_uboot
116.. am62x_evm_rst_include_end_build_steps
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530117
118Target Images
119--------------
Tom Rinifdf45032023-07-25 12:44:16 -0400120In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
121variant (GP, HS-FS, HS-SE) requires a different source for these files.
Neha Malcom Francis507be122023-07-22 00:14:43 +0530122
123 - GP
124
125 * tiboot3-am62x-gp-evm.bin from step 3.1
126 * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2
127
128 - HS-FS
129
130 * tiboot3-am62x-hs-fs-evm.bin from step 3.1
131 * tispl.bin, u-boot.img from step 3.2
132
133 - HS-SE
134
135 * tiboot3-am62x-hs-evm.bin from step 3.1
136 * tispl.bin, u-boot.img from step 3.2
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530137
138Image formats:
139--------------
140
Nishanth Menon96a5f182023-07-27 13:58:52 -0500141- tiboot3.bin
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530142
Nishanth Menon96a5f182023-07-27 13:58:52 -0500143.. image:: img/multi_cert_tiboot3.bin.svg
Vignesh Raghavendra25205462022-05-25 13:38:50 +0530144
145- tispl.bin
146
Nishanth Menon96a5f182023-07-27 13:58:52 -0500147.. image:: img/dm_tispl.bin.svg
Judith Mendez964f9722023-03-31 15:36:15 -0500148
Nikhil M Jaina9b12042023-07-18 14:27:35 +0530149A53 SPL DDR Memory Layout
150-------------------------
151
Nishanth Menon3dc51b92023-07-27 13:58:53 -0500152.. am62x_evm_rst_include_start_ddr_mem_layout
153
Nikhil M Jaina9b12042023-07-18 14:27:35 +0530154This provides an overview memory usage in A53 SPL stage.
155
156.. list-table::
157 :widths: 16 16 16
158 :header-rows: 1
159
160 * - Region
161 - Start Address
162 - End Address
163
164 * - EMPTY
165 - 0x80000000
166 - 0x80080000
167
168 * - TEXT BASE
169 - 0x80080000
170 - 0x800d8000
171
172 * - EMPTY
173 - 0x800d8000
174 - 0x80200000
175
176 * - BMP IMAGE
177 - 0x80200000
178 - 0x80b77660
179
180 * - STACK
181 - 0x80b77660
182 - 0x80b77e60
183
184 * - GD
185 - 0x80b77e60
186 - 0x80b78000
187
188 * - MALLOC
189 - 0x80b78000
190 - 0x80b80000
191
192 * - EMPTY
193 - 0x80b80000
194 - 0x80c80000
195
196 * - BSS
197 - 0x80c80000
198 - 0x80d00000
199
200 * - BLOBS
201 - 0x80d00000
202 - 0x80d00400
203
204 * - EMPTY
205 - 0x80d00400
206 - 0x81000000
Nishanth Menon3dc51b92023-07-27 13:58:53 -0500207.. am62x_evm_rst_include_end_ddr_mem_layout
Nikhil M Jaina9b12042023-07-18 14:27:35 +0530208
Judith Mendez964f9722023-03-31 15:36:15 -0500209Switch Setting for Boot Mode
210----------------------------
211
212Boot Mode pins provide means to select the boot mode and options before the
213device is powered up. After every POR, they are the main source to populate
214the Boot Parameter Tables.
215
216The following table shows some common boot modes used on AM62 platform. More
217details can be found in the Technical Reference Manual:
218https://www.ti.com/lit/pdf/spruiv7 under the `Boot Mode Pins` section.
219
Nishanth Menon5807ae82023-07-27 13:58:54 -0500220.. list-table:: Boot Modes
221 :widths: 16 16 16
222 :header-rows: 1
223
224 * - Switch Label
225 - SW2: 12345678
226 - SW3: 12345678
227
228 * - SD
229 - 01000000
230 - 11000010
231
232 * - OSPI
233 - 00000000
234 - 11001110
235
236 * - EMMC
237 - 00000000
238 - 11010010
239
240 * - UART
241 - 00000000
242 - 11011100
Judith Mendez964f9722023-03-31 15:36:15 -0500243
Nishanth Menon5807ae82023-07-27 13:58:54 -0500244 * - USB DFU
245 - 00000000
246 - 11001010
Judith Mendez964f9722023-03-31 15:36:15 -0500247
248For SW2 and SW1, the switch state in the "ON" position = 1.