Vignesh Raghavendra | e16aac3 | 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 | 0820e11 | 2022-12-19 14:29:49 -0600 | [diff] [blame] | 4 | AM62 Platforms |
| 5 | =============== |
Vignesh Raghavendra | e16aac3 | 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 | |
Nishanth Menon | 08df746 | 2023-07-27 13:59:00 -0500 | [diff] [blame] | 41 | Platform information: |
| 42 | |
| 43 | * https://www.ti.com/tool/SK-AM62B |
| 44 | |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 45 | Boot Flow: |
| 46 | ---------- |
| 47 | Below is the pictorial representation of boot flow: |
| 48 | |
Nishanth Menon | 68b3baa | 2023-07-27 13:58:45 -0500 | [diff] [blame] | 49 | .. image:: img/boot_diagram_k3_current.svg |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 50 | |
| 51 | - Here TIFS acts as master and provides all the critical services. R5/A53 |
| 52 | requests TIFS to get these services done as shown in the above diagram. |
| 53 | |
| 54 | Sources: |
| 55 | -------- |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 56 | |
Marcel Ziswiler | 7d1a106 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 57 | .. include:: ../ti/k3.rst |
Nishanth Menon | cce3e7a | 2023-07-27 13:58:44 -0500 | [diff] [blame] | 58 | :start-after: .. k3_rst_include_start_boot_sources |
| 59 | :end-before: .. k3_rst_include_end_boot_sources |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 60 | |
| 61 | Build procedure: |
| 62 | ---------------- |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 63 | 0. Setup the environment variables: |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 64 | |
Marcel Ziswiler | 7d1a106 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 65 | .. include:: ../ti/k3.rst |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 66 | :start-after: .. k3_rst_include_start_common_env_vars_desc |
| 67 | :end-before: .. k3_rst_include_end_common_env_vars_desc |
| 68 | |
Marcel Ziswiler | 7d1a106 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 69 | .. include:: ../ti/k3.rst |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 70 | :start-after: .. k3_rst_include_start_board_env_vars_desc |
| 71 | :end-before: .. k3_rst_include_end_board_env_vars_desc |
| 72 | |
| 73 | Set the variables corresponding to this platform: |
| 74 | |
Marcel Ziswiler | 7d1a106 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 75 | .. include:: ../ti/k3.rst |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 76 | :start-after: .. k3_rst_include_start_common_env_vars_defn |
| 77 | :end-before: .. k3_rst_include_end_common_env_vars_defn |
Neha Malcom Francis | 1ee652a | 2023-07-22 00:14:43 +0530 | [diff] [blame] | 78 | .. code-block:: bash |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 79 | |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 80 | $ export UBOOT_CFG_CORTEXR=am62x_evm_r5_defconfig |
| 81 | $ export UBOOT_CFG_CORTEXA=am62x_evm_a53_defconfig |
| 82 | $ export TFA_BOARD=lite |
| 83 | $ # we dont use any extra TFA parameters |
| 84 | $ unset TFA_EXTRA_ARGS |
| 85 | $ export OPTEE_PLATFORM=k3-am62x |
| 86 | $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y" |
| 87 | |
| 88 | .. am62x_evm_rst_include_start_build_steps |
| 89 | |
| 90 | 1. Trusted Firmware-A: |
| 91 | |
Marcel Ziswiler | 7d1a106 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 92 | .. include:: ../ti/k3.rst |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 93 | :start-after: .. k3_rst_include_start_build_steps_tfa |
| 94 | :end-before: .. k3_rst_include_end_build_steps_tfa |
| 95 | |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 96 | |
Neha Malcom Francis | 1ee652a | 2023-07-22 00:14:43 +0530 | [diff] [blame] | 97 | 2. OP-TEE: |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 98 | |
Marcel Ziswiler | 7d1a106 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 99 | .. include:: ../ti/k3.rst |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 100 | :start-after: .. k3_rst_include_start_build_steps_optee |
| 101 | :end-before: .. k3_rst_include_end_build_steps_optee |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 102 | |
| 103 | 3. U-Boot: |
| 104 | |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 105 | * 4.1 R5: |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 106 | |
Marcel Ziswiler | 7d1a106 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 107 | .. include:: ../ti/k3.rst |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 108 | :start-after: .. k3_rst_include_start_build_steps_spl_r5 |
| 109 | :end-before: .. k3_rst_include_end_build_steps_spl_r5 |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 110 | |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 111 | * 4.2 A53: |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 112 | |
Marcel Ziswiler | 7d1a106 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 113 | .. include:: ../ti/k3.rst |
Nishanth Menon | c727b81 | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 114 | :start-after: .. k3_rst_include_start_build_steps_uboot |
| 115 | :end-before: .. k3_rst_include_end_build_steps_uboot |
| 116 | .. am62x_evm_rst_include_end_build_steps |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 117 | |
| 118 | Target Images |
| 119 | -------------- |
Tom Rini | f687c8f | 2023-07-25 12:44:16 -0400 | [diff] [blame] | 120 | In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC |
| 121 | variant (GP, HS-FS, HS-SE) requires a different source for these files. |
Neha Malcom Francis | 1ee652a | 2023-07-22 00:14:43 +0530 | [diff] [blame] | 122 | |
| 123 | - GP |
| 124 | |
| 125 | * tiboot3-am62x-gp-evm.bin from step 3.1 |
| 126 | * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2 |
| 127 | |
| 128 | - HS-FS |
| 129 | |
| 130 | * tiboot3-am62x-hs-fs-evm.bin from step 3.1 |
| 131 | * tispl.bin, u-boot.img from step 3.2 |
| 132 | |
| 133 | - HS-SE |
| 134 | |
| 135 | * tiboot3-am62x-hs-evm.bin from step 3.1 |
| 136 | * tispl.bin, u-boot.img from step 3.2 |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 137 | |
| 138 | Image formats: |
| 139 | -------------- |
| 140 | |
Nishanth Menon | 34f7692 | 2023-07-27 13:58:52 -0500 | [diff] [blame] | 141 | - tiboot3.bin |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 142 | |
Nishanth Menon | 34f7692 | 2023-07-27 13:58:52 -0500 | [diff] [blame] | 143 | .. image:: img/multi_cert_tiboot3.bin.svg |
Vignesh Raghavendra | e16aac3 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 144 | |
| 145 | - tispl.bin |
| 146 | |
Nishanth Menon | 34f7692 | 2023-07-27 13:58:52 -0500 | [diff] [blame] | 147 | .. image:: img/dm_tispl.bin.svg |
Judith Mendez | 354c05f | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 148 | |
Nikhil M Jain | a72532f | 2023-07-18 14:27:35 +0530 | [diff] [blame] | 149 | A53 SPL DDR Memory Layout |
| 150 | ------------------------- |
| 151 | |
Nishanth Menon | d7c3ca9 | 2023-07-27 13:58:53 -0500 | [diff] [blame] | 152 | .. am62x_evm_rst_include_start_ddr_mem_layout |
| 153 | |
Nikhil M Jain | a72532f | 2023-07-18 14:27:35 +0530 | [diff] [blame] | 154 | This provides an overview memory usage in A53 SPL stage. |
| 155 | |
| 156 | .. list-table:: |
| 157 | :widths: 16 16 16 |
| 158 | :header-rows: 1 |
| 159 | |
| 160 | * - Region |
| 161 | - Start Address |
| 162 | - End Address |
| 163 | |
| 164 | * - EMPTY |
| 165 | - 0x80000000 |
| 166 | - 0x80080000 |
| 167 | |
| 168 | * - TEXT BASE |
| 169 | - 0x80080000 |
| 170 | - 0x800d8000 |
| 171 | |
| 172 | * - EMPTY |
| 173 | - 0x800d8000 |
| 174 | - 0x80200000 |
| 175 | |
| 176 | * - BMP IMAGE |
| 177 | - 0x80200000 |
| 178 | - 0x80b77660 |
| 179 | |
| 180 | * - STACK |
| 181 | - 0x80b77660 |
| 182 | - 0x80b77e60 |
| 183 | |
| 184 | * - GD |
| 185 | - 0x80b77e60 |
| 186 | - 0x80b78000 |
| 187 | |
| 188 | * - MALLOC |
| 189 | - 0x80b78000 |
| 190 | - 0x80b80000 |
| 191 | |
| 192 | * - EMPTY |
| 193 | - 0x80b80000 |
| 194 | - 0x80c80000 |
| 195 | |
| 196 | * - BSS |
| 197 | - 0x80c80000 |
| 198 | - 0x80d00000 |
| 199 | |
| 200 | * - BLOBS |
| 201 | - 0x80d00000 |
| 202 | - 0x80d00400 |
| 203 | |
| 204 | * - EMPTY |
| 205 | - 0x80d00400 |
| 206 | - 0x81000000 |
Nishanth Menon | d7c3ca9 | 2023-07-27 13:58:53 -0500 | [diff] [blame] | 207 | .. am62x_evm_rst_include_end_ddr_mem_layout |
Nikhil M Jain | a72532f | 2023-07-18 14:27:35 +0530 | [diff] [blame] | 208 | |
Judith Mendez | 354c05f | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 209 | Switch Setting for Boot Mode |
| 210 | ---------------------------- |
| 211 | |
| 212 | Boot Mode pins provide means to select the boot mode and options before the |
| 213 | device is powered up. After every POR, they are the main source to populate |
| 214 | the Boot Parameter Tables. |
| 215 | |
| 216 | The following table shows some common boot modes used on AM62 platform. More |
| 217 | details can be found in the Technical Reference Manual: |
| 218 | https://www.ti.com/lit/pdf/spruiv7 under the `Boot Mode Pins` section. |
| 219 | |
Nishanth Menon | 36ed8fb | 2023-07-27 13:58:54 -0500 | [diff] [blame] | 220 | .. list-table:: Boot Modes |
| 221 | :widths: 16 16 16 |
| 222 | :header-rows: 1 |
Judith Mendez | 354c05f | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 223 | |
Nishanth Menon | 36ed8fb | 2023-07-27 13:58:54 -0500 | [diff] [blame] | 224 | * - Switch Label |
| 225 | - SW2: 12345678 |
| 226 | - SW3: 12345678 |
| 227 | |
| 228 | * - SD |
| 229 | - 01000000 |
| 230 | - 11000010 |
| 231 | |
| 232 | * - OSPI |
| 233 | - 00000000 |
| 234 | - 11001110 |
| 235 | |
| 236 | * - EMMC |
| 237 | - 00000000 |
| 238 | - 11010010 |
| 239 | |
| 240 | * - UART |
| 241 | - 00000000 |
| 242 | - 11011100 |
| 243 | |
| 244 | * - USB DFU |
| 245 | - 00000000 |
| 246 | - 11001010 |
Judith Mendez | 354c05f | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 247 | |
| 248 | For SW2 and SW1, the switch state in the "ON" position = 1. |
Jason Kacines | effe508 | 2023-08-03 01:29:22 -0500 | [diff] [blame] | 249 | |
| 250 | Debugging U-Boot |
| 251 | ---------------- |
| 252 | |
| 253 | See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for |
| 254 | detailed setup information. |
| 255 | |
| 256 | .. warning:: |
| 257 | |
| 258 | **OpenOCD support since**: v0.12.0 |
| 259 | |
| 260 | If the default package version of OpenOCD in your development |
| 261 | environment's distribution needs to be updated, it might be necessary to |
| 262 | build OpenOCD from the source. |
| 263 | |
| 264 | .. include:: k3.rst |
| 265 | :start-after: .. k3_rst_include_start_openocd_connect_XDS110 |
| 266 | :end-before: .. k3_rst_include_end_openocd_connect_XDS110 |
| 267 | |
| 268 | To start OpenOCD and connect to the board |
| 269 | |
| 270 | .. code-block:: bash |
| 271 | |
| 272 | openocd -f board/ti_am625evm.cfg |