Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0-or-later |
Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 2 | .. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com> |
Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [diff] [blame] | 3 | |
| 4 | Verdin iMX8M Plus 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-plus |
| 8 | - Carrier board: https://www.toradex.com/products/carrier-board/verdin-development-board-kit |
| 9 | |
Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [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..." |
| 25 | $ git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git |
| 26 | $ cd trusted-firmware-a |
| 27 | |
| 28 | Then build ATF (TF-A): |
| 29 | |
| 30 | .. code-block:: bash |
| 31 | |
| 32 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
| 33 | $ make PLAT=imx8mp IMX_BOOT_UART_BASE=0x30880000 bl31 |
| 34 | $ cp build/imx8mp/release/bl31.bin ../ |
| 35 | |
| 36 | Get the DDR Firmware |
| 37 | -------------------- |
| 38 | |
| 39 | .. code-block:: bash |
| 40 | |
| 41 | $ cd .. |
| 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*_202006.bin ./ |
| 46 | |
| 47 | Build U-Boot |
| 48 | ------------ |
Marcel Ziswiler | 813070a | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 49 | |
Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [diff] [blame] | 50 | .. code-block:: bash |
| 51 | |
| 52 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
| 53 | $ make verdin-imx8mp_defconfig |
| 54 | $ make |
| 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 2 1 && mmc write ${loadaddr} 0x0 ${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 |
Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [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, |
Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [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:: |
Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [diff] [blame] | 83 | |
Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 84 | U-Boot SPL 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100) |
| 85 | Quad die, dual rank failed, attempting dual die, single rank configuration. |
| 86 | Normal Boot |
| 87 | WDT: Started watchdog@30280000 with servicing (60s timeout) |
| 88 | Trying to boot from BOOTROM |
| 89 | Find img info 0x&48025a00, size 872 |
| 90 | Need continue download 1024 |
| 91 | Download 779264, Total size 780424 |
| 92 | NOTICE: BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b |
| 93 | NOTICE: BL31: Built : 16:52:37, Aug 26 2021 |
Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [diff] [blame] | 94 | |
| 95 | |
Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 96 | U-Boot 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100) |
Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [diff] [blame] | 97 | |
Marcel Ziswiler | 712d624 | 2023-08-07 01:44:46 +0200 | [diff] [blame] | 98 | CPU: Freescale i.MX8MP[8] rev1.1 at 1200 MHz |
| 99 | Reset cause: POR |
| 100 | DRAM: 8 GiB |
| 101 | Core: 78 devices, 18 uclasses, devicetree: separate |
| 102 | WDT: Started watchdog@30280000 with servicing (60s timeout) |
| 103 | MMC: FSL_SDHC: 1, FSL_SDHC: 2 |
| 104 | Loading Environment from MMC... OK |
| 105 | In: serial |
| 106 | Out: serial |
| 107 | Err: serial |
| 108 | Model: Toradex Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT V1.0B, Serial# 06817281 |
| 109 | Carrier: Toradex Verdin Development Board V1.1A, Serial# 10807609 |
| 110 | Setting variant to wifi |
| 111 | Net: Hard-coding pdata->enetaddr |
| 112 | eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME] |
| 113 | Hit any key to stop autoboot: 0 |
| 114 | Verdin iMX8MP # |