Skip to contentSkip to conversation

board: phytec: imx8mp: Add PHYTEC phyCORE-i.MX8MP support

PATCH New Teresa Remmet 2 participants 2 messages Jan 13, 2021 – Jan 23, 2021

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

PATCH v3 1/1 board: phytec: imx8mp: Add PHYTEC phyCORE-i.MX8MP support

Add initial support PHYTEC phyCORE-i.MX8MP SOM.

Supported features:
- 2GB LPDDR4 RAM
- eMMC
- external SD
- debug UART2
- watchdog

---
Changes in v3:
- switched to accepted upstream kernel device tree
(http://lists.infradead.org/pipermail/linux-arm-kernel/2021-January/629277.html)
- added Reviewed-by

Changes in v2:
- remove not needed spl board init
- remove ifdef from board_fit_config_name_match
- disabled not needed i2c busses from defconfig
- not use size macro for PHYS_SDRAM
- remove makros from phycore_imx8mp.h that are defined elsewhere

 arch/arm/dts/Makefile                              |    1 +
 .../arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi |  114 ++
 arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts        |  161 ++
 arch/arm/dts/imx8mp-phycore-som.dtsi               |  293 ++++
 arch/arm/mach-imx/imx8m/Kconfig                    |    7 +
 board/phytec/phycore_imx8mp/Kconfig                |   12 +
 board/phytec/phycore_imx8mp/MAINTAINERS            |    9 +
 board/phytec/phycore_imx8mp/Makefile               |   11 +
 board/phytec/phycore_imx8mp/lpddr4_timing.c        | 1849 ++++++++++++++++++++
 board/phytec/phycore_imx8mp/phycore-imx8mp.c       |   39 +
 board/phytec/phycore_imx8mp/spl.c                  |  129 ++
 configs/phycore-imx8mp_defconfig                   |   95 +
 include/configs/phycore_imx8mp.h                   |  107 ++
 13 files changed, 2827 insertions(+)
 create mode 100644 arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts
 create mode 100644 arch/arm/dts/imx8mp-phycore-som.dtsi
 create mode 100644 board/phytec/phycore_imx8mp/Kconfig
 create mode 100644 board/phytec/phycore_imx8mp/MAINTAINERS
 create mode 100644 board/phytec/phycore_imx8mp/Makefile
 create mode 100644 board/phytec/phycore_imx8mp/lpddr4_timing.c
 create mode 100644 board/phytec/phycore_imx8mp/phycore-imx8mp.c
 create mode 100644 board/phytec/phycore_imx8mp/spl.c
 create mode 100644 configs/phycore-imx8mp_defconfig
 create mode 100644 include/configs/phycore_imx8mp.h
arch/arm/dts/Makefile +1 -0
index 0f738c224f2e..991b41a7d7da 100644
@@ -780,6 +780,7 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mm-beacon-kit.dtb \
 	imx8mq-phanbell.dtb \
 	imx8mp-evk.dtb \
+	imx8mp-phyboard-pollux-rdk.dtb \
 	imx8mq-pico-pi.dtb
 
 dtb-$(CONFIG_ARCH_IMXRT) += imxrt1050-evk.dtb \
arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi new file +114 -0

114 lines not on this page · raw message

arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts new file +161 -0

161 lines not on this page · raw message

arch/arm/dts/imx8mp-phycore-som.dtsi new file +293 -0

293 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +7 -0
index 8615dc3bec99..a80293a890de 100644
@@ -77,6 +77,12 @@ config TARGET_PHYCORE_IMX8MM
 	select IMX8MM
         select SUPPORT_SPL
 	select IMX8M_LPDDR4
+
+config TARGET_PHYCORE_IMX8MP
+	bool "PHYTEC PHYCORE i.MX8MP"
+	select IMX8MP
+        select SUPPORT_SPL
+	select IMX8M_LPDDR4
 endchoice
 
 source "board/freescale/imx8mq_evk/Kconfig"
@@ -88,5 +94,6 @@ source "board/technexion/pico-imx8mq/Kconfig"
 source "board/toradex/verdin-imx8mm/Kconfig"
 source "board/beacon/imx8mm/Kconfig"
 source "board/phytec/phycore_imx8mm/Kconfig"
+source "board/phytec/phycore_imx8mp/Kconfig"
 
 endif
board/phytec/phycore_imx8mp/Kconfig new file +12 -0
new file mode 100644
index 000000000000..7a20d6e8fe44
@@ -0,0 +1,12 @@
+if TARGET_PHYCORE_IMX8MP
+
+config SYS_BOARD
+	default "phycore_imx8mp"
+
+config SYS_VENDOR
+	default "phytec"
+
+config SYS_CONFIG_NAME
+	default "phycore_imx8mp"
+
+endif
board/phytec/phycore_imx8mp/MAINTAINERS new file +9 -0
new file mode 100644
index 000000000000..cb7ce558a81a
@@ -0,0 +1,9 @@
+phyCORE-i.MX8M Plus
+M:      Teresa Remmet <[email protected]>
+W:      https://www.phytec.eu/product-eu/system-on-modules/phycore-imx-8m-plus/
+S:      Maintained
+F:      arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts
+F:      arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi
+F:      board/phytec/phycore_imx8mp/
+F:      configs/phycore-imx8mp_defconfig
+F:      include/configs/phycore_imx8mp.h
board/phytec/phycore_imx8mp/Makefile new file +11 -0
new file mode 100644
index 000000000000..c4c434c9475b
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2020 PHYTEC Messtechnik GmbH
+# Author: Teresa Remmet <[email protected]>
+
+obj-y += phycore-imx8mp.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o
+endif
board/phytec/phycore_imx8mp/lpddr4_timing.c new file +1849 -0

1,849 lines not on this page · raw message

board/phytec/phycore_imx8mp/phycore-imx8mp.c new file +39 -0
new file mode 100644
index 000000000000..6cb2ba5fc21c
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2020 PHYTEC Messtechnik GmbH
+ * Author: Teresa Remmet <[email protected]>
+ */
+
+#include <common.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/io.h>
+#include <asm/mach-imx/boot_mode.h>
+#include <env.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+	return 0;
+}
+
+int board_mmc_get_env_dev(int devno)
+{
+	return devno;
+}
+
+int board_late_init(void)
+{
+	switch (get_boot_device()) {
+	case SD2_BOOT:
+		env_set_ulong("mmcdev", 1);
+		break;
+	case MMC3_BOOT:
+		env_set_ulong("mmcdev", 2);
+		break;
+	default:
+		break;
+	}
+
+	return 0;
+}
board/phytec/phycore_imx8mp/spl.c new file +129 -0

129 lines not on this page · raw message

configs/phycore-imx8mp_defconfig new file +95 -0

95 lines not on this page · raw message

include/configs/phycore_imx8mp.h new file +107 -0

107 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 1/1 board: phytec: imx8mp: Add PHYTEC phyCORE-i.MX8MP support

Quoted 9 lines

Add initial support PHYTEC phyCORE-i.MX8MP SOM.
Supported features:
- 2GB LPDDR4 RAM
- eMMC
- external SD
- debug UART2
- watchdog

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: sbabic at denx.de
=====================================================================