Jai Luthra | e526653e | 2023-11-13 08:51:49 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
| 2 | .. sectionauthor:: Jai Luthra <j-luthra@ti.com> |
| 3 | |
| 4 | AM62A Platforms |
| 5 | =============== |
| 6 | |
| 7 | Introduction: |
| 8 | ------------- |
| 9 | The AM62A SoC family is built on the K3 Multicore SoC architecture platform, |
| 10 | providing a deep learning accelerator, multi-camera support with ISP, video |
| 11 | transcoder and other BOM-saving integrations. |
| 12 | The AM62A SoC enables cost-sensitive automotive applications including driver |
| 13 | and in-cabin monitoring systems, next generation of eMirror system, as well as |
| 14 | a broad set of industrial applications in Factory Automation, Building |
| 15 | Automation, Robotics and more. |
| 16 | |
| 17 | Some highlights of this SoC are: |
| 18 | |
| 19 | * Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. |
| 20 | * Cortex-R5F for general-purpose or safety usage. |
| 21 | * Deep Learning Accelerator with Single-core C7x Vector DSP with MMA (up to |
| 22 | 1.0GHz). |
| 23 | * Vision Processing Accelerator (VPAC) with a 315MPixel/s ISP (up to 5MP @ |
| 24 | 60fps) supporting 16-bit RAW input with RGB-IR separation. |
| 25 | * 4K Video encoder and decoder for HEVC (Level 5.1 High-tier) and H.264 (Level |
| 26 | 5.2) supporting upto 240MPixels/s and MJPEG encoder at 416MPixels/s |
| 27 | * Single display with 24-bit RGB parallel (DPI) interface supporting upto |
| 28 | 165Mhz pixel clock for 2K resolution. |
| 29 | * Integrated Giga-bit Ethernet switch supporting up to a total of two |
| 30 | external ports (TSN capable). |
| 31 | * 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3x eMMC and SD, GPMC for |
| 32 | NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, |
| 33 | 1x CSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals. |
| 34 | * Dedicated Centralized System Controller for Security, Power, and |
| 35 | Resource Management. |
| 36 | * Multiple low power modes support, ex: Deep sleep, Standby, MCU-only, |
| 37 | enabling battery powered system design. |
| 38 | |
| 39 | More details can be found in the Technical Reference Manual: |
| 40 | https://www.ti.com/lit/pdf/spruj16 |
| 41 | |
| 42 | Platform information: |
| 43 | |
| 44 | * https://www.ti.com/tool/SK-AM62A-LP |
| 45 | |
| 46 | Boot Flow: |
| 47 | ---------- |
| 48 | Below is the pictorial representation of boot flow: |
| 49 | |
| 50 | .. image:: img/boot_diagram_k3_current.svg |
| 51 | :alt: Boot flow diagram |
| 52 | |
| 53 | - Here TIFS acts as master and provides all the critical services. R5/A53 |
| 54 | requests TIFS to get these services done as shown in the above diagram. |
| 55 | |
| 56 | Sources: |
| 57 | -------- |
| 58 | |
| 59 | .. include:: ../ti/k3.rst |
| 60 | :start-after: .. k3_rst_include_start_boot_sources |
| 61 | :end-before: .. k3_rst_include_end_boot_sources |
| 62 | |
| 63 | Build procedure: |
| 64 | ---------------- |
| 65 | 0. Setup the environment variables: |
| 66 | |
| 67 | .. include:: ../ti/k3.rst |
| 68 | :start-after: .. k3_rst_include_start_common_env_vars_desc |
| 69 | :end-before: .. k3_rst_include_end_common_env_vars_desc |
| 70 | |
| 71 | .. include:: ../ti/k3.rst |
| 72 | :start-after: .. k3_rst_include_start_board_env_vars_desc |
| 73 | :end-before: .. k3_rst_include_end_board_env_vars_desc |
| 74 | |
| 75 | Set the variables corresponding to this platform: |
| 76 | |
| 77 | .. include:: ../ti/k3.rst |
| 78 | :start-after: .. k3_rst_include_start_common_env_vars_defn |
| 79 | :end-before: .. k3_rst_include_end_common_env_vars_defn |
| 80 | .. code-block:: bash |
| 81 | |
| 82 | $ export UBOOT_CFG_CORTEXR=am62ax_evm_r5_defconfig |
| 83 | $ export UBOOT_CFG_CORTEXA=am62ax_evm_a53_defconfig |
| 84 | $ export TFA_BOARD=lite |
| 85 | $ # we dont use any extra TFA parameters |
| 86 | $ unset TFA_EXTRA_ARGS |
| 87 | $ export OPTEE_PLATFORM=k3-am62ax |
| 88 | $ # we dont use any extra OPTEE parameters |
| 89 | $ unset OPTEE_EXTRA_ARGS |
| 90 | |
| 91 | 1. Trusted Firmware-A: |
| 92 | |
| 93 | .. include:: ../ti/k3.rst |
| 94 | :start-after: .. k3_rst_include_start_build_steps_tfa |
| 95 | :end-before: .. k3_rst_include_end_build_steps_tfa |
| 96 | |
| 97 | 2. OP-TEE: |
| 98 | |
| 99 | .. include:: ../ti/k3.rst |
| 100 | :start-after: .. k3_rst_include_start_build_steps_optee |
| 101 | :end-before: .. k3_rst_include_end_build_steps_optee |
| 102 | |
| 103 | 3. U-Boot: |
| 104 | |
| 105 | * 3.1 R5: |
| 106 | |
| 107 | .. include:: ../ti/k3.rst |
| 108 | :start-after: .. k3_rst_include_start_build_steps_spl_r5 |
| 109 | :end-before: .. k3_rst_include_end_build_steps_spl_r5 |
| 110 | |
| 111 | * 3.2 A53: |
| 112 | |
| 113 | .. include:: ../ti/k3.rst |
| 114 | :start-after: .. k3_rst_include_start_build_steps_uboot |
| 115 | :end-before: .. k3_rst_include_end_build_steps_uboot |
| 116 | |
| 117 | Target Images |
| 118 | -------------- |
| 119 | In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC |
| 120 | variant (GP, HS-FS, HS-SE) requires a different source for these files. |
| 121 | |
| 122 | - GP |
| 123 | |
| 124 | * tiboot3-am62ax-gp-evm.bin from step 3.1 |
| 125 | * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2 |
| 126 | |
| 127 | - HS-FS |
| 128 | |
| 129 | * tiboot3-am62ax-hs-fs-evm.bin from step 3.1 |
| 130 | * tispl.bin, u-boot.img from step 3.2 |
| 131 | |
| 132 | - HS-SE |
| 133 | |
| 134 | * tiboot3-am62ax-hs-evm.bin from step 3.1 |
| 135 | * tispl.bin, u-boot.img from step 3.2 |
| 136 | |
| 137 | Image formats: |
| 138 | -------------- |
| 139 | |
| 140 | - tiboot3.bin |
| 141 | |
| 142 | .. image:: img/multi_cert_tiboot3.bin.svg |
| 143 | :alt: tiboot3.bin image format |
| 144 | |
| 145 | - tispl.bin |
| 146 | |
| 147 | .. image:: img/dm_tispl.bin.svg |
| 148 | :alt: tispl.bin image format |
| 149 | |
| 150 | Switch Setting for Boot Mode |
| 151 | ---------------------------- |
| 152 | |
| 153 | Boot Mode pins provide means to select the boot mode and options before the |
| 154 | device is powered up. After every POR, they are the main source to populate |
| 155 | the Boot Parameter Tables. |
| 156 | |
| 157 | The following table shows some common boot modes used on AM62 platform. More |
| 158 | details can be found in the Technical Reference Manual: |
| 159 | https://www.ti.com/lit/pdf/spruj16 under the `Boot Mode Pins` section. |
| 160 | |
| 161 | .. list-table:: Boot Modes |
| 162 | :widths: 16 16 16 |
| 163 | :header-rows: 1 |
| 164 | |
| 165 | * - Switch Label |
| 166 | - SW2: 12345678 |
| 167 | - SW3: 12345678 |
| 168 | |
| 169 | * - SD |
| 170 | - 01000000 |
| 171 | - 11000010 |
| 172 | |
| 173 | * - OSPI |
| 174 | - 00000000 |
| 175 | - 11001110 |
| 176 | |
| 177 | * - EMMC |
| 178 | - 00000000 |
| 179 | - 11010010 |
| 180 | |
| 181 | * - UART |
| 182 | - 00000000 |
| 183 | - 11011100 |
| 184 | |
| 185 | * - USB DFU |
| 186 | - 00000000 |
| 187 | - 11001010 |
| 188 | |
| 189 | For SW2 and SW1, the switch state in the "ON" position = 1. |
| 190 | |
| 191 | Debugging U-Boot |
| 192 | ---------------- |
| 193 | |
| 194 | See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for |
| 195 | detailed setup information. |
| 196 | |
| 197 | .. warning:: |
| 198 | |
| 199 | **OpenOCD support since**: August 2023 (git master) |
| 200 | |
| 201 | Until the next stable release of OpenOCD is available in your development |
| 202 | environment's distribution, it might be necessary to build OpenOCD `from the |
| 203 | source <https://github.com/openocd-org/openocd>`_. |
| 204 | |
| 205 | .. include:: k3.rst |
| 206 | :start-after: .. k3_rst_include_start_openocd_connect_XDS110 |
| 207 | :end-before: .. k3_rst_include_end_openocd_connect_XDS110 |
| 208 | |
| 209 | To start OpenOCD and connect to the board |
| 210 | |
| 211 | .. code-block:: bash |
| 212 | |
| 213 | openocd -f board/ti_am62a7evm.cfg |