Skip to contentSkip to conversation

ARM: dts: imx: Add support for DH electronics i.MX8M Plus DHCOM and PDK2

PATCH New Marek Vasut 2 participants 2 messages May 21, 2022 – May 23, 2022

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

PATCH v2 1/1 ARM: dts: imx: Add support for DH electronics i.MX8M Plus DHCOM and PDK2

Add support for DH electronics i.MX8M Plus DHCOM SoM on PDK2 carrier board. Currently supported are serial console, EQoS and FEC ethernets, eMMC, SD, SPI NOR and USB 3.0 host.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>

--
V2: - Drop CONFIG_SYS_I2C_SPEED and CONFIG_SYS_PROMPT_HUSH_PS2 from
include/configs/imx8mp_dhcom_pdk2.h

---
 arch/arm/dts/Makefile                         |    1 +
 arch/arm/dts/imx8mp-dhcom-pdk2-u-boot.dtsi    |  141 ++
 arch/arm/dts/imx8mp-dhcom-pdk2.dts            |  152 ++
 arch/arm/dts/imx8mp-dhcom-som.dtsi            | 1042 ++++++++++
 arch/arm/mach-imx/imx8m/Kconfig               |    8 +
 board/dhelectronics/dh_imx8mp/Kconfig         |   15 +
 board/dhelectronics/dh_imx8mp/MAINTAINERS     |    8 +
 board/dhelectronics/dh_imx8mp/Makefile        |   13 +
 board/dhelectronics/dh_imx8mp/common.c        |   37 +
 .../dh_imx8mp/imx8mp_dhcom_pdk2.c             |  186 ++
 .../dh_imx8mp/imximage-lpddr4.cfg             |    8 +
 board/dhelectronics/dh_imx8mp/lpddr4_timing.h |   13 +
 .../dh_imx8mp/lpddr4_timing_4G_32.c           | 1844 +++++++++++++++++
 board/dhelectronics/dh_imx8mp/spl.c           |  187 ++
 configs/imx8mp_dhcom_pdk2_defconfig           |  244 +++
 include/configs/imx8mp_dhcom_pdk2.h           |  113 +
 16 files changed, 4012 insertions(+)
 create mode 100644 arch/arm/dts/imx8mp-dhcom-pdk2-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mp-dhcom-pdk2.dts
 create mode 100644 arch/arm/dts/imx8mp-dhcom-som.dtsi
 create mode 100644 board/dhelectronics/dh_imx8mp/Kconfig
 create mode 100644 board/dhelectronics/dh_imx8mp/MAINTAINERS
 create mode 100644 board/dhelectronics/dh_imx8mp/Makefile
 create mode 100644 board/dhelectronics/dh_imx8mp/common.c
 create mode 100644 board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c
 create mode 100644 board/dhelectronics/dh_imx8mp/imximage-lpddr4.cfg
 create mode 100644 board/dhelectronics/dh_imx8mp/lpddr4_timing.h
 create mode 100644 board/dhelectronics/dh_imx8mp/lpddr4_timing_4G_32.c
 create mode 100644 board/dhelectronics/dh_imx8mp/spl.c
 create mode 100644 configs/imx8mp_dhcom_pdk2_defconfig
 create mode 100644 include/configs/imx8mp_dhcom_pdk2.h
arch/arm/dts/Makefile +1 -0
index 83630af4f67..576206cb4b0 100644
@@ -936,6 +936,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mn-beacon-kit.dtb \
 	imx8mq-mnt-reform2.dtb \
 	imx8mq-phanbell.dtb \
+	imx8mp-dhcom-pdk2.dtb \
 	imx8mp-evk.dtb \
 	imx8mp-phyboard-pollux-rdk.dtb \
 	imx8mp-venice.dtb \
arch/arm/dts/imx8mp-dhcom-pdk2-u-boot.dtsi new file +141 -0

141 lines not on this page · raw message

arch/arm/dts/imx8mp-dhcom-pdk2.dts new file +152 -0

152 lines not on this page · raw message

arch/arm/dts/imx8mp-dhcom-som.dtsi new file +1042 -0

1,042 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +8 -0
index 24299ae037f..61397bf88d1 100644
@@ -148,6 +148,13 @@ config TARGET_IMX8MN_VENICE
 	select GATEWORKS_SC
 	select MISC
 
+config TARGET_IMX8MP_DH_DHCOM_PDK2
+	bool "DH electronics DHCOM Premium Developer Kit (2) i.MX8M Plus"
+	select BINMAN
+	select IMX8MP
+	select IMX8M_LPDDR4
+	select SUPPORT_SPL
+
 config TARGET_IMX8MP_EVK
 	bool "imx8mp LPDDR4 EVK board"
 	select BINMAN
@@ -265,6 +272,7 @@ source "board/beacon/imx8mn/Kconfig"
 source "board/bsh/imx8mn_smm_s2/Kconfig"
 source "board/compulab/imx8mm-cl-iot-gate/Kconfig"
 source "board/data_modul/imx8mm_edm_sbc/Kconfig"
+source "board/dhelectronics/dh_imx8mp/Kconfig"
 source "board/engicam/imx8mm/Kconfig"
 source "board/freescale/imx8mq_evk/Kconfig"
 source "board/freescale/imx8mm_evk/Kconfig"
board/dhelectronics/dh_imx8mp/Kconfig new file +15 -0
new file mode 100644
index 00000000000..8fb80a0ff18
@@ -0,0 +1,15 @@
+if TARGET_IMX8MP_DH_DHCOM_PDK2
+
+config SYS_BOARD
+	default "dh_imx8mp"
+
+config SYS_VENDOR
+	default "dhelectronics"
+
+config SYS_CONFIG_NAME
+	default "imx8mp_dhcom_pdk2"
+
+config IMX_CONFIG
+	default "board/dhelectronics/dh_imx8mp/imximage-lpddr4.cfg"
+
+endif
board/dhelectronics/dh_imx8mp/MAINTAINERS new file +8 -0
new file mode 100644
index 00000000000..7c70cfdd949
@@ -0,0 +1,8 @@
+DH electronics DHCOM Premium Developer Kit (2) i.MX8M Plus
+M:	Marek Vasut <[email protected]>
+S:	Maintained
+F:	arch/arm/dts/imx8mp-dhcom-pdk2.dts
+F:	arch/arm/dts/imx8mp-dhcom-pdk2-u-boot.dtsi
+F:	board/dhelectronics/imx8mp_dhcom_pdk2/
+F:	configs/imx8mp_dhcom_pdk2_defconfig
+F:	include/configs/imx8mp_dhcom_pdk2.h
board/dhelectronics/dh_imx8mp/Makefile new file +13 -0
new file mode 100644
index 00000000000..86ffc31fed8
@@ -0,0 +1,13 @@
+#
+# Copyright (C) 2022 Marek Vasut <[email protected]>
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o lpddr4_timing_4G_32.o
+else
+obj-y += imx8mp_dhcom_pdk2.o
+endif
+
+obj-y += common.o
board/dhelectronics/dh_imx8mp/common.c new file +37 -0
new file mode 100644
index 00000000000..44456da681c
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2022 Marek Vasut <[email protected]>
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm-generic/gpio.h>
+
+#include "lpddr4_timing.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+u8 dh_get_memcfg(void)
+{
+	struct gpio_desc gpio[4];
+	u8 memcfg = 0;
+	ofnode node;
+	int i, ret;
+
+	node = ofnode_path("/config");
+	if (!ofnode_valid(node)) {
+		printf("%s: no /config node?\n", __func__);
+		return BIT(2) | BIT(0);
+	}
+
+	ret = gpio_request_list_by_name_nodev(node,
+					      "dh,ram-coding-gpios",
+					      gpio, ARRAY_SIZE(gpio),
+					      GPIOD_IS_IN);
+	for (i = 0; i < ret; i++)
+		memcfg |= !!dm_gpio_get_value(&(gpio[i])) << i;
+
+	gpio_free_list_nodev(gpio, ret);
+
+	return memcfg;
+}
board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c new file +186 -0

186 lines not on this page · raw message

board/dhelectronics/dh_imx8mp/imximage-lpddr4.cfg new file +8 -0
new file mode 100644
index 00000000000..8aadedb1028
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 NXP
+ */
+
+ROM_VERSION	v2
+BOOT_FROM	sd
+LOADER		u-boot-spl-ddr.bin	0x920000
board/dhelectronics/dh_imx8mp/lpddr4_timing.h new file +13 -0
new file mode 100644
index 00000000000..6d496a970be
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2022 Marek Vasut <[email protected]>
+ */
+
+#ifndef __LPDDR4_TIMING_H__
+#define __LPDDR4_TIMING_H__
+
+extern struct dram_timing_info dh_imx8mp_dhcom_dram_timing_32g_x32;
+
+u8 dh_get_memcfg(void);
+
+#endif /* __LPDDR4_TIMING_H__ */
board/dhelectronics/dh_imx8mp/lpddr4_timing_4G_32.c new file +1844 -0

1,358 lines not on this page · raw message

board/dhelectronics/dh_imx8mp/spl.c new file +187 -0

187 lines not on this page · raw message

configs/imx8mp_dhcom_pdk2_defconfig new file +244 -0

244 lines not on this page · raw message

include/configs/imx8mp_dhcom_pdk2.h new file +113 -0

113 lines not on this page · raw message

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

Signature · 1 line
2.35.1

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

#1 lore raw

PATCH v2 1/1 ARM: dts: imx: Add support for DH electronics i.MX8M Plus DHCOM and PDK2

Quoted 7 lines

Add support for DH electronics i.MX8M Plus DHCOM SoM on PDK2 carrier board. Currently supported are serial console, EQoS and FEC ethernets, eMMC, SD, SPI NOR and USB 3.0 host.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>

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

Best regards,
Stefano Babic

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