Use NAND-Flash with Kernel 3.2 on mx28evk

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use NAND-Flash with Kernel 3.2 on mx28evk

1,246 Views
StMa
Contributor I

Hi,

I'm currently trying to bring up a 3.2.10 Kernel on the i.MX 28 EVK. The default configuration is booting up fine and at a first glance it seems to work.

Now I try to get a NAND Flash (MT29F4G08 in particular) up and running but I don't really know where to start as none of the boards in Mainline Linux have it implemented.

After some research I found a Patchset that seems to add NAND support to the mx28evk and gave it a try. The patches [1] needed some love to apply cleanly on my kernel but I manged to get it in. The Kernel also boots up but the initialization of the gpmi driver gives me the following error message:

 [snip]

[    3.720000] uart-pl011 duart: no DMA platform data
[    3.730000] mxs-auart.0: ttyAPP0 at MMIO 0x8006a000 (irq = 112) is a mxs-auart.0
[    3.740000] mxs-auart mxs-auart.0: Found APPUART 3.1.0
[    3.740000] mxs-auart.3: ttyAPP3 at MMIO 0x80070000 (irq = 115) is a mxs-auart.3
[    3.750000] mxs-auart mxs-auart.3: Found APPUART 3.1.0
[    3.810000] brd: module loaded
[    3.820000] Can't acquire DMA channel 4
[    3.830000] gpmi-nand: probe of imx28-gpmi-nand failed with error -22
[    3.830000] GPMI NAND driver registered. (IMX)
[    3.840000] FEC Ethernet Driver
[    3.900000] fec_enet_mii_bus: probed

[/snip]

The kernel boots into the console but flash access doesn't work.

A quick try with 3.4-rc2 also failed, the kernel refused to boot up without any notice. I'll give 3.3 a chance when I have some more time to work on this but in the meantime I'm eager to hear which thoughts the community has on this.

The Problem is that I need a very recent kernel for my project so it would be fine to achieve that functionality with some version  >3.0.

Has anyone already managed to get the GPMI working in some post 3.0 versions or has any pointers into the right direction for me ?

I'd really appreciate any help :)

Cheers,

Steve

[1] http://www.spinics.net/lists/arm-kernel/msg137631.html

Labels (1)
0 Kudos
1 Reply

519 Views
StMa
Contributor I

Hi,

just for the records I managed to overcome that problem based on Kernel 3.4-rc2. Patches [1] and [2] were needed to get the console on the DBGU to work. [3] is needed to fix a BUG_ON() that was frequently triggered when accessing the Flash. CONFIG_MTD_NAND_VERIFY_WRITE has to be disabled in the Kernel config because that is not supported in the gpmi-nand driver and leads to a Kernel Ooops if enabled.

The rest of the kernel config should be obvious (enable mtd support, select mxs related things etc) and was pretty much straight forward.The Board init file must do the pinmuxing for gpmi and set up the gpmi platform device as seen in the patches from my previous post.

In the end I was able to create UBI volumes, create and mount an UBIFS on top of it and it all works well. Also ran integck on it for about 15 hours without any errors.

References:

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-March/092036.html

[2] http://permalink.gmane.org/gmane.linux.ports.arm.kernel/158694

[3] http://lists.infradead.org/pipermail/linux-mtd/2012-April/040597.html

-Steve

0 Kudos