NAND flash with BeagleBone variant

I’ve got an 8-bit Micron MT29 NAND flash hooked up to the GPMC lines on a custom board derived from the BeagleBone and AM335x EVM. The NAND flash is hooked up to the GPMC lines identically to the AM335X EVM.

U-Boot does not see the NAND flash for some reason. When I probe the WE and RE GPMC lines, I can see that the processor is talking to the NAND chip, sending the RESET and retrieving the ONFI ID. The processor does not boot off this NAND because there is nothing programmed in it, so the system boots off the SD card.

However, in the U-Boot config for the BeagleBone/AM335X evm (include/configs/am335x_evm.h) appears to be configured to use talk to NAND via SPI. Is there a reason why this is the case, when the AM335x schematics show that the onboard NAND is connected via GPMC? I tried using the U-Boot from TI’s PSP, but that version of U-Boot does not seem to be talking on the GPMC lines too.

Has anyone ever gotten NAND to work directly on the main board? I was going to recompile U-Boot with the GPMC options enabled, but is there something obvious that I’m missing preventing me from getting this to work.

Incidentally, I also modified the Linux kernel (board-am335x.c) to load the NAND, but all I get back from the chip and manufacturer IDs is 0xFF.

We have a memory cape in house where we have 16b NAND working. I don’t believe anything has been done with 8b.



I got the onboard NAND flash working on U-Boot by disabling the MMC1 pin mux (the BeagleBone daughter card settings was reconfiguring the pad for GPMC_CSN0), but now Linux still doesn’t seem to recognize the NAND chip. The manufacturer and chip ID return 0 right now.

I checked that the pin mux settings are right in Linux. Looking at the scope, I think the chip select line is being toggled way too fast–it doesn’t remain active low for long enough. Do you have any idea why this might be happening?

No idea at all. We should have support for NAND in the BeagleBone release in about 4-6 weeks. In the mena time you best bet may be to get help on the TI forums to get access to the unofficial things that is currently going on. I do know that you will need changes to UBoot for NAND to work in linux in general.


am335x EVM supports 8b NAND flash. The only way for you to use it both
under u-boot and Linux is to use TI SDK or port necessary code from
SDK to the bone software

I figured out how to get the 8-bit NAND to work both in U-Boot and Linux. The NAND timing settings in board-am335xevm.c look totally wrong. I’m really curious if anyone has really tested NAND recently since January 25th of this year. If so, please send me the part number and/or datasheet so I can see if the setup/hold times are so much faster than this part. The latest Micron MT29 NAND parts seem like they need even longer setup/hold times than even the one I’m using.

  1. A number of the values exceed the maximum value (e.g. 44 is listed where 31 is the max value), so the actual value gets masked to a different value.
  2. There are many zero setup times resulting from these settings. For example, B below is 0 because we_on is set to 0. The Micron MT29 8-bit NAND
    flash requires at least a 5 ns hold time.

I’m confirming with the author of the patch, but for now I’ve changed the settings to match U-Boot’s default settings:

static struct gpmc_timings am335x_nand_timings = {
.sync_clk = 0,

.cs_on = 0,
.cs_rd_off = 20,
.cs_wr_off = 20,

.adv_on = 6,
.adv_rd_off = 20,
.adv_wr_off = 20,

.oe_on = 1
.oe_off = 15,
.we_on = 1,
.we_off = 15,

.access = 64,
.rd_cycle = 20,
.wr_cycle = 20,

.wr_access = 31,
.wr_data_mux_bus = 0,

does it work in Linux? I mean mounting a flash root fs a few times
(reboot and mount again)

Hi Gerald,

I have the 16-bit NAND cape connected to me Beaglebone Black board in my desk.

Using mainline U-Boot and kernel the NAND is detected (had to modify the muxing for 16-bit)
but the nand write/read doesn’t work. I get “ECC uncorrectable” on every “nand read”.

Can you point me to some custom U-Boot tree where this is supported? I need to boot from NAND, so I need
to put both SPL and U-Boot in the flash, but for now, I would like to at least flash the kernel to NAND and boot it from SD.

Sorry to ask you directly, but I’ve been googling all past week for this issue, and I found nothing but to hack
U-Boot myself!

Regards and thanks in advance!

Nope. That is a SW question. You might try the TI e2e forum, I know that support for it is inside TI.


Ah, OK. I thought you provided some minimal software to use the capes
you sold.

Was I wrong? In that case, sorry for bothering.

I'll ask in the TI forum, although they don't seem the most
knowledgeable engineers out there. Let's cross fingers and hope that I
get lucky.

Right now, I have this cape connected, but it's completely unusable to me,
without the capability of booting to it :frowning:

Thanks for the prompt answer!

Ahh, well. We don’t sell capes. That is done by third parties. has no capes. They are made by various manufacturers. I suggest you contact the manufacturer of that board direct. There may also be others that have used that cape that can also help you out.

The TI forum won’t help on the capes. again. I suggest you contact the manufacturer of that board direct.


Oh, sorry then. I thought you were related in some way to Circuitco.
Anyway, looking at the NAND cape wiki page, there's a sign saying
there's no software support for the cape.

Odd as it sound, maybe the cape is really not usable :frowning:

In case anybody has this same issue, there are some patches floating
around from Pekon Gupta to support x16 NAND in U-Boot, but they are
still work-in-progress and could need some tweaking:


Cape works fine as i already said. It is used inside TI all the time. But the images we release are all based on eMMC or SD. Not NAND.



Sorry to insist: what do you mean by "cape works fine"?

You mean cape works fine from Linux? or cape works fine from U-Boot?
Or both?

This makes all the difference in the world, given I've been searching
like crazy for U-Boot support, but found none so far. It doesn't seem
to work using TI SDK releases, nor using mainline stuff.

Of course, I realize the cape is probably perfect from a hardware
point of view, but as far as software concerns, it seems it's unusable
from U-Boot.
Hence, unusable to me :slight_smile:

I mean that the cape is used inside TI by TI to support NAND functionality on the AM335x processor using the BeagleBone. BUT, it take an image specifically for the thing to work. The NAND is used ot boot the UBOOT and the Kernel. I cannot say if it is used by Linux anywhere to act as a file storage or not.

Ping the e2e forum and see what response you get.

Or, contact the supplier of the cape.


Oh, sorry then. I thought you were related in some way to Circuitco.
Anyway, looking at the NAND cape wiki page, there's a sign saying
there's no software support for the cape.

Odd as it sound, maybe the cape is really not usable :frowning:

It seems that the issue is like this:

1) Current U-Boot from git supports (8Bit-)NAND. It can be used by U-Boot (!)
by means of the "nand ... " commands. You can write images to NAND and read them back.

2) (8Bit-)NAND also works with the beaglebone kernel (3.8.13) when the device tree
contains a correct gpmc node with

  ti,nand-ecc-opt = "bch8";
        ti,nand-ecc-opt = "sw";

Both seem to work. SO you can use UBI on your NAND.

3) But the NAND implementation - probably the ECC schemes - from recent U-Boot
and the beagleboard repository are incompatible. This is the same even with the mentioned
U-Boot NAND patch by Pekon Gupta applied.

But I cannot tell which side (u-Boot or Linux) is right. Perhaps its a kernel 3.8
issue. I will try a more recent kernel, but perhaps anybody know where it comes from.


you can flash the MLO, u-boot and kernel files using u-boot, but UBI images only from the kernel itself. This limitation is due to u-boot/kernel incompatibility in terms of NAND

However, given the Circuitco cape wires a 16-bit NAND, this 8-bit support
is not too useful... don't you think?

That cape also supports 8bit NAND devices. You just need to swap out the NAND module for an 8bit version.


A quick google search shows nobody but Circuitco sells these modules,
and the Circuitco one is 16-bit.

So I guess I'd have to assemble such module myself, uh?