imx: support i.MX8QM DMSSE20 a1 board
Subsystems (3)
PATCH 1/1 imx: support i.MX8QM DMSSE20 a1 board
Add i.MX8QM DMSSE20 a1 board support
U-Boot 2020.10-rc3-00177-g316f823505 (Aug 31 2020 - 16:08:37 +0200)
Model: Advantech iMX8QM DMSSE20 Board: DMS-SE20A1 8GB Build: SCFW 494c97f3, SECO-FW d7523fe8, ATF 09c5cc9 Boot: USB DRAM: 8 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... Card did not respond to voltage select! *** Warning - No block device, using default environment
In: serial at 5a060000 Out: serial at 5a060000 Err: serial at 5a060000
Net:
Warning: ethernet at 5b040000 (eth0) using random MAC address - 0e:db:c9:1a:a4:a7
eth0: ethernet at 5b040000 [PRIME]
Warning: ethernet at 5b050000 (eth1) using random MAC address - d2:38:f7:68:ce:91 , eth1: ethernet at 5b050000
Hit any key to stop autoboot: 0
--- arch/arm/dts/Makefile | 1 + arch/arm/dts/imx8qm-dmsse20-a1.dts | 345 ++++++++++++++++++ arch/arm/mach-imx/imx8/Kconfig | 7 + board/advantech/imx8qm_dmsse20_a1/Kconfig | 14 + board/advantech/imx8qm_dmsse20_a1/MAINTAINERS | 6 + board/advantech/imx8qm_dmsse20_a1/Makefile | 8 + board/advantech/imx8qm_dmsse20_a1/README | 61 ++++ .../imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c | 188 ++++++++++ .../advantech/imx8qm_dmsse20_a1/imximage.cfg | 21 ++ board/advantech/imx8qm_dmsse20_a1/spl.c | 217 +++++++++++ common/Kconfig | 2 +- configs/imx8qm_dmsse20a1_defconfig | 86 +++++ include/configs/imx8qm_dmsse20.h | 219 +++++++++++ 13 files changed, 1174 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/imx8qm-dmsse20-a1.dts create mode 100644 board/advantech/imx8qm_dmsse20_a1/Kconfig create mode 100644 board/advantech/imx8qm_dmsse20_a1/MAINTAINERS create mode 100644 board/advantech/imx8qm_dmsse20_a1/Makefile create mode 100644 board/advantech/imx8qm_dmsse20_a1/README create mode 100644 board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c create mode 100644 board/advantech/imx8qm_dmsse20_a1/imximage.cfg create mode 100644 board/advantech/imx8qm_dmsse20_a1/spl.c create mode 100644 configs/imx8qm_dmsse20a1_defconfig create mode 100644 include/configs/imx8qm_dmsse20.h
arch/arm/dts/Makefile +1 -0
@@ -752,6 +752,7 @@ dtb-$(CONFIG_ARCH_MX7ULP) += imx7ulp-com.dtb \ dtb-$(CONFIG_ARCH_IMX8) += \ fsl-imx8qm-apalis.dtb \ fsl-imx8qm-mek.dtb \ + imx8qm-dmsse20-a1.dtb \ imx8qm-rom7720-a1.dtb \ fsl-imx8qxp-ai_ml.dtb \ fsl-imx8qxp-colibri.dtb \
arch/arm/dts/imx8qm-dmsse20-a1.dts new file +345 -0
345 lines not on this page · raw message
arch/arm/mach-imx/imx8/Kconfig +7 -0
@@ -86,6 +86,12 @@ config TARGET_IMX8QM_ROM7720_A1 select SUPPORT_SPL select IMX8QM +config TARGET_IMX8QM_DMSSE20_A1 + bool "Support i.MX8QM DMS-SE20-A1 board" + select BOARD_LATE_INIT + select SUPPORT_SPL + select IMX8QM + config TARGET_IMX8QXP_MEK bool "Support i.MX8QXP MEK board" select BOARD_LATE_INIT
@@ -95,6 +101,7 @@ endchoice source "board/freescale/imx8qm_mek/Kconfig" source "board/freescale/imx8qxp_mek/Kconfig" +source "board/advantech/imx8qm_dmsse20_a1/Kconfig" source "board/advantech/imx8qm_rom7720_a1/Kconfig" source "board/toradex/apalis-imx8/Kconfig" source "board/toradex/colibri-imx8x/Kconfig"
board/advantech/imx8qm_dmsse20_a1/Kconfig new file +14 -0
@@ -0,0 +1,14 @@ +if TARGET_IMX8QM_DMSSE20_A1 + +config SYS_BOARD + default "imx8qm_dmsse20_a1" + +config SYS_VENDOR + default "advantech" + +config SYS_CONFIG_NAME + default "imx8qm_dmsse20" + +source "board/freescale/common/Kconfig" + +endif
board/advantech/imx8qm_dmsse20_a1/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +i.MX8QM ROM DMSSE20 a1 BOARD +M: Oliver Graute <[email protected]> +S: Maintained +F: board/advantech/imx8qm_dmsse20_a1/ +F: include/configs/imx8qm_dmsse20.h +F: configs/imx8qm_dmsse20a1_defconfig
board/advantech/imx8qm_dmsse20_a1/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# Copyright 2017 NXP +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += imx8qm_dmsse20_a1.o +obj-$(CONFIG_SPL_BUILD) += spl.o
board/advantech/imx8qm_dmsse20_a1/README new file +61 -0
61 lines not on this page · raw message
board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c new file +188 -0
188 lines not on this page · raw message
board/advantech/imx8qm_dmsse20_a1/imximage.cfg new file +21 -0
@@ -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_dmsse20_a1/spl.c new file +217 -0
217 lines not on this page · raw message
common/Kconfig +1 -1
@@ -896,7 +896,7 @@ config BOARD_LATE_INIT config DISPLAY_CPUINFO bool "Display information about the CPU during start up" - default y if ARC|| ARM || NIOS2 || X86 || XTENSA || M68K + default y if ARC || ARM || NIOS2 || X86 || XTENSA || M68K help Display information about the CPU that U-Boot is running on when U-Boot starts up. The function print_cpuinfo() is called
configs/imx8qm_dmsse20a1_defconfig new file +86 -0
86 lines not on this page · raw message
include/configs/imx8qm_dmsse20.h new file +219 -0
219 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 1/1 imx: support i.MX8QM DMSSE20 a1 board
Quoted 1 line · Oliver Graute
Add i.MX8QM DMSSE20 a1 board support
[snip]
board/advantech/imx8qm_dmsse20_a1/MAINTAINERS line 6
Quoted 12 lines
board/advantech/imx8qm_dmsse20_a1/MAINTAINERS new file +6
-0@@ -0,0 +1,6 @@ +i.MX8QM ROM DMSSE20 a1 BOARD +M: Oliver Graute <[email protected]> +S: Maintained +F: board/advantech/imx8qm_dmsse20_a1/ +F: include/configs/imx8qm_dmsse20.h +F: configs/imx8qm_dmsse20a1_defconfig
You should also list the dts files.
[snip]
board/advantech/imx8qm_dmsse20_a1/README
Quoted 5 lines
board/advantech/imx8qm_dmsse20_a1/README new file +0
-0
This should be rST and in doc/board/
[snip]
Quoted 6 lines
include/configs/imx8qm_dmsse20.h new file +0
-0
include/configs/imx8qm_dmsse20.h line 10
Quoted 10 lines
include/configs/imx8qm_dmsse20.h new file +10
-0@@ -0,0 +1,219 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2017-2019 NXP +*/ + +#ifndef __IMX8QM_DMSSE20_H +#define __IMX8QM_DMSSE20_H + +#include <linux/sizes.h> +#include <asm/arch/imx-regs.h>
Do we really need these includes here?
include/configs/imx8qm_dmsse20.h line 17
Quoted 7 lines
include/configs/imx8qm_dmsse20.h new file +7
-0+#define CONFIG_REMAKE_ELF + +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_MAX_SIZE (124 * 1024) +#define CONFIG_SPL_BSS_START_ADDR 0x00128000 +#define CONFIG_SPL_BSS_MAX_SIZE 0x1000/* 4 KB */ +#endif
These guards are unnecessary.
include/configs/imx8qm_dmsse20.h line 21
Quoted 3 lines
include/configs/imx8qm_dmsse20.h new file +3
-0+#define CONFIG_NR_DRAM_BANKS 4 + +/* #define CONFIG_ARCH_MISC_INIT */
Don't include commented out defines please.
include/configs/imx8qm_dmsse20.h line 33
Quoted 12 lines
include/configs/imx8qm_dmsse20.h new file +12
-0+ +/* #define CONFIG_CMD_READ */ + +/* Flat Device Tree Definitions */ +#define CONFIG_OF_BOARD_SETUP + +/* #undef CONFIG_CMD_EXPORTENV */ +/* #undef CONFIG_CMD_IMPORTENV */ +/* #undef CONFIG_CMD_IMLS */ + +/* #undef CONFIG_CMD_CRC32 */ +#undef CONFIG_BOOTM_NETBSD
You cannot enable/disable commands in the header file, that's an error to checkpatch as they've all been in Kconfig for some time. CONFIG_BOOTM_xxx has been for a bit as well. Please audit the whole file for things which are already in Kconfig, thanks.
include/configs/imx8qm_dmsse20.h line 88
Quoted 4 lines
include/configs/imx8qm_dmsse20.h new file +4
-0+#define CONFIG_MFG_ENV_SETTINGS \ + "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ + "initrd_addr=0x83100000\0" \ + "initrd_high=0xffffffffffffffff\0" \
It's not a good idea, but not fatal to disable initrd relocation.
Quoted 5 lines
include/configs/imx8qm_dmsse20.h new file +5
-0+"emmc_dev=0\0" \ +"sd_dev=1\0" \ + +/* Initial environment variables */ +#define CONFIG_EXTRA_ENV_SETTINGS \
include/configs/imx8qm_dmsse20.h line 146
Quoted 10 lines
include/configs/imx8qm_dmsse20.h new file +10
-0+CONFIG_MFG_ENV_SETTINGS \ + M4_BOOT_ENV \ +"script=boot.scr\0" \ +"image=Image\0" \ +"panel=NULL\0" \ +"console=ttyLP0\0" \ +"earlycon=lpuart32,0x5a060000\0" \ +"fdt_addr=0x83000000\0" \ +"fdt_high=0xffffffffffffffff\0" \ +
It is however fatal to disable fdt relocation. It's far too easy for real life examples to generated non-8-byte-aligned addresses for the dtb and the Linux blows up. Please also see include/configs/ti_armv7_common.h and the big block comment about where to place and how much space to have between the kernel, initrd and device tree. While that's for a 32bit platform, it's all applicable to aarch64 (perhaps with the caveat that dtb can be up to 2MiB? off the top of my head).
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200831/d7d71896/attachment.sig>
PATCH 1/1 imx: support i.MX8QM DMSSE20 a1 board
Quoted 4 lines · Tom Rini
Quoted 1 line · Oliver Graute
Add i.MX8QM DMSSE20 a1 board support
[snip]
Quoted 14 lines
board/advantech/imx8qm_dmsse20_a1/MAINTAINERS line 6
Quoted 12 lines
board/advantech/imx8qm_dmsse20_a1/MAINTAINERS new file +6
-0@@ -0,0 +1,6 @@ +i.MX8QM ROM DMSSE20 a1 BOARD +M: Oliver Graute <[email protected]> +S: Maintained +F: board/advantech/imx8qm_dmsse20_a1/ +F: include/configs/imx8qm_dmsse20.h +F: configs/imx8qm_dmsse20a1_defconfigYou should also list the dts files.
ok will do that
Quoted 8 lines
[snip]
board/advantech/imx8qm_dmsse20_a1/README
Quoted 5 lines
board/advantech/imx8qm_dmsse20_a1/README new file +0
-0This should be rST and in doc/board/
ok will do that
Quoted 12 lines
[snip]
Quoted 10 lines
include/configs/imx8qm_dmsse20.h new file +4
-0@@ -0,0 +1,219 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2017-2019 NXP +*/
Quoted 8 lines
include/configs/imx8qm_dmsse20.h line 10
Quoted 6 lines
include/configs/imx8qm_dmsse20.h new file +6
-0+ +#ifndef __IMX8QM_DMSSE20_H +#define __IMX8QM_DMSSE20_H + +#include <linux/sizes.h> +#include <asm/arch/imx-regs.h> Do we really need these includes here?
I got some errors if I remove these two lines. So I keep them.
Quoted 9 lines
include/configs/imx8qm_dmsse20.h line 17
Quoted 7 lines
include/configs/imx8qm_dmsse20.h new file +7
-0+#define CONFIG_REMAKE_ELF + +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_MAX_SIZE (124 * 1024) +#define CONFIG_SPL_BSS_START_ADDR 0x00128000 +#define CONFIG_SPL_BSS_MAX_SIZE 0x1000/* 4 KB */ +#endif These guards are unnecessary.
ok will remove that
Quoted 5 lines
include/configs/imx8qm_dmsse20.h line 21
Quoted 3 lines
include/configs/imx8qm_dmsse20.h new file +3
-0+#define CONFIG_NR_DRAM_BANKS 4 + +/* #define CONFIG_ARCH_MISC_INIT */ Don't include commented out defines please.
ok will remove that
Quoted 18 lines
include/configs/imx8qm_dmsse20.h line 33
Quoted 12 lines
include/configs/imx8qm_dmsse20.h new file +12
-0+ +/* #define CONFIG_CMD_READ */ + +/* Flat Device Tree Definitions */ +#define CONFIG_OF_BOARD_SETUP + +/* #undef CONFIG_CMD_EXPORTENV */ +/* #undef CONFIG_CMD_IMPORTENV */ +/* #undef CONFIG_CMD_IMLS */ + +/* #undef CONFIG_CMD_CRC32 */ +#undef CONFIG_BOOTM_NETBSDYou cannot enable/disable commands in the header file, that's an error to checkpatch as they've all been in
Kconfigfor some time.CONFIG_BOOTM_xxxhas been for a bit as well. Please audit the whole file for things which are already inKconfig, thanks.
Quoted 6 lines
include/configs/imx8qm_dmsse20.h line 88
Quoted 4 lines
include/configs/imx8qm_dmsse20.h new file +4
-0+#define CONFIG_MFG_ENV_SETTINGS \ + "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ + "initrd_addr=0x83100000\0" \ + "initrd_high=0xffffffffffffffff\0" \It's not a good idea, but not fatal to disable initrd relocation.
ok will remove that
Quoted 16 lines
Quoted 5 lines
include/configs/imx8qm_dmsse20.h new file +5
-0+"emmc_dev=0\0" \ +"sd_dev=1\0" \ + +/* Initial environment variables */ +#define CONFIG_EXTRA_ENV_SETTINGS \include/configs/imx8qm_dmsse20.h line 146
Quoted 10 lines
include/configs/imx8qm_dmsse20.h new file +10
-0+CONFIG_MFG_ENV_SETTINGS \ + M4_BOOT_ENV \ +"script=boot.scr\0" \ +"image=Image\0" \ +"panel=NULL\0" \ +"console=ttyLP0\0" \ +"earlycon=lpuart32,0x5a060000\0" \ +"fdt_addr=0x83000000\0" \ +"fdt_high=0xffffffffffffffff\0" \ +
Quoted 8 lines
It is however fatal to disable fdt relocation. It's far too easy for real life examples to generated non-8-byte-aligned addresses for the dtb and the Linux blows up. Please also see
include/configs/ti_armv7_common.hand the big block comment about where to place and how much space to have between the kernel, initrd and device tree. While that's for a 32bit platform, it's all applicable to aarch64 (perhaps with the caveat that dtb can be up to 2MiB? off the top of my head).
not sure If I full understood that. I will remove the fdt_high line.
thx for your feedback.
Best regards,
Oliver
Fabio Estevam
reviewerPATCH 1/1 imx: support i.MX8QM DMSSE20 a1 board
In reply to Oliver GrauteHi Oliver,
board/advantech/imx8qm_dmsse20_a1/README line 10
Quoted 8 lines · Oliver Graute
board/advantech/imx8qm_dmsse20_a1/README new file +8
-0+Quick Start +=========== + +- Build the ARM Trusted firmware binary +- Get scfw_tcm.bin and ahab-container.img +- Get imx-mkimage +- Build U-Boot +- Build imx-mkimage
The imx-mkimage is only needed for building the NXP U-Boot, right?
PATCH 1/1 imx: support i.MX8QM DMSSE20 a1 board
Quoted 5 lines · Fabio Estevam
Hi Oliver,
On Mon, Aug 31, 2020 at 11:54 AM Oliver Graute
<[email protected]> wrote:
Quoted 10 lines
board/advantech/imx8qm_dmsse20_a1/README line 10
Quoted 8 lines
board/advantech/imx8qm_dmsse20_a1/README new file +8
-0+Quick Start +=========== + +- Build the ARM Trusted firmware binary +- Get scfw_tcm.bin and ahab-container.img +- Get imx-mkimage +- Build U-Boot +- Build imx-mkimageThe imx-mkimage is only needed for building the NXP U-Boot, right?
ok I'll remove that line
Best Regards,
Oliver