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.

am335x evalution kit, access 2 gigs of nand

Hello,

I have an am335x evaluation kit, with MT29F2G08 nand module.   The nand module has a capacity of 2 gigs, 8 nand banks with 256 megs on each.  At least that is my understanding.

I edited the following file, to adjust the nand partitions:

arch/arm/mach-omap2/board-am335xevm.c
static struct mtd_partition am335x_nand_partitions[] = {
        {    
                .name       = "SPL",
                .offset     = 0,     
                .size       = SZ_128K,
        },   
        {    
               .name       = "U-Boot",
               .offset         = MTDPART_OFS_APPEND,   
               .size           = 15 * SZ_128K,
       },   
       {    
               .name            = "U-Boot Env",
               .offset         = MTDPART_OFS_APPEND,   
               .size           = 2 * SZ_128K,
       },   
       {    
               .name           = "Rootfs1",
               .offset         = MTDPART_OFS_APPEND,
        .size           = SZ_128M,
       },   
       {    
               .name            = "Rootfs2",
               .offset         = MTDPART_OFS_APPEND,   
               .size           = MTDPART_SIZ_FULL,
       }    
};

The Rootfs1 parition is about 128M as expected.  But, I expected Rootfs2 to take up the remainder space and be over 1 gig.  
Rootfs2 is about 128M making me think only one Nand bank is being addressed.  Replacing and booting with the stock kernel gives me the same results.  It appears I'm only able to access the first 256M of Nand.


Any pointers would be very much appericated.
Thanks







Additional info:

root@am335x-evm:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00020000 "SPL"
mtd1: 001e0000 00020000 "U-Boot"
mtd2: 00040000 00020000 "U-Boot Env"
mtd3: 08000000 00020000 "Rootfs1"
mtd4: 07dc0000 00020000 "Rootfs2"


root@am335x-evm:~# flash_erase /dev/mtd4 0 0

root@am335x-evm:~# ubiattach /dev/ubi_ctrl -m 4

[  114.265063] UBI: attaching mtd4 to ubi0
[  114.269088] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[  114.275709] UBI: logical eraseblock size:    129024 bytes
[  114.281347] UBI: smallest flash I/O unit:    2048
[  114.286248] UBI: sub-page size:              512
[  114.291071] UBI: VID header offset:          512 (aligned 512)
[  114.297150] UBI: data offset:                2048
[  114.865903] UBI: empty MTD device detected
[  114.870341] UBI: max. sequence number:       0
[  114.875073] UBI: create volume table (copy #1)
[  114.888396] UBI: create volume table (copy #2)
[  114.904582] UBI: attached mtd4 to ubi0
[  114.908524] UBI: MTD device name:            "Rootfs2"
[  114.913938] UBI: MTD device size:            125 MiB
[  114.919111] UBI: number of good PEBs:        1006
[  114.924025] UBI: number of bad PEBs:         0
[  114.928654] UBI: number of corrupted PEBs:   0
[  114.933292] UBI: max. allowed volumes:       128
[  114.938103] UBI: wear-leveling threshold:    4096
[  114.943014] UBI: number of internal volumes: 1
[  114.947642] UBI: number of user volumes:     0
[  114.952280] UBI: available PEBs:             992
[  114.957093] UBI: total number of reserved PEBs: 14
[  114.962093] UBI: number of PEBs reserved for bad PEB handling: 10
[  114.968444] UBI: max/mean erase counter: 0/0
[  114.972903] UBI: image sequence number:  1923469276
[  114.978361] UBI: background thread "ubi_bgt0d" started, PID 1930
UBI device number 0, total 1006 LEBs (129798144 bytes, 123.8 MiB), available 992 LEBs (127991808 bytes, 122.1 MiB), LEB size 129024 bytes (126.0 KiB)