blob: 5c4bd2c927d04ba214c1a22e6b809b8a090ce85a [file] [log] [blame]
Apurva Nandan2b1c9ff2024-02-24 01:51:53 +05301.. SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
2.. sectionauthor:: Apurva Nandan <a-nandan@ti.com>
3
4J784S4 and AM69 Platforms
5=========================
6
7Introduction
8------------
9The J784S4 SoC belongs to the K3 Multicore SoC architecture
10platform, providing advanced system integration in automotive,
11ADAS and industrial applications requiring AI at the network edge.
12This SoC extends the K3 Jacinto 7 family of SoCs with focus on
13raising performance and integration while providing interfaces,
14memory architecture and compute performance for multi-sensor, high
15concurrency applications.
16
17The device is partitioned into three functional domains, each containing
18specific processing cores and peripherals:
19
201. Wake-up (WKUP) domain
21 * ARM Cortex-M4F processor, runs TI Foundational Security (TIFS)
22
232. Microcontroller (MCU) domain
24 * Dual core ARM Cortex-R5F processor, runs device management
25 and SoC early boot
26
273. MAIN domain
28 * Two clusters of quad core 64-bit ARM Cortex-A72, runs HLOS
29 * Dual core ARM Cortex-R5F processor used for RTOS applications
30 * Four C7x DSPs used for Machine Learning applications.
31
32
33More info can be found in TRM: http://www.ti.com/lit/zip/spruj52
34
35Platform information:
36
37* https://www.ti.com/tool/J784S4XEVM
38* https://www.ti.com/tool/SK-AM69
39
40Boot Flow
41---------
42Below is the pictorial representation of boot flow:
43
44.. image:: img/boot_diagram_k3_current.svg
45 :alt: K3 boot flow
46
47- On this platform, "TI Foundational Security" (TIFS) functions as the
48 security enclave master. While "Device Manager" (DM), also known as the
49 "TISCI server" in TI terminology, offers all the essential services.
50
51- As illustrated in the diagram above, R5 SPL manages power and clock
52 services independently before handing over control to DM. The A72 or
53 the C7x (Aux core) software components request TIFS/DM to handle
54 security or device management services.
55
56Sources
57-------
58
59.. include:: k3.rst
60 :start-after: .. k3_rst_include_start_boot_sources
61 :end-before: .. k3_rst_include_end_boot_sources
62
63Build procedure
64---------------
650. Setup the environment variables:
66
67.. include:: k3.rst
68 :start-after: .. k3_rst_include_start_common_env_vars_desc
69 :end-before: .. k3_rst_include_end_common_env_vars_desc
70
71.. include:: k3.rst
72 :start-after: .. k3_rst_include_start_board_env_vars_desc
73 :end-before: .. k3_rst_include_end_board_env_vars_desc
74
75Set the variables corresponding to this platform:
76
77.. include:: k3.rst
78 :start-after: .. k3_rst_include_start_common_env_vars_defn
79 :end-before: .. k3_rst_include_end_common_env_vars_defn
80.. code-block:: bash
81
82 $ export UBOOT_CFG_CORTEXR=j784s4_evm_r5_defconfig
83 $ export UBOOT_CFG_CORTEXA=j784s4_evm_a72_defconfig
84 $ export TFA_BOARD=j784s4
85 $ export TFA_EXTRA_ARGS="K3_USART=0x8"
86 $ export OPTEE_PLATFORM=k3-j784s4
87 $ export OPTEE_EXTRA_ARGS="CFG_CONSOLE_UART=0x8"
88
89.. j784s4_evm_rst_include_start_build_steps
90
911. Trusted Firmware-A
92
93.. include:: k3.rst
94 :start-after: .. k3_rst_include_start_build_steps_tfa
95 :end-before: .. k3_rst_include_end_build_steps_tfa
96
97
982. OP-TEE
99
100.. include:: k3.rst
101 :start-after: .. k3_rst_include_start_build_steps_optee
102 :end-before: .. k3_rst_include_end_build_steps_optee
103
1043. U-Boot
105
106.. _j784s4_evm_rst_u_boot_r5:
107
108* 3.1 R5
109
110.. include:: k3.rst
111 :start-after: .. k3_rst_include_start_build_steps_spl_r5
112 :end-before: .. k3_rst_include_end_build_steps_spl_r5
113
114.. _j784s4_evm_rst_u_boot_a72:
115
116* 3.2 A72
117
118.. include:: k3.rst
119 :start-after: .. k3_rst_include_start_build_steps_uboot
120 :end-before: .. k3_rst_include_end_build_steps_uboot
121.. j784s4_evm_rst_include_end_build_steps
122
123Target Images
124-------------
125In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
126variant (GP, HS-FS, HS-SE) requires a different source for these files.
127
128 - GP
129
130 * tiboot3-j784s4-gp-evm.bin from :ref:`step 3.1 <j784s4_evm_rst_u_boot_r5>`
131 * tispl.bin_unsigned, u-boot.img_unsigned from :ref:`step 3.2 <j784s4_evm_rst_u_boot_a72>`
132
133 - HS-FS
134
135 * tiboot3-j784s4-hs-fs-evm.bin from :ref:`step 3.1 <j784s4_evm_rst_u_boot_r5>`
136 * tispl.bin, u-boot.img from :ref:`step 3.2 <j784s4_evm_rst_u_boot_a72>`
137
138 - HS-SE
139
140 * tiboot3-j784s4-hs-evm.bin from :ref:`step 3.1 <j784s4_evm_rst_u_boot_r5>`
141 * tispl.bin, u-boot.img from :ref:`step 3.2 <j784s4_evm_rst_u_boot_a72>`
142
143Image formats
144-------------
145
146- tiboot3.bin
147
148.. image:: img/multi_cert_tiboot3.bin.svg
149 :alt: tiboot3.bin format
150
151- tispl.bin
152
153.. image:: img/dm_tispl.bin.svg
154 :alt: tispl.bin format
155
156R5 Memory Map
157-------------
158
159.. list-table::
160 :widths: 16 16 16
161 :header-rows: 1
162
163 * - Region
164 - Start Address
165 - End Address
166
167 * - SPL
168 - 0x41c00000
169 - 0x41c40000
170
171 * - EMPTY
172 - 0x41c40000
173 - 0x41c61f20
174
175 * - STACK
176 - 0x41c65f20
177 - 0x41c61f20
178
179 * - Global data
180 - 0x41c65f20
181 - 0x41c66000
182
183 * - Heap
184 - 0x41c66000
185 - 0x41c76000
186
187 * - BSS
188 - 0x41c76000
189 - 0x41c80000
190
191 * - DM DATA
192 - 0x41c80000
193 - 0x41c84130
194
195 * - EMPTY
196 - 0x41c84130
197 - 0x41cff9fc
198
199 * - MCU Scratchpad
200 - 0x41cff9fc
201 - 0x41cffbfc
202
203 * - ROM DATA
204 - 0x41cffbfc
205 - 0x41cfffff
206
207Switch Setting for Boot Mode
208----------------------------
209
210Boot Mode pins provide means to select the boot mode and options before the
211device is powered up. After every POR, they are the main source to populate
212the Boot Parameter Tables.
213
214Boot Mode Pins for J784S4-EVM
215^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
216
217The following tables show some common boot modes used on J784S4 EVM platform.
218More details can be found in the Technical Reference Manual:
219http://www.ti.com/lit/zip/spruj52 under the `Boot Mode Pins` section.
220
221.. list-table:: J784S4 EVM Boot Modes
222 :widths: 16 16 16
223 :header-rows: 1
224
225 * - Switch Label
226 - SW11: 12345678
227 - SW7: 12345678
228
229 * - SD
230 - 10000010
231 - 00000000
232
233 * - EMMC
234 - 10000000
235 - 01000000
236
237 * - OSPI
238 - 00000110
239 - 01000000
240
241 * - UART
242 - 00000000
243 - 01110000
244
245For SW7 and SW11, the switch state in the "ON" position = 1.
246
247Boot Mode Pins for AM69-SK
248^^^^^^^^^^^^^^^^^^^^^^^^^^
249
250The following table show some common boot modes used on AM69-SK platform.
251More details can be found in the User Guide for AM69-SK:
252https://www.ti.com/lit/ug/spruj70/spruj70.pdf under the `Bootmode Settings`
253section.
254
255.. list-table:: AM69 SK Boot Modes
256 :widths: 16 16
257 :header-rows: 1
258
259 * - Switch Label
260 - SW2: 1234
261
262 * - SD
263 - 0000
264
265 * - EMMC
266 - 0110
267
268 * - UART
269 - 1010
270
271For SW2, the switch state in the "ON" position = 1.
272
273Debugging U-Boot
274----------------
275
276See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
277detailed setup information.
278
279.. warning::
280
281 **OpenOCD support since**: September 2023 (git master)
282
283 Until the next stable release of OpenOCD is available in your development
284 environment's distribution, it might be necessary to build OpenOCD `from the
285 source <https://github.com/openocd-org/openocd>`_.
286
287Debugging U-Boot on J784S4-EVM and AM69-SK
288^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
289
290.. include:: k3.rst
291 :start-after: .. k3_rst_include_start_openocd_connect_XDS110
292 :end-before: .. k3_rst_include_end_openocd_connect_XDS110
293
294To start OpenOCD and connect to J784S4-EVM or AM69-SK board, use the
295following.
296
297.. code-block:: bash
298
299 openocd -f board/ti_j784s4evm.cfg