From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 4/9] imx: mx53ard: Add support for NAND Flash
Date: Wed, 6 Feb 2013 22:37:11 +0100 [thread overview]
Message-ID: <1360186636-6041-4-git-send-email-benoit.thebaudeau@advansee.com> (raw)
In-Reply-To: <1360186636-6041-1-git-send-email-benoit.thebaudeau@advansee.com>
Add support for the Samsung K9LAG08U0M NAND Flash (2-GiB MLC NAND Flash, 2-kiB
pages, 256-kiB blocks, 30-ns R/W cycles, 1 CS) on mx53ard.
eNFC_CLK_ROOT is set up with a cycle time of 37.5 ns (400 MHz / 3 / 5) for this
board, which satisfies the 30-ns NF R/W cycle requirement.
Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
---
Changes in v4: None
Changes in v3:
- New patch.
Changes in v2: None
board/freescale/mx53ard/mx53ard.c | 18 ++++++++++++++++++
include/configs/mx53ard.h | 10 ++++++++++
2 files changed, 28 insertions(+)
diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c
index 2fc8570..8907388 100644
--- a/board/freescale/mx53ard/mx53ard.c
+++ b/board/freescale/mx53ard/mx53ard.c
@@ -58,6 +58,23 @@ void dram_init_banksize(void)
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
}
+#ifdef CONFIG_NAND_MXC
+static void setup_iomux_nand(void)
+{
+ mxc_request_iomux(MX53_PIN_NANDF_CLE, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_NANDF_ALE, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_NANDF_CS0, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_NANDF_RE_B, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_NANDF_WE_B, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_NANDF_WP_B, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_NANDF_RB0, IOMUX_CONFIG_ALT0);
+}
+#else
+static void setup_iomux_nand(void)
+{
+}
+#endif
+
static void setup_iomux_uart(void)
{
/* UART1 RXD */
@@ -277,6 +294,7 @@ static void weim_cs1_settings(void)
int board_early_init_f(void)
{
+ setup_iomux_nand();
setup_iomux_uart();
return 0;
}
diff --git a/include/configs/mx53ard.h b/include/configs/mx53ard.h
index 62cb42b..148f7a2 100644
--- a/include/configs/mx53ard.h
+++ b/include/configs/mx53ard.h
@@ -41,6 +41,16 @@
#define CONFIG_BOARD_EARLY_INIT_F
#define CONFIG_MXC_GPIO
+#define CONFIG_SYS_MAX_NAND_DEVICE 1
+#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR_AXI
+#define CONFIG_NAND_MXC
+#define CONFIG_MXC_NAND_REGS_BASE NFC_BASE_ADDR_AXI
+#define CONFIG_MXC_NAND_IP_REGS_BASE NFC_BASE_ADDR
+#define CONFIG_SYS_NAND_LARGEPAGE
+#define CONFIG_MXC_NAND_HWECC
+#define CONFIG_SYS_NAND_USE_FLASH_BBT
+#define CONFIG_CMD_NAND
+
#define CONFIG_MXC_UART
#define CONFIG_MXC_UART_BASE UART1_BASE
--
1.7.10.4
next prev parent reply other threads:[~2013-02-06 21:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 21:37 [U-Boot] [PATCH v4 1/9] nand: mxc: Prepare to add support for i.MX5 Benoît Thébaudeau
2013-02-06 21:37 ` [U-Boot] [PATCH v4 2/9] nand: mxc: Add " Benoît Thébaudeau
2013-02-06 21:37 ` [U-Boot] [PATCH v4 3/9] imx: mx5: lowlevel_init: Simplify code Benoît Thébaudeau
2013-02-06 21:37 ` Benoît Thébaudeau [this message]
2013-02-06 21:37 ` [U-Boot] [PATCH v4 5/9] nand: mxc: Fix debug trace in mxc_nand_read_oob_syndrome() Benoît Thébaudeau
2013-02-06 21:37 ` [U-Boot] [PATCH v4 6/9] nand: mxc: Use appropriate page number in syndrome functions Benoît Thébaudeau
2013-02-06 21:37 ` [U-Boot] [PATCH v4 7/9] Makefile: u-boot-with-spl.bin: Pad to CONFIG_SPL_MAX_SIZE Benoît Thébaudeau
2013-02-06 21:38 ` Benoît Thébaudeau
2013-02-06 21:37 ` [U-Boot] [PATCH v4 8/9] nand: mxc: Switch NAND SPL to generic SPL Benoît Thébaudeau
2013-02-06 21:37 ` [U-Boot] [PATCH v4 9/9] imx: Add u-boot-with-spl.imx make target Benoît Thébaudeau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360186636-6041-4-git-send-email-benoit.thebaudeau@advansee.com \
--to=benoit.thebaudeau@advansee.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.