blob: b12dc85f06b50a80e657f17b0a325863d51dcba4 [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
Bryan Brattlof0820e112022-12-19 14:29:49 -06004AM62 Platforms
Heinrich Schuchardtb214e882023-10-28 11:59:32 +02005==============
Vignesh Raghavendrae16aac32022-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 Menon08df7462023-07-27 13:59:00 -050041Platform information:
42
43* https://www.ti.com/tool/SK-AM62B
44
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +053045Boot Flow:
46----------
47Below is the pictorial representation of boot flow:
48
Nishanth Menon68b3baa2023-07-27 13:58:45 -050049.. image:: img/boot_diagram_k3_current.svg
Heinrich Schuchardtf5a578e2023-08-22 11:40:57 -050050 :alt: Boot flow diagram
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +053051
52- Here TIFS acts as master and provides all the critical services. R5/A53
53 requests TIFS to get these services done as shown in the above diagram.
54
55Sources:
56--------
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +053057
Marcel Ziswiler7d1a1062023-08-04 12:08:08 +020058.. include:: ../ti/k3.rst
Nishanth Menoncce3e7a2023-07-27 13:58:44 -050059 :start-after: .. k3_rst_include_start_boot_sources
60 :end-before: .. k3_rst_include_end_boot_sources
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +053061
62Build procedure:
63----------------
Nishanth Menonc727b812023-07-27 13:58:48 -0500640. Setup the environment variables:
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +053065
Marcel Ziswiler7d1a1062023-08-04 12:08:08 +020066.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -050067 :start-after: .. k3_rst_include_start_common_env_vars_desc
68 :end-before: .. k3_rst_include_end_common_env_vars_desc
69
Marcel Ziswiler7d1a1062023-08-04 12:08:08 +020070.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -050071 :start-after: .. k3_rst_include_start_board_env_vars_desc
72 :end-before: .. k3_rst_include_end_board_env_vars_desc
73
74Set the variables corresponding to this platform:
75
Marcel Ziswiler7d1a1062023-08-04 12:08:08 +020076.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -050077 :start-after: .. k3_rst_include_start_common_env_vars_defn
78 :end-before: .. k3_rst_include_end_common_env_vars_defn
Nishanth Menonca845d22023-11-02 23:40:26 -050079.. prompt:: bash $
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +053080
Nishanth Menonca845d22023-11-02 23:40:26 -050081 export UBOOT_CFG_CORTEXR=am62x_evm_r5_defconfig
82 export UBOOT_CFG_CORTEXA=am62x_evm_a53_defconfig
83 export TFA_BOARD=lite
84 # we dont use any extra TFA parameters
85 unset TFA_EXTRA_ARGS
86 export OPTEE_PLATFORM=k3-am62x
87 export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
Nishanth Menonc727b812023-07-27 13:58:48 -050088
89.. am62x_evm_rst_include_start_build_steps
90
911. Trusted Firmware-A:
92
Marcel Ziswiler7d1a1062023-08-04 12:08:08 +020093.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -050094 :start-after: .. k3_rst_include_start_build_steps_tfa
95 :end-before: .. k3_rst_include_end_build_steps_tfa
96
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +053097
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530982. OP-TEE:
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +053099
Marcel Ziswiler7d1a1062023-08-04 12:08:08 +0200100.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -0500101 :start-after: .. k3_rst_include_start_build_steps_optee
102 :end-before: .. k3_rst_include_end_build_steps_optee
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +0530103
1043. U-Boot:
105
Nishanth Menonbfffc812023-08-22 11:41:02 -0500106* 3.1 R5:
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +0530107
Marcel Ziswiler7d1a1062023-08-04 12:08:08 +0200108.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -0500109 :start-after: .. k3_rst_include_start_build_steps_spl_r5
110 :end-before: .. k3_rst_include_end_build_steps_spl_r5
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +0530111
Nishanth Menonbfffc812023-08-22 11:41:02 -0500112* 3.2 A53:
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +0530113
Marcel Ziswiler7d1a1062023-08-04 12:08:08 +0200114.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -0500115 :start-after: .. k3_rst_include_start_build_steps_uboot
116 :end-before: .. k3_rst_include_end_build_steps_uboot
117.. am62x_evm_rst_include_end_build_steps
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +0530118
119Target Images
Heinrich Schuchardtb214e882023-10-28 11:59:32 +0200120-------------
121
Tom Rinif687c8f2023-07-25 12:44:16 -0400122In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
123variant (GP, HS-FS, HS-SE) requires a different source for these files.
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530124
125 - GP
126
127 * tiboot3-am62x-gp-evm.bin from step 3.1
128 * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2
129
130 - HS-FS
131
132 * tiboot3-am62x-hs-fs-evm.bin from step 3.1
133 * tispl.bin, u-boot.img from step 3.2
134
135 - HS-SE
136
137 * tiboot3-am62x-hs-evm.bin from step 3.1
138 * tispl.bin, u-boot.img from step 3.2
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +0530139
140Image formats:
141--------------
142
Nishanth Menon34f76922023-07-27 13:58:52 -0500143- tiboot3.bin
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +0530144
Nishanth Menon34f76922023-07-27 13:58:52 -0500145.. image:: img/multi_cert_tiboot3.bin.svg
Heinrich Schuchardtf5a578e2023-08-22 11:40:57 -0500146 :alt: tiboot3.bin image format
Vignesh Raghavendrae16aac32022-05-25 13:38:50 +0530147
148- tispl.bin
149
Nishanth Menon34f76922023-07-27 13:58:52 -0500150.. image:: img/dm_tispl.bin.svg
Heinrich Schuchardtf5a578e2023-08-22 11:40:57 -0500151 :alt: tispl.bin image format
Judith Mendez354c05f2023-03-31 15:36:15 -0500152
Nikhil M Jaina72532f2023-07-18 14:27:35 +0530153A53 SPL DDR Memory Layout
154-------------------------
155
Nishanth Menond7c3ca92023-07-27 13:58:53 -0500156.. am62x_evm_rst_include_start_ddr_mem_layout
157
Nikhil M Jaina72532f2023-07-18 14:27:35 +0530158This provides an overview memory usage in A53 SPL stage.
159
160.. list-table::
161 :widths: 16 16 16
162 :header-rows: 1
163
164 * - Region
165 - Start Address
166 - End Address
167
168 * - EMPTY
169 - 0x80000000
170 - 0x80080000
171
172 * - TEXT BASE
173 - 0x80080000
174 - 0x800d8000
175
176 * - EMPTY
177 - 0x800d8000
178 - 0x80200000
179
180 * - BMP IMAGE
181 - 0x80200000
182 - 0x80b77660
183
184 * - STACK
185 - 0x80b77660
186 - 0x80b77e60
187
188 * - GD
189 - 0x80b77e60
190 - 0x80b78000
191
192 * - MALLOC
193 - 0x80b78000
194 - 0x80b80000
195
196 * - EMPTY
197 - 0x80b80000
198 - 0x80c80000
199
200 * - BSS
201 - 0x80c80000
202 - 0x80d00000
203
204 * - BLOBS
205 - 0x80d00000
206 - 0x80d00400
207
208 * - EMPTY
209 - 0x80d00400
210 - 0x81000000
Nishanth Menond7c3ca92023-07-27 13:58:53 -0500211.. am62x_evm_rst_include_end_ddr_mem_layout
Nikhil M Jaina72532f2023-07-18 14:27:35 +0530212
Judith Mendez354c05f2023-03-31 15:36:15 -0500213Switch Setting for Boot Mode
214----------------------------
215
216Boot Mode pins provide means to select the boot mode and options before the
217device is powered up. After every POR, they are the main source to populate
218the Boot Parameter Tables.
219
220The following table shows some common boot modes used on AM62 platform. More
221details can be found in the Technical Reference Manual:
222https://www.ti.com/lit/pdf/spruiv7 under the `Boot Mode Pins` section.
223
Nishanth Menon36ed8fb2023-07-27 13:58:54 -0500224.. list-table:: Boot Modes
225 :widths: 16 16 16
226 :header-rows: 1
Judith Mendez354c05f2023-03-31 15:36:15 -0500227
Nishanth Menon36ed8fb2023-07-27 13:58:54 -0500228 * - Switch Label
229 - SW2: 12345678
230 - SW3: 12345678
231
232 * - SD
233 - 01000000
234 - 11000010
235
236 * - OSPI
237 - 00000000
238 - 11001110
239
240 * - EMMC
241 - 00000000
242 - 11010010
243
244 * - UART
245 - 00000000
246 - 11011100
247
248 * - USB DFU
249 - 00000000
250 - 11001010
Judith Mendez354c05f2023-03-31 15:36:15 -0500251
252For SW2 and SW1, the switch state in the "ON" position = 1.
Jason Kacineseffe5082023-08-03 01:29:22 -0500253
254Debugging U-Boot
255----------------
256
257See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
258detailed setup information.
259
260.. warning::
261
262 **OpenOCD support since**: v0.12.0
263
264 If the default package version of OpenOCD in your development
265 environment's distribution needs to be updated, it might be necessary to
266 build OpenOCD from the source.
267
268.. include:: k3.rst
269 :start-after: .. k3_rst_include_start_openocd_connect_XDS110
270 :end-before: .. k3_rst_include_end_openocd_connect_XDS110
271
272To start OpenOCD and connect to the board
273
Nishanth Menonca845d22023-11-02 23:40:26 -0500274.. prompt:: bash $
Jason Kacineseffe5082023-08-03 01:29:22 -0500275
276 openocd -f board/ti_am625evm.cfg