blob: e5a1be50c4fa729645f3142655dd7d461be66d68 [file] [log] [blame]
Jayesh Choudhary5e547a72024-06-12 14:41:23 +05301.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2.. sectionauthor:: Jayesh Choudhary <j-choudhary@ti.com>
3
4J722S-EVM Platform
5==================
6
7The J722S is a family of application processors built for Automotive and
8Linux Application development. J722S family of SoCs is a superset of the
9AM62P SoC family and shares similar memory map, thus the nodes are being
10reused from AM62P includes instead of duplicating the definitions.
11
12Some highlights of J722S SoC (in addition to AM62P SoC features) are:
13
14* Two Cortex-R5F for Functional Safety or general-purpose usage and
15 two C7x floating point vector DSP with Matrix Multiply Accelerator
16 for deep learning.
17
18* Vision Processing Accelerator (VPAC) with image signal processor
19 and Depth and Motion Processing Accelerator (DMPAC).
20
21* 7xUARTs, 3xSPI, 5xI2C, 2xUSB2, 2xCAN-FD, 3xMMC and SD, GPMC for
22 NAND/FPGA connection, OSPI memory controller, 5xMcASP for audio,
23 4xCSI-RX for Camera, 1 PCIe Gen3 controller, USB3.0 eCAP/eQEP,
24 ePWM, among other peripherals.
25
26For those interested, more details about this SoC can be found in the
27Technical Reference Manual here: https://www.ti.com/lit/zip/sprujb3
28
29Boot Flow:
30----------
31
32The bootflow is exactly the same as all SoCs in the am62xxx extended SoC
33family. Below is the pictorial representation:
34
35.. image:: img/boot_diagram_k3_current.svg
36 :alt: Boot flow diagram
37
38- Here TIFS acts as master and provides all the critical services. R5/A53
39 requests TIFS to get these services done as shown in the above diagram.
40
41Sources:
42--------
43
44.. include:: ../ti/k3.rst
45 :start-after: .. k3_rst_include_start_boot_sources
46 :end-before: .. k3_rst_include_end_boot_sources
47
Dhruva Gole26e0ddf2024-08-05 19:59:33 +053048.. include:: ../ti/k3.rst
49 :start-after: .. k3_rst_include_start_boot_firmwares
50 :end-before: .. k3_rst_include_end_boot_firmwares
51
Jayesh Choudhary5e547a72024-06-12 14:41:23 +053052Build procedure:
53----------------
54
550. Setup the environment variables:
56
57.. include:: ../ti/k3.rst
58 :start-after: .. k3_rst_include_start_common_env_vars_desc
59 :end-before: .. k3_rst_include_end_common_env_vars_desc
60
61.. include:: ../ti/k3.rst
62 :start-after: .. k3_rst_include_start_board_env_vars_desc
63 :end-before: .. k3_rst_include_end_board_env_vars_desc
64
65Set the variables corresponding to this platform:
66
67.. include:: ../ti/k3.rst
68 :start-after: .. k3_rst_include_start_common_env_vars_defn
69 :end-before: .. k3_rst_include_end_common_env_vars_defn
70
71.. code-block:: bash
72
73 $ export UBOOT_CFG_CORTEXR=j722s_evm_r5_defconfig
74 $ export UBOOT_CFG_CORTEXA=j722s_evm_a53_defconfig
75 $ export TFA_BOARD=lite
76 $ export OPTEE_PLATFORM=k3-am62x
77 $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
78
79.. j722s_evm_rst_include_start_build_steps
80
811. Trusted Firmware-A:
82
83.. include:: ../ti/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:: ../ti/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
96* 3.1 R5:
97
98.. include:: ../ti/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
102* 3.2 A53:
103
104.. include:: ../ti/k3.rst
105 :start-after: .. k3_rst_include_start_build_steps_uboot
106 :end-before: .. k3_rst_include_end_build_steps_uboot
107.. j722s_evm_rst_include_end_build_steps
108
109Target Images
110--------------
111
112In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
113variant (HS-FS, HS-SE) requires a different source for these files.
114
115 - HS-FS
116
117 * tiboot3-j722s-hs-fs-evm.bin from step 3.1
118 * tispl.bin, u-boot.img from step 3.2
119
120 - HS-SE
121
122 * tiboot3-j722s-hs-evm.bin from step 3.1
123 * tispl.bin, u-boot.img from step 3.2
124
125Image formats:
126--------------
127
128- tiboot3.bin
129
130.. image:: img/multi_cert_tiboot3.bin.svg
131 :alt: tiboot3.bin image format
132
133- tispl.bin
134
135.. image:: img/dm_tispl.bin.svg
136 :alt: tispl.bin image format
137
138A53 SPL DDR Memory Layout
139-------------------------
140
141.. j722s_evm_rst_include_start_ddr_mem_layout
142
143This provides an overview memory usage in A53 SPL stage.
144
145.. list-table::
146 :widths: 16 16 16
147 :header-rows: 1
148
149 * - Region
150 - Start Address
151 - End Address
152
153 * - EMPTY
154 - 0x80000000
155 - 0x80080000
156
157 * - TEXT BASE
158 - 0x80080000
159 - 0x800d8000
160
161 * - EMPTY
162 - 0x800d8000
163 - 0x80477660
164
165 * - STACK
166 - 0x80477660
167 - 0x80477e60
168
169 * - GD
170 - 0x80477e60
171 - 0x80478000
172
173 * - MALLOC
174 - 0x80478000
175 - 0x80480000
176
177 * - EMPTY
178 - 0x80480000
179 - 0x80a00000
180
181 * - BSS
182 - 0x80a00000
183 - 0x80a80000
184
185 * - BLOBS
186 - 0x80a80000
187 - 0x80d00400
188
189 * - EMPTY
190 - 0x80d00400
191 - 0x81000000
192.. j722s_evm_rst_include_end_ddr_mem_layout
193
194Switch Setting for Boot Mode
195----------------------------
196
197Boot Mode pins provide means to select the boot mode and options before the
198device is powered up. After every POR, they are the main source to populate
199the Boot Parameter Tables.
200
201The following table shows some common boot modes used on J722S-EVM
202platform. More details can be found in the Technical Reference Manual:
203https://www.ti.com/lit/zip/sprujb3 under the `Boot Mode Pins` section.
204
205.. note::
206
207 This device is very new. Currently only UART boot is available while
208 we continue to add support for the other bootmodes.
209
210.. list-table:: Boot Modes
211 :widths: 16 16 16
212 :header-rows: 1
213
214 * - Switch Label
215 - SW3: 12345678
216 - SW4: 12345678
217
218 * - SD
219 - 11000010
220 - 01000000
221
222 * - OSPI
223 - 11001110
224 - 00000000
225
226 * - EMMC
227 - 11010010
228 - 00000000
229
230 * - UART
231 - 11011100
232 - 00000000
233
234 * - USB DFU
235 - 11001010
236 - 00000000
237
238For SW2 and SW1, the switch state in the "ON" position = 1.
239
240Debugging U-Boot
241----------------
242
243See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
244detailed setup information.
245
246.. warning::
247
248 **OpenOCD support after**: v0.12.0
249
250 While support for the entire K3 generation including the am62xxx
251 extended family was added before v0.12.0, the tcl scripts for the
252 am62px have been accepted and will be available in the next release of
253 OpenOCD. It may be necessary to build OpenOCD from source depending on
254 the version your distribution has packaged.
255
256.. include:: k3.rst
257 :start-after: .. k3_rst_include_start_openocd_connect_XDS110
258 :end-before: .. k3_rst_include_end_openocd_connect_XDS110
259
260To start OpenOCD and connect to the board
261
262.. code-block:: bash
263
264 openocd -f board/ti_j722sevm.cfg