From fef438d76c08ba11f35b1257892bb3093d8e4caf Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 20 Nov 2015 21:43:24 +0100 Subject: arm: mx6: Reduce SPL malloc pool size Using 50 MiB malloc pool in SPL is nonsense. Since the caches are not enabled in SPL, it takes 2 seconds to init the pool and has no obvious benefit. Reduce the size to 1 MiB. Signed-off-by: Marek Vasut Cc: Stefano Babic Cc: Tim Harvey Tested-by: Stefano Babic Acked-by: Tim Harvey --- include/configs/imx6_spl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/configs') diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h index 1744f2c74c..43ce7fe25f 100644 --- a/include/configs/imx6_spl.h +++ b/include/configs/imx6_spl.h @@ -63,15 +63,15 @@ #if defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || defined(CONFIG_MX6SL) #define CONFIG_SPL_BSS_START_ADDR 0x88200000 -#define CONFIG_SPL_BSS_MAX_SIZE 0x100000 /* 1 MB */ +#define CONFIG_SPL_BSS_MAX_SIZE 0x100000 /* 1 MB */ #define CONFIG_SYS_SPL_MALLOC_START 0x88300000 -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x3200000 /* 50 MB */ +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 /* 1 MB */ #define CONFIG_SYS_TEXT_BASE 0x87800000 #else #define CONFIG_SPL_BSS_START_ADDR 0x18200000 #define CONFIG_SPL_BSS_MAX_SIZE 0x100000 /* 1 MB */ #define CONFIG_SYS_SPL_MALLOC_START 0x18300000 -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x3200000 /* 50 MB */ +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 /* 1 MB */ #define CONFIG_SYS_TEXT_BASE 0x17800000 #endif #endif -- cgit v1.2.1 From 71bcdafe73255d6ef974e55f3d31cf27127871b5 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 19 Nov 2015 19:02:33 -0200 Subject: cgtqmx6eval: Add SPI NOR flash support Add SPI NOR support: => sf probe SF: Detected SST25VF032B with page size 256 Bytes, erase size 4 KiB, total 4 MiB Signed-off-by: Otavio Salvador Reviewed-by: Fabio Estevam --- include/configs/cgtqmx6eval.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/configs') diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h index e0aa4b0894..9aa66c727d 100644 --- a/include/configs/cgtqmx6eval.h +++ b/include/configs/cgtqmx6eval.h @@ -29,6 +29,16 @@ /* MMC Configs */ #define CONFIG_SYS_FSL_ESDHC_ADDR 0 +/* SPI NOR */ +#define CONFIG_CMD_SF +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_STMICRO +#define CONFIG_SPI_FLASH_SST +#define CONFIG_MXC_SPI +#define CONFIG_SF_DEFAULT_BUS 0 +#define CONFIG_SF_DEFAULT_SPEED 20000000 +#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) + /* Miscellaneous commands */ #define CONFIG_CMD_BMODE @@ -200,8 +210,10 @@ "else " \ "bootz; " \ "fi;\0" \ + "spilock=sf probe && sf protect lock 0x3f0000 0x10000;"\ #define CONFIG_BOOTCOMMAND \ + "run spilock;" \ "mmc dev ${mmcdev};" \ "if mmc rescan; then " \ "if run loadbootscript; then " \ -- cgit v1.2.1 From d5de91086dd7bf2a1b3ecebd883636ced05d3b91 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 19 Nov 2015 19:02:34 -0200 Subject: cgtqmx6eval: Use SPI NOR to store the environment Congatec boards boot from SPI NOR, so it makes more sense to use SPI NOR to store the environment variables. Signed-off-by: Otavio Salvador Reviewed-by: Fabio Estevam --- include/configs/cgtqmx6eval.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'include/configs') diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h index 9aa66c727d..79183c4146 100644 --- a/include/configs/cgtqmx6eval.h +++ b/include/configs/cgtqmx6eval.h @@ -245,11 +245,21 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) /* Environment organization */ -#define CONFIG_ENV_SIZE (8 * 1024) - -#define CONFIG_ENV_IS_IN_MMC - +#if defined (CONFIG_ENV_IS_IN_MMC) #define CONFIG_ENV_OFFSET (6 * 64 * 1024) #define CONFIG_SYS_MMC_ENV_DEV 0 +#endif + +#define CONFIG_ENV_SIZE (8 * 1024) + +#define CONFIG_ENV_IS_IN_SPI_FLASH +#if defined(CONFIG_ENV_IS_IN_SPI_FLASH) +#define CONFIG_ENV_OFFSET (768 * 1024) +#define CONFIG_ENV_SECT_SIZE (64 * 1024) +#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS +#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS +#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE +#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED +#endif #endif /* __CONFIG_CGTQMX6EVAL_H */ -- cgit v1.2.1 From eb76f13ac0000bc6950ecf9f6485306f90059a97 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 19 Nov 2015 19:02:35 -0200 Subject: cgtqmx6eval: Add fastboot support Tested basic fastboot commands, such as: On the U-boot prompt: => fastboot 0 On the host PC: $ fastboot getvar bootloader-version -i 0x0525 bootloader-version: U-Boot 2015.10-rc2-09654-g8f41d27 finished. total time: 0.000s $ fastboot reboot -i 0x0525 --> board reboots fine. Signed-off-by: Otavio Salvador Reviewed-by: Fabio Estevam --- include/configs/cgtqmx6eval.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/configs') diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h index 79183c4146..ee48fa62d6 100644 --- a/include/configs/cgtqmx6eval.h +++ b/include/configs/cgtqmx6eval.h @@ -89,6 +89,12 @@ #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 #define CONFIG_G_DNL_MANUFACTURER "Congatec" +#define CONFIG_USB_FUNCTION_FASTBOOT +#define CONFIG_CMD_FASTBOOT +#define CONFIG_ANDROID_BOOT_IMAGE +#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR +#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000 + /* Framebuffer */ #define CONFIG_VIDEO #define CONFIG_VIDEO_IPUV3 -- cgit v1.2.1 From d7140351c27a4ba4cd83b0cea82bf65d3a95ce18 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 19 Nov 2015 19:02:36 -0200 Subject: cgtqmx6eval: Add SPL support Congatec has several MX6 boards based on quad, dual, dual-lite and solo. Add SPL support so that all the variants can be supported Signed-off-by: Otavio Salvador Reviewed-by: Fabio Estevam --- include/configs/cgtqmx6eval.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h index ee48fa62d6..79fc0f668c 100644 --- a/include/configs/cgtqmx6eval.h +++ b/include/configs/cgtqmx6eval.h @@ -17,10 +17,21 @@ #define CONFIG_MACH_TYPE 4122 +#ifdef CONFIG_SPL +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_MMC_SUPPORT +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define CONFIG_SYS_SPI_U_BOOT_OFFS (64 * 1024) +#define CONFIG_SPL_SPI_LOAD +#include "imx6_spl.h" +#endif + /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) #define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_BOARD_LATE_INIT #define CONFIG_MISC_INIT_R #define CONFIG_MXC_UART @@ -144,10 +155,11 @@ #define CONFIG_MMCROOT "/dev/mmcblk0p2" #define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ "image=zImage\0" \ - "fdtfile=imx6q-qmx6.dtb\0" \ + "fdtfile=undefined\0" \ "fdt_addr_r=0x18000000\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ @@ -192,6 +204,13 @@ "else " \ "bootz; " \ "fi;\0" \ + "findfdt="\ + "if test $board_rev = MX6Q ; then " \ + "setenv fdtfile imx6q-qmx6.dtb; fi; " \ + "if test $board_rev = MX6DL ; then " \ + "setenv fdtfile imx6dl-qmx6.dtb; fi; " \ + "if test $fdtfile = undefined; then " \ + "echo WARNING: Could not determine dtb to use; fi; \0" \ "netargs=setenv bootargs console=${console},${baudrate} " \ "root=/dev/nfs " \ "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ @@ -220,6 +239,7 @@ #define CONFIG_BOOTCOMMAND \ "run spilock;" \ + "run findfdt; " \ "mmc dev ${mmcdev};" \ "if mmc rescan; then " \ "if run loadbootscript; then " \ -- cgit v1.2.1 From e0a352d1e2dd060c2d43da1cf2b91878e997ce1e Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 19 Nov 2015 19:02:38 -0200 Subject: cgtqmx6eval: Add DFU support Add MMC and SPI DFU support. Signed-off-by: Otavio Salvador Reviewed-by: Fabio Estevam --- include/configs/cgtqmx6eval.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/configs') diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h index 79fc0f668c..487c011cc2 100644 --- a/include/configs/cgtqmx6eval.h +++ b/include/configs/cgtqmx6eval.h @@ -100,6 +100,12 @@ #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 #define CONFIG_G_DNL_MANUFACTURER "Congatec" +/* USB Device Firmware Update support */ +#define CONFIG_CMD_DFU +#define CONFIG_USB_FUNCTION_DFU +#define CONFIG_DFU_MMC +#define CONFIG_DFU_SF + #define CONFIG_USB_FUNCTION_FASTBOOT #define CONFIG_CMD_FASTBOOT #define CONFIG_ANDROID_BOOT_IMAGE @@ -164,6 +170,10 @@ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "console=" CONFIG_CONSOLE_DEV "\0" \ + "dfuspi=dfu 0 sf 0:0:10000000:0\0" \ + "dfu_alt_info_spl=spl raw 0x400\0" \ + "dfu_alt_info_img=u-boot raw 0x10000\0" \ + "dfu_alt_info=spl raw 0x400\0" \ "bootm_size=0x10000000\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=1\0" \ -- cgit v1.2.1 From a80a999c9b5c128cad2f67b4b32036bd4d667904 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 26 Nov 2015 00:18:45 +0100 Subject: arm: imx6: novena: Enable extfs support in SPL Simple patch to enable support for extfs filesystem in SPL, this is useful to those who want to avoid vfat like plague. Signed-off-by: Marek Vasut Cc: Stefano Babic --- include/configs/novena.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/configs') diff --git a/include/configs/novena.h b/include/configs/novena.h index d88389a472..4b4f2d7f70 100644 --- a/include/configs/novena.h +++ b/include/configs/novena.h @@ -82,6 +82,7 @@ /* SPL */ #define CONFIG_SPL_FAT_SUPPORT +#define CONFIG_SPL_EXT_SUPPORT #define CONFIG_SPL_MMC_SUPPORT #include "imx6_spl.h" /* common IMX6 SPL configuration */ -- cgit v1.2.1