Peng Fan | 50ce1bf | 2020-10-14 17:12:02 +0800 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | imx8mm_evk |
| 4 | ========== |
| 5 | |
| 6 | U-Boot for the NXP i.MX8MM EVK board |
| 7 | |
| 8 | Quick Start |
| 9 | ----------- |
| 10 | |
| 11 | - Build the ARM Trusted firmware binary |
| 12 | - Get ddr firmware |
| 13 | - Build U-Boot |
| 14 | - Boot |
| 15 | |
| 16 | Get and Build the ARM Trusted firmware |
| 17 | -------------------------------------- |
| 18 | |
| 19 | Note: builddir is U-Boot build directory (source directory for in-tree builds) |
Fabio Estevam | f0f4612 | 2023-01-12 21:52:23 -0300 | [diff] [blame] | 20 | Get ATF from: https://github.com/nxp-imx/imx-atf |
Andrey Zhizhikin | 1396e41 | 2020-12-13 20:36:06 +0000 | [diff] [blame] | 21 | branch: imx_5.4.47_2.2.0 |
Peng Fan | 50ce1bf | 2020-10-14 17:12:02 +0800 | [diff] [blame] | 22 | |
| 23 | .. code-block:: bash |
| 24 | |
| 25 | $ make PLAT=imx8mm bl31 |
| 26 | $ cp build/imx8mm/release/bl31.bin $(builddir) |
| 27 | |
| 28 | Get the ddr firmware |
| 29 | -------------------- |
| 30 | |
| 31 | .. code-block:: bash |
| 32 | |
Andrey Zhizhikin | 1396e41 | 2020-12-13 20:36:06 +0000 | [diff] [blame] | 33 | $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.9.bin |
| 34 | $ chmod +x firmware-imx-8.9.bin |
| 35 | $ ./firmware-imx-8.9 |
| 36 | $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4*.bin $(builddir) |
Peng Fan | 50ce1bf | 2020-10-14 17:12:02 +0800 | [diff] [blame] | 37 | |
Mamta Shukla | 4ae1fa3 | 2022-07-12 14:36:23 +0000 | [diff] [blame] | 38 | Build U-Boot for sd card |
| 39 | -------------------------- |
Peng Fan | 50ce1bf | 2020-10-14 17:12:02 +0800 | [diff] [blame] | 40 | |
| 41 | .. code-block:: bash |
| 42 | |
| 43 | $ export CROSS_COMPILE=aarch64-poky-linux- |
| 44 | $ make imx8mm_evk_defconfig |
Peng Fan | a505fd3 | 2021-04-06 11:58:58 +0800 | [diff] [blame] | 45 | $ make |
Peng Fan | 50ce1bf | 2020-10-14 17:12:02 +0800 | [diff] [blame] | 46 | |
| 47 | Burn the flash.bin to MicroSD card offset 33KB: |
| 48 | |
| 49 | .. code-block:: bash |
| 50 | |
| 51 | $sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=notrunc |
Peng Fan | 50ce1bf | 2020-10-14 17:12:02 +0800 | [diff] [blame] | 52 | |
| 53 | Boot |
| 54 | ---- |
| 55 | Set Boot switch to SD boot |
Mamta Shukla | 4ae1fa3 | 2022-07-12 14:36:23 +0000 | [diff] [blame] | 56 | |
| 57 | Build U-Boot for qspi flash card |
| 58 | ------------------------------------ |
| 59 | |
| 60 | .. code-block:: bash |
| 61 | |
| 62 | $ export CROSS_COMPILE=aarch64-poky-linux- |
| 63 | $ make imx8mm_evk_fspi_defconfig |
| 64 | $ make |
| 65 | |
| 66 | Currently, there is no direct support to write to QSPI Flash. |
| 67 | Copy flash.bin to ${loadaddr} either from sd card or over network and then copy to |
| 68 | qspi flash |
| 69 | |
| 70 | From sd card to memory |
| 71 | |
| 72 | .. code-block:: bash |
| 73 | |
| 74 | $mmc dev 1 |
| 75 | $mmc read ${loadaddr} 0x00 <size_of_flash.bin/512> |
| 76 | |
| 77 | .. code-block:: bash |
| 78 | |
| 79 | $ sf probe |
| 80 | $ sf erase 0 <size_of_flash.bin_in_hex> |
| 81 | $ sf write $loadaddr 0x00 <size_of_flash.bin_in_hex> |
| 82 | |
| 83 | Boot from QSPI Flash |
| 84 | ----------------------- |
| 85 | Set Boot Switch to QSPI Flash |
| 86 | |
| 87 | Pin configuration for imx8mm_revC evk to boot from qspi flash |
| 88 | SW1101: 0110xxxxxx |
| 89 | SW1102: 00100x0010 |