blob: d4a823fa26ca842de1f6a6692ce6220b35686524 [file] [log] [blame]
Udit Kumared92ede2023-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 Menon4981d9a2023-07-27 13:59:00 -050029Platform information:
30
31* https://www.ti.com/tool/J7200XSOMXEVM
32
Udit Kumared92ede2023-05-11 14:47:48 +053033Boot Flow:
34----------
35Below is the pictorial representation of boot flow:
36
Nishanth Menonb47c9f72023-07-27 13:58:45 -050037.. image:: img/boot_diagram_k3_current.svg
Nishanth Menon5539eaf2023-08-22 11:41:00 -050038 :alt: Boot flow diagram
Udit Kumared92ede2023-05-11 14:47:48 +053039
40- Here DMSC acts as master and provides all the critical services. R5/A72
41 requests DMSC to get these services done as shown in the above diagram.
42
43Sources:
44--------
Udit Kumared92ede2023-05-11 14:47:48 +053045
Nishanth Menonee91e482023-07-27 13:58:44 -050046.. include:: k3.rst
47 :start-after: .. k3_rst_include_start_boot_sources
48 :end-before: .. k3_rst_include_end_boot_sources
Udit Kumared92ede2023-05-11 14:47:48 +053049
Udit Kumared92ede2023-05-11 14:47:48 +053050Build procedure:
51----------------
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500520. Setup the environment variables:
Udit Kumared92ede2023-05-11 14:47:48 +053053
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050054.. include:: k3.rst
55 :start-after: .. k3_rst_include_start_common_env_vars_desc
56 :end-before: .. k3_rst_include_end_common_env_vars_desc
Udit Kumared92ede2023-05-11 14:47:48 +053057
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050058.. include:: k3.rst
59 :start-after: .. k3_rst_include_start_board_env_vars_desc
60 :end-before: .. k3_rst_include_end_board_env_vars_desc
Udit Kumared92ede2023-05-11 14:47:48 +053061
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050062Set the variables corresponding to this platform:
Udit Kumared92ede2023-05-11 14:47:48 +053063
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050064.. include:: k3.rst
65 :start-after: .. k3_rst_include_start_common_env_vars_defn
66 :end-before: .. k3_rst_include_end_common_env_vars_defn
Nishanth Menonfdd7cb72023-11-02 23:40:26 -050067.. prompt:: bash $
Udit Kumared92ede2023-05-11 14:47:48 +053068
Nishanth Menonfdd7cb72023-11-02 23:40:26 -050069 export UBOOT_CFG_CORTEXR=j7200_evm_r5_defconfig
70 export UBOOT_CFG_CORTEXA=j7200_evm_a72_defconfig
71 export TFA_BOARD=generic
72 # we dont use any extra TFA parameters
73 unset TFA_EXTRA_ARGS
74 export OPTEE_PLATFORM=k3-j7200
75 # we dont use any extra OP-TEE parameters
76 unset OPTEE_EXTRA_ARGS
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050077
78.. j7200_evm_rst_include_start_build_steps
79
801. Trusted Firmware-A:
81
82.. include:: k3.rst
83 :start-after: .. k3_rst_include_start_build_steps_tfa
84 :end-before: .. k3_rst_include_end_build_steps_tfa
85
86
872. OP-TEE:
88
89.. include:: k3.rst
90 :start-after: .. k3_rst_include_start_build_steps_optee
91 :end-before: .. k3_rst_include_end_build_steps_optee
Udit Kumared92ede2023-05-11 14:47:48 +053092
Neha Malcom Francis507be122023-07-22 00:14:43 +0530933. U-Boot:
Udit Kumared92ede2023-05-11 14:47:48 +053094
Nishanth Menondaed6db2023-08-22 11:41:05 -050095* 3.1 R5:
Udit Kumared92ede2023-05-11 14:47:48 +053096
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050097.. include:: k3.rst
98 :start-after: .. k3_rst_include_start_build_steps_spl_r5
99 :end-before: .. k3_rst_include_end_build_steps_spl_r5
Udit Kumared92ede2023-05-11 14:47:48 +0530100
Nishanth Menondaed6db2023-08-22 11:41:05 -0500101* 3.2 A72:
Udit Kumared92ede2023-05-11 14:47:48 +0530102
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500103.. include:: k3.rst
104 :start-after: .. k3_rst_include_start_build_steps_uboot
105 :end-before: .. k3_rst_include_end_build_steps_uboot
106.. j7200_evm_rst_include_end_build_steps
Udit Kumared92ede2023-05-11 14:47:48 +0530107
108Target Images
Heinrich Schuchardtb72160b2023-10-28 11:59:32 +0200109-------------
110
Tom Rinifdf45032023-07-25 12:44:16 -0400111In 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.
Neha Malcom Francis507be122023-07-22 00:14:43 +0530113
114 - GP
115
Nishanth Menondaed6db2023-08-22 11:41:05 -0500116 * tiboot3-j7200-gp-evm.bin from step 3.1
117 * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2
Neha Malcom Francis507be122023-07-22 00:14:43 +0530118
119 - HS-FS
120
Nishanth Menondaed6db2023-08-22 11:41:05 -0500121 * tiboot3-j7200_sr2-hs-fs-evm.bin from step 3.1
122 * tispl.bin, u-boot.img from step 3.2
Neha Malcom Francis507be122023-07-22 00:14:43 +0530123
124 - HS-SE
125
Nishanth Menondaed6db2023-08-22 11:41:05 -0500126 * tiboot3-j7200_sr2-hs-evm.bin from step 3.1
127 * tispl.bin, u-boot.img from step 3.2
Udit Kumared92ede2023-05-11 14:47:48 +0530128
129Image formats:
130--------------
131
Nishanth Menonb1e1c3b2023-07-27 13:58:49 -0500132- tiboot3.bin
Udit Kumared92ede2023-05-11 14:47:48 +0530133
Nishanth Menonb1e1c3b2023-07-27 13:58:49 -0500134.. image:: img/j7200_tiboot3.bin.svg
Nishanth Menon5539eaf2023-08-22 11:41:00 -0500135 :alt: tiboot3.bin image format
Udit Kumared92ede2023-05-11 14:47:48 +0530136
137- tispl.bin
138
Nishanth Menonb1e1c3b2023-07-27 13:58:49 -0500139.. image:: img/dm_tispl.bin.svg
Nishanth Menon5539eaf2023-08-22 11:41:00 -0500140 :alt: tispl.bin image format
Udit Kumared92ede2023-05-11 14:47:48 +0530141
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 J7200 platform. More
150details can be found in the Technical Reference Manual:
151https://www.ti.com/lit/pdf/spruiu1 under the `Boot Mode Pins` section.
152
Nishanth Menon2fd774e2023-07-27 13:58:55 -0500153.. list-table:: Boot Modes
154 :widths: 16 16 16
155 :header-rows: 1
Udit Kumared92ede2023-05-11 14:47:48 +0530156
Nishanth Menon2fd774e2023-07-27 13:58:55 -0500157 * - Switch Label
158 - SW9: 12345678
159 - SW8: 12345678
160
161 * - SD
162 - 00000000
163 - 10000010
164
165 * - EMMC
166 - 01000000
167 - 10000000
168
169 * - OSPI
170 - 01000000
171 - 00000110
172
173 * - UART
174 - 01110000
175 - 00000000
Udit Kumared92ede2023-05-11 14:47:48 +0530176
Nishanth Menon2fd774e2023-07-27 13:58:55 -0500177 * - USB DFU
178 - 00100000
179 - 10000000
Udit Kumared92ede2023-05-11 14:47:48 +0530180
181For SW8 and SW9, the switch state in the "ON" position = 1.
182
183eMMC:
184-----
185ROM supports booting from eMMC raw read or UDA FS mode.
186
187Below is memory layout in case of booting from
188boot 0/1 partition in raw mode.
189
190Current allocated size for tiboot3 size is 1MB, tispl is 2MB.
191
192Size of u-boot.img is taken 4MB for refernece,
193But this is subject to change depending upon atf, optee size
194
Nishanth Menon03f27e52023-07-27 13:58:59 -0500195.. image:: img/emmc_j7200_evm_boot01.svg
Nishanth Menon5539eaf2023-08-22 11:41:00 -0500196 :alt: Traditional eMMC boot partition layout
Udit Kumared92ede2023-05-11 14:47:48 +0530197
198In case of UDA FS mode booting, following is layout.
199
200All boot images tiboot3.bin, tispl and u-boot should be written to
201fat formatted UDA FS as file.
202
Nishanth Menon03f27e52023-07-27 13:58:59 -0500203.. image:: img/emmc_j7200_evm_udafs.svg
Nishanth Menon5539eaf2023-08-22 11:41:00 -0500204 :alt: eMMC UDA boot partition layout
Udit Kumared92ede2023-05-11 14:47:48 +0530205
206In case of booting from eMMC, write above images into raw or UDA FS.
207and set mmc partconf accordingly.
Jason Kacinesb0fdee92023-08-03 01:29:22 -0500208
209Debugging U-Boot
210----------------
211
212See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
213detailed setup information.
214
215.. warning::
216
217 **OpenOCD support since**: v0.12.0
218
219 If the default package version of OpenOCD in your development
220 environment's distribution needs to be updated, it might be necessary to
221 build OpenOCD from the source.
222
223.. include:: k3.rst
224 :start-after: .. k3_rst_include_start_openocd_connect_XDS110
225 :end-before: .. k3_rst_include_end_openocd_connect_XDS110
226
227To start OpenOCD and connect to the board
228
Nishanth Menonfdd7cb72023-11-02 23:40:26 -0500229.. prompt:: bash $
Jason Kacinesb0fdee92023-08-03 01:29:22 -0500230
231 openocd -f board/ti_j7200evm.cfg