From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 2/2] ti814x_evm: enable support for NAND
Date: Wed, 28 Aug 2013 11:03:06 -0400 [thread overview]
Message-ID: <20130828150306.GE17898@bill-the-cat> (raw)
In-Reply-To: <1375776908-19345-2-git-send-email-pekon@ti.com>
On Tue, Aug 06, 2013 at 01:45:08PM +0530, Pekon Gupta wrote:
> ti814x_evm has on-board socket for using Micron (MT29Fxx) family of
> NAND devices to GPMC interface. This patch
> - adds NAND related pin-mux configuration for same
> - adds #defines for NAND partitions to TI814x configs
> - enables support for NAND in TI814x configs
[snip]
> @@ -56,6 +55,7 @@
> "fdtfile=\0" \
> "console=ttyO0,115200n8\0" \
> "optargs=\0" \
> + "dfu_alt_info_nand=" DFU_ALT_INFO_NAND "\0" \
> "mmcdev=0\0" \
> "mmcroot=/dev/mmcblk0p2 ro\0" \
> "mmcrootfstype=ext4 rootwait\0" \
> @@ -134,6 +134,13 @@
> #define CONFIG_DOS_PARTITION
> #define CONFIG_CMD_FAT
> #define CONFIG_CMD_EXT2
> +#define CONFIG_DFU_NAND
> +#define DFU_ALT_INFO_NAND \
> + "u-boot-spl part 0 1;" \
> + "u-boot-main part 0 2;" \
> + "env variables part 0 3;" \
> + "kernel part 0 4;" \
> + "rootfs part 0 5"
You're not bringing in USB here, so drop these.
> @@ -186,6 +193,14 @@
> #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */
> #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1
> #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img"
> +
> +#ifdef CONFIG_SPL_OS_BOOT
> +/* nand */
> +#define CONFIG_CMD_SPL_NAND_OFS 0x000000 /* end of u-boot */
> +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
> +#define CONFIG_CMD_SPL_WRITE_SIZE 0x1000
> +#endif
Since you aren't adding the SD/MMC defines as well, nor setting
SPL_OS_BOOT, lets drop these.
> @@ -242,5 +283,32 @@
> #define CONFIG_PHY_ADDR 1
> #define CONFIG_PHY_ET1011C
> #define CONFIG_PHY_ET1011C_TX_CLK_FIX
> +#define CONFIG_NAND
> +/* NAND support */
> +#ifdef CONFIG_NAND
> +#define CONFIG_MTD_NAND_OMAP_BCH
> +#define CONFIG_CMD_NAND
> +#define CONFIG_CMD_MTDPARTS
> +#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
> +#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:128k(SPL)," \
> + "128k(u-boot-spl)," \
> + "2M(u-boot-main)," \
> + "128k(u-boot-env),4M(kernel),-(rootfs)"
Lets get the partition tables right, we've still got 4 locations where
ROM checks for something, so lets use those for SPL, then U-Boot, then
U-Boot Env (redundant as well, please), and a block saved off for device
tree/SPL OS "args" support, then kernel, rootfs.
> +#define CONFIG_NAND_OMAP_GPMC
> +#define GPMC_NAND_ECC_LP_x16_LAYOUT 1
> +#define NAND_BASE (0x08000000)
Don't need NAND_BASE.
> +#define CONFIG_SYS_NAND_BASE (0x08000000) /* physical address */
> + /* to access nand at */
> + /* CS0 */
> +#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND
> + devices */
> +#define CONFIG_SYS_NAND_BOOT
> +#if !defined(CONFIG_SPI_BOOT)
> +#undef CONFIG_ENV_IS_NOWHERE
> +#define CONFIG_ENV_IS_IN_NAND
> +#define CONFIG_ENV_OFFSET 0x260000 /* environment starts here */
> +#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
> +#endif
> +#endif
And we don't support SPI boot or anything here, so lets just always do
env on NAND until we have support for other things as well. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130828/74818dd9/attachment.pgp>
next prev parent reply other threads:[~2013-08-28 15:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 8:15 [U-Boot] [PATCH v1 1/2] am33xx: enable GPMC clocks for TI814x Pekon Gupta
2013-08-06 8:15 ` [U-Boot] [PATCH v1 2/2] ti814x_evm: enable support for NAND Pekon Gupta
2013-08-28 15:03 ` Tom Rini [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-08-06 9:40 [U-Boot] [PATCH v1 1/2] am33xx: enable GPMC clocks for TI814x Pekon Gupta
2013-08-06 9:40 ` [U-Boot] [PATCH v1 2/2] ti814x_evm: enable support for NAND Pekon Gupta
2013-09-16 9:51 Gupta, Pekon
2013-09-19 18:09 ` Tom Rini
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=20130828150306.GE17898@bill-the-cat \
--to=trini@ti.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.