Skip to contentSkip to conversation

ARM: imx6q_logic: Enable SPL Booting from NAND

PATCH In review Adam Ford 2 participants 2 messages Jan 12, 2019 – Feb 16, 2019 Arm i.MX and Layerscape

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 ARM: imx6q_logic: Enable SPL Booting from NAND

This patch fixes a few values that were incorrect, and this now lets SPL boot from NAND.

configs/imx6q_logic_defconfig +3 -1
index 457366a664..f56f532631 100644
@@ -16,6 +16,7 @@ CONFIG_BOOTDELAY=3
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
+CONFIG_SPL_RAW_IMAGE_SUPPORT=y
 CONFIG_SPL_SEPARATE_BSS=y
 # CONFIG_TPL_BANNER_PRINT is not set
 # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
@@ -30,7 +31,8 @@ CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_SYS_PROMPT="i.MX6 Logic # "
 CONFIG_CMD_SPL=y
-CONFIG_CMD_SPL_WRITE_SIZE=0x20000
+CONFIG_CMD_SPL_NAND_OFS=0x1500000
+CONFIG_CMD_SPL_WRITE_SIZE=0x00100000
 CONFIG_CMD_MEMTEST=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
include/configs/imx6_logic.h +3 -1
index e55941408c..70cc63fc1b 100644
@@ -144,6 +144,8 @@
 #define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x200000
 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00500000
+#define CONFIG_SYS_NAND_USE_FLASH_BBT
+
 /* MTD device */
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
@@ -162,7 +164,7 @@
 /* Falcon Mode */
 #define CONFIG_SPL_FS_LOAD_ARGS_NAME	"args"
 #define CONFIG_SPL_FS_LOAD_KERNEL_NAME	"uImage"
-#define CONFIG_SYS_SPL_ARGS_ADDR       0x15000000
+#define CONFIG_SYS_SPL_ARGS_ADDR       0x18000000
 
 /* Falcon Mode - MMC support: args at 1MB kernel at 2MB */
 #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR  0x800   /* 1MB */
Signature · 1 line
2.17.1
#1 lore raw
Quoted 39 lines

This patch fixes a few values that were incorrect, and this now lets SPL boot from NAND.

configs/imx6q_logic_defconfig +3 -1
index 457366a664..f56f532631 100644
@@ -16,6 +16,7 @@ CONFIG_BOOTDELAY=3
 # CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
+CONFIG_SPL_RAW_IMAGE_SUPPORT=y
 CONFIG_SPL_SEPARATE_BSS=y
 # CONFIG_TPL_BANNER_PRINT is not set
 # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
@@ -30,7 +31,8 @@ CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_SYS_PROMPT="i.MX6 Logic # "
 CONFIG_CMD_SPL=y
-CONFIG_CMD_SPL_WRITE_SIZE=0x20000
+CONFIG_CMD_SPL_NAND_OFS=0x1500000
+CONFIG_CMD_SPL_WRITE_SIZE=0x00100000
 CONFIG_CMD_MEMTEST=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
include/configs/imx6_logic.h +2 -0
index e55941408c..70cc63fc1b 100644
@@ -144,6 +144,8 @@
 #define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x200000
 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00500000
+#define CONFIG_SYS_NAND_USE_FLASH_BBT
+
 /* MTD device */
 
 /* DMA stuff, needed for GPMI/MXS NAND support */

include/configs/imx6_logic.h line 170

Quoted 8 lines
include/configs/imx6_logic.h +1 -1
@@ -162,7 +164,7 @@
 /* Falcon Mode */
 #define CONFIG_SPL_FS_LOAD_ARGS_NAME	"args"
 #define CONFIG_SPL_FS_LOAD_KERNEL_NAME	"uImage"
-#define CONFIG_SYS_SPL_ARGS_ADDR       0x15000000
+#define CONFIG_SYS_SPL_ARGS_ADDR       0x18000000
 
 /* Falcon Mode - MMC support: args at 1MB kernel at 2MB */
 #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR  0x800   /* 1MB */

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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 at denx.de
=====================================================================