Skip to contentSkip to conversation

arm64: imx: Add support for imx8mp-beacon-kit

PATCH New Adam Ford 2 participants 2 messages Mar 24, 2023 – Apr 4, 2023

Subsystems (3)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH v5 1/1 arm64: imx: Add support for imx8mp-beacon-kit

Beacon Embedded has an i.MX8M Plus development kit which consists of a SOM + baseboard. The SOM includes Bluetooth, WiFi, QSPI, eMMC, and one Ethernet PHY. The baseboard includes audio, HDMI, USB-C Dual Role port, USB Hub with five ports, a PCIe slot, and a second Ethernet PHY. The device trees are already queued for inclusion in Linux 6.3.

---
V5: Rebase off next instead of imx branch.
Replace u-boot,dm-spl with bootph-pre-ram

V4: Rebase off Marek V's EQOS series.
Remove code no longer needed from the EQOS series Remove unnecessary include files.

V3: Fix Doc indicies to fix errors with 'make htmldocs'
Remove duplicated entries in imx8mp_beacon.env found in env_default.h Remove unnecessary include options from imx8mp_beacon.h

V2: Move default environment from imx8mp_beacon.h to imx8mp_beacon.env
Move README to beacon-imx8mp.rst

arch/arm/dts/Makefile +1 -0
index c160e884bf..eff9c69969 100644
@@ -995,6 +995,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mn-beacon-kit.dtb \
 	imx8mq-mnt-reform2.dtb \
 	imx8mq-phanbell.dtb \
+	imx8mp-beacon-kit.dtb \
 	imx8mp-dhcom-pdk2.dtb \
 	imx8mp-evk.dtb \
 	imx8mp-icore-mx8mp-edimm2.2.dtb \
arch/arm/dts/imx8mp-beacon-kit-u-boot.dtsi new file +216 -0

216 lines not on this page · raw message

arch/arm/dts/imx8mp-beacon-kit.dts new file +550 -0

550 lines not on this page · raw message

arch/arm/dts/imx8mp-beacon-som.dtsi new file +416 -0

416 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +11 -0
index 5e4836b02f..eb45d8d671 100644
@@ -170,6 +170,16 @@ config TARGET_IMX8MN_VENICE
 	select GATEWORKS_SC
 	select MISC
 
+config TARGET_IMX8MP_BEACON
+	bool "imx8mm Beacon Embedded devkit"
+	select BINMAN
+	select IMX8MP
+	select SUPPORT_SPL
+	select IMX8M_LPDDR4
+	select FSL_CAAM
+	select ARCH_MISC_INIT
+	select SPL_CRYPTO if SPL
+
 config TARGET_IMX8MP_DH_DHCOM_PDK2
 	bool "DH electronics DHCOM Premium Developer Kit (2) i.MX8M Plus"
 	select BINMAN
@@ -326,6 +336,7 @@ endchoice
 source "board/advantech/imx8mp_rsb3720a1/Kconfig"
 source "board/beacon/imx8mm/Kconfig"
 source "board/beacon/imx8mn/Kconfig"
+source "board/beacon/imx8mp/Kconfig"
 source "board/bsh/imx8mn_smm_s2/Kconfig"
 source "board/cloos/imx8mm_phg/Kconfig"
 source "board/compulab/imx8mm-cl-iot-gate/Kconfig"
board/beacon/imx8mp/Kconfig new file +16 -0
new file mode 100644
index 0000000000..3c0fca9be8
@@ -0,0 +1,16 @@
+if TARGET_IMX8MP_BEACON
+
+config SYS_BOARD
+	default "imx8mp"
+
+config SYS_VENDOR
+	default "beacon"
+
+config SYS_CONFIG_NAME
+	default "imx8mp_beacon"
+
+config IMX_CONFIG
+	default "board/freescale/imx8mp_evk/imximage-8mp-lpddr4.cfg"
+
+
+endif
board/beacon/imx8mp/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000..3750551a4a
@@ -0,0 +1,6 @@
+i.MX8MP Beacon EmbeddedWorks Devkit
+M:	Adam Ford <[email protected]>
+S:	Maintained
+F:	board/beacon/imx8mp/
+F:	include/configs/imx8mp_beacon.h
+F:	configs/imx8mp_beacon_defconfig
board/beacon/imx8mp/Makefile new file +13 -0
new file mode 100644
index 0000000000..264720f6d4
@@ -0,0 +1,13 @@
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2022 Logic PD, Inc dba Beacon EmbeddedWorks
+#
+
+obj-y += imx8mp_beacon.o
+obj-y += ../../freescale/common/
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o
+endif
board/beacon/imx8mp/imx8mp_beacon.c new file +35 -0
new file mode 100644
index 0000000000..8963a51fbb
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* Copyright 2023 Logic PD, Inc dba Beacon EmbeddedWorks */
+
+#include <common.h>
+#include <init.h>
+#include <miiphy.h>
+#include <asm/arch/sys_proto.h>
+
+static void setup_fec(void)
+{
+	struct iomuxc_gpr_base_regs *gpr =
+		(struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR;
+
+	/* Enable RGMII TX clk output */
+	setbits_le32(&gpr->gpr[1], BIT(22));
+}
+
+#if IS_ENABLED(CONFIG_NET)
+int board_phy_config(struct phy_device *phydev)
+{
+	if (phydev->drv->config)
+		phydev->drv->config(phydev);
+	return 0;
+}
+#endif
+
+int board_init(void)
+{
+	int ret = 0;
+
+	if (CONFIG_IS_ENABLED(FEC_MXC))
+		setup_fec();
+
+	return ret;
+}
board/beacon/imx8mp/imx8mp_beacon.env new file +19 -0
new file mode 100644
index 0000000000..ec9fbd3332
@@ -0,0 +1,19 @@
+boot_fdt=try
+boot_fit=no
+console=ttymxc1,115200
+fdt_addr=0x43000000
+fdt_addr_r=0x43000000
+fdt_file=imx8mp-beacon-kit.dtb
+finduuid=part uuid mmc ${mmcdev}:2 uuid
+image=Image
+kernel_addr_r=0x40480000
+loadfdt=echo ${fdt_file}; fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdt_file}
+loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
+mmcargs=setenv bootargs console=${console}  root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}
+mmcboot=echo Booting from mmc ...; run finduuid; run mmcargs; if test ${boot_fit} = yes || test ${boot_fit} = try; then bootm ${loadaddr}; else if run loadfdt; then booti ${loadaddr} - ${fdt_addr_r}; else echo WARN: Cannot load the DT; fi; fi;
+mmcdev=1
+mmcpart=1
+netargs=setenv bootargs ${jh_clk} console=${console} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
+netboot=echo Booting from net ...; run netargs;  if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${loadaddr} ${image}; if test ${boot_fit} = yes || test ${boot_fit} = try; then bootm ${loadaddr}; else if ${get_cmd} ${fdt_addr_r} ${fdt_file}; then booti ${loadaddr} - ${fdt_addr_r}; else echo WARN: Cannot load the DT; fi; fi;
+optargs=audit=0 video=LVDS-1:d video=LVDS-2:d
+scriptaddr=0x40480000
board/beacon/imx8mp/imximage-8mp-lpddr4.cfg new file +9 -0
new file mode 100644
index 0000000000..6dedf1724a
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 NXP
+ */
+
+
+ROM_VERSION	v2
+BOOT_FROM	sd
+LOADER		u-boot-spl-ddr.bin	0x920000
board/beacon/imx8mp/lpddr4_timing.c new file +1881 -0

1,690 lines not on this page · raw message

board/beacon/imx8mp/spl.c new file +132 -0

132 lines not on this page · raw message

configs/imx8mp_beacon_defconfig new file +182 -0

182 lines not on this page · raw message

doc/board/beacon/beacon-imx8mp.rst new file +52 -0

52 lines not on this page · raw message

doc/board/beacon/index.rst new file +9 -0
new file mode 100644
index 0000000000..1fe1046a4c

Lines of this file are not shown. View the raw message.

doc/board/index.rst +1 -0
index 618d22e616..69e2cd5fb8 100644

Lines of this file are not shown. View the raw message.

include/configs/imx8mp_beacon.h new file +29 -0
new file mode 100644
index 0000000000..ee0fd07e65

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.39.2

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH v5 1/1 arm64: imx: Add support for imx8mp-beacon-kit

Quoted 7 lines

Beacon Embedded has an i.MX8M Plus development kit which consists of a SOM + baseboard. The SOM includes Bluetooth, WiFi, QSPI, eMMC, and one Ethernet PHY. The baseboard includes audio, HDMI, USB-C Dual Role port, USB Hub with five ports, a PCIe slot, and a second Ethernet PHY. The device trees are already queued for inclusion in Linux 6.3.

Applied to u-boot-imx, next, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,        Managing Director: Erika Unter  
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================