blob: 80d91cafab08780f5fa6a1e5814d4e3d1f1a631b [file] [log] [blame]
Kishon Vijay Abraham I8baeeec2021-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 Brattlof0820e112022-12-19 14:29:49 -06004J721E Platforms
5===============
Kishon Vijay Abraham I8baeeec2021-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
Nishanth Menona94a4072023-11-01 15:56:03 -050030More info can be found in TRM: https://www.ti.com/lit/pdf/spruil1
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053031
Nishanth Menon08df7462023-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 I8baeeec2021-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 Menon9e30ebc2023-07-27 13:58:47 -050042.. image:: img/boot_diagram_j721e.svg
Nishanth Menone21a2ed2023-08-22 11:41:01 -050043 :alt: Boot flow diagram
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053044
45- Here DMSC acts as master and provides all the critical services. R5/A72
46 requests DMSC to get these services done as shown in the above diagram.
47
48Sources:
49--------
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053050
Nishanth Menond35dcc62023-11-04 02:21:50 -050051.. include:: ../ti/k3.rst
Nishanth Menoncce3e7a2023-07-27 13:58:44 -050052 :start-after: .. k3_rst_include_start_boot_sources
53 :end-before: .. k3_rst_include_end_boot_sources
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +053054
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053055Build procedure:
56----------------
Nishanth Menonc727b812023-07-27 13:58:48 -0500570. Setup the environment variables:
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053058
Nishanth Menond35dcc62023-11-04 02:21:50 -050059.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -050060 :start-after: .. k3_rst_include_start_common_env_vars_desc
61 :end-before: .. k3_rst_include_end_common_env_vars_desc
62
Nishanth Menond35dcc62023-11-04 02:21:50 -050063.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -050064 :start-after: .. k3_rst_include_start_board_env_vars_desc
65 :end-before: .. k3_rst_include_end_board_env_vars_desc
66
67Set the variables corresponding to this platform:
68
Nishanth Menond35dcc62023-11-04 02:21:50 -050069.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -050070 :start-after: .. k3_rst_include_start_common_env_vars_defn
71 :end-before: .. k3_rst_include_end_common_env_vars_defn
Nishanth Menonca845d22023-11-02 23:40:26 -050072.. prompt:: bash $
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053073
Nishanth Menonca845d22023-11-02 23:40:26 -050074 export UBOOT_CFG_CORTEXR=j721e_evm_r5_defconfig
75 export UBOOT_CFG_CORTEXA=j721e_evm_a72_defconfig
76 export TFA_BOARD=generic
77 # we dont use any extra TFA parameters
78 unset TFA_EXTRA_ARGS
79 export OPTEE_PLATFORM=k3-j721e
80 # we dont use any extra OP-TEE parameters
81 unset OPTEE_EXTRA_ARGS
Nishanth Menonc727b812023-07-27 13:58:48 -050082
83.. j721e_evm_rst_include_start_build_steps
84
851. Trusted Firmware-A:
86
Nishanth Menond35dcc62023-11-04 02:21:50 -050087.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -050088 :start-after: .. k3_rst_include_start_build_steps_tfa
89 :end-before: .. k3_rst_include_end_build_steps_tfa
90
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053091
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530922. OP-TEE:
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053093
Nishanth Menond35dcc62023-11-04 02:21:50 -050094.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -050095 :start-after: .. k3_rst_include_start_build_steps_optee
96 :end-before: .. k3_rst_include_end_build_steps_optee
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053097
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530983. U-Boot:
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +053099
Nishanth Menonf340a162023-08-22 11:41:06 -0500100* 3.1 R5:
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +0530101
Nishanth Menond35dcc62023-11-04 02:21:50 -0500102.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -0500103 :start-after: .. k3_rst_include_start_build_steps_spl_r5
104 :end-before: .. k3_rst_include_end_build_steps_spl_r5
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +0530105
Nishanth Menonf340a162023-08-22 11:41:06 -0500106* 3.2 A72:
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +0530107
Nishanth Menond35dcc62023-11-04 02:21:50 -0500108.. include:: ../ti/k3.rst
Nishanth Menonc727b812023-07-27 13:58:48 -0500109 :start-after: .. k3_rst_include_start_build_steps_uboot
110 :end-before: .. k3_rst_include_end_build_steps_uboot
111.. j721e_evm_rst_include_end_build_steps
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +0530112
113Target Images
Heinrich Schuchardtb214e882023-10-28 11:59:32 +0200114-------------
115
Tom Rinif687c8f2023-07-25 12:44:16 -0400116In order to boot we need tiboot3.bin, sysfw.itb, tispl.bin and u-boot.img.
117Each SoC variant (GP, HS-FS and HS-SE) requires a different source for these
118files.
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530119
120 - GP
121
Nishanth Menonf340a162023-08-22 11:41:06 -0500122 * tiboot3-j721e-gp-evm.bin, sysfw-j721e-gp-evm.itb from step 3.1
123 * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530124
125 - HS-FS
126
Nishanth Menonf340a162023-08-22 11:41:06 -0500127 * tiboot3-j721e_sr2-hs-fs-evm.bin, sysfw-j721e_sr2-hs-fs-evm.itb from step 3.1
128 * tispl.bin, u-boot.img from step 3.2
Neha Malcom Francis1ee652a2023-07-22 00:14:43 +0530129
130 - HS-SE
131
Nishanth Menonf340a162023-08-22 11:41:06 -0500132 * tiboot3-j721e_sr2-hs-evm.bin, sysfw-j721e_sr2-hs-evm.itb from step 3.1
133 * tispl.bin, u-boot.img from step 3.2
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +0530134
135Image formats:
136--------------
137
Nishanth Menon3b83dff2023-07-27 13:58:50 -0500138- tiboot3.bin
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +0530139
Nishanth Menon3b83dff2023-07-27 13:58:50 -0500140.. image:: img/no_multi_cert_tiboot3.bin.svg
Nishanth Menone21a2ed2023-08-22 11:41:01 -0500141 :alt: tiboot3.bin image format
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +0530142
143- tispl.bin
144
Nishanth Menon3b83dff2023-07-27 13:58:50 -0500145.. image:: img/dm_tispl.bin.svg
Nishanth Menone21a2ed2023-08-22 11:41:01 -0500146 :alt: tispl.bin image format
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +0530147
148- sysfw.itb
149
Nishanth Menon3b83dff2023-07-27 13:58:50 -0500150.. image:: img/sysfw.itb.svg
Nishanth Menone21a2ed2023-08-22 11:41:01 -0500151 :alt: sysfw.itb image format
Kishon Vijay Abraham I8baeeec2021-07-21 21:28:48 +0530152
Jonathan Humphreys44ba2832024-06-14 11:35:36 -0500153OSPI:
154-----
155ROM supports booting from OSPI from offset 0x0.
156
157Flashing images to OSPI:
158
159Below commands can be used to download tiboot3.bin, tispl.bin, u-boot.img,
160and sysfw.itb over tftp and then flash those to OSPI at their respective
161addresses.
162
163.. prompt:: bash =>
164
165 sf probe
166 tftp ${loadaddr} tiboot3.bin
167 sf update $loadaddr 0x0 $filesize
168 tftp ${loadaddr} tispl.bin
169 sf update $loadaddr 0x80000 $filesize
170 tftp ${loadaddr} u-boot.img
171 sf update $loadaddr 0x280000 $filesize
172 tftp ${loadaddr} sysfw.itb
173 sf update $loadaddr 0x6C0000 $filesize
174
175Flash layout for OSPI:
176
177.. image:: img/ospi_sysfw.svg
178 :alt: OSPI flash partition layout
179
Manorit Chawdhry6cfdf822023-05-16 10:24:36 +0530180R5 Memory Map:
181--------------
182
183.. list-table::
184 :widths: 16 16 16
185 :header-rows: 1
186
187 * - Region
188 - Start Address
189 - End Address
190
191 * - SPL
192 - 0x41c00000
193 - 0x41c40000
194
195 * - EMPTY
196 - 0x41c40000
197 - 0x41c81920
198
199 * - STACK
200 - 0x41c85920
201 - 0x41c81920
202
203 * - Global data
204 - 0x41c859f0
205 - 0x41c85920
206
207 * - Heap
208 - 0x41c859f0
209 - 0x41cf59f0
210
211 * - BSS
212 - 0x41cf59f0
213 - 0x41cff9f0
214
215 * - MCU Scratchpad
216 - 0x41cff9fc
217 - 0x41cffbfc
218
219 * - ROM DATA
220 - 0x41cffbfc
221 - 0x41cfffff
222
Jonathan Humphreys44ba2832024-06-14 11:35:36 -0500223Firmware:
224---------
Kishon Vijay Abraham I4689aab2021-07-21 21:28:49 +0530225
226The J721e u-boot allows firmware to be loaded for the Cortex-R5 subsystem.
227The CPSW5G in J7200 and CPSW9G in J721E present in MAIN domain is configured
228and controlled by the ethernet firmware that executes in the MAIN Cortex R5.
229The default supported environment variables support loading these firmwares
230from only MMC. "dorprocboot" env variable has to be set for the U-BOOT to load
231and start the remote cores in the system.
232
233J721E common processor board can be attached to a Ethernet QSGMII card and the
234PHY in the card has to be reset before it can be used for data transfer.
235"do_main_cpsw0_qsgmii_phyinit" env variable has to be set for the U-BOOT to
236configure this PHY.
Jason Kacineseffe5082023-08-03 01:29:22 -0500237
238Debugging U-Boot
239----------------
240
241See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for
242detailed setup information.
243
244.. warning::
245
246 **OpenOCD support since**: v0.12.0
247
248 If the default package version of OpenOCD in your development
249 environment's distribution needs to be updated, it might be necessary to
250 build OpenOCD from the source.
251
Nishanth Menond35dcc62023-11-04 02:21:50 -0500252.. include:: ../ti/k3.rst
Jason Kacineseffe5082023-08-03 01:29:22 -0500253 :start-after: .. k3_rst_include_start_openocd_connect_XDS110
254 :end-before: .. k3_rst_include_end_openocd_connect_XDS110
255
256To start OpenOCD and connect to the board
257
Nishanth Menonca845d22023-11-02 23:40:26 -0500258.. prompt:: bash $
Jason Kacineseffe5082023-08-03 01:29:22 -0500259
260 openocd -f board/ti_j721eevm.cfg