AnsweredAssumed Answered

imx6q u-boot NAND support

Question asked by Maxim Podberezniy on Apr 6, 2016


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

Outcomes