Bryan Brattlof | cf2e2b1 | 2024-03-12 15:20:30 -0500 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
| 2 | .. sectionauthor:: Bryan Brattlof <bb@ti.com> |
| 3 | |
| 4 | AM62Px Platforms |
| 5 | ================ |
| 6 | |
| 7 | The AM62Px is an extension of the existing Sitara AM62x low-cost family |
| 8 | of application processors built for Automotive and Linux Application |
| 9 | development. Scalable Arm Cortex-A53 performance and embedded features, |
| 10 | such as: multi high-definition display support, 3D-graphics |
| 11 | acceleration, 4K video acceleration, and extensive peripherals make the |
| 12 | AM62Px well-suited for a broad range of automation and industrial |
| 13 | application, including automotive digital instrumentation, automotive |
| 14 | displays, industrial HMI, and more. |
| 15 | |
| 16 | Some highlights of AM62P SoC are: |
| 17 | |
| 18 | * Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. |
| 19 | Dual/Single core variants are provided in the same package to allow HW |
| 20 | compatible designs. |
| 21 | |
| 22 | * One Device manager Cortex-R5F for system power and resource |
| 23 | management, and one Cortex-R5F for Functional Safety or |
| 24 | general-purpose usage. |
| 25 | |
| 26 | * One 3D GPU up to 50 GLFOPS |
| 27 | |
| 28 | * H.264/H.265 Video Encode/Decode. |
| 29 | |
| 30 | * Display support: 3x display support over OLDI/LVDS (1x OLDI-DL, 1x or |
| 31 | 2x OLDI-SL), DSI, or DPI. Up to 3840x1080 @ 60fps resolution |
| 32 | |
| 33 | * Integrated Giga-bit Ethernet switch supporting up to a total of two |
| 34 | external ports (TSN capable). |
| 35 | |
| 36 | * 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3xMMC and SD, GPMC for |
| 37 | NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, |
| 38 | 1xCSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals. |
| 39 | |
| 40 | * Dedicated Centralized Hardware Security Module with support for secure |
| 41 | boot, debug security and crypto acceleration and trusted execution |
| 42 | environment. |
| 43 | |
| 44 | * One 32-bit DDR Subsystem that supports LPDDR4, DDR4 memory types. |
| 45 | |
| 46 | * Multiple low power modes support, ex: Deep sleep, Standby, MCU-only, |
| 47 | enabling battery powered system design. |
| 48 | |
| 49 | For those interested, more details about this SoC can be found in the |
| 50 | Technical Reference Manual here: https://www.ti.com/lit/pdf/spruj83 |
| 51 | |
| 52 | Boot Flow: |
| 53 | ---------- |
| 54 | |
| 55 | The bootflow is exactly the same as all SoCs in the am62xxx extended SoC |
| 56 | family. Below is the pictorial representation: |
| 57 | |
| 58 | .. image:: img/boot_diagram_k3_current.svg |
| 59 | :alt: Boot flow diagram |
| 60 | |
| 61 | - Here TIFS acts as master and provides all the critical services. R5/A53 |
| 62 | requests TIFS to get these services done as shown in the above diagram. |
| 63 | |
| 64 | Sources: |
| 65 | -------- |
| 66 | |
| 67 | .. include:: ../ti/k3.rst |
| 68 | :start-after: .. k3_rst_include_start_boot_sources |
| 69 | :end-before: .. k3_rst_include_end_boot_sources |
| 70 | |
| 71 | Build procedure: |
| 72 | ---------------- |
| 73 | |
| 74 | 0. Setup the environment variables: |
| 75 | |
| 76 | .. include:: ../ti/k3.rst |
| 77 | :start-after: .. k3_rst_include_start_common_env_vars_desc |
| 78 | :end-before: .. k3_rst_include_end_common_env_vars_desc |
| 79 | |
| 80 | .. include:: ../ti/k3.rst |
| 81 | :start-after: .. k3_rst_include_start_board_env_vars_desc |
| 82 | :end-before: .. k3_rst_include_end_board_env_vars_desc |
| 83 | |
| 84 | Set the variables corresponding to this platform: |
| 85 | |
| 86 | .. include:: ../ti/k3.rst |
| 87 | :start-after: .. k3_rst_include_start_common_env_vars_defn |
| 88 | :end-before: .. k3_rst_include_end_common_env_vars_defn |
| 89 | |
| 90 | .. code-block:: bash |
| 91 | |
| 92 | $ export UBOOT_CFG_CORTEXR=am62px_evm_r5_defconfig |
| 93 | $ export UBOOT_CFG_CORTEXA=am62px_evm_a53_defconfig |
| 94 | $ export TFA_BOARD=lite |
| 95 | $ # we dont use any extra TFA parameters |
| 96 | $ unset TFA_EXTRA_ARGS |
| 97 | $ export OPTEE_PLATFORM=k3-am62x |
| 98 | $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y" |
| 99 | |
| 100 | .. am62px_evm_rst_include_start_build_steps |
| 101 | |
| 102 | 1. Trusted Firmware-A: |
| 103 | |
| 104 | .. include:: ../ti/k3.rst |
| 105 | :start-after: .. k3_rst_include_start_build_steps_tfa |
| 106 | :end-before: .. k3_rst_include_end_build_steps_tfa |
| 107 | |
| 108 | |
| 109 | 2. OP-TEE: |
| 110 | |
| 111 | .. include:: ../ti/k3.rst |
| 112 | :start-after: .. k3_rst_include_start_build_steps_optee |
| 113 | :end-before: .. k3_rst_include_end_build_steps_optee |
| 114 | |
| 115 | 3. U-Boot: |
| 116 | |
| 117 | * 3.1 R5: |
| 118 | |
| 119 | .. include:: ../ti/k3.rst |
| 120 | :start-after: .. k3_rst_include_start_build_steps_spl_r5 |
| 121 | :end-before: .. k3_rst_include_end_build_steps_spl_r5 |
| 122 | |
| 123 | * 3.2 A53: |
| 124 | |
| 125 | .. include:: ../ti/k3.rst |
| 126 | :start-after: .. k3_rst_include_start_build_steps_uboot |
| 127 | :end-before: .. k3_rst_include_end_build_steps_uboot |
| 128 | .. am62px_evm_rst_include_end_build_steps |
| 129 | |
| 130 | Target Images |
| 131 | -------------- |
| 132 | |
| 133 | In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC |
| 134 | variant (HS-FS, HS-SE) requires a different source for these files. |
| 135 | |
| 136 | - HS-FS |
| 137 | |
| 138 | * tiboot3-am62px-hs-fs-evm.bin from step 3.1 |
| 139 | * tispl.bin, u-boot.img from step 3.2 |
| 140 | |
| 141 | - HS-SE |
| 142 | |
| 143 | * tiboot3-am62px-hs-evm.bin from step 3.1 |
| 144 | * tispl.bin, u-boot.img from step 3.2 |
| 145 | |
| 146 | Image formats: |
| 147 | -------------- |
| 148 | |
| 149 | - tiboot3.bin |
| 150 | |
| 151 | .. image:: img/multi_cert_tiboot3.bin.svg |
| 152 | :alt: tiboot3.bin image format |
| 153 | |
| 154 | - tispl.bin |
| 155 | |
| 156 | .. image:: img/dm_tispl.bin.svg |
| 157 | :alt: tispl.bin image format |
| 158 | |
Jonathan Humphreys | f4c161f | 2024-06-14 11:35:45 -0500 | [diff] [blame] | 159 | OSPI: |
| 160 | ----- |
| 161 | ROM supports booting from OSPI from offset 0x0. |
| 162 | |
| 163 | Flashing images to OSPI: |
| 164 | |
| 165 | Below commands can be used to download tiboot3.bin, tispl.bin, and u-boot.img, |
| 166 | over tftp and then flash those to OSPI at their respective addresses. |
| 167 | |
| 168 | .. prompt:: bash => |
| 169 | |
| 170 | sf probe |
| 171 | tftp ${loadaddr} tiboot3.bin |
| 172 | sf update $loadaddr 0x0 $filesize |
| 173 | tftp ${loadaddr} tispl.bin |
| 174 | sf update $loadaddr 0x80000 $filesize |
| 175 | tftp ${loadaddr} u-boot.img |
| 176 | sf update $loadaddr 0x280000 $filesize |
| 177 | |
| 178 | Flash layout for OSPI: |
| 179 | |
| 180 | .. image:: img/ospi_sysfw2.svg |
| 181 | :alt: OSPI flash partition layout |
| 182 | |
Bryan Brattlof | cf2e2b1 | 2024-03-12 15:20:30 -0500 | [diff] [blame] | 183 | A53 SPL DDR Memory Layout |
| 184 | ------------------------- |
| 185 | |
| 186 | .. am62px_evm_rst_include_start_ddr_mem_layout |
| 187 | |
| 188 | This provides an overview memory usage in A53 SPL stage. |
| 189 | |
| 190 | .. list-table:: |
| 191 | :widths: 16 16 16 |
| 192 | :header-rows: 1 |
| 193 | |
| 194 | * - Region |
| 195 | - Start Address |
| 196 | - End Address |
| 197 | |
| 198 | * - EMPTY |
| 199 | - 0x80000000 |
| 200 | - 0x80080000 |
| 201 | |
| 202 | * - TEXT BASE |
| 203 | - 0x80080000 |
| 204 | - 0x800d8000 |
| 205 | |
| 206 | * - EMPTY |
| 207 | - 0x800d8000 |
| 208 | - 0x80200000 |
| 209 | |
| 210 | * - BMP IMAGE |
| 211 | - 0x80200000 |
| 212 | - 0x80b77660 |
| 213 | |
| 214 | * - STACK |
| 215 | - 0x80b77660 |
| 216 | - 0x80b77e60 |
| 217 | |
| 218 | * - GD |
| 219 | - 0x80b77e60 |
| 220 | - 0x80b78000 |
| 221 | |
| 222 | * - MALLOC |
| 223 | - 0x80b78000 |
| 224 | - 0x80b80000 |
| 225 | |
| 226 | * - EMPTY |
| 227 | - 0x80b80000 |
| 228 | - 0x80c80000 |
| 229 | |
| 230 | * - BSS |
| 231 | - 0x80c80000 |
| 232 | - 0x80d00000 |
| 233 | |
| 234 | * - BLOBS |
| 235 | - 0x80d00000 |
| 236 | - 0x80d00400 |
| 237 | |
| 238 | * - EMPTY |
| 239 | - 0x80d00400 |
| 240 | - 0x81000000 |
| 241 | .. am62px_evm_rst_include_end_ddr_mem_layout |
| 242 | |
| 243 | Switch Setting for Boot Mode |
| 244 | ---------------------------- |
| 245 | |
| 246 | Boot Mode pins provide means to select the boot mode and options before the |
| 247 | device is powered up. After every POR, they are the main source to populate |
| 248 | the Boot Parameter Tables. |
| 249 | |
| 250 | The following table shows some common boot modes used on AM62Px |
| 251 | platforms. More details can be found in the Technical Reference Manual: |
| 252 | https://www.ti.com/lit/pdf/spruj83 under the `Boot Mode Pins` section. |
| 253 | |
| 254 | .. note:: |
| 255 | |
| 256 | This device is very new. Currently only UART boot is available while |
| 257 | we continue to add support for the other bootmodes. |
| 258 | |
| 259 | .. list-table:: Boot Modes |
| 260 | :widths: 16 16 16 |
| 261 | :header-rows: 1 |
| 262 | |
| 263 | * - Switch Label |
| 264 | - SW2: 12345678 |
| 265 | - SW3: 12345678 |
| 266 | |
| 267 | * - SD |
| 268 | - 01000000 |
| 269 | - 11000010 |
| 270 | |
| 271 | * - OSPI |
| 272 | - 00000000 |
| 273 | - 11001110 |
| 274 | |
| 275 | * - EMMC |
| 276 | - 00000000 |
| 277 | - 11010010 |
| 278 | |
| 279 | * - UART |
| 280 | - 00000000 |
| 281 | - 11011100 |
| 282 | |
| 283 | * - USB DFU |
| 284 | - 00000000 |
| 285 | - 11001010 |
| 286 | |
| 287 | For SW2 and SW1, the switch state in the "ON" position = 1. |
| 288 | |
| 289 | Debugging U-Boot |
| 290 | ---------------- |
| 291 | |
| 292 | See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for |
| 293 | detailed setup information. |
| 294 | |
| 295 | .. warning:: |
| 296 | |
| 297 | **OpenOCD support after**: v0.12.0 |
| 298 | |
| 299 | While support for the entire K3 generation including the am62xxx |
| 300 | extended family was added before v0.12.0, the tcl scripts for the |
| 301 | am62px have been accepted and will be available in the next release of |
| 302 | OpenOCD. It may be necessary to build OpenOCD from source depending on |
| 303 | the version your distribution has packaged. |
| 304 | |
| 305 | .. include:: k3.rst |
| 306 | :start-after: .. k3_rst_include_start_openocd_connect_XDS110 |
| 307 | :end-before: .. k3_rst_include_end_openocd_connect_XDS110 |
| 308 | |
| 309 | To start OpenOCD and connect to the board |
| 310 | |
| 311 | .. code-block:: bash |
| 312 | |
| 313 | openocd -f board/ti_am62pevm.cfg |