Marcel Ziswiler | 36a439d | 2022-02-07 11:54:13 +0100 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | |
| 3 | Verdin iMX8M Plus Module |
| 4 | ======================== |
| 5 | |
| 6 | Quick Start |
| 7 | ----------- |
| 8 | |
| 9 | - Build the ARM trusted firmware binary |
| 10 | - Get the DDR firmware |
| 11 | - Build U-Boot |
| 12 | - Flash to eMMC |
| 13 | - Boot |
| 14 | |
| 15 | Get and Build the ARM Trusted Firmware (Trusted Firmware A) |
| 16 | ----------------------------------------------------------- |
| 17 | |
| 18 | .. code-block:: bash |
| 19 | |
| 20 | $ echo "Downloading and building TF-A..." |
| 21 | $ git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git |
| 22 | $ cd trusted-firmware-a |
| 23 | |
| 24 | Then build ATF (TF-A): |
| 25 | |
| 26 | .. code-block:: bash |
| 27 | |
| 28 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
| 29 | $ make PLAT=imx8mp IMX_BOOT_UART_BASE=0x30880000 bl31 |
| 30 | $ cp build/imx8mp/release/bl31.bin ../ |
| 31 | |
| 32 | Get the DDR Firmware |
| 33 | -------------------- |
| 34 | |
| 35 | .. code-block:: bash |
| 36 | |
| 37 | $ cd .. |
| 38 | $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.10.1.bin |
| 39 | $ chmod +x firmware-imx-8.10.1.bin |
| 40 | $ ./firmware-imx-8.10.1.bin |
| 41 | $ cp firmware-imx-8.10.1/firmware/ddr/synopsys/lpddr4*_202006.bin ./ |
| 42 | |
| 43 | Build U-Boot |
| 44 | ------------ |
| 45 | .. code-block:: bash |
| 46 | |
| 47 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
| 48 | $ make verdin-imx8mp_defconfig |
| 49 | $ make |
| 50 | |
| 51 | Flash to eMMC |
| 52 | ------------- |
| 53 | |
| 54 | .. code-block:: bash |
| 55 | |
| 56 | > tftpboot ${loadaddr} flash.bin |
| 57 | > setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 |
| 58 | > mmc dev 2 1 && mmc write ${loadaddr} 0x0 ${blkcnt} |
| 59 | |
| 60 | As a convenience, instead of the last two commands one may also use the update |
| 61 | U-Boot wrapper: |
| 62 | |
| 63 | .. code-block:: bash |
| 64 | |
| 65 | > run update_uboot |
| 66 | |
| 67 | Boot |
| 68 | ---- |
| 69 | |
| 70 | ATF, U-Boot proper and u-boot.dtb images are packed into FIT image, |
| 71 | which is loaded and parsed by SPL. |
| 72 | |
| 73 | Boot sequence is: |
| 74 | |
| 75 | * SPL ---> ATF (TF-A) ---> U-Boot proper |
| 76 | |
| 77 | Output: |
| 78 | |
| 79 | .. code-block:: bash |
| 80 | |
| 81 | U-Boot SPL 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100) |
| 82 | Quad die, dual rank failed, attempting dual die, single rank configuration. |
| 83 | Normal Boot |
| 84 | WDT: Started watchdog@30280000 with servicing (60s timeout) |
| 85 | Trying to boot from BOOTROM |
| 86 | Find img info 0x&48025a00, size 872 |
| 87 | Need continue download 1024 |
| 88 | Download 779264, Total size 780424 |
| 89 | NOTICE: BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b |
| 90 | NOTICE: BL31: Built : 16:52:37, Aug 26 2021 |
| 91 | |
| 92 | |
| 93 | U-Boot 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100) |
| 94 | |
| 95 | CPU: Freescale i.MX8MP[8] rev1.1 at 1200 MHz |
| 96 | Reset cause: POR |
| 97 | DRAM: 8 GiB |
| 98 | Core: 78 devices, 18 uclasses, devicetree: separate |
| 99 | WDT: Started watchdog@30280000 with servicing (60s timeout) |
| 100 | MMC: FSL_SDHC: 1, FSL_SDHC: 2 |
| 101 | Loading Environment from MMC... OK |
| 102 | In: serial |
| 103 | Out: serial |
| 104 | Err: serial |
| 105 | Model: Toradex Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT V1.0B, Serial# 06817281 |
| 106 | Carrier: Toradex Verdin Development Board V1.1A, Serial# 10807609 |
| 107 | Setting variant to wifi |
| 108 | Net: Hard-coding pdata->enetaddr |
| 109 | eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME] |
| 110 | Hit any key to stop autoboot: 0 |
| 111 | Verdin iMX8MP # |