summaryrefslogtreecommitdiff
path: root/board/davinci
diff options
context:
space:
mode:
authorNick Thompson <nick.thompson@ge.com>2010-02-08 11:36:16 -0500
committerTom Rix <Tom.Rix@windriver.com>2010-02-12 12:31:54 -0600
commit3a4e43921d2599453ea87c623099e5f347c9e54a (patch)
tree3c02c4476f71e39053313805c11eebca500f1bc5 /board/davinci
parent6228e6389e5ef472d5f43cc5ec4f309323305638 (diff)
DA830 EVM: Enable NAND support on Spectrum Digital EVM
The EVM UI extender card has a NAND device. This change will enable saveenv to work with NAND and Linux to be booted using: mtdparts default nboot kernel bootm Signed-off-by: Nick Thompson <nick.thompson@ge.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'board/davinci')
-rw-r--r--board/davinci/da830evm/da830evm.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/board/davinci/da830evm/da830evm.c b/board/davinci/da830evm/da830evm.c
index 12df1f81837..aac5c5cbe1a 100644
--- a/board/davinci/da830evm/da830evm.c
+++ b/board/davinci/da830evm/da830evm.c
@@ -35,6 +35,7 @@
#include <common.h>
#include <i2c.h>
#include <asm/arch/hardware.h>
+#include <asm/arch/emif_defs.h>
#include <asm/io.h>
#include "../common/misc.h"
@@ -51,6 +52,23 @@ static const struct pinmux_config spi0_pins[] = {
{ pinmux[7], 1, 7 }
};
+/* EMIF-A bus pins for 8-bit NAND support on CS3 */
+static const struct pinmux_config emifa_nand_pins[] = {
+ { pinmux[13], 1, 6 },
+ { pinmux[13], 1, 7 },
+ { pinmux[14], 1, 0 },
+ { pinmux[14], 1, 1 },
+ { pinmux[14], 1, 2 },
+ { pinmux[14], 1, 3 },
+ { pinmux[14], 1, 4 },
+ { pinmux[14], 1, 5 },
+ { pinmux[15], 1, 7 },
+ { pinmux[16], 1, 0 },
+ { pinmux[18], 1, 1 },
+ { pinmux[18], 1, 4 },
+ { pinmux[18], 1, 5 },
+};
+
/* UART pin muxer settings */
static const struct pinmux_config uart_pins[] = {
{ pinmux[8], 2, 7 },
@@ -77,6 +95,9 @@ static const struct pinmux_resource pinmuxes[] = {
#ifdef CONFIG_USB_DA8XX
PINMUX_ITEM(usb_pins),
#endif
+#ifdef CONFIG_USE_NAND
+ PINMUX_ITEM(emifa_nand_pins),
+#endif
};
int board_init(void)
@@ -96,6 +117,22 @@ int board_init(void)
writel(0xffffffff, &davinci_aintc_regs->ecr3);
#endif
+#ifdef CONFIG_NAND_DAVINCI
+ /* EMIFA 100MHz clock select */
+ writel(readl(&davinci_syscfg_regs->cfgchip3) & ~2,
+ &davinci_syscfg_regs->cfgchip3);
+ /* NAND CS setup */
+ writel((DAVINCI_ABCR_WSETUP(0) |
+ DAVINCI_ABCR_WSTROBE(2) |
+ DAVINCI_ABCR_WHOLD(0) |
+ DAVINCI_ABCR_RSETUP(0) |
+ DAVINCI_ABCR_RSTROBE(2) |
+ DAVINCI_ABCR_RHOLD(0) |
+ DAVINCI_ABCR_TA(2) |
+ DAVINCI_ABCR_ASIZE_8BIT),
+ &davinci_emif_regs->AB2CR);
+#endif
+
/* arch number of the board */
gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_DA830_EVM;