blob: 482f6935779eb9127742fd3fe3e93e89b0c3c927 [file] [log] [blame]
Marcel Ziswiler36a439d2022-02-07 11:54:13 +01001.. SPDX-License-Identifier: GPL-2.0-or-later
2
3Verdin iMX8M Plus Module
4========================
5
6Quick 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
15Get 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
24Then 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
32Get 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
43Build U-Boot
44------------
45.. code-block:: bash
46
47 $ export CROSS_COMPILE=aarch64-linux-gnu-
48 $ make verdin-imx8mp_defconfig
49 $ make
50
51Flash 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
60As a convenience, instead of the last two commands one may also use the update
61U-Boot wrapper:
62
63.. code-block:: bash
64
65 > run update_uboot
66
67Boot
68----
69
70ATF, U-Boot proper and u-boot.dtb images are packed into FIT image,
71which is loaded and parsed by SPL.
72
73Boot sequence is:
74
75* SPL ---> ATF (TF-A) ---> U-Boot proper
76
77Output:
78
79.. code-block:: bash
80
81U-Boot SPL 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100)
82Quad die, dual rank failed, attempting dual die, single rank configuration.
83Normal Boot
84WDT: Started watchdog@30280000 with servicing (60s timeout)
85Trying to boot from BOOTROM
86Find img info 0x&48025a00, size 872
87Need continue download 1024
88Download 779264, Total size 780424
89NOTICE: BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b
90NOTICE: BL31: Built : 16:52:37, Aug 26 2021
91
92
93U-Boot 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100)
94
95CPU: Freescale i.MX8MP[8] rev1.1 at 1200 MHz
96Reset cause: POR
97DRAM: 8 GiB
98Core: 78 devices, 18 uclasses, devicetree: separate
99WDT: Started watchdog@30280000 with servicing (60s timeout)
100MMC: FSL_SDHC: 1, FSL_SDHC: 2
101Loading Environment from MMC... OK
102In: serial
103Out: serial
104Err: serial
105Model: Toradex Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT V1.0B, Serial# 06817281
106Carrier: Toradex Verdin Development Board V1.1A, Serial# 10807609
107Setting variant to wifi
108Net: Hard-coding pdata->enetaddr
109eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME]
110Hit any key to stop autoboot: 0
111Verdin iMX8MP #