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 |
Heinrich Schuchardt | b72160b | 2023-10-28 11:59:32 +0200 | [diff] [blame] | 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 | |
Nishanth Menon | 4981d9a | 2023-07-27 13:59:00 -0500 | [diff] [blame] | 41 | Platform information: |
| 42 | |
| 43 | * https://www.ti.com/tool/SK-AM62B |
| 44 | |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 45 | Boot Flow: |
| 46 | ---------- |
| 47 | Below is the pictorial representation of boot flow: |
| 48 | |
Dhruva Gole | c6bfa97 | 2024-08-05 19:59:34 +0530 | [diff] [blame] | 49 | .. image:: img/boot_diagram_am62.svg |
Heinrich Schuchardt | bcd233b | 2023-08-22 11:40:57 -0500 | [diff] [blame] | 50 | :alt: Boot flow diagram |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 51 | |
| 52 | - Here TIFS acts as master and provides all the critical services. R5/A53 |
| 53 | requests TIFS to get these services done as shown in the above diagram. |
| 54 | |
| 55 | Sources: |
| 56 | -------- |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 57 | |
Marcel Ziswiler | 315deb3 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 58 | .. include:: ../ti/k3.rst |
Nishanth Menon | ee91e48 | 2023-07-27 13:58:44 -0500 | [diff] [blame] | 59 | :start-after: .. k3_rst_include_start_boot_sources |
| 60 | :end-before: .. k3_rst_include_end_boot_sources |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 61 | |
Dhruva Gole | 4a395e9 | 2024-08-05 19:59:32 +0530 | [diff] [blame] | 62 | .. include:: ../ti/k3.rst |
| 63 | :start-after: .. k3_rst_include_start_boot_firmwares |
| 64 | :end-before: .. k3_rst_include_end_tifsstub |
| 65 | |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 66 | Build procedure: |
| 67 | ---------------- |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 68 | 0. Setup the environment variables: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 69 | |
Marcel Ziswiler | 315deb3 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 70 | .. include:: ../ti/k3.rst |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 71 | :start-after: .. k3_rst_include_start_common_env_vars_desc |
| 72 | :end-before: .. k3_rst_include_end_common_env_vars_desc |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 73 | |
Marcel Ziswiler | 315deb3 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 74 | .. include:: ../ti/k3.rst |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 75 | :start-after: .. k3_rst_include_start_board_env_vars_desc |
| 76 | :end-before: .. k3_rst_include_end_board_env_vars_desc |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 77 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 78 | Set the variables corresponding to this platform: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 79 | |
Marcel Ziswiler | 315deb3 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 80 | .. include:: ../ti/k3.rst |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 81 | :start-after: .. k3_rst_include_start_common_env_vars_defn |
| 82 | :end-before: .. k3_rst_include_end_common_env_vars_defn |
Nishanth Menon | fdd7cb7 | 2023-11-02 23:40:26 -0500 | [diff] [blame] | 83 | .. prompt:: bash $ |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 84 | |
Nishanth Menon | fdd7cb7 | 2023-11-02 23:40:26 -0500 | [diff] [blame] | 85 | export UBOOT_CFG_CORTEXR=am62x_evm_r5_defconfig |
| 86 | export UBOOT_CFG_CORTEXA=am62x_evm_a53_defconfig |
| 87 | export TFA_BOARD=lite |
| 88 | # we dont use any extra TFA parameters |
| 89 | unset TFA_EXTRA_ARGS |
| 90 | export OPTEE_PLATFORM=k3-am62x |
| 91 | export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y" |
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 | .. am62x_evm_rst_include_start_build_steps |
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 | 1. Trusted Firmware-A: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 96 | |
Marcel Ziswiler | 315deb3 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 97 | .. include:: ../ti/k3.rst |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 98 | :start-after: .. k3_rst_include_start_build_steps_tfa |
| 99 | :end-before: .. k3_rst_include_end_build_steps_tfa |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 100 | |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 101 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 102 | 2. OP-TEE: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 103 | |
Marcel Ziswiler | 315deb3 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 104 | .. include:: ../ti/k3.rst |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 105 | :start-after: .. k3_rst_include_start_build_steps_optee |
| 106 | :end-before: .. k3_rst_include_end_build_steps_optee |
| 107 | |
| 108 | 3. U-Boot: |
| 109 | |
Nishanth Menon | 4ef5f34 | 2023-08-22 11:41:02 -0500 | [diff] [blame] | 110 | * 3.1 R5: |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 111 | |
Marcel Ziswiler | 315deb3 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 112 | .. include:: ../ti/k3.rst |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 113 | :start-after: .. k3_rst_include_start_build_steps_spl_r5 |
| 114 | :end-before: .. k3_rst_include_end_build_steps_spl_r5 |
| 115 | |
Sjoerd Simons | e71fea3 | 2024-05-06 15:38:46 +0100 | [diff] [blame] | 116 | * 3.1.1 Alternative build of R5 for DFU boot: |
| 117 | |
| 118 | As the SPL size can get too big when building with support for booting both |
| 119 | from local storage *and* DFU an extra config fragment should be used to enable |
| 120 | DFU support (and disable storage support) |
| 121 | |
| 122 | .. prompt:: bash $ |
| 123 | |
| 124 | export UBOOT_CFG_CORTEXR="${UBOOT_CFG_CORTEXR} am62x_r5_usbdfu.config" |
| 125 | |
| 126 | .. include:: ../ti/k3.rst |
| 127 | :start-after: .. k3_rst_include_start_build_steps_spl_r5 |
| 128 | :end-before: .. k3_rst_include_end_build_steps_spl_r5 |
| 129 | |
Nishanth Menon | 4ef5f34 | 2023-08-22 11:41:02 -0500 | [diff] [blame] | 130 | * 3.2 A53: |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 131 | |
Marcel Ziswiler | 315deb3 | 2023-08-04 12:08:08 +0200 | [diff] [blame] | 132 | .. include:: ../ti/k3.rst |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 133 | :start-after: .. k3_rst_include_start_build_steps_uboot |
| 134 | :end-before: .. k3_rst_include_end_build_steps_uboot |
Guillaume La Roque | 2a4642b | 2024-09-12 09:29:57 +0200 | [diff] [blame] | 135 | |
| 136 | * 3.2.1 Alternative build of A53 for Android bootflow: |
| 137 | |
| 138 | Since the Android requires many more dependencies, it is disabled by default. |
| 139 | An extra config fragment should be used to enable Android bootflow support. |
| 140 | |
| 141 | .. prompt:: bash $ |
| 142 | |
| 143 | export UBOOT_CFG_CORTEXR="${UBOOT_CFG_CORTEXA} am62x_a53_android.config" |
| 144 | |
| 145 | .. include:: ../ti/k3.rst |
| 146 | :start-after: .. k3_rst_include_start_build_steps_uboot |
| 147 | :end-before: .. k3_rst_include_end_build_steps_uboot |
| 148 | |
Nishanth Menon | b7ee22f | 2023-07-27 13:58:48 -0500 | [diff] [blame] | 149 | .. am62x_evm_rst_include_end_build_steps |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 150 | |
| 151 | Target Images |
Heinrich Schuchardt | b72160b | 2023-10-28 11:59:32 +0200 | [diff] [blame] | 152 | ------------- |
| 153 | |
Tom Rini | fdf4503 | 2023-07-25 12:44:16 -0400 | [diff] [blame] | 154 | In order to boot we need tiboot3.bin, tispl.bin and u-boot.img. Each SoC |
| 155 | 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] | 156 | |
| 157 | - GP |
| 158 | |
| 159 | * tiboot3-am62x-gp-evm.bin from step 3.1 |
| 160 | * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2 |
| 161 | |
| 162 | - HS-FS |
| 163 | |
| 164 | * tiboot3-am62x-hs-fs-evm.bin from step 3.1 |
| 165 | * tispl.bin, u-boot.img from step 3.2 |
| 166 | |
| 167 | - HS-SE |
| 168 | |
| 169 | * tiboot3-am62x-hs-evm.bin from step 3.1 |
| 170 | * tispl.bin, u-boot.img from step 3.2 |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 171 | |
| 172 | Image formats: |
| 173 | -------------- |
| 174 | |
Nishanth Menon | 96a5f18 | 2023-07-27 13:58:52 -0500 | [diff] [blame] | 175 | - tiboot3.bin |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 176 | |
Nishanth Menon | 96a5f18 | 2023-07-27 13:58:52 -0500 | [diff] [blame] | 177 | .. image:: img/multi_cert_tiboot3.bin.svg |
Heinrich Schuchardt | bcd233b | 2023-08-22 11:40:57 -0500 | [diff] [blame] | 178 | :alt: tiboot3.bin image format |
Vignesh Raghavendra | 2520546 | 2022-05-25 13:38:50 +0530 | [diff] [blame] | 179 | |
| 180 | - tispl.bin |
| 181 | |
Dhruva Gole | c6bfa97 | 2024-08-05 19:59:34 +0530 | [diff] [blame] | 182 | .. image:: img/tifsstub_dm_tispl.bin.svg |
Heinrich Schuchardt | bcd233b | 2023-08-22 11:40:57 -0500 | [diff] [blame] | 183 | :alt: tispl.bin image format |
Judith Mendez | 964f972 | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 184 | |
Jonathan Humphreys | 3a50e4b | 2024-06-14 11:35:42 -0500 | [diff] [blame] | 185 | OSPI: |
| 186 | ----- |
| 187 | ROM supports booting from OSPI from offset 0x0. |
| 188 | |
| 189 | Flashing images to OSPI: |
| 190 | |
| 191 | Below commands can be used to download tiboot3.bin, tispl.bin, and u-boot.img, |
| 192 | over tftp and then flash those to OSPI at their respective addresses. |
| 193 | |
| 194 | .. prompt:: bash => |
| 195 | |
| 196 | sf probe |
| 197 | tftp ${loadaddr} tiboot3.bin |
| 198 | sf update $loadaddr 0x0 $filesize |
| 199 | tftp ${loadaddr} tispl.bin |
| 200 | sf update $loadaddr 0x80000 $filesize |
| 201 | tftp ${loadaddr} u-boot.img |
| 202 | sf update $loadaddr 0x280000 $filesize |
| 203 | |
| 204 | Flash layout for OSPI: |
| 205 | |
| 206 | .. image:: img/ospi_sysfw2.svg |
| 207 | :alt: OSPI flash partition layout |
| 208 | |
Nikhil M Jain | a9b1204 | 2023-07-18 14:27:35 +0530 | [diff] [blame] | 209 | A53 SPL DDR Memory Layout |
| 210 | ------------------------- |
| 211 | |
Nishanth Menon | 3dc51b9 | 2023-07-27 13:58:53 -0500 | [diff] [blame] | 212 | .. am62x_evm_rst_include_start_ddr_mem_layout |
| 213 | |
Nikhil M Jain | a9b1204 | 2023-07-18 14:27:35 +0530 | [diff] [blame] | 214 | This provides an overview memory usage in A53 SPL stage. |
| 215 | |
| 216 | .. list-table:: |
| 217 | :widths: 16 16 16 |
| 218 | :header-rows: 1 |
| 219 | |
| 220 | * - Region |
| 221 | - Start Address |
| 222 | - End Address |
| 223 | |
| 224 | * - EMPTY |
| 225 | - 0x80000000 |
| 226 | - 0x80080000 |
| 227 | |
| 228 | * - TEXT BASE |
| 229 | - 0x80080000 |
| 230 | - 0x800d8000 |
| 231 | |
| 232 | * - EMPTY |
| 233 | - 0x800d8000 |
| 234 | - 0x80200000 |
| 235 | |
| 236 | * - BMP IMAGE |
| 237 | - 0x80200000 |
| 238 | - 0x80b77660 |
| 239 | |
| 240 | * - STACK |
| 241 | - 0x80b77660 |
| 242 | - 0x80b77e60 |
| 243 | |
| 244 | * - GD |
| 245 | - 0x80b77e60 |
| 246 | - 0x80b78000 |
| 247 | |
| 248 | * - MALLOC |
| 249 | - 0x80b78000 |
| 250 | - 0x80b80000 |
| 251 | |
| 252 | * - EMPTY |
| 253 | - 0x80b80000 |
| 254 | - 0x80c80000 |
| 255 | |
| 256 | * - BSS |
| 257 | - 0x80c80000 |
| 258 | - 0x80d00000 |
| 259 | |
| 260 | * - BLOBS |
| 261 | - 0x80d00000 |
| 262 | - 0x80d00400 |
| 263 | |
| 264 | * - EMPTY |
| 265 | - 0x80d00400 |
| 266 | - 0x81000000 |
Nishanth Menon | 3dc51b9 | 2023-07-27 13:58:53 -0500 | [diff] [blame] | 267 | .. am62x_evm_rst_include_end_ddr_mem_layout |
Nikhil M Jain | a9b1204 | 2023-07-18 14:27:35 +0530 | [diff] [blame] | 268 | |
Judith Mendez | 964f972 | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 269 | Switch Setting for Boot Mode |
| 270 | ---------------------------- |
| 271 | |
| 272 | Boot Mode pins provide means to select the boot mode and options before the |
| 273 | device is powered up. After every POR, they are the main source to populate |
| 274 | the Boot Parameter Tables. |
| 275 | |
| 276 | The following table shows some common boot modes used on AM62 platform. More |
| 277 | details can be found in the Technical Reference Manual: |
| 278 | https://www.ti.com/lit/pdf/spruiv7 under the `Boot Mode Pins` section. |
| 279 | |
Nishanth Menon | 5807ae8 | 2023-07-27 13:58:54 -0500 | [diff] [blame] | 280 | .. list-table:: Boot Modes |
| 281 | :widths: 16 16 16 |
| 282 | :header-rows: 1 |
| 283 | |
| 284 | * - Switch Label |
| 285 | - SW2: 12345678 |
| 286 | - SW3: 12345678 |
| 287 | |
| 288 | * - SD |
| 289 | - 01000000 |
| 290 | - 11000010 |
| 291 | |
| 292 | * - OSPI |
| 293 | - 00000000 |
| 294 | - 11001110 |
| 295 | |
| 296 | * - EMMC |
| 297 | - 00000000 |
| 298 | - 11010010 |
| 299 | |
| 300 | * - UART |
| 301 | - 00000000 |
| 302 | - 11011100 |
Judith Mendez | 964f972 | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 303 | |
Nishanth Menon | 5807ae8 | 2023-07-27 13:58:54 -0500 | [diff] [blame] | 304 | * - USB DFU |
| 305 | - 00000000 |
| 306 | - 11001010 |
Judith Mendez | 964f972 | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 307 | |
Chintan Vankar | 2a8c7af | 2024-09-26 10:31:38 +0530 | [diff] [blame] | 308 | * - Ethernet |
| 309 | - 00110000 |
| 310 | - 11000100 |
| 311 | |
Judith Mendez | 964f972 | 2023-03-31 15:36:15 -0500 | [diff] [blame] | 312 | For SW2 and SW1, the switch state in the "ON" position = 1. |
Jason Kacines | b0fdee9 | 2023-08-03 01:29:22 -0500 | [diff] [blame] | 313 | |
Sjoerd Simons | e71fea3 | 2024-05-06 15:38:46 +0100 | [diff] [blame] | 314 | DFU based boot |
| 315 | -------------- |
| 316 | |
| 317 | To boot the board over DFU, set the switches to DFU mode and connect to the |
| 318 | USB type C DRD port on the board. After power-on the build artifacts needs to be |
| 319 | uploaded one by one with a tool like dfu-util. |
| 320 | |
| 321 | .. am62x_evm_rst_include_start_dfu_boot |
| 322 | |
| 323 | The initial ROM will have a DFU alt named `bootloader` for the initial R5 spl |
| 324 | upload. The next stages as exposed by U-Boot have target alts matching the name |
| 325 | of the artifacts, for these a USB reset has to be done after each upload. |
| 326 | |
| 327 | When using dfu-util the following commands can be used to boot to a U-Boot shell: |
| 328 | |
| 329 | .. prompt:: bash $ |
| 330 | |
| 331 | dfu-util -a bootloader -D tiboot3.bin |
| 332 | dfu-util -R -a tispl -D tispl.bin |
| 333 | dfu-util -R -a u-boot.img -D u-boot.img |
| 334 | |
| 335 | .. am62x_evm_rst_include_end_dfu_boot |
| 336 | |
Chintan Vankar | 2a8c7af | 2024-09-26 10:31:38 +0530 | [diff] [blame] | 337 | Ethernet based boot |
| 338 | ------------------- |
| 339 | |
| 340 | To boot the board via Ethernet, configure the BOOT MODE pins for Ethernet boot. |
| 341 | |
| 342 | On powering on the device, ROM uses the Ethernet Port corresponding to CPSW3G's MAC |
| 343 | Port 1 to transmit "TI K3 Bootp Boot". |
| 344 | |
| 345 | The TFTP server and DHCP server on the receiver device need to be configured such |
| 346 | that VCI string "TI K3 Bootp Boot" maps to the file `tiboot3.bin` and the TFTP |
| 347 | server should be capable of transferring it to the device. |
| 348 | |
| 349 | **Configuring DHCP server includes following steps:** |
| 350 | |
| 351 | * Install DHCP server: |
| 352 | |
| 353 | .. prompt:: bash $ |
| 354 | |
| 355 | sudo apt install isc-dhcp-server |
| 356 | |
| 357 | * Disable services before configuring: |
| 358 | |
| 359 | .. prompt:: bash $ |
| 360 | |
| 361 | sudo systemctl disable --now isc-dhcp-server.service isc-dhcp-server6.service |
| 362 | |
| 363 | * DHCP server setup |
| 364 | |
| 365 | Run the ip link or ifconfig command to find the name of your network interface: |
| 366 | |
| 367 | Example |
| 368 | |
| 369 | .. code-block:: |
| 370 | |
| 371 | eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 |
| 372 | inet 172.24.145.229 netmask 255.255.254.0 broadcast 172.24.145.255 |
| 373 | inet6 fe80::bbd5:34c8:3d4c:5de4 prefixlen 64 scopeid 0x20<link> |
| 374 | ether c0:18:03:bd:b1:a6 txqueuelen 1000 (Ethernet) |
| 375 | RX packets 2733979 bytes 1904440459 (1.9 GB) |
| 376 | RX errors 0 dropped 3850 overruns 0 frame 0 |
| 377 | TX packets 796807 bytes 84534764 (84.5 MB) |
| 378 | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
| 379 | device interrupt 16 memory 0xe2200000-e2220000 |
| 380 | |
| 381 | enxf8e43b8cffe8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 |
| 382 | ether f8:e4:3b:8c:ff:e8 txqueuelen 1000 (Ethernet) |
| 383 | RX packets 95 bytes 31160 (31.1 KB) |
| 384 | RX errors 0 dropped 0 overruns 0 frame 0 |
| 385 | TX packets 89 bytes 17445 (17.4 KB) |
| 386 | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
| 387 | |
| 388 | lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 |
| 389 | inet 127.0.0.1 netmask 255.0.0.0 |
| 390 | inet6 ::1 prefixlen 128 scopeid 0x10<host> |
| 391 | loop txqueuelen 1000 (Local Loopback) |
| 392 | RX packets 85238 bytes 7244462 (7.2 MB) |
| 393 | RX errors 0 dropped 0 overruns 0 frame 0 |
| 394 | TX packets 85238 bytes 7244462 (7.2 MB) |
| 395 | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
| 396 | |
| 397 | Suppose we are using enxf8e43b8cffe8 interface, one end of it is connected to host PC |
| 398 | and other to board. |
| 399 | |
| 400 | * Do the following changes in /etc/dhcp/dhcpd.conf in host PC. |
| 401 | |
| 402 | .. code-block:: |
| 403 | |
| 404 | subnet 192.168.0.0 netmask 255.255.254.0 |
| 405 | { |
| 406 | range dynamic-bootp 192.168.0.2 192.168.0.5; |
| 407 | if substring (option vendor-class-identifier, 0, 16) = "TI K3 Bootp Boot" |
| 408 | { |
| 409 | filename "tiboot3.bin"; |
| 410 | } elsif substring (option vendor-class-identifier, 0, 20) = "AM62X U-Boot R5 SPL" |
| 411 | { |
| 412 | filename "tispl.bin"; |
| 413 | } elsif substring (option vendor-class-identifier, 0, 21) = "AM62X U-Boot A53 SPL" |
| 414 | { |
| 415 | filename "u-boot.img"; |
| 416 | } |
| 417 | default-lease-time 60000; |
| 418 | max-lease-time 720000; |
| 419 | next-server 192.168.0.1; |
| 420 | } |
| 421 | |
| 422 | * Do following changes in /etc/default/isc-dhcp-server |
| 423 | |
| 424 | .. code-block:: |
| 425 | |
| 426 | DHCPDv4_CONF=/etc/dhcp/dhcpd.conf |
| 427 | INTERFACESv4="enxf8e43b8cffe8" |
| 428 | INTERFACESv6="" |
| 429 | |
| 430 | * For your interface change ip address and netmask to next-server and your netmask |
| 431 | |
| 432 | .. prompt:: bash $ |
| 433 | |
| 434 | sudo ifconfig enxf8e43b8cffe8 192.168.0.1 netmask 255.255.254.0 |
| 435 | |
| 436 | * Enable DHCP |
| 437 | |
| 438 | .. prompt:: bash $ |
| 439 | |
| 440 | sudo systemctl enable --now isc-dhcp-server |
| 441 | |
| 442 | * To see if there is any configuration error or if dhcp is running run |
| 443 | |
| 444 | .. prompt:: bash $ |
| 445 | |
| 446 | sudo service isc-dhcp-server status |
| 447 | # If it shows error then something is wrong with configuration |
| 448 | |
| 449 | **For TFTP setup follow below steps:** |
| 450 | |
| 451 | * Install TFTP server: |
| 452 | |
| 453 | .. prompt:: bash $ |
| 454 | |
| 455 | sudo apt install tftpd-hpa |
| 456 | |
| 457 | tftpd-hpa package should be installed. |
| 458 | |
| 459 | Now, check whether the tftpd-hpa service is running with the following command: |
| 460 | |
| 461 | .. prompt:: bash $ |
| 462 | |
| 463 | sudo systemctl status tftpd-hpa |
| 464 | |
| 465 | * Configuring TFTP server: |
| 466 | |
| 467 | The default configuration file of tftpd-hpa server is /etc/default/tftpd-hpa. |
| 468 | If you want to configure the TFTP server, then you have to modify this configuration |
| 469 | file and restart the tftpd-hpa service afterword. |
| 470 | |
| 471 | To modify the /etc/default/tftpd-hpa configuration file, run the following command |
| 472 | |
| 473 | .. prompt:: bash $ |
| 474 | |
| 475 | sudo vim /etc/default/tftpd-hpa |
| 476 | |
| 477 | Configuration file may contain following configuration options by default: |
| 478 | |
| 479 | .. code-block:: |
| 480 | |
| 481 | # /etc/default/tftpd-hpa |
| 482 | |
| 483 | TFTP_USERNAME="tftp" |
| 484 | TFTP_DIRECTORY="/var/lib/tftpboot" |
| 485 | TFTP_ADDRESS=":69" |
| 486 | TFTP_OPTIONS="--secure" |
| 487 | |
| 488 | Now change the **TFTP_DIRECTORY** to **/tftp** and add the **--create** option to the |
| 489 | **TFTP_OPTIONS**. Without the **--create** option, you won't be able to create or upload |
| 490 | new files to the TFTP server. You will only be able to update existing files. |
| 491 | |
| 492 | After above changes /etc/default/tftpd-hpa file would look like this: |
| 493 | |
| 494 | .. code-block:: |
| 495 | |
| 496 | # /etc/default/tftpd-hpa |
| 497 | |
| 498 | TFTP_USERNAME="tftp" |
| 499 | TFTP_DIRECTORY="/tftp" |
| 500 | TFTP_ADDRESS=":69" |
| 501 | TFTP_OPTIONS="--secure --create" |
| 502 | |
| 503 | Since we have configured tftp directory as /tftp, put tiboot3.bin, tispl.bin |
| 504 | and u-boot.img after building it using sdk or manually cloning all the repos. |
| 505 | |
| 506 | To build binaries use following defconfig files: |
| 507 | |
| 508 | .. code-block:: |
| 509 | |
| 510 | am62x_evm_r5_ethboot_defconfig |
| 511 | am62x_evm_a53_ethboot_defconfig |
| 512 | |
| 513 | `tiboot3.bin` is expected to be built from `am62x_evm_r5_ethboot_defconfig` and |
| 514 | `tispl.bin` and `u-boot.img` are expected to be built from |
| 515 | `am62x_evm_a53_ethboot_defconfig`. |
| 516 | |
| 517 | Images should get fetched in following sequence as a part of boot procedure: |
| 518 | |
| 519 | .. code-block:: |
| 520 | |
| 521 | tiboot3.bin => tispl.bin => u-boot.img |
| 522 | |
| 523 | ROM loads and executes `tiboot3.bin` provided by the TFTP server. |
| 524 | |
| 525 | Next, based on NET_VCI_STRING string mentioned in respective defconfig file `tiboot3.bin` |
| 526 | fetches `tispl.bin` and then `tispl.bin` fetches `u-boot.img` from TFTP server which |
| 527 | completes Ethernet boot on the device. |
| 528 | |
Jason Kacines | b0fdee9 | 2023-08-03 01:29:22 -0500 | [diff] [blame] | 529 | Debugging U-Boot |
| 530 | ---------------- |
| 531 | |
| 532 | See :ref:`Common Debugging environment - OpenOCD<k3_rst_refer_openocd>`: for |
| 533 | detailed setup information. |
| 534 | |
| 535 | .. warning:: |
| 536 | |
| 537 | **OpenOCD support since**: v0.12.0 |
| 538 | |
| 539 | If the default package version of OpenOCD in your development |
| 540 | environment's distribution needs to be updated, it might be necessary to |
| 541 | build OpenOCD from the source. |
| 542 | |
| 543 | .. include:: k3.rst |
| 544 | :start-after: .. k3_rst_include_start_openocd_connect_XDS110 |
| 545 | :end-before: .. k3_rst_include_end_openocd_connect_XDS110 |
| 546 | |
| 547 | To start OpenOCD and connect to the board |
| 548 | |
Nishanth Menon | fdd7cb7 | 2023-11-02 23:40:26 -0500 | [diff] [blame] | 549 | .. prompt:: bash $ |
Jason Kacines | b0fdee9 | 2023-08-03 01:29:22 -0500 | [diff] [blame] | 550 | |
| 551 | openocd -f board/ti_am625evm.cfg |