Skip to contentSkip to conversation

board: emcraft: Add support for Emcraft Systems NavQ+

PATCH Applied Gilles Talis 2 participants 3 messages Oct 27, 2024 – Oct 30, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 board: emcraft: Add support for Emcraft Systems NavQ+

The Emcraft Systems NavQ+ kit is a mobile robotics platform based on NXP i.MX8 MPlus SoC.

The following interfaces and devices are enabled:
- eMMC
- Gigabit Ethernet (through eQOS interface)
- SD-Card
- UART console

The device tree file is taken from upstream Linux Kernel through OF_UPSTREAM

---
Changes v2 --> v3
- Fixed board documentation build error
- Removed board_phy_config() function
- Added SPDX to env file
- Removed PHY_ADDR config variable

Changes v1 --> v2:
- Removed unused usdhc properties from dtsi
- Moved to correct ethernet PHY driver (REALTEK -> ATHEROS)
- Removed empty board_late_init() function
- Moved env variables to an env file

---
 arch/arm/dts/imx8mp-navqp-u-boot.dtsi         |  110 +
 arch/arm/mach-imx/imx8m/Kconfig               |    8 +
 board/emcraft/imx8mp_navqp/Kconfig            |   15 +
 board/emcraft/imx8mp_navqp/MAINTAINERS        |    8 +
 board/emcraft/imx8mp_navqp/Makefile           |   13 +
 board/emcraft/imx8mp_navqp/imx8mp_navqp.c     |   10 +
 board/emcraft/imx8mp_navqp/imx8mp_navqp.env   |   18 +
 .../imx8mp_navqp/imximage-8mp-lpddr4.cfg      |    8 +
 board/emcraft/imx8mp_navqp/lpddr4_timing.c    | 1842 +++++++++++++++++
 board/emcraft/imx8mp_navqp/spl.c              |  132 ++
 configs/imx8mp_navqp_defconfig                |  104 +
 doc/board/emcraft/imx8mp-navqp.rst            |   65 +
 doc/board/emcraft/index.rst                   |    9 +
 doc/board/index.rst                           |    1 +
 include/configs/imx8mp_navqp.h                |   37 +
 15 files changed, 2380 insertions(+)
 create mode 100644 arch/arm/dts/imx8mp-navqp-u-boot.dtsi
 create mode 100644 board/emcraft/imx8mp_navqp/Kconfig
 create mode 100644 board/emcraft/imx8mp_navqp/MAINTAINERS
 create mode 100644 board/emcraft/imx8mp_navqp/Makefile
 create mode 100644 board/emcraft/imx8mp_navqp/imx8mp_navqp.c
 create mode 100644 board/emcraft/imx8mp_navqp/imx8mp_navqp.env
 create mode 100644 board/emcraft/imx8mp_navqp/imximage-8mp-lpddr4.cfg
 create mode 100644 board/emcraft/imx8mp_navqp/lpddr4_timing.c
 create mode 100644 board/emcraft/imx8mp_navqp/spl.c
 create mode 100644 configs/imx8mp_navqp_defconfig
 create mode 100644 doc/board/emcraft/imx8mp-navqp.rst
 create mode 100644 doc/board/emcraft/index.rst
 create mode 100644 include/configs/imx8mp_navqp.h
arch/arm/dts/imx8mp-navqp-u-boot.dtsi new file +110 -0
new file mode 100644
index 0000000000..fe41d81813
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019, 2021 NXP
+ * Copyright 2024 Gilles Talis <[email protected]>
+ */
+
+#include "imx8mp-u-boot.dtsi"
+
+/ {
+	wdt-reboot {
+		compatible = "wdt-reboot";
+		wdt = <&wdog1>;
+		bootph-pre-ram;
+	};
+
+	firmware {
+		optee {
+			compatible = "linaro,optee-tz";
+			method = "smc";
+		};
+	};
+};
+
+&{/soc@0/bus@30800000/i2c@30a20000/pmic@25} {
+	bootph-all;
+};
+
+&{/soc@0/bus@30800000/i2c@30a20000/pmic@25/regulators} {
+	bootph-all;
+};
+
+&gpio1 {
+	bootph-pre-ram;
+};
+
+&gpio2 {
+	bootph-pre-ram;
+};
+
+&gpio3 {
+	bootph-pre-ram;
+};
+
+&gpio4 {
+	bootph-pre-ram;
+};
+
+&gpio5 {
+	bootph-pre-ram;
+};
+
+&i2c1 {
+	bootph-all;
+};
+
+&pinctrl_i2c1 {
+	bootph-pre-ram;
+};
+
+&pinctrl_pmic {
+	bootph-pre-ram;
+};
+
+&pinctrl_uart2 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_gpio {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc3 {
+	bootph-pre-ram;
+};
+
+&pinctrl_wdog {
+	bootph-pre-ram;
+};
+
+&reg_usdhc2_vmmc {
+	u-boot,off-on-delay-us = <20000>;
+};
+
+&reg_usdhc2_vmmc {
+	bootph-pre-ram;
+};
+
+&uart2 {
+	bootph-pre-ram;
+};
+
+&usdhc1 {
+	bootph-pre-ram;
+};
+
+&usdhc2 {
+	bootph-pre-ram;
+};
+
+&usdhc3 {
+	bootph-pre-ram;
+};
+
+&wdog1 {
+	bootph-pre-ram;
+};
arch/arm/mach-imx/imx8m/Kconfig +8 -0
index 9d1fabe91c..b254a50b09 100644
@@ -228,6 +228,13 @@ config TARGET_IMX8MP_EVK
 	select SPL_CRYPTO if SPL
 	imply OF_UPSTREAM
 
+config TARGET_IMX8MP_NAVQP
+	bool "Emcraft Systems i.MX8M Plus NavQ+ board"
+	select IMX8MP
+	select IMX8M_LPDDR4
+	select SUPPORT_SPL
+	imply OF_UPSTREAM
+
 config TARGET_IMX8MP_VENICE
 	bool "Support Gateworks Venice iMX8M Plus module"
 	select IMX8MP
@@ -358,6 +365,7 @@ source "board/compulab/imx8mm-cl-iot-gate/Kconfig"
 source "board/data_modul/imx8mm_edm_sbc/Kconfig"
 source "board/data_modul/imx8mp_edm_sbc/Kconfig"
 source "board/dhelectronics/dh_imx8mp/Kconfig"
+source "board/emcraft/imx8mp_navqp/Kconfig"
 source "board/engicam/imx8mm/Kconfig"
 source "board/engicam/imx8mp/Kconfig"
 source "board/freescale/imx8mq_evk/Kconfig"
board/emcraft/imx8mp_navqp/Kconfig new file +15 -0
new file mode 100644
index 0000000000..20b09b68c7
@@ -0,0 +1,15 @@
+if TARGET_IMX8MP_NAVQP
+
+config SYS_BOARD
+	default "imx8mp_navqp"
+
+config SYS_VENDOR
+	default "emcraft"
+
+config SYS_CONFIG_NAME
+	default "imx8mp_navqp"
+
+config IMX_CONFIG
+	default "board/emcraft/imx8mp_navqp/imximage-8mp-lpddr4.cfg"
+
+endif
board/emcraft/imx8mp_navqp/MAINTAINERS new file +8 -0
new file mode 100644
index 0000000000..d91605e461
@@ -0,0 +1,8 @@
+Emcraft Systems NavQ+ board (i.MX8M Plus)
+M:	Gilles Talis <[email protected]>
+S:	Maintained
+F:	arch/arm/dts/imx8mp-navqp-u-boot.dtsi
+F:	board/emcraft/imx8mp_navqp/
+F:	configs/imx8mp_navqp_defconfig
+F:	doc/board/emcraft/
+F:	include/configs/imx8mp_navqp.h
board/emcraft/imx8mp_navqp/Makefile new file +13 -0
new file mode 100644
index 0000000000..a5890b009e
@@ -0,0 +1,13 @@
+#
+# Copyright 2019 NXP
+# Copyright 2024 Gilles Talis <[email protected]>
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += imx8mp_navqp.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o
+endif
board/emcraft/imx8mp_navqp/imx8mp_navqp.c new file +10 -0
new file mode 100644
index 0000000000..219efdddcb
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019 NXP
+ * Copyright 2024 Gilles Talis <[email protected]>
+ */
+
+int board_init(void)
+{
+	return 0;
+}
board/emcraft/imx8mp_navqp/imx8mp_navqp.env new file +18 -0
new file mode 100644
index 0000000000..c19fe08648
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2024 Gilles Talis <[email protected]>
+ */
+
+#include <config_distro_bootcmd.h>
+
+scriptaddr=CONFIG_SYS_LOAD_ADDR
+kernel_addr_r=CONFIG_SYS_LOAD_ADDR
+image=Image
+console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
+fdt_addr_r=0x43000000
+boot_fdt=try
+fdtfile=CONFIG_DEFAULT_FDT_FILE
+initrd_addr=0x43800000
+bootm_size=0x10000000
+mmcpart=1
+mmcroot=/dev/mmcblk1p2 rootwait rw
board/emcraft/imx8mp_navqp/imximage-8mp-lpddr4.cfg new file +8 -0
new file mode 100644
index 0000000000..0a23408049
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021, 2024 NXP
+ */
+
+ROM_VERSION	v2
+BOOT_FROM	sd
+LOADER		u-boot-spl-ddr.bin	0x920000
board/emcraft/imx8mp_navqp/lpddr4_timing.c new file +1842 -0

1,842 lines not on this page · raw message

board/emcraft/imx8mp_navqp/spl.c new file +132 -0

132 lines not on this page · raw message

configs/imx8mp_navqp_defconfig new file +104 -0

104 lines not on this page · raw message

doc/board/emcraft/imx8mp-navqp.rst new file +65 -0

65 lines not on this page · raw message

doc/board/emcraft/index.rst new file +9 -0
new file mode 100644
index 0000000000..564552cb36
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Emcraft
+=======
+
+.. toctree::
+   :maxdepth: 2
+
+   imx8mp-navqp
doc/board/index.rst +1 -0
index 3fb7c84f10..ca5246e259 100644
@@ -24,6 +24,7 @@ Board-specific doc
    cloos/index
    congatec/index
    coreboot/index
+   emcraft/index
    emulation/index
    gateworks/index
    google/index
include/configs/imx8mp_navqp.h new file +37 -0
new file mode 100644
index 0000000000..802438aea5
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019 NXP
+ * Copyright 2024 Gilles Talis <[email protected]>
+ */
+
+#ifndef __IMX8MP_NAVQP_H
+#define __IMX8MP_NAVQP_H
+
+#include <linux/sizes.h>
+#include <asm/arch/imx-regs.h>
+
+#define CFG_SYS_UBOOT_BASE	(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
+
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 1) \
+	func(MMC, mmc, 2)
+
+#include <config_distro_bootcmd.h>
+
+/* Initial environment variables */
+#define CFG_EXTRA_ENV_SETTINGS \
+	BOOTENV
+
+/* Link Definitions */
+
+#define CFG_SYS_INIT_RAM_ADDR	0x40000000
+#define CFG_SYS_INIT_RAM_SIZE	0x80000
+
+/* 8GB DDR */
+#define CFG_SYS_SDRAM_BASE		0x40000000
+#define PHYS_SDRAM			0x40000000
+#define PHYS_SDRAM_SIZE			0xC0000000	/* 3 GB */
+#define PHYS_SDRAM_2			0x100000000
+#define PHYS_SDRAM_2_SIZE		0x140000000	/* 5 GB */
+
+#endif

base-commit: 7036abbd5c3934059b020d5fd5bcb8b3bf3c788c

Signature · 1 line
2.43.0
reviewer Reviewed-by on v3 1/1
#1 lore raw

Hi Gilles,

Quoted 13 lines · Gilles Talis

The Emcraft Systems NavQ+ kit is a mobile robotics platform based on NXP i.MX8 MPlus SoC.

The following interfaces and devices are enabled:
- eMMC
- Gigabit Ethernet (through eQOS interface)
- SD-Card
- UART console

The device tree file is taken from upstream Linux Kernel through OF_UPSTREAM

Quoted 7 lines

---
Changes v2 --> v3
- Fixed board documentation build error
- Removed board_phy_config() function
- Added SPDX to env file
- Removed PHY_ADDR config variable

This version looks good, thanks: