Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | .. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com> |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 3 | |
| 4 | Verdin iMX8M Mini Module |
| 5 | ======================== |
| 6 | |
Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 7 | - SoM: https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx-8m-mini-nano |
| 8 | - Carrier board: https://www.toradex.com/products/carrier-board/verdin-development-board-kit |
| 9 | |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 10 | Quick Start |
| 11 | ----------- |
| 12 | |
| 13 | - Build the ARM trusted firmware binary |
| 14 | - Get the DDR firmware |
| 15 | - Build U-Boot |
| 16 | - Flash to eMMC |
| 17 | - Boot |
| 18 | |
| 19 | Get and Build the ARM Trusted Firmware (Trusted Firmware A) |
| 20 | ----------------------------------------------------------- |
| 21 | |
| 22 | .. code-block:: bash |
| 23 | |
| 24 | $ echo "Downloading and building TF-A..." |
Igor Opaniuk | a00b51d | 2020-03-05 22:56:26 +0200 | [diff] [blame] | 25 | $ git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git |
| 26 | $ cd trusted-firmware-a |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 27 | |
| 28 | Then build ATF (TF-A): |
| 29 | |
| 30 | .. code-block:: bash |
| 31 | |
Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 32 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
Igor Opaniuk | a00b51d | 2020-03-05 22:56:26 +0200 | [diff] [blame] | 33 | $ make PLAT=imx8mm IMX_BOOT_UART_BASE=0x30860000 bl31 |
| 34 | $ cp build/imx8mm/release/bl31.bin ../ |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 35 | |
| 36 | Get the DDR Firmware |
| 37 | -------------------- |
| 38 | |
| 39 | .. code-block:: bash |
| 40 | |
Igor Opaniuk | a00b51d | 2020-03-05 22:56:26 +0200 | [diff] [blame] | 41 | $ cd .. |
Marcel Ziswiler | 0723f39 | 2021-10-09 22:41:07 +0200 | [diff] [blame] | 42 | $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.10.1.bin |
| 43 | $ chmod +x firmware-imx-8.10.1.bin |
| 44 | $ ./firmware-imx-8.10.1.bin |
| 45 | $ cp firmware-imx-8.10.1/firmware/ddr/synopsys/lpddr4*.bin ./ |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 46 | |
| 47 | Build U-Boot |
| 48 | ------------ |
Marcel Ziswiler | 813070a | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 49 | |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 50 | .. code-block:: bash |
| 51 | |
| 52 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
| 53 | $ make verdin-imx8mm_defconfig |
Marcel Ziswiler | 0723f39 | 2021-10-09 22:41:07 +0200 | [diff] [blame] | 54 | $ make |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 55 | |
| 56 | Flash to eMMC |
| 57 | ------------- |
| 58 | |
| 59 | .. code-block:: bash |
| 60 | |
| 61 | > tftpboot ${loadaddr} flash.bin |
| 62 | > setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 |
| 63 | > mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt} |
| 64 | |
Marcel Ziswiler | 813070a | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 65 | As a convenience, instead of the last two commands, one may also use the update |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 66 | U-Boot wrapper: |
| 67 | |
| 68 | .. code-block:: bash |
| 69 | |
| 70 | > run update_uboot |
| 71 | |
| 72 | Boot |
| 73 | ---- |
| 74 | |
Marcel Ziswiler | 813070a | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 75 | ATF, U-Boot proper and u-boot.dtb images are packed into a FIT image, |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 76 | which is loaded and parsed by SPL. |
| 77 | |
| 78 | Boot sequence is: |
| 79 | |
| 80 | * SPL ---> ATF (TF-A) ---> U-Boot proper |
| 81 | |
Marcel Ziswiler | 813070a | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 82 | Output:: |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 83 | |
Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 84 | U-Boot SPL 2021.10-rc2-00028-gee010ba1129 (Aug 23 2021 - 16:56:02 +0200) |
| 85 | Normal Boot |
| 86 | WDT: Started with servicing (60s timeout) |
| 87 | Trying to boot from MMC1 |
| 88 | NOTICE: BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b |
| 89 | NOTICE: BL31: Built : 18:02:12, Aug 16 2021 |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 90 | |
Marcel Ziswiler | 0723f39 | 2021-10-09 22:41:07 +0200 | [diff] [blame] | 91 | |
Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 92 | U-Boot 2021.10-rc2-00028-gee010ba1129 (Aug 23 2021 - 16:56:02 +0200) |
Igor Opaniuk | 6fa6efe | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 93 | |
Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 94 | CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz |
| 95 | Reset cause: POR |
| 96 | DRAM: 2 GiB |
| 97 | WDT: Started with servicing (60s timeout) |
| 98 | MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 |
| 99 | Loading Environment from MMC... OK |
| 100 | In: serial |
| 101 | Out: serial |
| 102 | Err: serial |
| 103 | Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.1A, Serial# 06760554 |
| 104 | Carrier: Toradex Verdin Development Board V1.1A, Serial# 10754333 |
| 105 | Setting variant to wifi |
| 106 | Net: eth0: ethernet@30be0000 |
| 107 | Hit any key to stop autoboot: 0 |
| 108 | Verdin iMX8MM # |