]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: imxrt1170-evk: Add support for the NXP i.MXRT1170-EVK
authorJesse Taube <mr.bossman075@gmail.com>
Tue, 26 Jul 2022 05:43:39 +0000 (01:43 -0400)
committerStefano Babic <sbabic@denx.de>
Sun, 18 Sep 2022 18:42:56 +0000 (20:42 +0200)
This commit adds board support for i.MXRT1170-EVK from NXP. This board
is an evaluation kit provided by NXP for i.MXRT117x processor family.

Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
arch/arm/include/asm/arch-imx/cpu.h
arch/arm/mach-imx/imxrt/Kconfig
arch/arm/mach-imx/imxrt/soc.c
board/freescale/imxrt1170-evk/Kconfig [new file with mode: 0644]
board/freescale/imxrt1170-evk/MAINTAINERS [new file with mode: 0644]
board/freescale/imxrt1170-evk/Makefile [new file with mode: 0644]
board/freescale/imxrt1170-evk/imximage.cfg [new file with mode: 0644]
board/freescale/imxrt1170-evk/imxrt1170-evk.c [new file with mode: 0644]

index d54e6e6335200f2f5eb83809cb8853def3716c40..a666271fc11ab7378b51c8542f16114b9169c25e 100644 (file)
@@ -56,6 +56,7 @@
 
 #define MXC_CPU_IMXRT1020      0xB4 /* dummy ID */
 #define MXC_CPU_IMXRT1050      0xB6 /* dummy ID */
+#define MXC_CPU_IMXRT1170      0xBA /* dummy ID */
 
 #define MXC_CPU_MX7ULP         0xE1 /* Temporally hard code */
 #define MXC_CPU_VF610          0xF6 /* dummy ID */
index 8c891339657e28c2d9cf679c1949009b6943c2f0..c1d6b09e7753fcc9638122a48a3c04dd3019fcaf 100644 (file)
@@ -12,6 +12,10 @@ config IMXRT1050
        bool
        select IMXRT
 
+config IMXRT1170
+       bool
+       select IMXRT
+
 config SYS_SOC
        default "imxrt"
 
@@ -27,9 +31,14 @@ config TARGET_IMXRT1050_EVK
        bool "Support imxrt1050 EVK board"
        select IMXRT1050
 
+config TARGET_IMXRT1170_EVK
+       bool "Support imxrt1170 EVK board"
+       select IMXRT1170
+
 endchoice
 
 source "board/freescale/imxrt1020-evk/Kconfig"
 source "board/freescale/imxrt1050-evk/Kconfig"
+source "board/freescale/imxrt1170-evk/Kconfig"
 
 endif
index ba015992ee5737556fd01e6677f6d56bfe77692f..34162a3976fbf1120ece470a4de396376717cfcf 100644 (file)
@@ -43,6 +43,8 @@ u32 get_cpu_rev(void)
        return MXC_CPU_IMXRT1020 << 12;
 #elif defined(CONFIG_IMXRT1050)
        return MXC_CPU_IMXRT1050 << 12;
+#elif defined(CONFIG_IMXRT1170)
+       return MXC_CPU_IMXRT1170 << 12;
 #else
 #error This IMXRT SoC is not supported
 #endif
diff --git a/board/freescale/imxrt1170-evk/Kconfig b/board/freescale/imxrt1170-evk/Kconfig
new file mode 100644 (file)
index 0000000..c61fc57
--- /dev/null
@@ -0,0 +1,22 @@
+if TARGET_IMXRT1170_EVK
+
+config SYS_BOARD
+       string
+       default "imxrt1170-evk"
+
+config SYS_VENDOR
+       string
+       default "freescale"
+
+config SYS_SOC
+       string
+       default "imxrt1170"
+
+config SYS_CONFIG_NAME
+       string
+       default "imxrt1170-evk"
+
+config IMX_CONFIG
+       default "board/freescale/imxrt1170-evk/imximage.cfg"
+
+endif
diff --git a/board/freescale/imxrt1170-evk/MAINTAINERS b/board/freescale/imxrt1170-evk/MAINTAINERS
new file mode 100644 (file)
index 0000000..1fc3179
--- /dev/null
@@ -0,0 +1,7 @@
+IMXRT1170 EVALUATION KIT
+M:     Giulio Benetti <giulio.benetti@benettiengineering.com>
+M:     Jesse Taube <Mr.Bossman075@gmail.com>
+S:     Maintained
+F:     board/freescale/imxrt1170-evk
+F:     include/configs/imxrt1170-evk.h
+F:     configs/imxrt1170-evk_defconfig
diff --git a/board/freescale/imxrt1170-evk/Makefile b/board/freescale/imxrt1170-evk/Makefile
new file mode 100644 (file)
index 0000000..857a168
--- /dev/null
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2019
+# Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com>
+
+obj-y  := imxrt1170-evk.o
diff --git a/board/freescale/imxrt1170-evk/imximage.cfg b/board/freescale/imxrt1170-evk/imximage.cfg
new file mode 100644 (file)
index 0000000..57583d0
--- /dev/null
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2022
+ * Author(s): Jesse Taube <Mr.Bossman075@gmail.com>
+ * Giulio Benetti <giulio.benetti@benettiengineering.com>
+ */
+
+#include <config.h>
+
+/* image version */
+
+IMAGE_VERSION 2
+
+/*
+ * Boot Device : one of
+ * spi/sd/nand/onenand, qspi/nor
+ */
+
+BOOT_FROM      sd
+
+/*
+ * Device Configuration Data (DCD)
+ *
+ * Each entry must have the format:
+ * Addr-type           Address        Value
+ *
+ * where:
+ *     Addr-type register length (1,2 or 4 bytes)
+ *     Address   absolute address of the register
+ *     value     value to be stored in the register
+ */
diff --git a/board/freescale/imxrt1170-evk/imxrt1170-evk.c b/board/freescale/imxrt1170-evk/imxrt1170-evk.c
new file mode 100644 (file)
index 0000000..4b82ee5
--- /dev/null
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2019
+ * Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com>
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <init.h>
+#include <log.h>
+#include <ram.h>
+#include <spl.h>
+#include <asm/global_data.h>
+#include <asm/io.h>
+#include <asm/armv7m.h>
+#include <serial.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+#ifndef CONFIG_SUPPORT_SPL
+       int rv;
+       struct udevice *dev;
+
+       rv = uclass_get_device(UCLASS_RAM, 0, &dev);
+       if (rv) {
+               debug("DRAM init failed: %d\n", rv);
+               return rv;
+       }
+
+#endif
+       return fdtdec_setup_mem_size_base();
+}
+
+int dram_init_banksize(void)
+{
+       return fdtdec_setup_memory_banksize();
+}
+
+#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_SPL_OS_BOOT
+int spl_start_uboot(void)
+{
+       debug("SPL: booting kernel\n");
+       /* break into full u-boot on 'c' */
+       return serial_tstc() && serial_getc() == 'c';
+}
+#endif
+
+int spl_dram_init(void)
+{
+       struct udevice *dev;
+       int rv;
+
+       rv = uclass_get_device(UCLASS_RAM, 0, &dev);
+       if (rv)
+               debug("DRAM init failed: %d\n", rv);
+       return rv;
+}
+
+void spl_board_init(void)
+{
+       preloader_console_init();
+       spl_dram_init();
+       arch_cpu_init(); /* to configure mpu for sdram rw permissions */
+}
+
+u32 spl_boot_device(void)
+{
+       return BOOT_DEVICE_MMC1;
+}
+#endif
+
+int board_init(void)
+{
+       gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
+
+       return 0;
+}