Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause |
| 2 | .. sectionauthor:: Vignesh Raghavendra <vigneshr@ti.com> |
| 3 | |
Bryan Brattlof | 10d3f17 | 2022-12-19 14:29:49 -0600 | [diff] [blame] | 4 | AM62 Platforms |
| 5 | =============== |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 6 | |
| 7 | Introduction: |
| 8 | ------------- |
| 9 | The AM62 SoC family is the follow on AM335x built on the K3 Multicore |
| 10 | SoC architecture platform, providing ultra-low-power modes, dual |
| 11 | display, multi-sensor edge compute, security and other BOM-saving |
| 12 | integrations. The AM62 SoC targets a broad market to enable |
| 13 | applications such as Industrial HMI, PLC/CNC/Robot control, Medical |
| 14 | Equipment, Building Automation, Appliances and more. |
| 15 | |
| 16 | Some highlights of this SoC are: |
| 17 | |
| 18 | * Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. |
| 19 | Pin-to-pin compatible options for single and quad core are available. |
| 20 | * Cortex-M4F for general-purpose or safety usage. |
| 21 | * Dual display support, providing 24-bit RBG parallel interface and |
| 22 | OLDI/LVDS-4 Lane x2, up to 200MHz pixel clock support for 2K display |
| 23 | resolution. |
| 24 | * Selectable GPU support, up to 8GFLOPS, providing better user experience |
| 25 | in 3D graphic display case and Android. |
| 26 | * PRU(Programmable Realtime Unit) support for customized programmable |
| 27 | interfaces/IOs. |
| 28 | * Integrated Giga-bit Ethernet switch supporting up to a total of two |
| 29 | external ports (TSN capable). |
| 30 | * 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3x eMMC and SD, GPMC for |
| 31 | NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, |
| 32 | 1x CSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals. |
| 33 | * Dedicated Centralized System Controller for Security, Power, and |
| 34 | Resource Management. |
| 35 | * Multiple low power modes support, ex: Deep sleep, Standby, MCU-only, |
| 36 | enabling battery powered system design. |
| 37 | |
| 38 | More details can be found in the Technical Reference Manual: |
| 39 | https://www.ti.com/lit/pdf/spruiv7 |
| 40 | |
| 41 | Boot Flow: |
| 42 | ---------- |
| 43 | Below is the pictorial representation of boot flow: |
| 44 | |
Nishanth Menon | b47c9f7 | 2023-07-27 13:58:45 -0500 | [diff] [blame] | 45 | .. image:: img/boot_diagram_k3_current.svg |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 46 | |
| 47 | - Here TIFS acts as master and provides all the critical services. R5/A53 |
| 48 | requests TIFS to get these services done as shown in the above diagram. |
| 49 | |
| 50 | Sources: |
| 51 | -------- |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 52 | |
Nishanth Menon | ee91e48 | 2023-07-27 13:58:44 -0500 | [diff] [blame] | 53 | .. include:: k3.rst |
| 54 | :start-after: .. k3_rst_include_start_boot_sources |
| 55 | :end-before: .. k3_rst_include_end_boot_sources |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 56 | |
| 57 | Build procedure: |
| 58 | ---------------- |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 59 | 0. Setup the environment variables: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 60 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 61 | .. include:: k3.rst |
| 62 | :start-after: .. k3_rst_include_start_common_env_vars_desc |
| 63 | :end-before: .. k3_rst_include_end_common_env_vars_desc |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 64 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 65 | .. include:: k3.rst |
| 66 | :start-after: .. k3_rst_include_start_board_env_vars_desc |
| 67 | :end-before: .. k3_rst_include_end_board_env_vars_desc |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 68 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 69 | Set the variables corresponding to this platform: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 70 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 71 | .. include:: k3.rst |
| 72 | :start-after: .. k3_rst_include_start_common_env_vars_defn |
| 73 | :end-before: .. k3_rst_include_end_common_env_vars_defn |
Neha Malcom Francis | 507be12 | 2023-07-22 00:14:43 +0530 | [diff] [blame] | 74 | .. code-block:: bash |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 75 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 76 | $ export UBOOT_CFG_CORTEXR=am62x_evm_r5_defconfig |
| 77 | $ export UBOOT_CFG_CORTEXA=am62x_evm_a53_defconfig |
| 78 | $ export TFA_BOARD=lite |
| 79 | $ # we dont use any extra TFA parameters |
| 80 | $ unset TFA_EXTRA_ARGS |
| 81 | $ export OPTEE_PLATFORM=k3-am62x |
| 82 | $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y" |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 83 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 84 | .. am62x_evm_rst_include_start_build_steps |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 85 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 86 | 1. Trusted Firmware-A: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 87 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 88 | .. include:: k3.rst |
| 89 | :start-after: .. k3_rst_include_start_build_steps_tfa |
| 90 | :end-before: .. k3_rst_include_end_build_steps_tfa |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 91 | |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 92 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 93 | 2. OP-TEE: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 94 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 95 | .. include:: k3.rst |
| 96 | :start-after: .. k3_rst_include_start_build_steps_optee |
| 97 | :end-before: .. k3_rst_include_end_build_steps_optee |
| 98 | |
| 99 | 3. U-Boot: |
| 100 | |
| 101 | * 4.1 R5: |
| 102 | |
| 103 | .. include:: k3.rst |
| 104 | :start-after: .. k3_rst_include_start_build_steps_spl_r5 |
| 105 | :end-before: .. k3_rst_include_end_build_steps_spl_r5 |
| 106 | |
| 107 | * 4.2 A53: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 108 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 109 | .. include:: k3.rst |
| 110 | :start-after: .. k3_rst_include_start_build_steps_uboot |
| 111 | :end-before: .. k3_rst_include_end_build_steps_uboot |
| 112 | .. am62x_evm_rst_include_end_build_steps |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 113 | |
| 114 | Target Images |
| 115 | -------------- |
Tom Rini | fdf4503 | 2023-07-25 12:44:16 -0400 | [diff] [blame] | 116 | In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC |
| 117 | variant (GP, HS-FS, HS-SE) requires a different source for these files. |
Neha Malcom Francis | 507be12 | 2023-07-22 00:14:43 +0530 | [diff] [blame] | 118 | |
| 119 | - GP |
| 120 | |
| 121 | * tiboot3-am62x-gp-evm.bin from step 3.1 |
| 122 | * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2 |
| 123 | |
| 124 | - HS-FS |
| 125 | |
| 126 | * tiboot3-am62x-hs-fs-evm.bin from step 3.1 |
| 127 | * tispl.bin, u-boot.img from step 3.2 |
| 128 | |
| 129 | - HS-SE |
| 130 | |
| 131 | * tiboot3-am62x-hs-evm.bin from step 3.1 |
| 132 | * tispl.bin, u-boot.img from step 3.2 |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 133 | |
| 134 | Image formats: |
| 135 | -------------- |
| 136 | |
Nishanth Menon | 96a5f18 | 2023-07-27 13:58:52 -0500 | [diff] [blame^] | 137 | - tiboot3.bin |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 138 | |
Nishanth Menon | 96a5f18 | 2023-07-27 13:58:52 -0500 | [diff] [blame^] | 139 | .. image:: img/multi_cert_tiboot3.bin.svg |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 140 | |
| 141 | - tispl.bin |
| 142 | |
Nishanth Menon | 96a5f18 | 2023-07-27 13:58:52 -0500 | [diff] [blame^] | 143 | .. image:: img/dm_tispl.bin.svg |
Judith Mendez | 964f972 | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 144 | |
Nikhil M Jain | a9b1204 | 2023-07-18 14:27:35 +0530 | [diff] [blame] | 145 | A53 SPL DDR Memory Layout |
| 146 | ------------------------- |
| 147 | |
| 148 | This provides an overview memory usage in A53 SPL stage. |
| 149 | |
| 150 | .. list-table:: |
| 151 | :widths: 16 16 16 |
| 152 | :header-rows: 1 |
| 153 | |
| 154 | * - Region |
| 155 | - Start Address |
| 156 | - End Address |
| 157 | |
| 158 | * - EMPTY |
| 159 | - 0x80000000 |
| 160 | - 0x80080000 |
| 161 | |
| 162 | * - TEXT BASE |
| 163 | - 0x80080000 |
| 164 | - 0x800d8000 |
| 165 | |
| 166 | * - EMPTY |
| 167 | - 0x800d8000 |
| 168 | - 0x80200000 |
| 169 | |
| 170 | * - BMP IMAGE |
| 171 | - 0x80200000 |
| 172 | - 0x80b77660 |
| 173 | |
| 174 | * - STACK |
| 175 | - 0x80b77660 |
| 176 | - 0x80b77e60 |
| 177 | |
| 178 | * - GD |
| 179 | - 0x80b77e60 |
| 180 | - 0x80b78000 |
| 181 | |
| 182 | * - MALLOC |
| 183 | - 0x80b78000 |
| 184 | - 0x80b80000 |
| 185 | |
| 186 | * - EMPTY |
| 187 | - 0x80b80000 |
| 188 | - 0x80c80000 |
| 189 | |
| 190 | * - BSS |
| 191 | - 0x80c80000 |
| 192 | - 0x80d00000 |
| 193 | |
| 194 | * - BLOBS |
| 195 | - 0x80d00000 |
| 196 | - 0x80d00400 |
| 197 | |
| 198 | * - EMPTY |
| 199 | - 0x80d00400 |
| 200 | - 0x81000000 |
| 201 | |
Judith Mendez | 964f972 | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 202 | Switch Setting for Boot Mode |
| 203 | ---------------------------- |
| 204 | |
| 205 | Boot Mode pins provide means to select the boot mode and options before the |
| 206 | device is powered up. After every POR, they are the main source to populate |
| 207 | the Boot Parameter Tables. |
| 208 | |
| 209 | The following table shows some common boot modes used on AM62 platform. More |
| 210 | details can be found in the Technical Reference Manual: |
| 211 | https://www.ti.com/lit/pdf/spruiv7 under the `Boot Mode Pins` section. |
| 212 | |
| 213 | *Boot Modes* |
| 214 | |
| 215 | ============ ============= ============= |
| 216 | Switch Label SW2: 12345678 SW3: 12345678 |
| 217 | ============ ============= ============= |
| 218 | SD 01000000 11000010 |
| 219 | OSPI 00000000 11001110 |
| 220 | EMMC 00000000 11010010 |
| 221 | UART 00000000 11011100 |
| 222 | USB DFU 00000000 11001010 |
| 223 | ============ ============= ============= |
| 224 | |
| 225 | For SW2 and SW1, the switch state in the "ON" position = 1. |