blob: 2d5f6497007b5a59492fcfba18683ee98a3d540a [file] [log] [blame]
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +05301.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2.. sectionauthor:: Lokesh Vutla <lokeshvutla@ti.com>
3
Bryan Brattlof10d3f172022-12-19 14:29:49 -06004J721E Platforms
5===============
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +05306
7Introduction:
8-------------
9The J721e 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 * 2 x Dual cortex ARM Cortex-R5 subsystem
27 * 2 x C66x Digital signal processor sub system
28 * C71x Digital signal processor sub-system with MMA.
29
30More info can be found in TRM: http://www.ti.com/lit/pdf/spruil1
31
32Boot Flow:
33----------
34Boot flow is similar to that of AM65x SoC and extending it with remoteproc
35support. Below is the pictorial representation of boot flow:
36
Nishanth Menon0a2d2ef2023-07-27 13:58:47 -050037.. image:: img/boot_diagram_j721e.svg
Kishon Vijay Abraham I78d13c92021-07-21 21:28: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--------
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053044
Nishanth Menonee91e482023-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
Andrew Davis4bb06452022-11-09 11:30:00 -060048
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053049Build procedure:
50----------------
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500510. Setup the environment variables:
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053052
Nishanth Menonb7ee22f2023-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
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053056
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050057.. 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
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053060
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050061Set the variables corresponding to this platform:
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053062
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050063.. 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
Andrew Davisd8fcaa22022-11-09 11:30:01 -060066.. code-block:: bash
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053067
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050068 $ export UBOOT_CFG_CORTEXR=j721e_evm_r5_defconfig
69 $ export UBOOT_CFG_CORTEXA=j721e_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-j721e
74 $ # we dont use any extra OP-TEE parameters
75 $ unset OPTEE_EXTRA_ARGS
76
77.. j721e_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
85
862. OP-TEE:
87
88.. include:: k3.rst
89 :start-after: .. k3_rst_include_start_build_steps_optee
90 :end-before: .. k3_rst_include_end_build_steps_optee
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053091
Neha Malcom Francis507be122023-07-22 00:14:43 +0530923. U-Boot:
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053093
94* 4.1 R5:
95
Nishanth Menonb7ee22f2023-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
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053099
100* 4.2 A72:
101
Nishanth Menonb7ee22f2023-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.. j721e_evm_rst_include_end_build_steps
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530106
107Target Images
108--------------
Tom Rinifdf45032023-07-25 12:44:16 -0400109In order to boot we need tiboot3.bin, sysfw.itb, tispl.bin and u-boot.img.
110Each SoC variant (GP, HS-FS and HS-SE) requires a different source for these
111files.
Neha Malcom Francis507be122023-07-22 00:14:43 +0530112
113 - GP
114
115 * tiboot3-j721e-gp-evm.bin, sysfw-j721e-gp-evm.itb from step 4.1
116 * tispl.bin_unsigned, u-boot.img_unsigned from step 4.2
117
118 - HS-FS
119
120 * tiboot3-j721e_sr2-hs-fs-evm.bin, sysfw-j721e_sr2-hs-fs-evm.itb from step 4.1
121 * tispl.bin, u-boot.img from step 4.2
122
123 - HS-SE
124
125 * tiboot3-j721e_sr2-hs-evm.bin, sysfw-j721e_sr2-hs-evm.itb from step 4.1
126 * tispl.bin, u-boot.img from step 4.2
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530127
128Image formats:
129--------------
130
Nishanth Menon0495c4e2023-07-27 13:58:50 -0500131- tiboot3.bin
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530132
Nishanth Menon0495c4e2023-07-27 13:58:50 -0500133.. image:: img/no_multi_cert_tiboot3.bin.svg
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530134
135- tispl.bin
136
Nishanth Menon0495c4e2023-07-27 13:58:50 -0500137.. image:: img/dm_tispl.bin.svg
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530138
139- sysfw.itb
140
Nishanth Menon0495c4e2023-07-27 13:58:50 -0500141.. image:: img/sysfw.itb.svg
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530142
Manorit Chawdhryc4188b92023-05-16 10:24:36 +0530143R5 Memory Map:
144--------------
145
146.. list-table::
147 :widths: 16 16 16
148 :header-rows: 1
149
150 * - Region
151 - Start Address
152 - End Address
153
154 * - SPL
155 - 0x41c00000
156 - 0x41c40000
157
158 * - EMPTY
159 - 0x41c40000
160 - 0x41c81920
161
162 * - STACK
163 - 0x41c85920
164 - 0x41c81920
165
166 * - Global data
167 - 0x41c859f0
168 - 0x41c85920
169
170 * - Heap
171 - 0x41c859f0
172 - 0x41cf59f0
173
174 * - BSS
175 - 0x41cf59f0
176 - 0x41cff9f0
177
178 * - MCU Scratchpad
179 - 0x41cff9fc
180 - 0x41cffbfc
181
182 * - ROM DATA
183 - 0x41cffbfc
184 - 0x41cfffff
185
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530186OSPI:
187-----
188ROM supports booting from OSPI from offset 0x0.
189
190Flashing images to OSPI:
191
192Below commands can be used to download tiboot3.bin, tispl.bin, u-boot.img,
193and sysfw.itb over tftp and then flash those to OSPI at their respective
194addresses.
195
196.. code-block:: text
197
198 => sf probe
199 => tftp ${loadaddr} tiboot3.bin
200 => sf update $loadaddr 0x0 $filesize
201 => tftp ${loadaddr} tispl.bin
202 => sf update $loadaddr 0x80000 $filesize
203 => tftp ${loadaddr} u-boot.img
204 => sf update $loadaddr 0x280000 $filesize
205 => tftp ${loadaddr} sysfw.itb
206 => sf update $loadaddr 0x6C0000 $filesize
207
208Flash layout for OSPI:
209
210.. code-block:: text
211
212 0x0 +----------------------------+
213 | ospi.tiboot3(512K) |
214 | |
215 0x80000 +----------------------------+
216 | ospi.tispl(2M) |
217 | |
218 0x280000 +----------------------------+
219 | ospi.u-boot(4M) |
220 | |
221 0x680000 +----------------------------+
222 | ospi.env(128K) |
223 | |
224 0x6A0000 +----------------------------+
225 | ospi.env.backup (128K) |
226 | |
227 0x6C0000 +----------------------------+
228 | ospi.sysfw(1M) |
229 | |
230 0x7C0000 +----------------------------+
231 | padding (256k) |
232 0x800000 +----------------------------+
233 | ospi.rootfs(UBIFS) |
234 | |
235 +----------------------------+
Kishon Vijay Abraham Idd7f5282021-07-21 21:28:49 +0530236
237Firmwares:
238----------
239
240The J721e u-boot allows firmware to be loaded for the Cortex-R5 subsystem.
241The CPSW5G in J7200 and CPSW9G in J721E present in MAIN domain is configured
242and controlled by the ethernet firmware that executes in the MAIN Cortex R5.
243The default supported environment variables support loading these firmwares
244from only MMC. "dorprocboot" env variable has to be set for the U-BOOT to load
245and start the remote cores in the system.
246
247J721E common processor board can be attached to a Ethernet QSGMII card and the
248PHY in the card has to be reset before it can be used for data transfer.
249"do_main_cpsw0_qsgmii_phyinit" env variable has to be set for the U-BOOT to
250configure this PHY.