This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Two piece of 1G Nand timing

Other Parts Discussed in Thread: AM3352

Hi.

I'm using am3352 at custom board consist of  Two piece of 1G Nand (Micron MT29F8G08ABACA)

Before I'm solve Two piece of 256 Nand ..  For Avinash's advice

i'M Change Nand Flash 1G

Configurate of CS0 , CS1 

CS0 is exactly  cognition  , But CS1 is different 

blow log print

omap2-nand driver initializing
[ 0.923113] omap_nand_probe 0
[ 0.926462] ONFI flash detected
[ 0.929877] ONFI param page 0 valid   -- code - driver/mtd/nand/nand_base.c 's function nand_flash_detect_onfi  is crc check clean
[ 0.933509] ONFI out param page 0 valid 
[ 0.937513] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F8G08ABACAWP) - exactly cognition 
[ 0.946096] Creating 6 MTD partitions on "omap2-nand.0":
[ 0.951668] 0x000000000000-0x000000040000 : "SPL"
[ 0.958049] 0x000000040000-0x000000080000 : "SPL.backup1"
[ 0.964968] 0x000000080000-0x000000280000 : "U-Boot"
[ 0.971755] 0x000000280000-0x0000002c0000 : "U-Boot Env"
[ 0.978527] 0x0000002c0000-0x0000007c0000 : "Kernel"
[ 0.986019] 0x0000007c0000-0x000040000000 : "rootfs"
[ 1.207803] omap_nand_probe 1
[ 1.211190] ONFI flash detected
[ 1.214624] ONFI out param page 3 valid    -- code - driver/mtd/nand/nand_base.c 's function nand_flash_detect_onfi  is crc check fail try 3th and return 
[ 1.218682] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit) - but different 
[ 1.227628] Creating 1 MTD partitions on "omap2-nand.1":
[ 1.233201] 0x000000000000-0x000040000000 : "data"

For result ,  mtd is generate mtd0 ~ mtd 6

mtd 6 is ubi format and mtdinfo perform 

But mtdinfo different

root@am335x-evm:~# mtdinfo /dev/mtd5
mtd5
Name: rootfs
Type: nand
Eraseblock size: 262144 bytes, 256.0 KiB
Amount of eraseblocks: 4065 (1065615360 bytes, 1016.2 MiB)
Minimum input/output unit size: 4096 bytes
Sub-page size: 4096 bytes
OOB size: 224 bytes
Character device major/minor: 90:10
Bad blocks are allowed: true
Device is writable: true

root@am335x-evm:~# mtdinfo /dev/mtd6
mtd6
Name: data
Type: nand
Eraseblock size: 262144 bytes, 256.0 KiB
Amount of eraseblocks: 4096 (1073741824 bytes, 1024.0 MiB)
Minimum input/output unit size: 4096 bytes
Sub-page size: 4096 bytes
OOB size: 128 bytes
Character device major/minor: 90:12
Bad blocks are allowed: true
Device is writable: true

and mtd5 is UBI FS mount success But mtd6 is UBI FS mount fail 

Problem is that CS1 is UBI FS mount fail

Attach is ubiattach print log

root@am335x-evm:~# ubiattach /dev/ubi_ctrl -m 6 -O 4096
[ 1120.091616] UBI: attaching mtd6 to ubi0
[ 1120.095641] UBI: physical eraseblock size: 262144 bytes (256 KiB)
[ 1120.102258] UBI: logical eraseblock size: 253952 bytes
[ 1120.107884] UBI: smallest flash I/O unit: 4096
[ 1120.112797] UBI: VID header offset: 4096 (aligned 4096)
[ 1120.119066] UBI: data offset: 8192
[ 1123.513707] UBI: max. sequence number: 0
[ 1123.518365] UBI error: ubi_read_volume_table: the layout volume was not found
[ 1123.527034] UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22
ubiattach: error!: cannot attach mtd6
error 22 (Invalid argument)
root@am335x-evm:~# ubiattach /dev/ubi_ctrl -m 5 -O 4096
[ 1129.993520] UBI: attaching mtd5 to ubi0
[ 1129.997546] UBI: physical eraseblock size: 262144 bytes (256 KiB)
[ 1130.004157] UBI: logical eraseblock size: 253952 bytes
[ 1130.009809] UBI: smallest flash I/O unit: 4096
[ 1130.014711] UBI: VID header offset: 4096 (aligned 4096)
[ 1130.020979] UBI: data offset: 8192
[ 1138.141698] UBI: max. sequence number: 14
[ 1138.172150] UBI: attached mtd5 to ubi0
[ 1138.176077] UBI: MTD device name: "rootfs"
[ 1138.181406] UBI: MTD device size: 1016 MiB
[ 1138.186670] UBI: number of good PEBs: 4065
[ 1138.191582] UBI: number of bad PEBs: 0
[ 1138.196211] UBI: number of corrupted PEBs: 0
[ 1138.200849] UBI: max. allowed volumes: 128
[ 1138.205659] UBI: wear-leveling threshold: 4096
[ 1138.210568] UBI: number of internal volumes: 1
[ 1138.215197] UBI: number of user volumes: 1
[ 1138.219835] UBI: available PEBs: 0
[ 1138.224464] UBI: total number of reserved PEBs: 4065
[ 1138.229645] UBI: number of PEBs reserved for bad PEB handling: 40
[ 1138.235996] UBI: max/mean erase counter: 2/0
[ 1138.240452] UBI: image sequence number: 2092540833
[ 1138.245866] UBI: background thread "ubi_bgt0d" started, PID 1224
UBI device number 0, total 4065 LEBs (1032314880 bytes, 984.5 MiB), available 0 LEBs (0 bytes), LEB size 253952 bytes (248.0 KiB)

i'M Guess For reason is mtd cognition 

My Question is so long ... sorry..

it 's wrong .

Thank you

Kind Regards,

  • Hello, can you give us a register dump of the GPMC settings?  I would like the config registers for both CS.  Also, can you test the both NANDs in uboot to make sure you can read and write them.  

  • Thank you Jeff

    I'M GPMC setting 

    [ 0.169966] omap-gpmc omap-gpmc: GPMC revision 6.0
    [ 0.169992] Registering NAND on CS0
    [ 0.170026] GPMC CS0: cs_on : 0 ticks, 0 ns (was 0 ticks) 0 ns
    [ 0.170042] GPMC CS0: cs_rd_off : 5 ticks, 50 ns (was 30 ticks) 50 ns
    [ 0.170057] GPMC CS0: cs_wr_off : 5 ticks, 50 ns (was 30 ticks) 50 ns
    [ 0.170073] GPMC CS0: adv_on : 1 ticks, 10 ns (was 0 ticks) 10 ns
    [ 0.170088] GPMC CS0: adv_rd_off: 4 ticks, 40 ns (was 30 ticks) 40 ns
    [ 0.170104] GPMC CS0: adv_wr_off: 5 ticks, 50 ns (was 30 ticks) 50 ns
    [ 0.170119] GPMC CS0: oe_on : 1 ticks, 10 ns (was 7 ticks) 10 ns
    [ 0.170134] GPMC CS0: oe_off : 6 ticks, 60 ns (was 24 ticks) 60 ns
    [ 0.170149] GPMC CS0: we_on : 1 ticks, 10 ns (was 5 ticks) 10 ns
    [ 0.170164] GPMC CS0: we_off : 4 ticks, 40 ns (was 22 ticks) 40 ns
    [ 0.170179] GPMC CS0: rd_cycle : 9 ticks, 90 ns (was 30 ticks) 90 ns
    [ 0.170194] GPMC CS0: wr_cycle : 9 ticks, 90 ns (was 30 ticks) 90 ns
    [ 0.170210] GPMC CS0: access : 7 ticks, 70 ns (was 21 ticks) 70 ns
    [ 0.170224] GPMC CS0: page_burst_access: 0 ticks, 0 ns (was 0 ticks) 0 ns
    [ 0.170240] GPMC CS0: wr_data_mux_bus: 0 ticks, 0 ns (was 0 ticks) 0 ns
    [ 0.170255] GPMC CS0: wr_access : 4 ticks, 40 ns (was 22 ticks) 40 ns
    [ 0.170732] Registering NAND on CS1
    [ 0.170768] GPMC CS1: cs_on : 0 ticks, 0 ns (was 1 ticks) 0 ns
    [ 0.170784] GPMC CS1: cs_rd_off : 5 ticks, 50 ns (was 16 ticks) 50 ns
    [ 0.170799] GPMC CS1: cs_wr_off : 5 ticks, 50 ns (was 16 ticks) 50 ns
    [ 0.170814] GPMC CS1: adv_on : 1 ticks, 10 ns (was 4 ticks) 10 ns
    [ 0.170829] GPMC CS1: adv_rd_off: 4 ticks, 40 ns (was 5 ticks) 40 ns
    [ 0.170844] GPMC CS1: adv_wr_off: 5 ticks, 50 ns (was 6 ticks) 50 ns
    [ 0.170859] GPMC CS1: oe_on : 1 ticks, 10 ns (was 6 ticks) 10 ns
    [ 0.170874] GPMC CS1: oe_off : 6 ticks, 60 ns (was 16 ticks) 60 ns
    [ 0.170889] GPMC CS1: we_on : 1 ticks, 10 ns (was 5 ticks) 10 ns
    [ 0.170904] GPMC CS1: we_off : 4 ticks, 40 ns (was 16 ticks) 40 ns
    [ 0.170919] GPMC CS1: rd_cycle : 9 ticks, 90 ns (was 17 ticks) 90 ns
    [ 0.170934] GPMC CS1: wr_cycle : 9 ticks, 90 ns (was 17 ticks) 90 ns
    [ 0.170949] GPMC CS1: access : 7 ticks, 70 ns (was 15 ticks) 70 ns
    [ 0.170964] GPMC CS1: page_burst_access: 0 ticks, 0 ns (was 1 ticks) 0 ns
    [ 0.170979] GPMC CS1: wr_data_mux_bus: 0 ticks, 0 ns (was 7 ticks) 0 ns
    [ 0.170995] GPMC CS1: wr_access : 4 ticks, 40 ns (was 15 ticks) 40 ns

    ........................

    [    0.170106] Registering NAND on CS0

    cs 0 , GPMC_CS_CONFIG1 0x00000800 ,GPMC_CS_CONFIG2 0x00050500 GPMC_CS_CONFIG3 0x00050401 ,GPMC_CS_CONFIG4 0x04010601 GPMC_CS_CONFIG5 0x00070909 ,GPMC_CS_CONFIG6 0x04000F80 ,GPMC_CS_CONFIG7 0x00000F48

    [ 0.170649] Registering NAND on CS1
    [ 0.170696] cs 1 , GPMC_CS_CONFIG1 0x00000800 ,GPMC_CS_CONFIG2 0x00050500 GPMC_CS_CONFIG3 0x00050401 ,GPMC_CS_CONFIG4 0x04010601 GPMC_CS_CONFIG5 0x00070909 ,GPMC_CS_CONFIG6 0x04000F80 ,GPMC_CS_CONFIG7 0x00000F48

    [ 1.099383] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F8G08ABACAWP)
    [ 1.107941] Creating 7 MTD partitions on "omap2-nand.0":
    [ 1.113515] 0x000000000000-0x000000040000 : "SPL"
    [ 1.119956] 0x000000040000-0x000000080000 : "SPL.backup1"
    [ 1.126815] 0x000000080000-0x000000280000 : "U-Boot"
    [ 1.133663] 0x000000280000-0x0000002c0000 : "U-Boot Env"
    [ 1.140501] 0x0000002c0000-0x0000007c0000 : "Kernel"
    [ 1.147944] 0x0000007c0000-0x0000047c0000 : "rootfs"
    [ 1.167920] 0x0000047c0000-0x000040000000 : "filestore"
    [ 1.376111] omap_nand_probe 1
    [ 1.380068] ONFI flash detected
    [ 1.383501] ONFI out param page 3 valid
    [ 1.387556] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit)
    [ 1.396500] Creating 1 MTD partitions on "omap2-nand.1":
    [ 1.402067] 0x000000000000-0x000040000000 : "data"

    Bootloader is print detection

    U-Boot 2012.10 (Feb 25 2013 - 09:23:10)

    I2C: ready
    DRAM: 512 MiB
    WARNING: Caches not enabled
    NAND: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit)
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit)
    2048 MiB

    U-Boot# nand info

    Device 0: nand0, sector size 256 KiB
    Page size 4096 b
    OOB size 128 b
    Erase size 262144 b
    Device 1: nand1, sector size 256 KiB
    Page size 4096 b
    OOB size 128 b
    Erase size 262144 b

    GPMC Timing setting same CS0 , CS1

    I 'm testing done  nand CS0 (write,read)

    and ' wil testing nand cs1 ..

    i want your advice

    Thank you

    Kind Regards,

  • I'M different testing 

    In kernel . it change CS0 and CS1 that is configurate and step

    so print

    [ 0.848707] omap2-nand driver initializing
    [ 0.853097] omap_nand_probe 1
    [ 0.856445] ONFI flash detected
    [ 0.859899] ONFI out param page 3 valid
    [ 0.863957] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit) -> CS1 fail detect
    [ 0.872896] Creating 7 MTD partitions on "omap2-nand.1":
    [ 0.878445] 0x000000000000-0x000000040000 : "SPL"
    [ 0.884850] 0x000000040000-0x000000080000 : "SPL.backup1"
    [ 0.891766] 0x000000080000-0x000000280000 : "U-Boot"
    [ 0.898515] 0x000000280000-0x0000002c0000 : "U-Boot Env"
    [ 0.905330] 0x0000002c0000-0x0000007c0000 : "Kernel"
    [ 0.912809] 0x0000007c0000-0x0000047c0000 : "rootfs"
    [ 0.932715] 0x0000047c0000-0x000040000000 : "filestore"
    [ 1.140604] omap_nand_probe 0
    [ 1.143962] ONFI flash detected
    [ 1.147358] ONFI param page 0 valid
    [ 1.151023] ONFI out param page 0 valid
    [ 1.155028] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F8G08ABACAWP) -> CS0 success
    [ 1.163611] Creating 1 MTD partitions on "omap2-nand.0":
    [ 1.169178] 0x000000000000-0x000040000000 : "data"

    it's condition CS0 success and CS1 fail.

    What's wrong..

    Thank you

    Kind Regards,

  • i'm Testing Too,

    ,gpmc-nand.c 's fucntion gpmc_nand_init()... change option 

    gpmc_nand_data->xfer_type = NAND_OMAP_POLLED;

    then kernel loding ..

    [ 0.840069] ONFI param page 0 valid
    [ 0.843727] ONFI out param page 0 valid
    [ 0.847733] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F8G08ABACAWP)
    [ 0.856305] Creating 7 MTD partitions on "omap2-nand.0":
    [ 0.861881] 0x000000000000-0x000000040000 : "SPL"
    [ 0.868347] 0x000000040000-0x000000080000 : "SPL.backup1"
    [ 0.875311] 0x000000080000-0x000000280000 : "U-Boot"
    [ 0.882536] 0x000000280000-0x0000002c0000 : "U-Boot Env"
    [ 0.889362] 0x0000002c0000-0x0000007c0000 : "Kernel"
    [ 0.897857] 0x0000007c0000-0x0000047c0000 : "rootfs"
    [ 0.930622] 0x0000047c0000-0x000040000000 : "filestore"
    [ 1.330325] ONFI flash detected
    [ 1.333836] ONFI param page 0 valid
    [ 1.337472] ONFI out param page 0 valid
    [ 1.341480] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F8G08ABACAWP) --> device PARM READ Success
    [ 1.350066] Creating 1 MTD partitions on "omap2-nand.1":
    [ 1.355639] 0x000000000000-0x000040000000 : "data"

    But UBIFS's attach is Fail..

    [ 102.668996] UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read 64 bytes
    [ 102.679276] Backtrace:
    [ 102.681874] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c039e4ac>] (dump_stack+0x18/0x1c)
    [ 102.690676] r6:00000004 r5:c7a78800 r4:ffffffb6 r3:c0540aa8
    [ 102.696626] [<c039e494>] (dump_stack+0x0/0x1c) from [<c027f3c0>] (ubi_io_read+0x1c4/0x39c)
    [ 102.705267] [<c027f1fc>] (ubi_io_read+0x0/0x39c) from [<c027f7f0>] (ubi_io_read_ec_hdr+0x64/0x2fc)
    [ 102.714631] [<c027f78c>] (ubi_io_read_ec_hdr+0x0/0x2fc) from [<c02849d0>] (ubi_scan+0x18c/0x154c)
    [ 102.723902] [<c0284844>] (ubi_scan+0x0/0x154c) from [<c027912c>] (ubi_attach_mtd_dev+0x710/0xdcc)
    [ 102.733173] [<c0278a1c>] (ubi_attach_mtd_dev+0x0/0xdcc) from [<c0279a9c>] (ctrl_cdev_ioctl+0x124/0x1c8)
    [ 102.742995] [<c0279978>] (ctrl_cdev_ioctl+0x0/0x1c8) from [<c00b63a8>] (do_vfs_ioctl+0x88/0x528)
    [ 102.752165] r6:c7145cc0 r5:bedf4b90 r4:bedf4b90
    [ 102.757001] [<c00b6320>] (do_vfs_ioctl+0x0/0x528) from [<c00b68c4>] (sys_ioctl+0x7c/0x84)
    [ 102.765536] r9:c7aaa000 r8:00000000 r7:00000003 r6:40186f40 r5:bedf4b90
    [ 102.772370] r4:c7aead40

    kernel dump generate...

    I'm wait your advice...help me

    Thank you

    Kind Regards,