blob: b2ae4fabea983ccafdd3b1c8c5d913cac91e244b [file] [log] [blame]
Igor Opaniukfa14fa72020-02-12 17:14:29 +02001.. SPDX-License-Identifier: GPL-2.0+
2
3Verdin iMX8M Mini 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 -b imx_4.14.98_2.3.0 \
22 https://source.codeaurora.org/external/imx/imx-atf
23 $ cd imx-atf
24
25Please edit ``plat/imx/imx8mm/include/platform_def.h`` so it contains proper
26values for UART configuration and BL31 base address (correct values listed
27below):
28
29.. code-block:: bash
30
31 #define BL31_BASE 0x910000
32 #define IMX_BOOT_UART_BASE 0x30860000
33 #define DEBUG_CONSOLE 1
34
35Then build ATF (TF-A):
36
37.. code-block:: bash
38
39 $ make PLAT=imx8mm bl31
40
41Get the DDR Firmware
42--------------------
43
44.. code-block:: bash
45
46 $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.4.1.bin
47 $ chmod +x firmware-imx-8.4.1.bin
48 $ ./firmware-imx-8.4.1.bin
49 $ cp firmware-imx-8.4.1/firmware/ddr/synopsys/lpddr4*.bin ./
50
51Build U-Boot
52------------
53.. code-block:: bash
54
55 $ export CROSS_COMPILE=aarch64-linux-gnu-
56 $ make verdin-imx8mm_defconfig
57 $ make flash.bin
58
59Flash to eMMC
60-------------
61
62.. code-block:: bash
63
64 > tftpboot ${loadaddr} flash.bin
65 > setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200
66 > mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt}
67
68As a convenience, instead of the last two commands one may also use the update
69U-Boot wrapper:
70
71.. code-block:: bash
72
73 > run update_uboot
74
75Boot
76----
77
78ATF, U-Boot proper and u-boot.dtb images are packed into FIT image,
79which is loaded and parsed by SPL.
80
81Boot sequence is:
82
83* SPL ---> ATF (TF-A) ---> U-Boot proper
84
85Output:
86
87.. code-block:: bash
88
89 U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)
90 Normal Boot
91 Trying to boot from MMC1
92 NOTICE: Configuring TZASC380
93 NOTICE: RDC off
94 NOTICE: BL31: v2.0(release):rel_imx_4.14.98_2.3.0-0-g09c5cc994-dirty
95 NOTICE: BL31: Built : 01:11:41, Jan 25 2020
96 NOTICE: sip svc init
97
98
99 U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)
100
101 CPU: Freescale i.MX8MMQ rev1.0 at 0 MHz
102 Reset cause: POR
103 DRAM: 2 GiB
104 MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
105 Loading Environment from MMC... OK
106 In: serial
107 Out: serial
108 Err: serial
109 Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial:
110 Net: eth0: ethernet@30be0000
111 Hit any key to stop autoboot: 0
112 Verdin iMX8MM #