blob: 9ee605f64d541e8988dc64a6e3facad47d469d84 [file] [log] [blame]
Marcel Ziswiler2bc2f812022-02-07 11:54:13 +01001.. SPDX-License-Identifier: GPL-2.0-or-later
Marcel Ziswiler636acb42023-08-07 01:44:46 +02002.. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Marcel Ziswiler2bc2f812022-02-07 11:54:13 +01003
4Verdin iMX8M Plus Module
5========================
6
Marcel Ziswiler636acb42023-08-07 01:44:46 +02007- 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 Ziswiler2bc2f812022-02-07 11:54:13 +010010Quick 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
19Get 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
28Then 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
36Get 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
47Build U-Boot
48------------
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +020049
Marcel Ziswiler2bc2f812022-02-07 11:54:13 +010050.. code-block:: bash
51
52 $ export CROSS_COMPILE=aarch64-linux-gnu-
53 $ make verdin-imx8mp_defconfig
54 $ make
55
56Flash 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 Ziswiler4d1fea92023-08-29 00:01:53 +020065As a convenience, instead of the last two commands, one may also use the update
Marcel Ziswiler2bc2f812022-02-07 11:54:13 +010066U-Boot wrapper:
67
68.. code-block:: bash
69
70 > run update_uboot
71
72Boot
73----
74
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +020075ATF, U-Boot proper and u-boot.dtb images are packed into a FIT image,
Marcel Ziswiler2bc2f812022-02-07 11:54:13 +010076which is loaded and parsed by SPL.
77
78Boot sequence is:
79
80* SPL ---> ATF (TF-A) ---> U-Boot proper
81
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +020082Output::
Marcel Ziswiler2bc2f812022-02-07 11:54:13 +010083
Marcel Ziswiler636acb42023-08-07 01:44:46 +020084 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 Ziswiler2bc2f812022-02-07 11:54:13 +010094
95
Marcel Ziswiler636acb42023-08-07 01:44:46 +020096 U-Boot 2022.04-rc1-00164-g21a0312611-dirty (Feb 07 2022 - 11:34:04 +0100)
Marcel Ziswiler2bc2f812022-02-07 11:54:13 +010097
Marcel Ziswiler636acb42023-08-07 01:44:46 +020098 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 #