imx6q u-boot NAND support

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

imx6q u-boot NAND support

2,124 Views
maximpodberezni
Contributor III


Hi!

Having a custom board with IMX6Q I'm trying to bring up NAND сhip (MT29F2G08ABAEA).

I've  already compiled a few u-boot versions from different vendors and repositories including Freescale, Boundary and Denx mainline. I have to mention that in all repositories I use nitrogen6x board as reference because it has similar design and very convenient set of files to fill in DDR3 registers. I need to modify DDR settings because DDR3 calibration tools shows different values.

 

So what I achieved so far:

1) Freescale uboot-imx->imx_v2013.04_3.10.17_1.0.0_ga

boots fine, NAND detected, NAND erase hangs:

U-Boot 2013.04-04989-g6bb0820-dirty (Apr 06 2016 - 09:46:52)

 

 

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz

CPU:   Temperature 37 C, calibration data: 0x5824ec69

Reset cause: POR

Board: Nitrogen6X

I2C:   ready

DRAM:  1 GiB

NAND:  256 MiB

MMC:   FSL_SDHC: 0, FSL_SDHC: 1

MMC: no card present

MMC init failed

Using default environment

 

 

No panel detected: default to HDMI

unsupported panel HDMI

In:    serial

Out:   serial

Err:   serial

Net:   Phy not found

using phy at 4

PHY reset timed out

FEC [PRIME]

Warning: failed to set MAC address

 

 

Boot from USB for mfgtools

Use default environment for mfgtools

Run bootcmd_mfg: run mfgtool_args;bootm ${loadaddr} ${initrd_addr} ${fdt_addr};

Hit any key to stop autoboot:  0

Wrong Image Format for bootm command

ERROR: can't get kernel image!

U-Boot > nand info

 

 

Device 0: nand0, sector size 128 KiB

  Page size      2048 b

  OOB size         64 b

  Erase size   131072 b

U-Boot > nand erase.chip

 

 

NAND erase.chip: device 0 whole chip

<<<here nothing happens and the board hangs

2) Denx u-boot mainline, branch v2016.03

git clone https://github.com/u-boot/u-boot

cd u-boot/

git checkout v2016.03 -b tmp

Results: boots fine, NAND detected, NAND erase hangs with lots of DMA errors:

U-Boot 2016.03-dirty (Apr 06 2016 - 10:07:27 +0300)

 

 

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz

Reset cause: POR

Board: Cruis-V ver.1 (Debug)

I2C:   ready

DRAM:  1 GiB

NAND:  256 MiB

MMC:   FSL_SDHC: 0, FSL_SDHC: 1

SF: Unsupported flash IDs: manuf 00, jedec 0000, ext_jedec 0000

*** Warning - spi_flash_probe() failed, using default environment

 

 

No panel detected: default to HDMI

Display: HDMI (1024x768)

In:    serial

Out:   serial

Err:   serial

Net:   Board Net Initialization Failed

No ethernet found.

Hit any key to stop autoboot:  0

=> nand info

 

 

Device 0: nand0, sector size 128 KiB

  Page size       2048 b

  OOB size          64 b

  Erase size    131072 b

  subpagesize     2048 b

  options     0x     200

  bbt options 0x    8000

=> nand erase.chip

 

 

NAND erase.chip: device 0 whole chip

MXS NAND: DMA read error

MXS NAND: Error sending command

MXS NAND: Error sending command

MXS NAND: DMA read error

MXS NAND: Error sending command

MXS NAND: Error sending command

MXS NAND: DMA read error

 

Please check the attached patch of my changes to 2016 u-boot. It is based on this patch http://lists.denx.de/pipermail/u-boot/2014-November/194898.html

 

Somebody please help me to enable NAND support in u-boot!

Original Attachment has been moved to: myboard.patch.zip

Labels (1)
2 Replies

1,027 Views
igorpadykov
NXP Employee
NXP Employee

Hi Maxim

please look at

NAND FLASH support for i.MX6 U-Boot

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

1,027 Views
maximpodberezni
Contributor III

Hi Igor!

That really helped!

Just to keep it for other users:

git clone https://github.com/u-boot/u-boot

cd u-boot

git checkout v2013.10

make ARCH=arm titanium_config

make ARCH=arm CROSS_COMPILE=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf- -j4

0 Kudos
Reply