blob: 2e60e22ba1514b5d10c1f5c11231fa31d1f3af10 [file] [log] [blame]
Udit Kumardb7af512023-05-11 14:47:48 +05301.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2.. sectionauthor:: Udit Kumar <u-kumar1@ti.com>
3
4J7200 Platforms
5===============
6
7Introduction:
8-------------
9The J7200 family of SoCs are part of K3 Multicore SoC architecture platform
10targeting automotive applications. They are designed as a low power, high
11performance and highly integrated device architecture, adding significant
12enhancement on processing power, graphics capability, video and imaging
13processing, virtualization and coherent memory support.
14
15The device is partitioned into three functional domains, each containing
16specific processing cores and peripherals:
17
181. Wake-up (WKUP) domain:
19 * Device Management and Security Controller (DMSC)
20
212. Microcontroller (MCU) domain:
22 * Dual Core ARM Cortex-R5F processor
23
243. MAIN domain:
25 * Dual core 64-bit ARM Cortex-A72
26
27More info can be found in TRM: https://www.ti.com/lit/pdf/spruiu1
28
Nishanth Menon08df7462023-07-27 13:59:00 -050029Platform information:
30
31* https://www.ti.com/tool/J7200XSOMXEVM
32
Udit Kumardb7af512023-05-11 14:47:48 +053033Boot Flow:
34----------
35Below is the pictorial representation of boot flow:
36
Nishanth Menon68b3baa2023-07-27 13:58:45 -050037.. image:: img/boot_diagram_k3_current.svg
Udit Kumardb7af512023-05-11 14:47:48 +053038
39- Here DMSC acts as master and provides all the critical services. R5/A72
40 requests DMSC to get these services done as shown in the above diagram.
41
42Sources:
43--------
Udit Kumardb7af512023-05-11 14:47:48 +053044
Nishanth Menoncce3e7a2023-07-27 13:58:44 -050045.. include:: k3.rst
46 :start-after: .. k3_rst_include_start_boot_sources
47 :end-before: .. k3_rst_include_end_boot_sources
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +053048
Udit Kumardb7af512023-05-11 14:47:48 +053049Build procedure:
50----------------
Nishanth Menonc727b812023-07-27 13:58:48 -0500510. Setup the environment variables:
Udit Kumardb7af512023-05-11 14:47:48 +053052
Nishanth Menonc727b812023-07-27 13:58:48 -050053.. include:: k3.rst
54 :start-after: .. k3_rst_include_start_common_env_vars_desc
55 :end-before: .. k3_rst_include_end_common_env_vars_desc
56
57.. include:: k3.rst
58 :start-after: .. k3_rst_include_start_board_env_vars_desc
59 :end-before: .. k3_rst_include_end_board_env_vars_desc
60
61Set the variables corresponding to this platform:
62
63.. include:: k3.rst
64 :start-after: .. k3_rst_include_start_common_env_vars_defn
65 :end-before: .. k3_rst_include_end_common_env_vars_defn
Udit Kumardb7af512023-05-11 14:47:48 +053066.. code-block:: bash
67
Nishanth Menonc727b812023-07-27 13:58:48 -050068 $ export UBOOT_CFG_CORTEXR=j7200_evm_r5_defconfig
69 $ export UBOOT_CFG_CORTEXA=j7200_evm_a72_defconfig
70 $ export TFA_BOARD=generic
71 $ # we dont use any extra TFA parameters
72 $ unset TFA_EXTRA_ARGS
73 $ export OPTEE_PLATFORM=k3-j7200
74 $ # we dont use any extra OP-TEE parameters
75 $ unset OPTEE_EXTRA_ARGS
76
77.. j7200_evm_rst_include_start_build_steps
78
791. Trusted Firmware-A:
80
81.. include:: k3.rst
82 :start-after: .. k3_rst_include_start_build_steps_tfa
83 :end-before: .. k3_rst_include_end_build_steps_tfa
84
Udit Kumardb7af512023-05-11 14:47:48 +053085
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530862. OP-TEE:
Udit Kumardb7af512023-05-11 14:47:48 +053087
Nishanth Menonc727b812023-07-27 13:58:48 -050088.. include:: k3.rst
89 :start-after: .. k3_rst_include_start_build_steps_optee
90 :end-before: .. k3_rst_include_end_build_steps_optee
Udit Kumardb7af512023-05-11 14:47:48 +053091
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530923. U-Boot:
Udit Kumardb7af512023-05-11 14:47:48 +053093
94* 4.1 R5:
95
Nishanth Menonc727b812023-07-27 13:58:48 -050096.. include:: k3.rst
97 :start-after: .. k3_rst_include_start_build_steps_spl_r5
98 :end-before: .. k3_rst_include_end_build_steps_spl_r5
Udit Kumardb7af512023-05-11 14:47:48 +053099
100* 4.2 A72:
101
Nishanth Menonc727b812023-07-27 13:58:48 -0500102.. include:: k3.rst
103 :start-after: .. k3_rst_include_start_build_steps_uboot
104 :end-before: .. k3_rst_include_end_build_steps_uboot
105.. j7200_evm_rst_include_end_build_steps
Udit Kumardb7af512023-05-11 14:47:48 +0530106
107Target Images
108--------------
Tom Rinif687c8f2023-07-25 12:44:16 -0400109In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC
110variant (GP, HS-FS, HS-SE) requires a different source for these files.
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530111
112 - GP
113
114 * tiboot3-j7200-gp-evm.bin from step 4.1
115 * tispl.bin_unsigned, u-boot.img_unsigned from step 4.2
116
117 - HS-FS
118
119 * tiboot3-j7200_sr2-hs-fs-evm.bin from step 4.1
120 * tispl.bin, u-boot.img from step 4.2
121
122 - HS-SE
123
124 * tiboot3-j7200_sr2-hs-evm.bin from step 4.1
125 * tispl.bin, u-boot.img from step 4.2
Udit Kumardb7af512023-05-11 14:47:48 +0530126
127Image formats:
128--------------
129
Nishanth Menonf4ade092023-07-27 13:58:49 -0500130- tiboot3.bin
Udit Kumardb7af512023-05-11 14:47:48 +0530131
Nishanth Menonf4ade092023-07-27 13:58:49 -0500132.. image:: img/j7200_tiboot3.bin.svg
Udit Kumardb7af512023-05-11 14:47:48 +0530133
134- tispl.bin
135
Nishanth Menonf4ade092023-07-27 13:58:49 -0500136.. image:: img/dm_tispl.bin.svg
Udit Kumardb7af512023-05-11 14:47:48 +0530137
Udit Kumardb7af512023-05-11 14:47:48 +0530138
139
140Switch Setting for Boot Mode
141----------------------------
142
143Boot Mode pins provide means to select the boot mode and options before the
144device is powered up. After every POR, they are the main source to populate
145the Boot Parameter Tables.
146
147The following table shows some common boot modes used on J7200 platform. More
148details can be found in the Technical Reference Manual:
149https://www.ti.com/lit/pdf/spruiu1 under the `Boot Mode Pins` section.
150
Nishanth Menonf940ec22023-07-27 13:58:55 -0500151.. list-table:: Boot Modes
152 :widths: 16 16 16
153 :header-rows: 1
Udit Kumardb7af512023-05-11 14:47:48 +0530154
Nishanth Menonf940ec22023-07-27 13:58:55 -0500155 * - Switch Label
156 - SW9: 12345678
157 - SW8: 12345678
Udit Kumardb7af512023-05-11 14:47:48 +0530158
Nishanth Menonf940ec22023-07-27 13:58:55 -0500159 * - SD
160 - 00000000
161 - 10000010
162
163 * - EMMC
164 - 01000000
165 - 10000000
166
167 * - OSPI
168 - 01000000
169 - 00000110
170
171 * - UART
172 - 01110000
173 - 00000000
174
175 * - USB DFU
176 - 00100000
177 - 10000000
Udit Kumardb7af512023-05-11 14:47:48 +0530178
179For SW8 and SW9, the switch state in the "ON" position = 1.
180
181eMMC:
182-----
183ROM supports booting from eMMC raw read or UDA FS mode.
184
185Below is memory layout in case of booting from
186boot 0/1 partition in raw mode.
187
188Current allocated size for tiboot3 size is 1MB, tispl is 2MB.
189
190Size of u-boot.img is taken 4MB for refernece,
191But this is subject to change depending upon atf, optee size
192
Nishanth Menon93d90bf2023-07-27 13:58:59 -0500193.. image:: img/emmc_j7200_evm_boot01.svg
Udit Kumardb7af512023-05-11 14:47:48 +0530194
195In case of UDA FS mode booting, following is layout.
196
197All boot images tiboot3.bin, tispl and u-boot should be written to
198fat formatted UDA FS as file.
199
Nishanth Menon93d90bf2023-07-27 13:58:59 -0500200.. image:: img/emmc_j7200_evm_udafs.svg
Udit Kumardb7af512023-05-11 14:47:48 +0530201
202In case of booting from eMMC, write above images into raw or UDA FS.
203and set mmc partconf accordingly.
Jason Kacineseffe5082023-08-03 01:29:22 -0500204
205Debugging U-Boot
206----------------
207
208See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
209detailed setup information.
210
211.. warning::
212
213 **OpenOCD support since**: v0.12.0
214
215 If the default package version of OpenOCD in your development
216 environment's distribution needs to be updated, it might be necessary to
217 build OpenOCD from the source.
218
219.. include:: k3.rst
220 :start-after: .. k3_rst_include_start_openocd_connect_XDS110
221 :end-before: .. k3_rst_include_end_openocd_connect_XDS110
222
223To start OpenOCD and connect to the board
224
225.. code-block:: bash
226
227 openocd -f board/ti_j7200evm.cfg