blob: f4b4c192d9dac3dcd898524fed3f21b7984775ba [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
Nishanth Menon4981d9a2023-07-27 13:59:00 -050032Platform information:
33
34* https://www.ti.com/tool/J721EXSOMXEVM
35* https://www.ti.com/tool/SK-TDA4VM
36
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053037Boot Flow:
38----------
39Boot flow is similar to that of AM65x SoC and extending it with remoteproc
40support. Below is the pictorial representation of boot flow:
41
Nishanth Menon0a2d2ef2023-07-27 13:58:47 -050042.. image:: img/boot_diagram_j721e.svg
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053043
44- Here DMSC acts as master and provides all the critical services. R5/A72
45 requests DMSC to get these services done as shown in the above diagram.
46
47Sources:
48--------
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053049
Nishanth Menonee91e482023-07-27 13:58:44 -050050.. include:: k3.rst
51 :start-after: .. k3_rst_include_start_boot_sources
52 :end-before: .. k3_rst_include_end_boot_sources
Andrew Davis4bb06452022-11-09 11:30:00 -060053
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053054Build procedure:
55----------------
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500560. Setup the environment variables:
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053057
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050058.. include:: k3.rst
59 :start-after: .. k3_rst_include_start_common_env_vars_desc
60 :end-before: .. k3_rst_include_end_common_env_vars_desc
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053061
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050062.. include:: k3.rst
63 :start-after: .. k3_rst_include_start_board_env_vars_desc
64 :end-before: .. k3_rst_include_end_board_env_vars_desc
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053065
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050066Set the variables corresponding to this platform:
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053067
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050068.. include:: k3.rst
69 :start-after: .. k3_rst_include_start_common_env_vars_defn
70 :end-before: .. k3_rst_include_end_common_env_vars_defn
Andrew Davisd8fcaa22022-11-09 11:30:01 -060071.. code-block:: bash
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053072
Nishanth Menonb7ee22f2023-07-27 13:58:48 -050073 $ export UBOOT_CFG_CORTEXR=j721e_evm_r5_defconfig
74 $ export UBOOT_CFG_CORTEXA=j721e_evm_a72_defconfig
75 $ export TFA_BOARD=generic
76 $ # we dont use any extra TFA parameters
77 $ unset TFA_EXTRA_ARGS
78 $ export OPTEE_PLATFORM=k3-j721e
79 $ # we dont use any extra OP-TEE parameters
80 $ unset OPTEE_EXTRA_ARGS
81
82.. j721e_evm_rst_include_start_build_steps
83
841. Trusted Firmware-A:
85
86.. include:: k3.rst
87 :start-after: .. k3_rst_include_start_build_steps_tfa
88 :end-before: .. k3_rst_include_end_build_steps_tfa
89
90
912. OP-TEE:
92
93.. include:: k3.rst
94 :start-after: .. k3_rst_include_start_build_steps_optee
95 :end-before: .. k3_rst_include_end_build_steps_optee
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053096
Neha Malcom Francis507be122023-07-22 00:14:43 +0530973. U-Boot:
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +053098
99* 4.1 R5:
100
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500101.. include:: k3.rst
102 :start-after: .. k3_rst_include_start_build_steps_spl_r5
103 :end-before: .. k3_rst_include_end_build_steps_spl_r5
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530104
105* 4.2 A72:
106
Nishanth Menonb7ee22f2023-07-27 13:58:48 -0500107.. include:: k3.rst
108 :start-after: .. k3_rst_include_start_build_steps_uboot
109 :end-before: .. k3_rst_include_end_build_steps_uboot
110.. j721e_evm_rst_include_end_build_steps
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530111
112Target Images
113--------------
Tom Rinifdf45032023-07-25 12:44:16 -0400114In order to boot we need tiboot3.bin, sysfw.itb, tispl.bin and u-boot.img.
115Each SoC variant (GP, HS-FS and HS-SE) requires a different source for these
116files.
Neha Malcom Francis507be122023-07-22 00:14:43 +0530117
118 - GP
119
120 * tiboot3-j721e-gp-evm.bin, sysfw-j721e-gp-evm.itb from step 4.1
121 * tispl.bin_unsigned, u-boot.img_unsigned from step 4.2
122
123 - HS-FS
124
125 * tiboot3-j721e_sr2-hs-fs-evm.bin, sysfw-j721e_sr2-hs-fs-evm.itb from step 4.1
126 * tispl.bin, u-boot.img from step 4.2
127
128 - HS-SE
129
130 * tiboot3-j721e_sr2-hs-evm.bin, sysfw-j721e_sr2-hs-evm.itb from step 4.1
131 * tispl.bin, u-boot.img from step 4.2
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530132
133Image formats:
134--------------
135
Nishanth Menon0495c4e2023-07-27 13:58:50 -0500136- tiboot3.bin
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530137
Nishanth Menon0495c4e2023-07-27 13:58:50 -0500138.. image:: img/no_multi_cert_tiboot3.bin.svg
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530139
140- tispl.bin
141
Nishanth Menon0495c4e2023-07-27 13:58:50 -0500142.. image:: img/dm_tispl.bin.svg
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530143
144- sysfw.itb
145
Nishanth Menon0495c4e2023-07-27 13:58:50 -0500146.. image:: img/sysfw.itb.svg
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530147
Manorit Chawdhryc4188b92023-05-16 10:24:36 +0530148R5 Memory Map:
149--------------
150
151.. list-table::
152 :widths: 16 16 16
153 :header-rows: 1
154
155 * - Region
156 - Start Address
157 - End Address
158
159 * - SPL
160 - 0x41c00000
161 - 0x41c40000
162
163 * - EMPTY
164 - 0x41c40000
165 - 0x41c81920
166
167 * - STACK
168 - 0x41c85920
169 - 0x41c81920
170
171 * - Global data
172 - 0x41c859f0
173 - 0x41c85920
174
175 * - Heap
176 - 0x41c859f0
177 - 0x41cf59f0
178
179 * - BSS
180 - 0x41cf59f0
181 - 0x41cff9f0
182
183 * - MCU Scratchpad
184 - 0x41cff9fc
185 - 0x41cffbfc
186
187 * - ROM DATA
188 - 0x41cffbfc
189 - 0x41cfffff
190
Kishon Vijay Abraham I78d13c92021-07-21 21:28:48 +0530191OSPI:
192-----
193ROM supports booting from OSPI from offset 0x0.
194
195Flashing images to OSPI:
196
197Below commands can be used to download tiboot3.bin, tispl.bin, u-boot.img,
198and sysfw.itb over tftp and then flash those to OSPI at their respective
199addresses.
200
201.. code-block:: text
202
203 => sf probe
204 => tftp ${loadaddr} tiboot3.bin
205 => sf update $loadaddr 0x0 $filesize
206 => tftp ${loadaddr} tispl.bin
207 => sf update $loadaddr 0x80000 $filesize
208 => tftp ${loadaddr} u-boot.img
209 => sf update $loadaddr 0x280000 $filesize
210 => tftp ${loadaddr} sysfw.itb
211 => sf update $loadaddr 0x6C0000 $filesize
212
213Flash layout for OSPI:
214
Nishanth Menon2bb20e42023-07-27 13:58:57 -0500215.. image:: img/ospi_sysfw.svg
Kishon Vijay Abraham Idd7f5282021-07-21 21:28:49 +0530216
217Firmwares:
218----------
219
220The J721e u-boot allows firmware to be loaded for the Cortex-R5 subsystem.
221The CPSW5G in J7200 and CPSW9G in J721E present in MAIN domain is configured
222and controlled by the ethernet firmware that executes in the MAIN Cortex R5.
223The default supported environment variables support loading these firmwares
224from only MMC. "dorprocboot" env variable has to be set for the U-BOOT to load
225and start the remote cores in the system.
226
227J721E common processor board can be attached to a Ethernet QSGMII card and the
228PHY in the card has to be reset before it can be used for data transfer.
229"do_main_cpsw0_qsgmii_phyinit" env variable has to be set for the U-BOOT to
230configure this PHY.