blob: 6e150e9aec7296ba77086a29ec5f3e1a1c51bdb7 [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------------
Marcel Ziswiler813070a2023-08-29 00:01:53 +020049
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020050.. code-block:: bash
51
52 $ export CROSS_COMPILE=aarch64-linux-gnu-
53 $ make verdin-imx8mm_defconfig
Marcel Ziswiler0723f392021-10-09 22:41:07 +020054 $ make
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020055
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 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt}
64
Marcel Ziswiler813070a2023-08-29 00:01:53 +020065As a convenience, instead of the last two commands, one may also use the update
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020066U-Boot wrapper:
67
68.. code-block:: bash
69
70 > run update_uboot
71
72Boot
73----
74
Marcel Ziswiler813070a2023-08-29 00:01:53 +020075ATF, U-Boot proper and u-boot.dtb images are packed into a FIT image,
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020076which is loaded and parsed by SPL.
77
78Boot sequence is:
79
80* SPL ---> ATF (TF-A) ---> U-Boot proper
81
Marcel Ziswiler813070a2023-08-29 00:01:53 +020082Output::
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020083
Marcel Ziswiler712d6242023-08-07 01:44:46 +020084 U-Boot SPL 2021.10-rc2-00028-gee010ba1129 (Aug 23 2021 - 16:56:02 +0200)
85 Normal Boot
86 WDT: Started with servicing (60s timeout)
87 Trying to boot from MMC1
88 NOTICE: BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b
89 NOTICE: BL31: Built : 18:02:12, Aug 16 2021
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020090
Marcel Ziswiler0723f392021-10-09 22:41:07 +020091
Marcel Ziswiler712d6242023-08-07 01:44:46 +020092 U-Boot 2021.10-rc2-00028-gee010ba1129 (Aug 23 2021 - 16:56:02 +0200)
Igor Opaniuk6fa6efe2020-02-12 17:14:29 +020093
Marcel Ziswiler712d6242023-08-07 01:44:46 +020094 CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz
95 Reset cause: POR
96 DRAM: 2 GiB
97 WDT: Started with servicing (60s timeout)
98 MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
99 Loading Environment from MMC... OK
100 In: serial
101 Out: serial
102 Err: serial
103 Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.1A, Serial# 06760554
104 Carrier: Toradex Verdin Development Board V1.1A, Serial# 10754333
105 Setting variant to wifi
106 Net: eth0: ethernet@30be0000
107 Hit any key to stop autoboot: 0
108 Verdin iMX8MM #