blob: cc39030450f05de3cbdf858b4ec2f32a2685e810 [file] [log] [blame]
Marcel Ziswiler712d6242023-08-07 01:44:46 +02001.. SPDX-License-Identifier: GPL-2.0-or-later
2.. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +02003
4Verdin iMX8M Mini Module
5========================
6
Marcel Ziswiler712d6242023-08-07 01:44:46 +02007- SoM: https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx-8m-mini-nano
8- Carrier board: https://www.toradex.com/products/carrier-board/verdin-development-board-kit
9
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020010Quick 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..."
Igor Opaniuka00b51d2020-03-05 22:56:26 +020025 $ git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
26 $ cd trusted-firmware-a
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020027
28Then build ATF (TF-A):
29
30.. code-block:: bash
31
Marcel Ziswiler712d6242023-08-07 01:44:46 +020032 $ export CROSS_COMPILE=aarch64-linux-gnu-
Igor Opaniuka00b51d2020-03-05 22:56:26 +020033 $ make PLAT=imx8mm IMX_BOOT_UART_BASE=0x30860000 bl31
34 $ cp build/imx8mm/release/bl31.bin ../
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020035
36Get the DDR Firmware
37--------------------
38
39.. code-block:: bash
40
Igor Opaniuka00b51d2020-03-05 22:56:26 +020041 $ cd ..
Marcel Ziswiler0723f392021-10-09 22:41:07 +020042 $ 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*.bin ./
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020046
47Build U-Boot
48------------
49.. code-block:: bash
50
51 $ export CROSS_COMPILE=aarch64-linux-gnu-
52 $ make verdin-imx8mm_defconfig
Marcel Ziswiler0723f392021-10-09 22:41:07 +020053 $ make
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020054
55Flash to eMMC
56-------------
57
58.. code-block:: bash
59
60 > tftpboot ${loadaddr} flash.bin
61 > setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200
62 > mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt}
63
64As a convenience, instead of the last two commands one may also use the update
65U-Boot wrapper:
66
67.. code-block:: bash
68
69 > run update_uboot
70
71Boot
72----
73
74ATF, U-Boot proper and u-boot.dtb images are packed into FIT image,
75which is loaded and parsed by SPL.
76
77Boot sequence is:
78
79* SPL ---> ATF (TF-A) ---> U-Boot proper
80
81Output:
82
Marcel Ziswiler712d6242023-08-07 01:44:46 +020083.. code-block:: none
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020084
Marcel Ziswiler712d6242023-08-07 01:44:46 +020085 U-Boot SPL 2021.10-rc2-00028-gee010ba1129 (Aug 23 2021 - 16:56:02 +0200)
86 Normal Boot
87 WDT: Started with servicing (60s timeout)
88 Trying to boot from MMC1
89 NOTICE: BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b
90 NOTICE: BL31: Built : 18:02:12, Aug 16 2021
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020091
Marcel Ziswiler0723f392021-10-09 22:41:07 +020092
Marcel Ziswiler712d6242023-08-07 01:44:46 +020093 U-Boot 2021.10-rc2-00028-gee010ba1129 (Aug 23 2021 - 16:56:02 +0200)
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020094
Marcel Ziswiler712d6242023-08-07 01:44:46 +020095 CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz
96 Reset cause: POR
97 DRAM: 2 GiB
98 WDT: Started with servicing (60s timeout)
99 MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
100 Loading Environment from MMC... OK
101 In: serial
102 Out: serial
103 Err: serial
104 Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.1A, Serial# 06760554
105 Carrier: Toradex Verdin Development Board V1.1A, Serial# 10754333
106 Setting variant to wifi
107 Net: eth0: ethernet@30be0000
108 Hit any key to stop autoboot: 0
109 Verdin iMX8MM #