[PATCH v1 00/17] colibri-imx8x: support refresh

This series refreshes Colibri iMX8X support as follows: - enable fuse command - revert switch to binman - set boot delay - enable bootcount limit - move bootaux memory base and size configuration to defconfig - update env memory layout - use load instead of fatload in M4 boot environment helpers - provide proper prompt - drop obsolete environment variables - implement SoC variant handling - move SoC variant detection into its own function - update update_uboot confirmation message - remove obsolete SDHC related config defines - remove obsolete net usb start - enable OF_SYSTEM_SETUP for M4 memory reservation - introduce setup setting setupargs - add 2nd ethernet address
Andrejs Cainikovs (7): board: colibri-imx8x: add 2nd ethernet address colibri-imx8x: construct fdtfile dynamically colibri-imx8x: drop obsolete environment variables colibri-imx8x: switch from fatload to load colibri-imx8x: set bootaux memory base and size Revert "imx: imx8x: colibri: switch to binman" colibri-imx8x: enable fuse command
Igor Opaniuk (1): colibri-imx8x: provide proper CONFIG_SYS_PROMPT
Marcel Ziswiler (6): colibri-imx8x: remove obsolete net usb start colibri-imx8x: remove obsolete sdhc related config defines colibri-imx8x: update update_uboot confirmation message colibri-imx8x: update env memory layout colibri-imx8x: enable environment bootcount limit colibri-imx8x: set bootdelay
Max Krummenacher (1): colibri-imx8x: extract is_imx8dx() from ram detection
Philippe Schenker (2): colibri-imx8x: Remove baudrate from console argument defconfig: colibri-imx8x: enable CONFIG_OF_SYSTEM_SETUP
arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi | 2 - arch/arm/mach-imx/imx8/Kconfig | 1 - board/toradex/colibri-imx8x/Kconfig | 3 + board/toradex/colibri-imx8x/colibri-imx8x.c | 36 ++++++--- configs/colibri-imx8x_defconfig | 13 +++- include/configs/colibri-imx8x.h | 78 ++++---------------- 6 files changed, 56 insertions(+), 77 deletions(-)

All Colibri iMX8X variants have 2nd RGMII on SoC, so add the address for 2nd ethernet.
Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- board/toradex/colibri-imx8x/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/board/toradex/colibri-imx8x/Kconfig b/board/toradex/colibri-imx8x/Kconfig index b89840a379c..cb11e2c318f 100644 --- a/board/toradex/colibri-imx8x/Kconfig +++ b/board/toradex/colibri-imx8x/Kconfig @@ -12,6 +12,9 @@ config SYS_CONFIG_NAME config TDX_CFG_BLOCK default y
+config TDX_CFG_BLOCK_2ND_ETHADDR + default y + config TDX_HAVE_MMC default y

All Colibri iMX8X variants have 2nd RGMII on SoC, so add the address for 2nd ethernet. Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Philippe Schenker philippe.schenker@toradex.com
This commit does remove the options argument from the console kernel-argument as it prevents the serial driver from outputting anything.
Do this by switchting to use the variable "setup" as it is done on other Toradex modules.
Signed-off-by: Philippe Schenker philippe.schenker@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- include/configs/colibri-imx8x.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index 3ec36aa773e..b337ef28533 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -64,7 +64,7 @@ MEM_LAYOUT_ENV_SETTINGS \ "boot_file=Image\0" \ "boot_script_dhcp=boot.scr\0" \ - "consoleargs=console=ttyLP3,${baudrate} earlycon\0" \ + "console=ttyLP3\0" \ "fdt_addr=0x83000000\0" \ "fdt_file=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \ "fdtfile=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \ @@ -77,6 +77,8 @@ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=1\0" \ "panel=NULL\0" \ + "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ + "consoleblank=0 earlycon\0" \ "update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \ "if test "$confirm" = "y"; then " \ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \

From: Philippe Schenker philippe.schenker@toradex.com This commit does remove the options argument from the console kernel-argument as it prevents the serial driver from outputting anything. Do this by switchting to use the variable "setup" as it is done on other Toradex modules. Signed-off-by: Philippe Schenker philippe.schenker@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Philippe Schenker philippe.schenker@toradex.com
Enable a call to ft_system_setup() which reserves M4 memory region.
Signed-off-by: Philippe Schenker philippe.schenker@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- configs/colibri-imx8x_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index 83f39996b1a..6a5c6e1d61b 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -19,6 +19,7 @@ CONFIG_REMAKE_ELF=y CONFIG_FIT=y CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_FIT_VERBOSE=y +CONFIG_OF_SYSTEM_SETUP=y CONFIG_LOG=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y

From: Philippe Schenker philippe.schenker@toradex.com Enable a call to ft_system_setup() which reserves M4 memory region. Signed-off-by: Philippe Schenker philippe.schenker@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Marcel Ziswiler marcel.ziswiler@toradex.com
Remove obsolete net USB start.
While at it also add a comment about enabling distro-boot.
Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- include/configs/colibri-imx8x.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index b337ef28533..c530cd7db9a 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -35,13 +35,12 @@
#define MFG_NAND_PARTITION ""
+/* Enable Distro Boot */ #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 1) \ func(MMC, mmc, 0) \ func(DHCP, dhcp, na) #include <config_distro_bootcmd.h> -#undef BOOTENV_RUN_NET_USB_START -#define BOOTENV_RUN_NET_USB_START ""
#define CFG_MFG_ENV_SETTINGS \ "mfgtool_args=setenv bootargs ${consoleargs} " \

From: Marcel Ziswiler marcel.ziswiler@toradex.com Remove obsolete net USB start. While at it also add a comment about enabling distro-boot. Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Marcel Ziswiler marcel.ziswiler@toradex.com
Remove obsolete SDHC related config defines. Nowadays, all SDHC related hardware configuration comes from the device tree.
Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- include/configs/colibri-imx8x.h | 11 ----------- 1 file changed, 11 deletions(-)
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index c530cd7db9a..f493ba9b0f8 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -10,10 +10,6 @@ #include <linux/sizes.h> #include <linux/stringify.h>
-#define CFG_SYS_FSL_ESDHC_ADDR 0 -#define USDHC1_BASE_ADDR 0x5b010000 -#define USDHC2_BASE_ADDR 0x5b020000 - #define MEM_LAYOUT_ENV_SETTINGS \ "fdt_addr_r=0x83000000\0" \ "kernel_addr_r=0x81000000\0" \ @@ -85,13 +81,6 @@ "${blkcnt}; fi\0" \ "vidargs=video=imxdpufb5:off video=imxdpufb6:off video=imxdpufb7:off\0"
-/* Link Definitions */ - -/* Environment in eMMC, before config block at the end of 1st "boot sector" */ - -/* On Colibri iMX8X USDHC1 is eMMC, USDHC2 is 4-bit SD */ -#define CFG_SYS_FSL_USDHC_NUM 2 - #define CFG_SYS_SDRAM_BASE 0x80000000 #define PHYS_SDRAM_1 0x80000000 #define PHYS_SDRAM_2 0x880000000

From: Marcel Ziswiler marcel.ziswiler@toradex.com Remove obsolete SDHC related config defines. Nowadays, all SDHC related hardware configuration comes from the device tree. Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Marcel Ziswiler marcel.ziswiler@toradex.com
Update update_uboot confirmation message.
Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- include/configs/colibri-imx8x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index f493ba9b0f8..7826596a331 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -74,7 +74,7 @@ "panel=NULL\0" \ "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ "consoleblank=0 earlycon\0" \ - "update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \ + "update_uboot=askenv confirm Did you load flash.bin resp. u-boot-dtb.imx (y/N)?; " \ "if test "$confirm" = "y"; then " \ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \

From: Marcel Ziswiler marcel.ziswiler@toradex.com Update update_uboot confirmation message. Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Max Krummenacher max.krummenacher@toradex.com
Refactor the detection of QXP vs. DX SoC into its own helper function.
Signed-off-by: Max Krummenacher max.krummenacher@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- board/toradex/colibri-imx8x/colibri-imx8x.c | 22 ++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index 169d4d04b16..88eddbddaef 100644 --- a/board/toradex/colibri-imx8x/colibri-imx8x.c +++ b/board/toradex/colibri-imx8x/colibri-imx8x.c @@ -40,21 +40,25 @@ static void setup_iomux_uart(void) imx8_iomux_setup_multiple_pads(uart3_pads, ARRAY_SIZE(uart3_pads)); }
-void board_mem_get_layout(u64 *phys_sdram_1_start, - u64 *phys_sdram_1_size, - u64 *phys_sdram_2_start, - u64 *phys_sdram_2_size) +static int is_imx8dx(void) { - u32 is_dualx = 0, val = 0; - sc_err_t scierr = sc_misc_otp_fuse_read(-1, 6, &val); + u32 val = 0; + sc_err_t sc_err = sc_misc_otp_fuse_read(-1, 6, &val);
- if (scierr == SC_ERR_NONE) { + if (sc_err == SC_ERR_NONE) { /* DX has two A35 cores disabled */ - is_dualx = (val & 0xf) != 0x0; + return (val & 0xf) != 0x0; } + return false; +}
+void board_mem_get_layout(u64 *phys_sdram_1_start, + u64 *phys_sdram_1_size, + u64 *phys_sdram_2_start, + u64 *phys_sdram_2_size) +{ *phys_sdram_1_start = PHYS_SDRAM_1; - if (is_dualx) + if (is_imx8dx()) /* Our DX based SKUs only have 1 GB RAM */ *phys_sdram_1_size = SZ_1G; else

From: Max Krummenacher max.krummenacher@toradex.com Refactor the detection of QXP vs. DX SoC into its own helper function. Signed-off-by: Max Krummenacher max.krummenacher@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

The following expression is used to construct the device tree name: fdtfile=${soc}-colibri-${fdt_board}.dtb
- soc is set dynamically (either imx8qxp or imx8dx) - fdt_board can be modified by the user (eval-v3, aster, iris/iris-v2)
Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- board/toradex/colibri-imx8x/colibri-imx8x.c | 14 ++++++++++++++ configs/colibri-imx8x_defconfig | 2 ++ include/configs/colibri-imx8x.h | 3 +-- 3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index 88eddbddaef..6ed9cc4fa80 100644 --- a/board/toradex/colibri-imx8x/colibri-imx8x.c +++ b/board/toradex/colibri-imx8x/colibri-imx8x.c @@ -123,6 +123,18 @@ int checkboard(void) return 0; }
+static void select_dt_from_module_version(void) +{ + /* + * The dtb filename is constructed from ${soc}-colibri-${fdt_board}.dtb. + * Set soc depending on the used SoC. + */ + if (is_imx8dx()) + env_set("soc", "imx8dx"); + else + env_set("soc", "imx8qxp"); +} + int board_init(void) { board_gpio_init(); @@ -158,5 +170,7 @@ int board_late_init(void) env_set("board_rev", "v1.0"); #endif
+ select_dt_from_module_version(); + return 0; } diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index 6a5c6e1d61b..6c1c9978d11 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -20,6 +20,8 @@ CONFIG_FIT=y CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_FIT_VERBOSE=y CONFIG_OF_SYSTEM_SETUP=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-colibri-${fdt_board}.dtb" CONFIG_LOG=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index 7826596a331..9a4a5f3b5de 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -61,8 +61,7 @@ "boot_script_dhcp=boot.scr\0" \ "console=ttyLP3\0" \ "fdt_addr=0x83000000\0" \ - "fdt_file=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \ - "fdtfile=fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb\0" \ + "fdt_board=eval-v3\0" \ "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \ "image=Image\0" \ "initrd_addr=0x83800000\0" \

The following expression is used to construct the device tree name: fdtfile=${soc}-colibri-${fdt_board}.dtb
- soc is set dynamically (either imx8qxp or imx8dx)
- fdt_board can be modified by the user (eval-v3, aster, iris/iris-v2)
Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

Drop obsolete environment variables boot_file, bootcmd_mfg, fdt_addr, finduuid, image, mfgtool_args, mmcargs, mmcdev, mmcpart, panel, sec_boot, vidargs.
Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- include/configs/colibri-imx8x.h | 35 +-------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-)
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index 9a4a5f3b5de..94243117f1c 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -8,7 +8,6 @@
#include <asm/arch/imx-regs.h> #include <linux/sizes.h> -#include <linux/stringify.h>
#define MEM_LAYOUT_ENV_SETTINGS \ "fdt_addr_r=0x83000000\0" \ @@ -16,12 +15,6 @@ "ramdisk_addr_r=0x83800000\0" \ "scriptaddr=0x80800000\0"
-#ifdef CONFIG_AHAB_BOOT -#define AHAB_ENV "sec_boot=yes\0" -#else -#define AHAB_ENV "sec_boot=no\0" -#endif - /* Boot M4 */ #define M4_BOOT_ENV \ "m4_0_image=m4_0.bin\0" \ @@ -29,8 +22,6 @@ "${m4_0_image}\0" \ "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
-#define MFG_NAND_PARTITION "" - /* Enable Distro Boot */ #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 1) \ @@ -38,47 +29,23 @@ func(DHCP, dhcp, na) #include <config_distro_bootcmd.h>
-#define CFG_MFG_ENV_SETTINGS \ - "mfgtool_args=setenv bootargs ${consoleargs} " \ - "rdinit=/linuxrc g_mass_storage.stall=0 " \ - "g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F " \ - "g_mass_storage.idProduct=0x37FF " \ - "g_mass_storage.iSerialNumber="" " MFG_NAND_PARTITION \ - "${vidargs} clk_ignore_unused\0" \ - "initrd_addr=0x83800000\0" \ - "initrd_high=0xffffffff\0" \ - "bootcmd_mfg=run mfgtool_args;booti ${loadaddr} ${initrd_addr} " \ - "${fdt_addr};\0" \ - /* Initial environment variables */ #define CFG_EXTRA_ENV_SETTINGS \ - AHAB_ENV \ BOOTENV \ - CFG_MFG_ENV_SETTINGS \ M4_BOOT_ENV \ MEM_LAYOUT_ENV_SETTINGS \ - "boot_file=Image\0" \ "boot_script_dhcp=boot.scr\0" \ "console=ttyLP3\0" \ - "fdt_addr=0x83000000\0" \ "fdt_board=eval-v3\0" \ - "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \ - "image=Image\0" \ "initrd_addr=0x83800000\0" \ "initrd_high=0xffffffffffffffff\0" \ - "mmcargs=setenv bootargs ${consoleargs} " \ - "root=PARTUUID=${uuid} rootwait " \ - "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ - "mmcpart=1\0" \ - "panel=NULL\0" \ "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ "consoleblank=0 earlycon\0" \ "update_uboot=askenv confirm Did you load flash.bin resp. u-boot-dtb.imx (y/N)?; " \ "if test "$confirm" = "y"; then " \ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \ - "${blkcnt}; fi\0" \ - "vidargs=video=imxdpufb5:off video=imxdpufb6:off video=imxdpufb7:off\0" + "${blkcnt}; fi\0"
#define CFG_SYS_SDRAM_BASE 0x80000000 #define PHYS_SDRAM_1 0x80000000

Drop obsolete environment variables boot_file, bootcmd_mfg, fdt_addr, finduuid, image, mfgtool_args, mmcargs, mmcdev, mmcpart, panel, sec_boot, vidargs. Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Igor Opaniuk igor.opaniuk@toradex.com
Provide proper sys prompt, which should be "Colibri iMX8X #".
Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- configs/colibri-imx8x_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index 6c1c9978d11..a39219db58e 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -9,6 +9,7 @@ CONFIG_ENV_OFFSET=0xFFFFDE00 CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-colibri" CONFIG_TARGET_COLIBRI_IMX8X=y +CONFIG_SYS_PROMPT="Colibri iMX8X # " CONFIG_SYS_LOAD_ADDR=0x80280000 CONFIG_SYS_MEMTEST_START=0x88000000 CONFIG_SYS_MEMTEST_END=0x89000000

From: Igor Opaniuk igor.opaniuk@toradex.com Provide proper sys prompt, which should be "Colibri iMX8X #". Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

Make sure M4 binary loading works equally well on ext4 as well as fat file systems.
Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- include/configs/colibri-imx8x.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index 94243117f1c..b4814bdfbfc 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -18,9 +18,8 @@ /* Boot M4 */ #define M4_BOOT_ENV \ "m4_0_image=m4_0.bin\0" \ - "loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} " \ - "${m4_0_image}\0" \ - "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \ + "loadm4image_0=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_0_image}\0" \ + "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0"
/* Enable Distro Boot */ #define BOOT_TARGET_DEVICES(func) \

Make sure M4 binary loading works equally well on ext4 as well as fat file systems. Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Marcel Ziswiler marcel.ziswiler@toradex.com
Update the distro config env memory layout for the Colibri iMX8X:
- kernel_comp_addr_r=0xb0000000 temporary area for uncompressing (ie FIT images or Image.gz booted using booti) - kernel_comp_size=0x08000000 - loadaddr=0x95400000 avoiding any reserved areas located before that - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script
Idea of memory layout taken from commit a9f1e35bedc4 ("apalis-imx8: update env memory layout").
Note that for our regular BSP Layers and Reference Images for Yocto Project an updated distro boot script is required (see meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-distro-boot).
Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- configs/colibri-imx8x_defconfig | 2 +- include/configs/colibri-imx8x.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index a39219db58e..53002c9537d 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -10,7 +10,7 @@ CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-colibri" CONFIG_TARGET_COLIBRI_IMX8X=y CONFIG_SYS_PROMPT="Colibri iMX8X # " -CONFIG_SYS_LOAD_ADDR=0x80280000 +CONFIG_SYS_LOAD_ADDR=0x95c00000 CONFIG_SYS_MEMTEST_START=0x88000000 CONFIG_SYS_MEMTEST_END=0x89000000 CONFIG_DISTRO_DEFAULTS=y diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index b4814bdfbfc..750336b0eb6 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -10,10 +10,12 @@ #include <linux/sizes.h>
#define MEM_LAYOUT_ENV_SETTINGS \ - "fdt_addr_r=0x83000000\0" \ - "kernel_addr_r=0x81000000\0" \ - "ramdisk_addr_r=0x83800000\0" \ - "scriptaddr=0x80800000\0" + "fdt_addr_r=0x9d400000\0" \ + "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "kernel_comp_addr_r=0xb0000000\0" \ + "kernel_comp_size=0x08000000\0" \ + "ramdisk_addr_r=0x9d500000\0" \ + "scriptaddr=0x9d480000\0"
/* Boot M4 */ #define M4_BOOT_ENV \

From: Marcel Ziswiler marcel.ziswiler@toradex.com Update the distro config env memory layout for the Colibri iMX8X:
- kernel_comp_addr_r=0xb0000000 temporary area for uncompressing (ie FIT
images or Image.gz booted using booti)
- kernel_comp_size=0x08000000
- loadaddr=0x95400000 avoiding any reserved areas located before that
- fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel
- scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt
- ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script
Idea of memory layout taken from commit a9f1e35bedc4 ("apalis-imx8: update env memory layout"). Note that for our regular BSP Layers and Reference Images for Yocto Project an updated distro boot script is required (see meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-distro-boot). Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

Move i.MX auxiliary core memory base and size configuration to defconfig where it should belong.
Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- configs/colibri-imx8x_defconfig | 2 ++ include/configs/colibri-imx8x.h | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index 53002c9537d..08d284bf912 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -8,6 +8,8 @@ CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFDE00 CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qxp-colibri" +CONFIG_BOOTAUX_RESERVED_MEM_BASE=0x88000000 +CONFIG_BOOTAUX_RESERVED_MEM_SIZE=0x08000000 CONFIG_TARGET_COLIBRI_IMX8X=y CONFIG_SYS_PROMPT="Colibri iMX8X # " CONFIG_SYS_LOAD_ADDR=0x95c00000 diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index 750336b0eb6..042fcb8757f 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -54,9 +54,4 @@ #define PHYS_SDRAM_1_SIZE SZ_2G /* 2 GB */ #define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 GB */
-/* Generic Timer Definitions */ - -#define BOOTAUX_RESERVED_MEM_BASE 0x88000000 -#define BOOTAUX_RESERVED_MEM_SIZE SZ_128M /* Reserve from second 128MB */ - #endif /* __COLIBRI_IMX8X_H */

Move i.MX auxiliary core memory base and size configuration to defconfig where it should belong. Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Marcel Ziswiler marcel.ziswiler@toradex.com
Enable optional environment bootcount limit functionality.
Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- configs/colibri-imx8x_defconfig | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index 08d284bf912..bebe87ac918 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -59,6 +59,8 @@ CONFIG_USE_NETMASK=y CONFIG_NETMASK="255.255.255.0" CONFIG_USE_SERVERIP=y CONFIG_SERVERIP="192.168.10.1" +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y CONFIG_CLK_IMX8=y CONFIG_CPU=y CONFIG_FXL6408_GPIO=y

From: Marcel Ziswiler marcel.ziswiler@toradex.com Enable optional environment bootcount limit functionality. Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

From: Marcel Ziswiler marcel.ziswiler@toradex.com
Set the boot delay to one second.
Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- configs/colibri-imx8x_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index bebe87ac918..450cd1981bb 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -23,6 +23,7 @@ CONFIG_FIT=y CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_FIT_VERBOSE=y CONFIG_OF_SYSTEM_SETUP=y +CONFIG_BOOTDELAY=1 CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-colibri-${fdt_board}.dtb" CONFIG_LOG=y

From: Marcel Ziswiler marcel.ziswiler@toradex.com Set the boot delay to one second. Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

This reverts commit bdadc140a127b14a666d2007eddc3f65c8de7d5a.
We do not want this, see [1].
[1] https://lore.kernel.org/all/56cf058164f331ce99ce75b0751b825ee2e07fc0.camel@t...
Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi | 2 -- arch/arm/mach-imx/imx8/Kconfig | 1 - configs/colibri-imx8x_defconfig | 1 - 3 files changed, 4 deletions(-)
diff --git a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi index 91e2944781e..322429a98a7 100644 --- a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi +++ b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi @@ -3,8 +3,6 @@ * Copyright 2019 Toradex AG */
-#include "imx8qxp-u-boot.dtsi" - &{/imx8qx-pm} {
u-boot,dm-pre-proper; diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 37d12d18958..018b87b85b7 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -51,7 +51,6 @@ config TARGET_APALIS_IMX8
config TARGET_COLIBRI_IMX8X bool "Support Colibri iMX8X module" - select BINMAN select BOARD_LATE_INIT select IMX8QXP
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index 450cd1981bb..8b4592020d5 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -20,7 +20,6 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_REMAKE_ELF=y CONFIG_FIT=y -CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_FIT_VERBOSE=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_BOOTDELAY=1

This reverts commit bdadc140a127b14a666d2007eddc3f65c8de7d5a. We do not want this, see [1]. [1] https://lore.kernel.org/all/56cf058164f331ce99ce75b0751b825ee2e07fc0.camel@t... Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic

This command is required for initial SoC provisioning.
Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com --- configs/colibri-imx8x_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig index 8b4592020d5..43aa4230ff9 100644 --- a/configs/colibri-imx8x_defconfig +++ b/configs/colibri-imx8x_defconfig @@ -38,6 +38,7 @@ CONFIG_CMD_ASKENV=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_CLK=y CONFIG_CMD_DM=y +CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y

This command is required for initial SoC provisioning. Signed-off-by: Andrejs Cainikovs andrejs.cainikovs@toradex.com
Applied to u-boot-imx, next, thanks !
Best regards, Stefano Babic
participants (2)
-
Andrejs Cainikovs
-
sbabic@denx.de