From a6b0652bb5040351eeb1a2580270bd3988cb0a59 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Wed, 20 Aug 2014 15:09:01 +0300 Subject: arm: mx6: cm_fx6: add nand support Add NAND support for Compulab CM-FX6 CoM. Cc: Igor Grinberg Cc: Stefano Babic Cc: Tom Rini Acked-by: Igor Grinberg Signed-off-by: Nikita Kiryanov --- include/configs/cm_fx6.h | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 15c55be..4c1bcb9 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -130,6 +130,20 @@ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "run doboot\0" \ + "nandroot=/dev/mtdblock4 rw\0" \ + "nandrootfstype=ubifs\0" \ + "nandargs=setenv bootargs console=${console} " \ + "root=${nandroot} " \ + "rootfstype=${nandrootfstype} " \ + "${video}\0" \ + "nandloadfdt=nand read ${fdtaddr} 780000 80000;\0" \ + "nandboot=echo Booting from nand ...; " \ + "run nandargs; " \ + "nand read ${loadaddr} 0 780000; " \ + "if ${loadfdt}; then " \ + "run nandloadfdt;" \ + "fi; " \ + "run doboot\0" \ "boot=mmc dev ${mmcdev}; " \ "if mmc rescan; then " \ "if run loadmmcbootscript; then " \ @@ -142,7 +156,8 @@ "run mmcboot;" \ "fi;" \ "fi;" \ - "fi;\0" + "fi;" \ + "run nandboot\0" #define CONFIG_BOOTCOMMAND \ "run setboottypem; run boot" @@ -160,6 +175,20 @@ #define CONFIG_SPI_FLASH_SST #define CONFIG_SPI_FLASH_WINBOND +/* NAND */ +#ifndef CONFIG_SPL_BUILD +#define CONFIG_CMD_NAND +#define CONFIG_SYS_NAND_BASE 0x40000000 +#define CONFIG_SYS_NAND_MAX_CHIPS 1 +#define CONFIG_SYS_MAX_NAND_DEVICE 1 +#define CONFIG_NAND_MXS +#define CONFIG_SYS_NAND_ONFI_DETECTION +/* APBH DMA is required for NAND support */ +#define CONFIG_APBH_DMA +#define CONFIG_APBH_DMA_BURST +#define CONFIG_APBH_DMA_BURST8 +#endif + /* GPIO */ #define CONFIG_MXC_GPIO -- cgit v1.1