Skip to contentSkip to conversation

imx: support i.MX8QM ROM 7720 a1 board

PATCH Superseded Oliver Graute 1 participant 2 messages Sep 20, 2019

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

v5 cover imx: support i.MX8QM ROM 7720 a1 board

Hello list,

with this version its possible to create the bootstream directly from u-boot without using the imx-mkimage tool.

Best Regards,

Oliver

Oliver Graute (1):
imx: support i.MX8QM ROM 7720 a1 board

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/imx8qm-rom7720-a1.dts            | 373 ++++++++++++++++++
 arch/arm/mach-imx/Makefile                    |   2 -
 arch/arm/mach-imx/imx8/Kconfig                |   7 +
 board/advantech/imx8qm_rom7720_a1/Kconfig     |  14 +
 board/advantech/imx8qm_rom7720_a1/MAINTAINERS |   6 +
 board/advantech/imx8qm_rom7720_a1/Makefile    |  11 +
 board/advantech/imx8qm_rom7720_a1/README      |  50 +++
 .../imx8qm_rom7720_a1/imx8qm_rom7720_a1.c     | 141 +++++++
 .../advantech/imx8qm_rom7720_a1/imximage.cfg  |  21 +
 board/advantech/imx8qm_rom7720_a1/spl.c       | 220 +++++++++++
 configs/imx8qm_rom7720_a1_4G_defconfig        |  83 ++++
 include/configs/imx8qm_rom7720.h              | 180 +++++++++
 13 files changed, 1107 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/imx8qm-rom7720-a1.dts
 create mode 100644 board/advantech/imx8qm_rom7720_a1/Kconfig
 create mode 100644 board/advantech/imx8qm_rom7720_a1/MAINTAINERS
 create mode 100644 board/advantech/imx8qm_rom7720_a1/Makefile
 create mode 100644 board/advantech/imx8qm_rom7720_a1/README
 create mode 100644 board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
 create mode 100644 board/advantech/imx8qm_rom7720_a1/imximage.cfg
 create mode 100644 board/advantech/imx8qm_rom7720_a1/spl.c
 create mode 100644 configs/imx8qm_rom7720_a1_4G_defconfig
 create mode 100644 include/configs/imx8qm_rom7720.h
Signature · 1 line
2.17.1
#1 lore raw

PATCH v5 1/1 imx: support i.MX8QM ROM 7720 a1 board

Add i.MX8QM ROM 7720a1 board support

Boot log as below:
U-Boot 2019.10-rc3-00004-gd073e0242f (Sep 20 2019 - 08:24:13 +0200)

CPU: NXP i.MX8QM RevB A53 at 1200 MHz

Model: Advantech iMX8QM Qseven series
Board: ROM-7720-A1 4GB
Build: SCFW 65afe5f6
Boot:  SD2
DRAM:  4 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial at 5a060000
Out:   serial at 5a060000
Err:   serial at 5a060000
Net:   eth0: ethernet at 5b040000Could not get PHY for FEC1: addr 1

, eth-1: ethernet at 5b050000
Hit any key to stop autoboot: 0

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Simon Glass <[email protected]>
Cc uboot-imx <[email protected]>

---

These changes are based on this vendor tree:
https://github.com/ADVANTECH-Corp/uboot-imx6.git

I adapted the files and compared them with code from similar imx8qm-mek board

Changes for v5
- removed spl_dram_init
- added some CONFIG_SPL defines
- reworked README

Changes for v4:
- changed SYS_VENDOR to advantech
- use sc_pm_setup_uart
- removed CONFIG_OF_BOARD_SETUP
- dropped board_gpio_init
- enabled CONFIG_SPL_DM_MMC
- dropped USDHC defines
- dropped CONFIG_AHAB_BOOT

Changes for v3:
- removed duplicate build_info
- removed CONFIG_FSL_ESDHC

Changes for v2:
- cleanup of u-boot environment
- set power mode SC_R_DC_0 for full boot of linux kernel
- enabled usdhc2
- enabled FEC defines
- updated README.md
- enabled readwrite for nfs rootfs
- removed include of environment header

 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/imx8qm-rom7720-a1.dts            | 373 ++++++++++++++++++
 arch/arm/mach-imx/Makefile                    |   2 -
 arch/arm/mach-imx/imx8/Kconfig                |   7 +
 board/advantech/imx8qm_rom7720_a1/Kconfig     |  14 +
 board/advantech/imx8qm_rom7720_a1/MAINTAINERS |   6 +
 board/advantech/imx8qm_rom7720_a1/Makefile    |  11 +
 board/advantech/imx8qm_rom7720_a1/README      |  50 +++
 .../imx8qm_rom7720_a1/imx8qm_rom7720_a1.c     | 141 +++++++
 .../advantech/imx8qm_rom7720_a1/imximage.cfg  |  21 +
 board/advantech/imx8qm_rom7720_a1/spl.c       | 220 +++++++++++
 configs/imx8qm_rom7720_a1_4G_defconfig        |  83 ++++
 include/configs/imx8qm_rom7720.h              | 180 +++++++++
 13 files changed, 1107 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/imx8qm-rom7720-a1.dts
 create mode 100644 board/advantech/imx8qm_rom7720_a1/Kconfig
 create mode 100644 board/advantech/imx8qm_rom7720_a1/MAINTAINERS
 create mode 100644 board/advantech/imx8qm_rom7720_a1/Makefile
 create mode 100644 board/advantech/imx8qm_rom7720_a1/README
 create mode 100644 board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
 create mode 100644 board/advantech/imx8qm_rom7720_a1/imximage.cfg
 create mode 100644 board/advantech/imx8qm_rom7720_a1/spl.c
 create mode 100644 configs/imx8qm_rom7720_a1_4G_defconfig
 create mode 100644 include/configs/imx8qm_rom7720.h
arch/arm/dts/Makefile +1 -0
index d098966380..c4c1100cd7 100644
@@ -635,6 +635,7 @@ dtb-$(CONFIG_ARCH_MX7ULP) += imx7ulp-evk.dtb
 dtb-$(CONFIG_ARCH_IMX8) += \
 	fsl-imx8qm-apalis.dtb \
 	fsl-imx8qm-mek.dtb \
+	imx8qm-rom7720-a1.dtb \
 	fsl-imx8qxp-colibri.dtb \
 	fsl-imx8qxp-mek.dtb
 
arch/arm/dts/imx8qm-rom7720-a1.dts new file +373 -0

373 lines not on this page · raw message

arch/arm/mach-imx/Makefile +0 -2
index 17b241ae99..0cfdffbc78 100644
@@ -152,10 +152,8 @@ ifeq ($(DEPFILE_EXISTS),0)
 endif
 
 flash.bin: spl/u-boot-spl-ddr.bin u-boot.itb FORCE
-ifeq ($(DEPFILE_EXISTS),0)
 	$(call if_changed,mkimage)
 endif
-endif
 
 ifeq ($(CONFIG_ARCH_IMX8), y)
 SPL:
arch/arm/mach-imx/imx8/Kconfig +7 -0
index d17760e333..3932a9c403 100644
@@ -55,6 +55,12 @@ config TARGET_IMX8QM_MEK
 	select BOARD_LATE_INIT
 	select IMX8QM
 
+config TARGET_IMX8QM_ROM7720_A1
+	bool "Support i.MX8QM ROM-7720-A1"
+	select BOARD_LATE_INIT
+	select SUPPORT_SPL
+	select IMX8QM
+
 config TARGET_IMX8QXP_MEK
 	bool "Support i.MX8QXP MEK board"
 	select BOARD_LATE_INIT
@@ -64,6 +70,7 @@ endchoice
 
 source "board/freescale/imx8qm_mek/Kconfig"
 source "board/freescale/imx8qxp_mek/Kconfig"
+source "board/advantech/imx8qm_rom7720_a1/Kconfig"
 source "board/toradex/apalis-imx8/Kconfig"
 source "board/toradex/colibri-imx8x/Kconfig"
 
board/advantech/imx8qm_rom7720_a1/Kconfig new file +14 -0
new file mode 100644
index 0000000000..cf3869ed92
@@ -0,0 +1,14 @@
+if TARGET_IMX8QM_ROM7720_A1
+
+config SYS_BOARD
+	default "imx8qm_rom7720_a1"
+
+config SYS_VENDOR
+	default "advantech"
+
+config SYS_CONFIG_NAME
+	default "imx8qm_rom7720"
+
+source "board/freescale/common/Kconfig"
+
+endif
board/advantech/imx8qm_rom7720_a1/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000..b142ee02e6
@@ -0,0 +1,6 @@
+i.MX8QM ROM 7720 a1 BOARD
+M:	Oliver Graute <[email protected]>
+S:	Maintained
+F:	board/advantech/imx8qm_rom7720_a1/
+F:	include/configs/imx8qm_rom7720.h
+F:	configs/imx8qm_rom7720_a1_4G_defconfig
board/advantech/imx8qm_rom7720_a1/Makefile new file +11 -0
new file mode 100644
index 0000000000..51c5de251c
@@ -0,0 +1,11 @@
+#
+# Copyright 2017 NXP
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y += imx8qm_rom7720_a1.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+endif
board/advantech/imx8qm_rom7720_a1/README new file +50 -0

50 lines not on this page · raw message

board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c new file +141 -0

141 lines not on this page · raw message

board/advantech/imx8qm_rom7720_a1/imximage.cfg new file +21 -0
new file mode 100644
index 0000000000..e324c7ca37
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier:	GPL-2.0+ */
+/*
+ * Copyright 2018 NXP
+ */
+
+#define __ASSEMBLY__
+
+/* Boot from SD, sector size 0x400 */
+BOOT_FROM SD 0x400
+/* SoC type IMX8QM */
+SOC_TYPE IMX8QM
+/* Append seco container image */
+APPEND mx8qm-ahab-container.img
+/* Create the 2nd container */
+CONTAINER
+/* Add scfw image with exec attribute */
+IMAGE SCU mx8qm-val-scfw-tcm.bin
+/* Add ATF image with exec attribute */
+IMAGE A35 bl31.bin 0x80000000
+/* Add U-Boot image with load attribute */
+DATA A35 u-boot-dtb.bin 0x80020000
board/advantech/imx8qm_rom7720_a1/spl.c new file +220 -0

220 lines not on this page · raw message

configs/imx8qm_rom7720_a1_4G_defconfig new file +83 -0

83 lines not on this page · raw message

include/configs/imx8qm_rom7720.h new file +180 -0

180 lines not on this page · raw message

Signature · 1 line
2.17.1