Jayesh Choudhary | 5e547a7 | 2024-06-12 14:41:23 +0530 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
| 2 | .. sectionauthor:: Jayesh Choudhary <j-choudhary@ti.com> |
| 3 | |
| 4 | J722S-EVM Platform |
| 5 | ================== |
| 6 | |
| 7 | The J722S is a family of application processors built for Automotive and |
| 8 | Linux Application development. J722S family of SoCs is a superset of the |
| 9 | AM62P SoC family and shares similar memory map, thus the nodes are being |
| 10 | reused from AM62P includes instead of duplicating the definitions. |
| 11 | |
| 12 | Some highlights of J722S SoC (in addition to AM62P SoC features) are: |
| 13 | |
| 14 | * Two Cortex-R5F for Functional Safety or general-purpose usage and |
| 15 | two C7x floating point vector DSP with Matrix Multiply Accelerator |
| 16 | for deep learning. |
| 17 | |
| 18 | * Vision Processing Accelerator (VPAC) with image signal processor |
| 19 | and Depth and Motion Processing Accelerator (DMPAC). |
| 20 | |
| 21 | * 7xUARTs, 3xSPI, 5xI2C, 2xUSB2, 2xCAN-FD, 3xMMC and SD, GPMC for |
| 22 | NAND/FPGA connection, OSPI memory controller, 5xMcASP for audio, |
| 23 | 4xCSI-RX for Camera, 1 PCIe Gen3 controller, USB3.0 eCAP/eQEP, |
| 24 | ePWM, among other peripherals. |
| 25 | |
| 26 | For those interested, more details about this SoC can be found in the |
| 27 | Technical Reference Manual here: https://www.ti.com/lit/zip/sprujb3 |
| 28 | |
| 29 | Boot Flow: |
| 30 | ---------- |
| 31 | |
| 32 | The bootflow is exactly the same as all SoCs in the am62xxx extended SoC |
| 33 | family. Below is the pictorial representation: |
| 34 | |
| 35 | .. image:: img/boot_diagram_k3_current.svg |
| 36 | :alt: Boot flow diagram |
| 37 | |
| 38 | - Here TIFS acts as master and provides all the critical services. R5/A53 |
| 39 | requests TIFS to get these services done as shown in the above diagram. |
| 40 | |
| 41 | Sources: |
| 42 | -------- |
| 43 | |
| 44 | .. include:: ../ti/k3.rst |
| 45 | :start-after: .. k3_rst_include_start_boot_sources |
| 46 | :end-before: .. k3_rst_include_end_boot_sources |
| 47 | |
| 48 | Build procedure: |
| 49 | ---------------- |
| 50 | |
| 51 | 0. Setup the environment variables: |
| 52 | |
| 53 | .. include:: ../ti/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:: ../ti/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 | |
| 61 | Set the variables corresponding to this platform: |
| 62 | |
| 63 | .. include:: ../ti/k3.rst |
| 64 | :start-after: .. k3_rst_include_start_common_env_vars_defn |
| 65 | :end-before: .. k3_rst_include_end_common_env_vars_defn |
| 66 | |
| 67 | .. code-block:: bash |
| 68 | |
| 69 | $ export UBOOT_CFG_CORTEXR=j722s_evm_r5_defconfig |
| 70 | $ export UBOOT_CFG_CORTEXA=j722s_evm_a53_defconfig |
| 71 | $ export TFA_BOARD=lite |
| 72 | $ export OPTEE_PLATFORM=k3-am62x |
| 73 | $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y" |
| 74 | |
| 75 | .. j722s_evm_rst_include_start_build_steps |
| 76 | |
| 77 | 1. Trusted Firmware-A: |
| 78 | |
| 79 | .. include:: ../ti/k3.rst |
| 80 | :start-after: .. k3_rst_include_start_build_steps_tfa |
| 81 | :end-before: .. k3_rst_include_end_build_steps_tfa |
| 82 | |
| 83 | |
| 84 | 2. OP-TEE: |
| 85 | |
| 86 | .. include:: ../ti/k3.rst |
| 87 | :start-after: .. k3_rst_include_start_build_steps_optee |
| 88 | :end-before: .. k3_rst_include_end_build_steps_optee |
| 89 | |
| 90 | 3. U-Boot: |
| 91 | |
| 92 | * 3.1 R5: |
| 93 | |
| 94 | .. include:: ../ti/k3.rst |
| 95 | :start-after: .. k3_rst_include_start_build_steps_spl_r5 |
| 96 | :end-before: .. k3_rst_include_end_build_steps_spl_r5 |
| 97 | |
| 98 | * 3.2 A53: |
| 99 | |
| 100 | .. include:: ../ti/k3.rst |
| 101 | :start-after: .. k3_rst_include_start_build_steps_uboot |
| 102 | :end-before: .. k3_rst_include_end_build_steps_uboot |
| 103 | .. j722s_evm_rst_include_end_build_steps |
| 104 | |
| 105 | Target Images |
| 106 | -------------- |
| 107 | |
| 108 | In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC |
| 109 | variant (HS-FS, HS-SE) requires a different source for these files. |
| 110 | |
| 111 | - HS-FS |
| 112 | |
| 113 | * tiboot3-j722s-hs-fs-evm.bin from step 3.1 |
| 114 | * tispl.bin, u-boot.img from step 3.2 |
| 115 | |
| 116 | - HS-SE |
| 117 | |
| 118 | * tiboot3-j722s-hs-evm.bin from step 3.1 |
| 119 | * tispl.bin, u-boot.img from step 3.2 |
| 120 | |
| 121 | Image formats: |
| 122 | -------------- |
| 123 | |
| 124 | - tiboot3.bin |
| 125 | |
| 126 | .. image:: img/multi_cert_tiboot3.bin.svg |
| 127 | :alt: tiboot3.bin image format |
| 128 | |
| 129 | - tispl.bin |
| 130 | |
| 131 | .. image:: img/dm_tispl.bin.svg |
| 132 | :alt: tispl.bin image format |
| 133 | |
| 134 | A53 SPL DDR Memory Layout |
| 135 | ------------------------- |
| 136 | |
| 137 | .. j722s_evm_rst_include_start_ddr_mem_layout |
| 138 | |
| 139 | This provides an overview memory usage in A53 SPL stage. |
| 140 | |
| 141 | .. list-table:: |
| 142 | :widths: 16 16 16 |
| 143 | :header-rows: 1 |
| 144 | |
| 145 | * - Region |
| 146 | - Start Address |
| 147 | - End Address |
| 148 | |
| 149 | * - EMPTY |
| 150 | - 0x80000000 |
| 151 | - 0x80080000 |
| 152 | |
| 153 | * - TEXT BASE |
| 154 | - 0x80080000 |
| 155 | - 0x800d8000 |
| 156 | |
| 157 | * - EMPTY |
| 158 | - 0x800d8000 |
| 159 | - 0x80477660 |
| 160 | |
| 161 | * - STACK |
| 162 | - 0x80477660 |
| 163 | - 0x80477e60 |
| 164 | |
| 165 | * - GD |
| 166 | - 0x80477e60 |
| 167 | - 0x80478000 |
| 168 | |
| 169 | * - MALLOC |
| 170 | - 0x80478000 |
| 171 | - 0x80480000 |
| 172 | |
| 173 | * - EMPTY |
| 174 | - 0x80480000 |
| 175 | - 0x80a00000 |
| 176 | |
| 177 | * - BSS |
| 178 | - 0x80a00000 |
| 179 | - 0x80a80000 |
| 180 | |
| 181 | * - BLOBS |
| 182 | - 0x80a80000 |
| 183 | - 0x80d00400 |
| 184 | |
| 185 | * - EMPTY |
| 186 | - 0x80d00400 |
| 187 | - 0x81000000 |
| 188 | .. j722s_evm_rst_include_end_ddr_mem_layout |
| 189 | |
| 190 | Switch Setting for Boot Mode |
| 191 | ---------------------------- |
| 192 | |
| 193 | Boot Mode pins provide means to select the boot mode and options before the |
| 194 | device is powered up. After every POR, they are the main source to populate |
| 195 | the Boot Parameter Tables. |
| 196 | |
| 197 | The following table shows some common boot modes used on J722S-EVM |
| 198 | platform. More details can be found in the Technical Reference Manual: |
| 199 | https://www.ti.com/lit/zip/sprujb3 under the `Boot Mode Pins` section. |
| 200 | |
| 201 | .. note:: |
| 202 | |
| 203 | This device is very new. Currently only UART boot is available while |
| 204 | we continue to add support for the other bootmodes. |
| 205 | |
| 206 | .. list-table:: Boot Modes |
| 207 | :widths: 16 16 16 |
| 208 | :header-rows: 1 |
| 209 | |
| 210 | * - Switch Label |
| 211 | - SW3: 12345678 |
| 212 | - SW4: 12345678 |
| 213 | |
| 214 | * - SD |
| 215 | - 11000010 |
| 216 | - 01000000 |
| 217 | |
| 218 | * - OSPI |
| 219 | - 11001110 |
| 220 | - 00000000 |
| 221 | |
| 222 | * - EMMC |
| 223 | - 11010010 |
| 224 | - 00000000 |
| 225 | |
| 226 | * - UART |
| 227 | - 11011100 |
| 228 | - 00000000 |
| 229 | |
| 230 | * - USB DFU |
| 231 | - 11001010 |
| 232 | - 00000000 |
| 233 | |
| 234 | For SW2 and SW1, the switch state in the "ON" position = 1. |
| 235 | |
| 236 | Debugging U-Boot |
| 237 | ---------------- |
| 238 | |
| 239 | See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for |
| 240 | detailed setup information. |
| 241 | |
| 242 | .. warning:: |
| 243 | |
| 244 | **OpenOCD support after**: v0.12.0 |
| 245 | |
| 246 | While support for the entire K3 generation including the am62xxx |
| 247 | extended family was added before v0.12.0, the tcl scripts for the |
| 248 | am62px have been accepted and will be available in the next release of |
| 249 | OpenOCD. It may be necessary to build OpenOCD from source depending on |
| 250 | the version your distribution has packaged. |
| 251 | |
| 252 | .. include:: k3.rst |
| 253 | :start-after: .. k3_rst_include_start_openocd_connect_XDS110 |
| 254 | :end-before: .. k3_rst_include_end_openocd_connect_XDS110 |
| 255 | |
| 256 | To start OpenOCD and connect to the board |
| 257 | |
| 258 | .. code-block:: bash |
| 259 | |
| 260 | openocd -f board/ti_j722sevm.cfg |