blob: db27461cb14df6515f02c221f5eedfc763d62e35 [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
68.. code-block:: bash
69
70 $ 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
78
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
110--------------
111In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
112variant (GP, HS-FS, HS-SE) requires a different source for these files.
113
114 - GP
115
116 * tiboot3-am64x-gp-evm.bin from step 3.1
117 * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2
118
119 - HS-FS
120
121 * tiboot3-am64x-hs-fs-evm.bin from step 3.1
122 * tispl.bin, u-boot.img from step 3.2
123
124 - HS-SE
125
126 * tiboot3-am64x-hs-evm.bin from step 3.1
127 * tispl.bin, u-boot.img from step 3.2
128
129Image formats:
130--------------
131
132- tiboot3.bin
133
134.. image:: img/multi_cert_tiboot3.bin.svg
Nishanth Menon5a536482023-08-22 11:40:58 -0500135 :alt: tiboot3.bin image format
Roger Quadroscd87b1e2023-08-05 11:14:39 +0300136
137- tispl.bin
138
139.. image:: img/nodm_tispl.bin.svg
Nishanth Menon5a536482023-08-22 11:40:58 -0500140 :alt: tispl.bin image format
Roger Quadroscd87b1e2023-08-05 11:14:39 +0300141
142Switch Setting for Boot Mode
143----------------------------
144
145Boot Mode pins provide means to select the boot mode and options before the
146device is powered up. After every POR, they are the main source to populate
147the Boot Parameter Tables.
148
149The following table shows some common boot modes used on AM64 platform. More
150details can be found in the Technical Reference Manual:
151https://www.ti.com/lit/pdf/spruim2 under the `Boot Mode Pins` section.
152
153.. list-table:: Boot Modes for AM64x-EVM
154 :widths: 16 16 16
155 :header-rows: 1
156
157 * - Switch Label
158 - SW2: 12345678
159 - SW3: 12345678
160
161 * - SD/MMC
162 - 11000010
163 - 01000000
164
165 * - xSPI/SFDP (OSPI)
166 - 11001110
167 - 01000000
168
169 * - UART
170 - 11011100
171 - 00000000
172
173.. note ::
174
175 For SW2 and SW3, the switch state in the "ON" position = 1.
176
177.. list-table:: Boot Modes for AM64x-SK
178 :widths: 16 16 16
179 :header-rows: 1
180
181 * - Switch Label
182 - SW2: 12345678
183 - SW3: 12345678
184
185 * - SD/MMC
186 - 00000010
187 - 01000011
188
189 * - xSPI/SFDP (OSPI)
190 - 00000010
191 - 01110011
192
193 * - UART
194 - 00000000
195 - 00111011
196
197.. note ::
198
199 For SW2 and SW3, the switch state in the "ON" position = 1.
200 Boot bits on SK is reversed bits to the bootmode signals