blob: 6ae35b3fee36740acfc28080271deac2ddc637d9 [file] [log] [blame]
Roger Quadroscd87b1e2023-08-05 11:14:39 +03001.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2.. sectionauthor:: Nishanth Menon <nm@ti.com>
3
4AM64 Platforms
5==============
6
7Introduction:
8-------------
9The AM642 SoC belongs to the K3 Multicore SoC architecture platform,
10providing advanced system integration to enable applications such as
11Motor Drives, PLC, Remote IO and IoT Gateways.
12
13Some highlights of this SoC are:
14
15* Dual Cortex-A53s in a single cluster, two clusters of dual Cortex-R5F
16 MCUs, and a single Cortex-M4F.
17* Two Gigabit Industrial Communication Subsystems (ICSSG).
18* Integrated Ethernet switch supporting up to a total of two external
19 ports.
20* PCIe-GEN2x1L, USB3/USB2, 2xCAN-FD, eMMC and SD, UFS, OSPI memory
21 controller, QSPI, I2C, eCAP/eQEP, ePWM, ADC, among other
22 peripherals.
23* Centralized System Controller for Security, Power, and Resource
24 Management (DMSC).
25
26More details can be found in the Technical Reference Manual:
27 https://www.ti.com/lit/pdf/spruim2
28
29Platform information:
30
31* AM64-EVM: https://www.ti.com/tool/TMDS64EVM
32* AM64-SK: https://www.ti.com/tool/SK-AM64B
33
34Boot Flow:
35----------
36Below is the pictorial representation of boot flow:
37
38.. image:: img/boot_diagram_am64.svg
Nishanth Menon5a536482023-08-22 11:40:58 -050039 :alt: Boot flow diagram
Roger Quadroscd87b1e2023-08-05 11:14:39 +030040
41- Here TIFS acts as master and provides all the critical services. R5/A53
42 requests TIFS to get these services done as shown in the above diagram.
43
44Sources:
45--------
46
47.. include:: k3.rst
48 :start-after: .. k3_rst_include_start_boot_sources
49 :end-before: .. k3_rst_include_end_boot_sources
50
51Build procedure:
52----------------
530. Setup the environment variables:
54
55.. include:: k3.rst
56 :start-after: .. k3_rst_include_start_common_env_vars_desc
57 :end-before: .. k3_rst_include_end_common_env_vars_desc
58
59.. include:: k3.rst
60 :start-after: .. k3_rst_include_start_board_env_vars_desc
61 :end-before: .. k3_rst_include_end_board_env_vars_desc
62
63Set the variables corresponding to this platform:
64
65.. include:: k3.rst
66 :start-after: .. k3_rst_include_start_common_env_vars_defn
67 :end-before: .. k3_rst_include_end_common_env_vars_defn
Nishanth Menonfdd7cb72023-11-02 23:40:26 -050068.. prompt:: bash $
Roger Quadroscd87b1e2023-08-05 11:14:39 +030069
Nishanth Menonfdd7cb72023-11-02 23:40:26 -050070 export UBOOT_CFG_CORTEXR=am64x_evm_r5_defconfig
71 export UBOOT_CFG_CORTEXA=am64x_evm_a53_defconfig
72 export TFA_BOARD=lite
73 # we dont use any extra TFA parameters
74 unset TFA_EXTRA_ARGS
75 export OPTEE_PLATFORM=k3-am64x
76 # we dont use any extra TFA parameters
77 unset OPTEE_EXTRA_ARGS
Roger Quadroscd87b1e2023-08-05 11:14:39 +030078
79.. am64x_evm_rst_include_start_build_steps
80
811. Trusted Firmware-A:
82
83.. include:: k3.rst
84 :start-after: .. k3_rst_include_start_build_steps_tfa
85 :end-before: .. k3_rst_include_end_build_steps_tfa
86
87
882. OP-TEE:
89
90.. include:: k3.rst
91 :start-after: .. k3_rst_include_start_build_steps_optee
92 :end-before: .. k3_rst_include_end_build_steps_optee
93
943. U-Boot:
95
Nishanth Menon1330ef12023-08-22 11:41:03 -050096* 3.1 R5:
Roger Quadroscd87b1e2023-08-05 11:14:39 +030097
98.. include:: k3.rst
99 :start-after: .. k3_rst_include_start_build_steps_spl_r5
100 :end-before: .. k3_rst_include_end_build_steps_spl_r5
101
Nishanth Menon1330ef12023-08-22 11:41:03 -0500102* 3.2 A53:
Roger Quadroscd87b1e2023-08-05 11:14:39 +0300103
104.. include:: k3.rst
105 :start-after: .. k3_rst_include_start_build_steps_uboot
106 :end-before: .. k3_rst_include_end_build_steps_uboot
107.. am64x_evm_rst_include_end_build_steps
108
109Target Images
Heinrich Schuchardtb72160b2023-10-28 11:59:32 +0200110-------------
111
Roger Quadroscd87b1e2023-08-05 11:14:39 +0300112In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
113variant (GP, HS-FS, HS-SE) requires a different source for these files.
114
115 - GP
116
117 * tiboot3-am64x-gp-evm.bin from step 3.1
118 * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2
119
120 - HS-FS
121
122 * tiboot3-am64x-hs-fs-evm.bin from step 3.1
123 * tispl.bin, u-boot.img from step 3.2
124
125 - HS-SE
126
127 * tiboot3-am64x-hs-evm.bin from step 3.1
128 * tispl.bin, u-boot.img from step 3.2
129
130Image formats:
131--------------
132
133- tiboot3.bin
134
135.. image:: img/multi_cert_tiboot3.bin.svg
Nishanth Menon5a536482023-08-22 11:40:58 -0500136 :alt: tiboot3.bin image format
Roger Quadroscd87b1e2023-08-05 11:14:39 +0300137
138- tispl.bin
139
140.. image:: img/nodm_tispl.bin.svg
Nishanth Menon5a536482023-08-22 11:40:58 -0500141 :alt: tispl.bin image format
Roger Quadroscd87b1e2023-08-05 11:14:39 +0300142
143Switch Setting for Boot Mode
144----------------------------
145
146Boot Mode pins provide means to select the boot mode and options before the
147device is powered up. After every POR, they are the main source to populate
148the Boot Parameter Tables.
149
150The following table shows some common boot modes used on AM64 platform. More
151details can be found in the Technical Reference Manual:
152https://www.ti.com/lit/pdf/spruim2 under the `Boot Mode Pins` section.
153
154.. list-table:: Boot Modes for AM64x-EVM
155 :widths: 16 16 16
156 :header-rows: 1
157
158 * - Switch Label
159 - SW2: 12345678
160 - SW3: 12345678
161
162 * - SD/MMC
163 - 11000010
164 - 01000000
165
166 * - xSPI/SFDP (OSPI)
167 - 11001110
168 - 01000000
169
170 * - UART
171 - 11011100
172 - 00000000
173
174.. note ::
175
176 For SW2 and SW3, the switch state in the "ON" position = 1.
177
178.. list-table:: Boot Modes for AM64x-SK
179 :widths: 16 16 16
180 :header-rows: 1
181
182 * - Switch Label
183 - SW2: 12345678
184 - SW3: 12345678
185
186 * - SD/MMC
187 - 00000010
188 - 01000011
189
190 * - xSPI/SFDP (OSPI)
191 - 00000010
192 - 01110011
193
194 * - UART
195 - 00000000
196 - 00111011
197
198.. note ::
199
200 For SW2 and SW3, the switch state in the "ON" position = 1.
201 Boot bits on SK is reversed bits to the bootmode signals