Skip to contentSkip to conversation

imx: Add support for i.MX8MN Beacon EmbeddedWorks devkit.

PATCH Superseded Adam Ford 2 participants 2 messages Dec 10, 2020 – Dec 11, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 imx: Add support for i.MX8MN Beacon EmbeddedWorks devkit.

Beacon EmbeddedWorks is releasing a devkit based on the i.MX8M Nano SoC consisting of baseboard + SOM.

The kit is based on the same design as the Beacon dev kit with the i.MX8M Mini.

arch/arm/dts/Makefile +1 -0
index 02d04f5a8c..0ca895815c 100644
@@ -773,6 +773,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mn-ddr4-evk.dtb \
 	imx8mq-evk.dtb \
 	imx8mm-beacon-kit.dtb \
+	imx8mn-beacon-kit.dtb \
 	imx8mq-phanbell.dtb \
 	imx8mp-evk.dtb \
 	imx8mq-pico-pi.dtb
arch/arm/dts/imx8mn-beacon-baseboard.dtsi new file +236 -0

236 lines not on this page · raw message

arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi new file +122 -0

122 lines not on this page · raw message

arch/arm/dts/imx8mn-beacon-kit.dts new file +19 -0
new file mode 100644
index 0000000000..1392ce0258
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2020 Compass Electronics Group, LLC
+ */
+
+/dts-v1/;
+
+#include "imx8mn.dtsi"
+#include "imx8mn-beacon-som.dtsi"
+#include "imx8mn-beacon-baseboard.dtsi"
+
+/ {
+	model = "Beacon EmbeddedWorks i.MX8M Nano Development Kit";
+	compatible = "beacon,imx8mn-beacon-kit", "fsl,imx8mn";
+
+	chosen {
+		stdout-path = &uart2;
+	};
+};
arch/arm/dts/imx8mn-beacon-som.dtsi new file +405 -0

405 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +7 -0
index 8615dc3bec..a84caeae7e 100644
@@ -72,6 +72,12 @@ config TARGET_IMX8MM_BEACON
 	select SUPPORT_SPL
 	select IMX8M_LPDDR4
 
+config TARGET_IMX8MN_BEACON
+	bool "imx8mn Beacon Embedded devkit"
+	select IMX8MN
+	select SUPPORT_SPL
+	select IMX8M_LPDDR4
+
 config TARGET_PHYCORE_IMX8MM
 	bool "PHYTEC PHYCORE i.MX8MM"
 	select IMX8MM
@@ -87,6 +93,7 @@ source "board/google/imx8mq_phanbell/Kconfig"
 source "board/technexion/pico-imx8mq/Kconfig"
 source "board/toradex/verdin-imx8mm/Kconfig"
 source "board/beacon/imx8mm/Kconfig"
+source "board/beacon/imx8mn/Kconfig"
 source "board/phytec/phycore_imx8mm/Kconfig"
 
 endif
arch/arm/mach-imx/imx8m/imximage-8mn-lpddr4.cfg new file +17 -0
new file mode 100644
index 0000000000..4c63b31db6
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019 NXP
+ */
+
+#define __ASSEMBLY__
+
+FIT
+ROM_VERSION	v2
+BOOT_FROM	sd
+LOADER		spl/u-boot-spl-ddr.bin	0x912000
+SECOND_LOADER	u-boot.itb		0x40200000 0x60000
+
+DDR_FW lpddr4_pmu_train_1d_imem.bin
+DDR_FW lpddr4_pmu_train_1d_dmem.bin
+DDR_FW lpddr4_pmu_train_2d_imem.bin
+DDR_FW lpddr4_pmu_train_2d_dmem.bin
board/beacon/imx8mn/Kconfig new file +18 -0
new file mode 100644
index 0000000000..6ed17c00d8
@@ -0,0 +1,18 @@
+if TARGET_IMX8MN_BEACON
+
+config SYS_BOARD
+	default "imx8mn"
+
+config SYS_VENDOR
+	default "beacon"
+
+config SYS_CONFIG_NAME
+	default "imx8mn_beacon"
+
+config IMX8MN_FORCE_NOM_SOC
+	bool "Force to use nominal mode for SOC and ARM"
+	default n
+
+source "board/freescale/common/Kconfig"
+
+endif
board/beacon/imx8mn/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000..4e3fc713a0
@@ -0,0 +1,6 @@
+i.MX8MN BEACON BOARD
+M:	Adam Ford <[email protected]>
+S:	Maintained
+F:	board/beacon/imx8mn/
+F:	include/configs/imx8mn_beacon.h
+F:	configs/imx8mn_beacon_defconfig
board/beacon/imx8mn/Makefile new file +13 -0
new file mode 100644
index 0000000000..9e842de42f
@@ -0,0 +1,13 @@
+#
+# Copyright 2020 Compass Electronics Group, LLC
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += imx8mn_beacon.o
+obj-y += ../../freescale/common/
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o
+obj-$(CONFIG_IMX8M_DDR4) += ddr4_timing.o
+endif
board/beacon/imx8mn/README new file +39 -0
new file mode 100644
index 0000000000..b1d7a19a39
@@ -0,0 +1,39 @@
+U-Boot for the Beacon EmbeddedWorks i.MX8M Nano Devkit
+
+Quick Start
+===========
+- Build the ARM Trusted firmware binary
+- Get ddr firmware
+- Build U-Boot
+- Boot
+
+Get and Build the ARM Trusted firmware
+======================================
+Note: $(srctree) is U-Boot source directory
+
+$ git clone https://source.codeaurora.org/external/imx/imx-atf
+$ git checkout imx_5.4.47_2.2.0
+$ make PLAT=imx8mn bl31 CROSS_COMPILE=aarch64-linux-gnu-
+$ cp build/imx8mm/release/bl31.bin $(srctree)
+
+Get the DDR firmware
+====================
+$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.5.bin
+$ chmod +x firmware-imx-8.5.bin
+$ ./firmware-imx-8.5
+$ cp firmware-imx-8.5/firmware/ddr/synopsys/lpddr4*.bin $(srctree)
+
+Build U-Boot
+============
+$ make imx8mn_beacon_defconfig
+$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- ATF_LOAD_ADDR=0x960000
+
+Burn U-Boot to microSD Card
+===========================
+$ sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=32
+
+Boot
+====
+Set baseboard DIP switch:
+S17: 1100XXXX
+
board/beacon/imx8mn/imx8mn_beacon.c new file +56 -0

56 lines not on this page · raw message

board/beacon/imx8mn/lpddr4_timing.c new file +1434 -0

1,434 lines not on this page · raw message

board/beacon/imx8mn/spl.c new file +128 -0

128 lines not on this page · raw message

configs/imx8mn_beacon_defconfig new file +132 -0

132 lines not on this page · raw message

include/configs/imx8mn_beacon.h new file +155 -0

155 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 imx: Add support for i.MX8MN Beacon EmbeddedWorks devkit.

Hello Adam,

Quoted 18 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Adam Ford
Sent: Thursday, December 10, 2020 5:08 PM
To: u-boot at lists.denx.de
Cc: aford at beaconembedded.com; Adam Ford <[email protected]>; Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; NXP i.MX U- Boot Team <[email protected]>
Subject: [PATCH] imx: Add support for i.MX8MN Beacon EmbeddedWorks devkit.

Beacon EmbeddedWorks is releasing a devkit based on the i.MX8M Nano SoC consisting of baseboard + SOM.

The kit is based on the same design as the Beacon dev kit with the i.MX8M Mini.

<snip>

Quoted 17 lines
board/beacon/imx8mn/README new file +11 -0
new file mode 100644
index 0000000000..b1d7a19a39
@@ -0,0 +1,39 @@
+U-Boot for the Beacon EmbeddedWorks i.MX8M Nano Devkit
+
+Quick Start
+===========
+- Build the ARM Trusted firmware binary
+- Get ddr firmware
+- Build U-Boot
+- Boot
+
+Get and Build the ARM Trusted firmware
+======================================

board/beacon/imx8mn/README line 21

Quoted 10 lines
board/beacon/imx8mn/README new file +10 -0
+Note: $(srctree) is U-Boot source directory
+
+$ git clone https://source.codeaurora.org/external/imx/imx-atf
+$ git checkout imx_5.4.47_2.2.0
+$ make PLAT=imx8mn bl31 CROSS_COMPILE=aarch64-linux-gnu-
+$ cp build/imx8mm/release/bl31.bin $(srctree)
+
+Get the DDR firmware
+====================
+$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.5.bin

There is a newer version of DDR firmware available from NXP:
https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.9.bin

It is also aligned with imx_5.4.47_2.2.0 ATF release, so for completeness purposes I would recommend you to include the updated link into README file.

Yocto meta-freescale layer is already using this firmware version for mx8m series [1], and it is operable.

I believe it would be beneficial to recommend users to pull the latest version available.

Quoted 19 lines
board/beacon/imx8mn/README new file +8 -0
+$ chmod +x firmware-imx-8.5.bin
+$ ./firmware-imx-8.5
+$ cp firmware-imx-8.5/firmware/ddr/synopsys/lpddr4*.bin $(srctree)
+
+Build U-Boot
+============
+$ make imx8mn_beacon_defconfig
+$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu-

ATF_LOAD_ADDR=0x960000

board/beacon/imx8mn/README new file +10 -0
+
+Burn U-Boot to microSD Card
+===========================
+$ sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=32
+
+Boot
+====
+Set baseboard DIP switch:
+S17: 1100XXXX
+

<snip>

Quoted 1 line

2.25.1

-- andrey