* [PATCH v2 0/3] Support SPL for i.MX7ULP @ 2021-09-12 14:32 Oleksandr Suvorov 2021-09-12 14:32 ` [PATCH v2 1/3] mx7ulp: select soc features Oleksandr Suvorov 0 siblings, 1 reply; 13+ messages in thread From: Oleksandr Suvorov @ 2021-09-12 14:32 UTC (permalink / raw) To: u-boot Cc: Fabio Estevam, Ricardo Salveti, Igor Opaniuk, Jorge Ramirez-Ortiz, Oleksandr Suvorov, Franck LENORMAND, Harald Seiler, NXP i.MX U-Boot Team, Peng Fan, Simon Glass, Stefano Babic This patchset adds SPL support for mx7ulp-based boards. Changes in v2: - add a patch with SPL support for mx7ulp_com board. Oleksandr Suvorov (1): mx7ulp: select soc features Ricardo Salveti (2): mx7ulp: add base SPL support for mx7ulp mx7ulp_com: add support for SPL arch/arm/Makefile | 2 +- arch/arm/dts/imx7ulp-com-u-boot.dtsi | 37 +++++++++++++++++++++ arch/arm/dts/imx7ulp-com.dts | 1 + arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-imx/mx7ulp/Kconfig | 15 +++++++++ arch/arm/mach-imx/mx7ulp/soc.c | 2 +- arch/arm/mach-imx/spl.c | 12 +++++-- board/ea/mx7ulp_com/mx7ulp_com.c | 26 +++++++++++++++ include/configs/imx7ulp_spl.h | 48 ++++++++++++++++++++++++++++ include/configs/mx7ulp_com.h | 6 ++++ 10 files changed, 145 insertions(+), 6 deletions(-) create mode 100644 arch/arm/dts/imx7ulp-com-u-boot.dtsi create mode 100644 include/configs/imx7ulp_spl.h -- 2.31.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/3] mx7ulp: select soc features 2021-09-12 14:32 [PATCH v2 0/3] Support SPL for i.MX7ULP Oleksandr Suvorov @ 2021-09-12 14:32 ` Oleksandr Suvorov 2021-09-12 14:32 ` [PATCH v2 2/3] mx7ulp: add base SPL support for mx7ulp Oleksandr Suvorov ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Oleksandr Suvorov @ 2021-09-12 14:32 UTC (permalink / raw) To: u-boot Cc: Fabio Estevam, Ricardo Salveti, Igor Opaniuk, Jorge Ramirez-Ortiz, Oleksandr Suvorov, Franck LENORMAND, NXP i.MX U-Boot Team, Peng Fan, Stefano Babic Force selecting features present in SoC i.MX7ULP. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> --- (no changes since v1) arch/arm/mach-imx/mx7ulp/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-imx/mx7ulp/Kconfig b/arch/arm/mach-imx/mx7ulp/Kconfig index 2ffac9cf7c..56a3efd7b9 100644 --- a/arch/arm/mach-imx/mx7ulp/Kconfig +++ b/arch/arm/mach-imx/mx7ulp/Kconfig @@ -9,6 +9,9 @@ config LDO_ENABLED_MODE Select this option to enable the PMC1 LDO. config MX7ULP + select ARCH_SUPPORT_PSCI + select CPU_V7_HAS_NONSEC + select CPU_V7_HAS_VIRT select HAS_CAAM bool -- 2.31.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/3] mx7ulp: add base SPL support for mx7ulp 2021-09-12 14:32 ` [PATCH v2 1/3] mx7ulp: select soc features Oleksandr Suvorov @ 2021-09-12 14:32 ` Oleksandr Suvorov 2021-09-12 14:32 ` [PATCH v2 3/3] mx7ulp_com: add support for SPL Oleksandr Suvorov 2021-09-15 16:06 ` [PATCH v2 1/3] mx7ulp: select soc features Igor Opaniuk 2022-02-05 16:40 ` sbabic 2 siblings, 1 reply; 13+ messages in thread From: Oleksandr Suvorov @ 2021-09-12 14:32 UTC (permalink / raw) To: u-boot Cc: Fabio Estevam, Ricardo Salveti, Igor Opaniuk, Jorge Ramirez-Ortiz, Oleksandr Suvorov, Harald Seiler, NXP i.MX U-Boot Team, Simon Glass, Stefano Babic From: Ricardo Salveti <ricardo@foundries.io> Add a base implementation of mx7ulp SPL config header and soc, and changes in makefiles in order to allow building SPL on mx7ulp based devices. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> --- Changes in v2: - fix typo in comments arch/arm/Makefile | 2 +- arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-imx/mx7ulp/soc.c | 2 +- arch/arm/mach-imx/spl.c | 12 ++++++--- include/configs/imx7ulp_spl.h | 48 ++++++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 include/configs/imx7ulp_spl.h diff --git a/arch/arm/Makefile b/arch/arm/Makefile index c68e598a67..03582af414 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -107,7 +107,7 @@ libs-y += arch/arm/cpu/ libs-y += arch/arm/lib/ ifeq ($(CONFIG_SPL_BUILD),y) -ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx5 mx6 mx7 mx35 imx8m imx8 imx8ulp imxrt)) +ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx5 mx6 mx7 mx7ulp mx35 imx8m imx8 imx8ulp imxrt)) libs-y += arch/arm/mach-imx/ endif else diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 0ef269563d..2ecd1280d4 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -28,7 +28,7 @@ endif obj-$(CONFIG_GPT_TIMER) += timer.o obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o endif -ifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs imx8m imx8 imxrt)) +ifeq ($(SOC),$(filter $(SOC),mx7 mx7ulp mx6 mxs imx8m imx8 imxrt)) obj-y += misc.o obj-$(CONFIG_CMD_PRIBLOB) += priblob.o obj-$(CONFIG_SPL_BUILD) += spl.o diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c index 320f24dd29..6815d73ca6 100644 --- a/arch/arm/mach-imx/mx7ulp/soc.c +++ b/arch/arm/mach-imx/mx7ulp/soc.c @@ -196,7 +196,7 @@ void s_init(void) } #endif -#ifndef CONFIG_ULP_WATCHDOG +#if !CONFIG_IS_ENABLED(ULP_WATCHDOG) || CONFIG_IS_ENABLED(SPL_BUILD) void reset_cpu(void) { setbits_le32(SIM0_RBASE, SIM_SOPT1_A7_SW_RESET); diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 36033d611c..2c5ab67154 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -111,8 +111,12 @@ u32 spl_boot_device(void) return BOOT_DEVICE_NONE; } -#elif defined(CONFIG_MX7) || defined(CONFIG_IMX8M) || defined(CONFIG_IMX8) -/* Translate iMX7/i.MX8M boot device to the SPL boot device enumeration */ +#elif defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) || \ + defined(CONFIG_IMX8M) || defined(CONFIG_IMX8) +/* + * Translate iMX7/i.MX7ULP/i.MX8M/i.MX8 boot device to the SPL boot + * device enumeration + */ u32 spl_boot_device(void) { #if defined(CONFIG_MX7) @@ -124,7 +128,9 @@ u32 spl_boot_device(void) */ if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */ return BOOT_DEVICE_BOARD; +#endif +#if defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) /* * The above method does not detect that the boot ROM used * serial downloader in case the boot ROM decided to use the @@ -182,7 +188,7 @@ u32 spl_boot_device(void) return BOOT_DEVICE_NONE; } } -#endif /* CONFIG_MX7 || CONFIG_IMX8M || CONFIG_IMX8 */ +#endif /* CONFIG_MX7 || CONFIG_MX7ULP || CONFIG_IMX8M || CONFIG_IMX8 */ #ifdef CONFIG_SPL_USB_GADGET int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) diff --git a/include/configs/imx7ulp_spl.h b/include/configs/imx7ulp_spl.h new file mode 100644 index 0000000000..991ea366c6 --- /dev/null +++ b/include/configs/imx7ulp_spl.h @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * SPL definitions for the i.MX7ULP SPL + * + * (C) Copyright 2019 Foundries.io + */ + +#ifndef __IMX7ULP_SPL_CONFIG_H +#define __IMX7ULP_SPL_CONFIG_H + +#if CONFIG_IS_ENABLED(SPL) +/* + * see figure 35-5 in i.MX 7ULP Reference manual: + * - IMX7ULP A7 OCRAM free area RAM is from 0x2F010000 to 0x2F03FF00. + * - Set the stack at the end of the free area section, at 0x2003FEB8. + * - The BOOT ROM loads what they consider the firmware image + * which consists of a 4K header in front of us that contains the IVT, DCD, + * and some padding thus 'our' max size is really 0x2F03FF00 - 0x2F011000. + * 187KB is more than enough for the SPL. + */ +#define CONFIG_SPL_MAX_SIZE 0x2EC00 +#define CONFIG_SPL_STACK 0x2F03FEB8 +/* + * Pad SPL to 191KB (4KB header + 187KB max size). This allows writing the + * SPL/U-Boot combination generated with u-boot-with-spl.imx directly to a + * boot media (given that boot media specific offset is configured properly). + */ +#define CONFIG_SPL_PAD_TO 0x2FC00 + +/* MMC support */ +#if CONFIG_IS_ENABLED(SPL_MMC_SUPPORT) +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +#define CONFIG_SYS_MONITOR_LEN 409600 /* 400 KB */ +#endif + +/* Define the payload for FAT/EXT support */ +#if CONFIG_IS_ENABLED(SPL_FS_FAT) || CONFIG_IS_ENABLED(SPL_FS_EXT4) +#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" +#endif + +#define CONFIG_SPL_BSS_START_ADDR 0x68200000 +#define CONFIG_SPL_BSS_MAX_SIZE 0x100000 /* 1 MB */ +#define CONFIG_SYS_SPL_MALLOC_START 0x68300000 +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 /* 1 MB */ + +#endif /* CONFIG_SPL */ + +#endif /* __IMX7ULP_SPL_CONFIG_H */ -- 2.31.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/3] mx7ulp_com: add support for SPL 2021-09-12 14:32 ` [PATCH v2 2/3] mx7ulp: add base SPL support for mx7ulp Oleksandr Suvorov @ 2021-09-12 14:32 ` Oleksandr Suvorov 2021-09-12 22:03 ` Fabio Estevam 2022-02-05 16:39 ` sbabic 0 siblings, 2 replies; 13+ messages in thread From: Oleksandr Suvorov @ 2021-09-12 14:32 UTC (permalink / raw) To: u-boot Cc: Fabio Estevam, Ricardo Salveti, Igor Opaniuk, Jorge Ramirez-Ortiz, Oleksandr Suvorov, Franck LENORMAND, NXP i.MX U-Boot Team, Peng Fan, Simon Glass, Stefano Babic From: Ricardo Salveti <ricardo@foundries.io> Add EA iMX7ULP COM board support for building SPL. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> --- Changes in v2: - add a patch with SPL support for mx7ulp_com board. arch/arm/dts/imx7ulp-com-u-boot.dtsi | 37 ++++++++++++++++++++++++++++ arch/arm/dts/imx7ulp-com.dts | 1 + arch/arm/mach-imx/mx7ulp/Kconfig | 12 +++++++++ board/ea/mx7ulp_com/mx7ulp_com.c | 26 +++++++++++++++++++ include/configs/mx7ulp_com.h | 6 +++++ 5 files changed, 82 insertions(+) create mode 100644 arch/arm/dts/imx7ulp-com-u-boot.dtsi diff --git a/arch/arm/dts/imx7ulp-com-u-boot.dtsi b/arch/arm/dts/imx7ulp-com-u-boot.dtsi new file mode 100644 index 0000000000..d73bfbf7a0 --- /dev/null +++ b/arch/arm/dts/imx7ulp-com-u-boot.dtsi @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0+ OR X11 +/* + * Copyright 2019 Foundries.io + */ + +&iomuxc1 { + u-boot,dm-spl; +}; + +&ahbbridge0 { + u-boot,dm-spl; +}; + +&ahbbridge1 { + u-boot,dm-spl; +}; + +&lpuart4 { + u-boot,dm-spl; +}; + +&usbotg1 { + extcon = <&usbphy1>; + u-boot,dm-spl; +}; + +&usbphy1 { + u-boot,dm-spl; +}; + +&usdhc0 { + u-boot,dm-spl; +}; + +&gpio0 { + u-boot,dm-spl; +}; diff --git a/arch/arm/dts/imx7ulp-com.dts b/arch/arm/dts/imx7ulp-com.dts index c01e03dd06..dcfa37441f 100644 --- a/arch/arm/dts/imx7ulp-com.dts +++ b/arch/arm/dts/imx7ulp-com.dts @@ -6,6 +6,7 @@ /dts-v1/; #include "imx7ulp.dtsi" +#include "imx7ulp-com-u-boot.dtsi" / { model = "Embedded Artists i.MX7ULP COM"; diff --git a/arch/arm/mach-imx/mx7ulp/Kconfig b/arch/arm/mach-imx/mx7ulp/Kconfig index 56a3efd7b9..15c3ab6dae 100644 --- a/arch/arm/mach-imx/mx7ulp/Kconfig +++ b/arch/arm/mach-imx/mx7ulp/Kconfig @@ -23,6 +23,18 @@ config TARGET_MX7ULP_COM bool "Support MX7ULP COM board" select MX7ULP select SYS_ARCH_TIMER + select SPL_DM if SPL + select SPL_GPIO_SUPPORT if SPL + select SPL_LIBCOMMON_SUPPORT if SPL + select SPL_LIBDISK_SUPPORT if SPL + select SPL_LIBGENERIC_SUPPORT if SPL + select SPL_MMC_SUPPORT if SPL + select SPL_OF_CONTROL if SPL + select SPL_OF_LIBFDT if SPL + select SPL_PINCTRL if SPL + select SPL_SEPARATE_BSS if SPL + select SPL_SERIAL_SUPPORT if SPL + select SUPPORT_SPL config TARGET_MX7ULP_EVK bool "Support mx7ulp EVK board" diff --git a/board/ea/mx7ulp_com/mx7ulp_com.c b/board/ea/mx7ulp_com/mx7ulp_com.c index 5b2d444366..fd9cc5b914 100644 --- a/board/ea/mx7ulp_com/mx7ulp_com.c +++ b/board/ea/mx7ulp_com/mx7ulp_com.c @@ -48,3 +48,29 @@ int board_init(void) return 0; } + +#ifdef CONFIG_SPL_BUILD +#include <spl.h> + +#ifdef CONFIG_SPL_LOAD_FIT +int board_fit_config_name_match(const char *name) +{ + if (!strcmp(name, "imx7ulp-com")) + return 0; + + return -1; +} +#endif + +void spl_board_init(void) +{ + preloader_console_init(); +} + +void board_init_f(ulong dummy) +{ + arch_cpu_init(); + + board_early_init_f(); +} +#endif diff --git a/include/configs/mx7ulp_com.h b/include/configs/mx7ulp_com.h index 28672c4f94..ad1fdef1f9 100644 --- a/include/configs/mx7ulp_com.h +++ b/include/configs/mx7ulp_com.h @@ -11,6 +11,10 @@ #include <linux/sizes.h> #include <asm/arch/imx-regs.h> +#ifdef CONFIG_SPL +#include "imx7ulp_spl.h" +#endif + #define CONFIG_BOARD_POSTCLK_INIT #define CONFIG_SYS_BOOTM_LEN 0x1000000 @@ -84,5 +88,7 @@ #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) +#define CONFIG_ARMV7_SECURE_BASE 0x2F000000 + #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #endif /* __CONFIG_H */ -- 2.31.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] mx7ulp_com: add support for SPL 2021-09-12 14:32 ` [PATCH v2 3/3] mx7ulp_com: add support for SPL Oleksandr Suvorov @ 2021-09-12 22:03 ` Fabio Estevam 2021-09-15 16:04 ` Igor Opaniuk 2022-02-05 16:39 ` sbabic 1 sibling, 1 reply; 13+ messages in thread From: Fabio Estevam @ 2021-09-12 22:03 UTC (permalink / raw) To: Oleksandr Suvorov Cc: U-Boot-Denx, Ricardo Salveti, Igor Opaniuk, Jorge Ramirez-Ortiz, Franck LENORMAND, NXP i.MX U-Boot Team, Peng Fan, Simon Glass, Stefano Babic Hi Oleksandr, On Sun, Sep 12, 2021 at 11:33 AM Oleksandr Suvorov <oleksandr.suvorov@foundries.io> wrote: > > From: Ricardo Salveti <ricardo@foundries.io> > > Add EA iMX7ULP COM board support for building SPL. > > Signed-off-by: Ricardo Salveti <ricardo@foundries.io> > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> > --- > > Changes in v2: > - add a patch with SPL support for mx7ulp_com board. > > arch/arm/dts/imx7ulp-com-u-boot.dtsi | 37 ++++++++++++++++++++++++++++ > arch/arm/dts/imx7ulp-com.dts | 1 + > arch/arm/mach-imx/mx7ulp/Kconfig | 12 +++++++++ > board/ea/mx7ulp_com/mx7ulp_com.c | 26 +++++++++++++++++++ > include/configs/mx7ulp_com.h | 6 +++++ > 5 files changed, 82 insertions(+) > create mode 100644 arch/arm/dts/imx7ulp-com-u-boot.dtsi I don't see DRAM initialization in the newly added SPL code. Am I missing something? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] mx7ulp_com: add support for SPL 2021-09-12 22:03 ` Fabio Estevam @ 2021-09-15 16:04 ` Igor Opaniuk 2021-09-15 18:21 ` Fabio Estevam 0 siblings, 1 reply; 13+ messages in thread From: Igor Opaniuk @ 2021-09-15 16:04 UTC (permalink / raw) To: Fabio Estevam Cc: Oleksandr Suvorov, U-Boot-Denx, Ricardo Salveti, Jorge Ramirez-Ortiz, Franck LENORMAND, NXP i.MX U-Boot Team, Peng Fan, Simon Glass, Stefano Babic Hi Fabio, On Mon, Sep 13, 2021 at 1:03 AM Fabio Estevam <festevam@gmail.com> wrote: > > Hi Oleksandr, > > On Sun, Sep 12, 2021 at 11:33 AM Oleksandr Suvorov > <oleksandr.suvorov@foundries.io> wrote: > > > > From: Ricardo Salveti <ricardo@foundries.io> > > > > Add EA iMX7ULP COM board support for building SPL. > > > > Signed-off-by: Ricardo Salveti <ricardo@foundries.io> > > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> > > --- > > > > Changes in v2: > > - add a patch with SPL support for mx7ulp_com board. > > > > arch/arm/dts/imx7ulp-com-u-boot.dtsi | 37 ++++++++++++++++++++++++++++ > > arch/arm/dts/imx7ulp-com.dts | 1 + > > arch/arm/mach-imx/mx7ulp/Kconfig | 12 +++++++++ > > board/ea/mx7ulp_com/mx7ulp_com.c | 26 +++++++++++++++++++ > > include/configs/mx7ulp_com.h | 6 +++++ > > 5 files changed, 82 insertions(+) > > create mode 100644 arch/arm/dts/imx7ulp-com-u-boot.dtsi > > I don't see DRAM initialization in the newly added SPL code. > > Am I missing something? Maybe I misunderstood your question, but it's already in board/ea/mx7ulp_com/mx7ulp_com.c, no? int dram_init(void) { gd->ram_size = imx_ddr_size(); #ifdef CONFIG_OPTEE_TZDRAM_SIZE gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE; #endif return 0; } which is in init_sequence_f (common/board_f.c), which is supposed to be called in spl when CONFIG_SPL=y. Or what exactly do you mean? Regards, Igor -- Best regards - Freundliche Grüsse - Meilleures salutations Igor Opaniuk Embedded Software Engineer T: +380 938364067 E: igor.opaniuk@foundries.io W: www.foundries.io ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] mx7ulp_com: add support for SPL 2021-09-15 16:04 ` Igor Opaniuk @ 2021-09-15 18:21 ` Fabio Estevam 2021-09-16 18:50 ` Oleksandr Suvorov 0 siblings, 1 reply; 13+ messages in thread From: Fabio Estevam @ 2021-09-15 18:21 UTC (permalink / raw) To: Igor Opaniuk Cc: Oleksandr Suvorov, U-Boot-Denx, Ricardo Salveti, Jorge Ramirez-Ortiz, Franck LENORMAND, NXP i.MX U-Boot Team, Peng Fan, Simon Glass, Stefano Babic Hi Igor, On Wed, Sep 15, 2021 at 1:04 PM Igor Opaniuk <igor.opaniuk@foundries.io> wrote: > Maybe I misunderstood your question, > but it's already in board/ea/mx7ulp_com/mx7ulp_com.c, no? The DDR initialization is currently at board/ea/mx7ulp_com/imximage.cfg. If the board supports SPL, I was expecting to see the DDR initialization happen in C code instead. Regards, Fabio Estevam ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] mx7ulp_com: add support for SPL 2021-09-15 18:21 ` Fabio Estevam @ 2021-09-16 18:50 ` Oleksandr Suvorov 2021-09-16 19:27 ` Fabio Estevam 0 siblings, 1 reply; 13+ messages in thread From: Oleksandr Suvorov @ 2021-09-16 18:50 UTC (permalink / raw) To: Fabio Estevam Cc: Igor Opaniuk, Oleksandr Suvorov, U-Boot-Denx, Ricardo Salveti, Jorge Ramirez-Ortiz, Franck LENORMAND, NXP i.MX U-Boot Team, Peng Fan, Simon Glass, Stefano Babic Hi Fabio, On Wed, Sep 15, 2021 at 9:21 PM Fabio Estevam <festevam@gmail.com> wrote: > > Hi Igor, > > On Wed, Sep 15, 2021 at 1:04 PM Igor Opaniuk <igor.opaniuk@foundries.io> wrote: > > > Maybe I misunderstood your question, > > but it's already in board/ea/mx7ulp_com/mx7ulp_com.c, no? > > The DDR initialization is currently at board/ea/mx7ulp_com/imximage.cfg. > > If the board supports SPL, I was expecting to see the DDR > initialization happen in C code instead. The SPL for this board is built with prepended DCD which includes DDR training data (defined in imximage.cfg). So that the bootrom initializes DDR using DCD before jumping to SPL. Is it mandatory to move DDR init in C code for SPL-enabled setups? We wouldn't be changing it for now :( > Regards, > > Fabio Estevam -- Best regards Oleksandr Oleksandr Suvorov cryosay@gmail.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] mx7ulp_com: add support for SPL 2021-09-16 18:50 ` Oleksandr Suvorov @ 2021-09-16 19:27 ` Fabio Estevam 2021-09-17 10:29 ` Oleksandr Suvorov 0 siblings, 1 reply; 13+ messages in thread From: Fabio Estevam @ 2021-09-16 19:27 UTC (permalink / raw) To: Oleksandr Suvorov Cc: Igor Opaniuk, Oleksandr Suvorov, U-Boot-Denx, Ricardo Salveti, Jorge Ramirez-Ortiz, Franck LENORMAND, NXP i.MX U-Boot Team, Peng Fan, Simon Glass, Stefano Babic Hi Oleksandr, On Thu, Sep 16, 2021 at 3:50 PM Oleksandr Suvorov <cryosay@gmail.com> wrote: > The SPL for this board is built with prepended DCD which includes DDR > training data (defined in imximage.cfg). So that the bootrom initializes > DDR using DCD before jumping to SPL. > Is it mandatory to move DDR init in C code for SPL-enabled setups? > We wouldn't be changing it for now :( If the SPL is currently not doing its minimum task of configuring DDR, why do we need SPL in the first place? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] mx7ulp_com: add support for SPL 2021-09-16 19:27 ` Fabio Estevam @ 2021-09-17 10:29 ` Oleksandr Suvorov 0 siblings, 0 replies; 13+ messages in thread From: Oleksandr Suvorov @ 2021-09-17 10:29 UTC (permalink / raw) To: Fabio Estevam Cc: Oleksandr Suvorov, Igor Opaniuk, U-Boot-Denx, Ricardo Salveti, Jorge Ramirez-Ortiz, Franck LENORMAND, NXP i.MX U-Boot Team, Peng Fan, Simon Glass, Stefano Babic Hi Fabio, On Thu, Sep 16, 2021 at 10:27 PM Fabio Estevam <festevam@gmail.com> wrote: > > Hi Oleksandr, > > On Thu, Sep 16, 2021 at 3:50 PM Oleksandr Suvorov <cryosay@gmail.com> wrote: > > > The SPL for this board is built with prepended DCD which includes DDR > > training data (defined in imximage.cfg). So that the bootrom initializes > > DDR using DCD before jumping to SPL. > > Is it mandatory to move DDR init in C code for SPL-enabled setups? > > We wouldn't be changing it for now :( > > If the SPL is currently not doing its minimum task of configuring DDR, > why do we need SPL in the first place? It's for a secure boot process, for running op-tee before u-boot. You could refer to the model we use https://docs.foundries.io/latest/reference-manual/security/secure-boot-imx.html#our-implementation In that model, u-boot runs in a normal world. Separating SPL is only the beginning of changes, so I'm trying to go prepare changes to mainline step-by-step. -- Best regards, Oleksandr Suvorov Software Engineer T: +380 63 8489656 E: oleksandr.suvorov@foundries.io W: www.foundries.io ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 3/3] mx7ulp_com: add support for SPL 2021-09-12 14:32 ` [PATCH v2 3/3] mx7ulp_com: add support for SPL Oleksandr Suvorov 2021-09-12 22:03 ` Fabio Estevam @ 2022-02-05 16:39 ` sbabic 1 sibling, 0 replies; 13+ messages in thread From: sbabic @ 2022-02-05 16:39 UTC (permalink / raw) To: Oleksandr Suvorov, u-boot > From: Ricardo Salveti <ricardo@foundries.io> > Add EA iMX7ULP COM board support for building SPL. > Signed-off-by: Ricardo Salveti <ricardo@foundries.io> > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== 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@denx.de ===================================================================== ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/3] mx7ulp: select soc features 2021-09-12 14:32 ` [PATCH v2 1/3] mx7ulp: select soc features Oleksandr Suvorov 2021-09-12 14:32 ` [PATCH v2 2/3] mx7ulp: add base SPL support for mx7ulp Oleksandr Suvorov @ 2021-09-15 16:06 ` Igor Opaniuk 2022-02-05 16:40 ` sbabic 2 siblings, 0 replies; 13+ messages in thread From: Igor Opaniuk @ 2021-09-15 16:06 UTC (permalink / raw) To: Oleksandr Suvorov Cc: U-Boot Mailing List, Fabio Estevam, Ricardo Salveti, Jorge Ramirez-Ortiz, Franck LENORMAND, NXP i.MX U-Boot Team, Peng Fan, Stefano Babic Hi Oleksandr, On Sun, Sep 12, 2021 at 5:33 PM Oleksandr Suvorov <oleksandr.suvorov@foundries.io> wrote: > > Force selecting features present in SoC i.MX7ULP. > > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> > --- > > (no changes since v1) > > arch/arm/mach-imx/mx7ulp/Kconfig | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm/mach-imx/mx7ulp/Kconfig b/arch/arm/mach-imx/mx7ulp/Kconfig > index 2ffac9cf7c..56a3efd7b9 100644 > --- a/arch/arm/mach-imx/mx7ulp/Kconfig > +++ b/arch/arm/mach-imx/mx7ulp/Kconfig > @@ -9,6 +9,9 @@ config LDO_ENABLED_MODE > Select this option to enable the PMC1 LDO. > > config MX7ULP > + select ARCH_SUPPORT_PSCI > + select CPU_V7_HAS_NONSEC > + select CPU_V7_HAS_VIRT > select HAS_CAAM > bool > > -- > 2.31.1 > Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io> -- Best regards - Freundliche Grüsse - Meilleures salutations Igor Opaniuk Embedded Software Engineer T: +380 938364067 E: igor.opaniuk@foundries.io W: www.foundries.io ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/3] mx7ulp: select soc features 2021-09-12 14:32 ` [PATCH v2 1/3] mx7ulp: select soc features Oleksandr Suvorov 2021-09-12 14:32 ` [PATCH v2 2/3] mx7ulp: add base SPL support for mx7ulp Oleksandr Suvorov 2021-09-15 16:06 ` [PATCH v2 1/3] mx7ulp: select soc features Igor Opaniuk @ 2022-02-05 16:40 ` sbabic 2 siblings, 0 replies; 13+ messages in thread From: sbabic @ 2022-02-05 16:40 UTC (permalink / raw) To: Oleksandr Suvorov, u-boot > Force selecting features present in SoC i.MX7ULP. > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> > Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io> Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== 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@denx.de ===================================================================== ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2022-02-05 16:42 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-09-12 14:32 [PATCH v2 0/3] Support SPL for i.MX7ULP Oleksandr Suvorov 2021-09-12 14:32 ` [PATCH v2 1/3] mx7ulp: select soc features Oleksandr Suvorov 2021-09-12 14:32 ` [PATCH v2 2/3] mx7ulp: add base SPL support for mx7ulp Oleksandr Suvorov 2021-09-12 14:32 ` [PATCH v2 3/3] mx7ulp_com: add support for SPL Oleksandr Suvorov 2021-09-12 22:03 ` Fabio Estevam 2021-09-15 16:04 ` Igor Opaniuk 2021-09-15 18:21 ` Fabio Estevam 2021-09-16 18:50 ` Oleksandr Suvorov 2021-09-16 19:27 ` Fabio Estevam 2021-09-17 10:29 ` Oleksandr Suvorov 2022-02-05 16:39 ` sbabic 2021-09-15 16:06 ` [PATCH v2 1/3] mx7ulp: select soc features Igor Opaniuk 2022-02-05 16:40 ` sbabic
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox