blob: b3e21d8538b4d01d91a4782840c2c289115faf63 [file] [log] [blame]
Frieder Schrempf199dfd92021-09-29 16:42:42 +02001.. SPDX-License-Identifier: GPL-2.0+
2
Frieder Schrempf3048ecd2022-08-24 15:59:19 +02003Kontron Electronics i.MX8MM SoMs and Boards
4===========================================
Frieder Schrempf199dfd92021-09-29 16:42:42 +02005
Frieder Schrempf3048ecd2022-08-24 15:59:19 +02006The SL i.MX8MM and OSM-S i.MX8MM by Kontron Electronics GmbH are SoM modules
Frieder Schrempf199dfd92021-09-29 16:42:42 +02007with an i.MX8M-Mini SoC, 1/2/4 GB LPDDR4 RAM, SPI NOR, eMMC and PMIC.
8
Frieder Schrempf3048ecd2022-08-24 15:59:19 +02009The matching evaluation boards (Board-Line, BL) have two Ethernet ports,
10USB 2.0, HDMI/LVDS, SD card, CAN, RS485, RS232 and much more.
11
Frieder Schrempf8c906592023-01-19 12:20:34 +010012The OSM-S i.MX8MM is compliant to the Open Standard Module (OSM) 1.1
Frieder Schrempf3048ecd2022-08-24 15:59:19 +020013specification, size S (https://sget.org/standards/osm).
Frieder Schrempf199dfd92021-09-29 16:42:42 +020014
15Quick Start
16-----------
17
18- Get and Build the Trusted Firmware-A (TF-A)
19- Get the DDR firmware
20- Build U-Boot
21- Boot
22
Frieder Schrempf5c49d4b2023-01-19 12:20:35 +010023.. note::
24
25 To build on a x86-64 host machine, you need a GNU cross toolchain for the
26 target architecture (aarch64). Check your distros package manager or
27 download and install the necessary tools (``aarch64-linux-gnu-*``) manually.
28
Frieder Schrempf199dfd92021-09-29 16:42:42 +020029Get and Build the Trusted Firmware-A (TF-A)
30^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
Frieder Schrempf199dfd92021-09-29 16:42:42 +020032There are two sources for the TF-A. Mainline and NXP. Get the one you prefer
33(support and features might differ).
34
Frieder Schrempff3346582023-01-19 12:20:36 +010035.. note::
36
37 If you are using GCC 12 and you get compiler/linker errors, try to add the
38 following arguments to your make command as workaround:
39 ``CFLAGS="-Wno-array-bounds" LDFLAGS="--no-warn-rwx-segments"``
40
Frieder Schrempf199dfd92021-09-29 16:42:42 +020041**NXP's imx-atf**
42
Frieder Schrempff3346582023-01-19 12:20:36 +0100431. Get TF-A from: https://github.com/nxp-imx/imx-atf, branch: lf_v2.6
442. Build
Frieder Schrempf199dfd92021-09-29 16:42:42 +020045
46 .. code-block:: bash
47
Frieder Schrempff3346582023-01-19 12:20:36 +010048 $ make PLAT=imx8mm CROSS_COMPILE=aarch64-linux-gnu- IMX_BOOT_UART_BASE="0x30880000" bl31
Frieder Schrempf199dfd92021-09-29 16:42:42 +020049 $ cp build/imx8mm/release/bl31.bin $(builddir)
50
Frieder Schrempff3346582023-01-19 12:20:36 +010051.. note::
52
53 *builddir* is U-Boot's build directory (source directory for in-tree builds)
54
Frieder Schrempf199dfd92021-09-29 16:42:42 +020055**Mainline TF-A**
56
571. Get TF-A from: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/, tag: v2.4
582. Build
59
60 .. code-block:: bash
61
62 $ make PLAT=imx8mm CROSS_COMPILE=aarch64-linux-gnu- IMX_BOOT_UART_BASE="0x30880000" bl31
63 $ cp build/imx8mm/release/bl31.bin $(builddir)
64
65Get the DDR firmware
66^^^^^^^^^^^^^^^^^^^^
67
68.. code-block:: bash
69
Frieder Schrempf4e0501a2023-01-19 12:20:37 +010070 $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.18.bin
71 $ chmod +x firmware-imx-8.18.bin
72 $ ./firmware-imx-8.18.bin
73 $ cp firmware-imx-8.18/firmware/ddr/synopsys/lpddr4_pmu_train_1d_imem.bin $(builddir)
74 $ cp firmware-imx-8.18/firmware/ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin $(builddir)
75 $ cp firmware-imx-8.18/firmware/ddr/synopsys/lpddr4_pmu_train_2d_imem.bin $(builddir)
76 $ cp firmware-imx-8.18/firmware/ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin $(builddir)
Frieder Schrempf199dfd92021-09-29 16:42:42 +020077
78Build U-Boot
79^^^^^^^^^^^^
80
81.. code-block:: bash
82
83 $ make kontron-sl-mx8mm_defconfig
Frieder Schrempf199dfd92021-09-29 16:42:42 +020084 $ make
85
86Burn the flash.bin to SD card at an offset of 33 KiB:
87
88.. code-block:: bash
89
90 $ dd if=flash.bin of=/dev/sd[x] bs=1K seek=33 conv=notrunc
91
92Boot
93^^^^
94
95Put the SD card in the slot on the board and apply power.
96
97Further Information
98-------------------
99
100The bootloader configuration is setup to be used with kernel FIT images. Legacy
101images might not be working out of the box.
102
103Please see https://docs.kontron-electronics.de for further vendor documentation.