Nand Flash Issue : Micron Tech. MT29F8G08ABABA ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Nand Flash Issue : Micron Tech. MT29F8G08ABABA ?

7,029件の閲覧回数
snan1z
Contributor I

Hi,

 

I am working with freescale's imx28 dev board and i cannot use my 1 GiB nand flash (MT29F8G09ABABA). I added lines as below to ~/ltib/rpm/BUILD/linux/drivers/mtd/nand/nand_device_info.c file;

/* * Type 2 */

static struct nand_device_info nand_device_info_table_type_2[] __initdata = {

.......

{

.end_of_table             = false,
.manufacturer_code        = 0x2c,
.device_code              = 0xd3,
.cell_technology          = NAND_DEVICE_CELL_TECH_SLC,
.chip_size_in_bytes       = 1LL*SZ_1G,
.block_size_in_pages      = 128,
.page_total_size_in_bytes = 4*SZ_1K + 224,
.ecc_strength_in_bits     = 4,
.ecc_size_in_bytes        = 512,
.data_setup_in_ns         = 25,
.data_hold_in_ns          = 15,
.address_setup_in_ns      = 10,
.gpmi_sample_delay_in_ns  = 6,
.tREA_in_ns               = -1,
.tRLOH_in_ns              = -1,
.tRHOH_in_ns              = -1,
"MT29F8G08ABABA",

}

, {true}

};

 

and i prepare a sd card for booting. Then i booted my board and checked my mtd devices;

$ mtdinfo

Count of MTD devices: 0

 

Please help, I have no time

 

Regards,

Sinan

ラベル(1)
0 件の賞賛
返信
13 返答(返信)

4,005件の閲覧回数
GiorgioLazzaret
Contributor I

Maybe you could try this kind of setting:

{

...

.page_total_size_in_bytes = 4*SZ_1K + 218,

...

}

And: 512 KiB, 516096, 2008, 4096

With these settings I'm able to boot from NAND

0 件の賞賛
返信

4,005件の閲覧回数
snan1z
Contributor I

So this is the only output you get when you reboot?

Yes

 

Are you sure you got a good kernel image loaded into NAND? How are you creating your kernel image?

 

Yes, I am sure that it is ok because i tried it with an another nand flash and it works.

Also i created it with ltib script;

$ ./ltib

$ ./ltib -p boot_stream.spec -f

 

In my opinion, LTIB does not support Open Nand devices well.(my flash has ONFI 2.1)

0 件の賞賛
返信

4,005件の閲覧回数
iMxGuy
Contributor II
So this is the only output you get when you reboot? Are you sure you got a good kernel image loaded into NAND? How are you creating your kernel image?

Sinan Emre Kutlu said:
only outputs this : HTL0x8050100b
0 件の賞賛
返信

4,005件の閲覧回数
snan1z
Contributor I
only outputs this : HTL0x8050100b
0 件の賞賛
返信

4,005件の閲覧回数
snan1z
Contributor I

but my mtdinfo output as below:

 

root@freescale ~$ mtdinfo -a

Count of MTD devices:           2

Present MTD devices:            mtd0, mtd1

Sysfs interface supported:      yes

mtd0

Name:                           gpmi-nfc-0-boot

Type:                           nand

Eraseblock size:                524288 bytes, 512.0 KiB

Amount of eraseblocks:          40 (20971520 bytes, 20.0 MiB)

Minimum input/output unit size: 4096 bytes

Sub-page size:                  4096 bytes

OOB size:                       224 bytes

Character device major/minor:   90:0

Bad blocks are allowed:         true

Device is writable:             true

mtd1

Name:                           gpmi-nfc-general-use

Type:                           nand

Eraseblock size:                524288 bytes, 512.0 KiB

Amount of eraseblocks:          2008 (1052770304 bytes, 1004.0 MiB)

Minimum input/output unit size: 4096 bytes

Sub-page size:                  4096 bytes

OOB size:                       224 bytes

Character device major/minor:   90:2

Bad blocks are allowed:         true

Device is writable:             true

 

As you see, settings should be  512KiB, 516096, 2048, 4096 ?

 

Also, a hour ago I realized that if I boot from nand, it does not loaded linux from nand. But if I load the linux from mmc card, then I can access rootfs in the nand flash.

 

How can I solve this issue?

0 件の賞賛
返信

4,005件の閲覧回数
iMxGuy
Contributor II

mtdinfo can give you lots of information about your NAND device. I use these settings on most of mine but it depends on your particular device. Use the mtdinfo output to check.

 

128KiB, 126976, 4096, 2048

0 件の賞賛
返信

4,005件の閲覧回数
snan1z
Contributor I

Mike,

 

I have a question for you such that have you used ubifs for nand ? if yes, what are the ubifs parameters ?

 

PEB size:

LEB size:

Max LEB count:

Min I/O unit size:

 

I tried it with :

          -> 512 KiB, 516096, 2048, 4096

          -> 512 KiB, 516096, 4096, 4096

          -> 512 KiB, 516096, 2008, 4096

but I can't boot from nand

0 件の賞賛
返信

4,005件の閲覧回数
snan1z
Contributor I

Thank you  Mike,

 

it works,  but it need some changes to file nand_device_info.c

0 件の賞賛
返信

4,005件の閲覧回数
snan1z
Contributor I

Thank you for your answers

 

Jon,

 

I tried it but nothing happened, also i add my struct to all types, i cant get success too.

 

Mike,

 

Now I'm trying your solution, i will inform you

0 件の賞賛
返信

4,005件の閲覧回数
iMxGuy
Contributor II
I got this patch from Freescale and it fixed my NAND problems.
0 件の賞賛
返信

4,005件の閲覧回数
JonSzymaniak
Contributor II

Ok...some further info regarding the issue I mentioned above:

 

For my device, the ID_GET_MICRON_SIMUL_PROG() macro used in nand_device_info_fn_micron() (nand_device_info.c in rpm/BUILD/linux/drivers/mtd/nand) yields the value 0x01.  As a result nand_device_info_table_type_7 is checked.  However, the definition for the MT29F2G08 is in the _type_2 table.  I don't know enough about the code/flash devices to determine if the macro or the table placement is the problem...

 

Regarding your issue though, I see that the "MT29F8G08FABWG" entry in the type 7 table is already associated with mfr code 0x2c and device code 0xd3, although some of your sizing information differs.  I think some of the info at boot will help folks determine if it's something along the lines of lacking MTD support in your kernel, incorrect device parameters, etc.

0 件の賞賛
返信

4,005件の閲覧回数
JonSzymaniak
Contributor II

Is the device detected at boot?  The relevant lines from dmesg might help.

 

I had an issue with the MT29F2G08 not being detected at boot -- basically the code that probes for nand devices was looking for my device in the type_7 table instead of the type_2 table due to the contents of one of the ID bytes.  I ended up moving the device info (similar to what you posted) to the type_7 table, and I was able to work with the flash device.

 

I'll check into more of the specifics when I have the code in front of me and let you know. :)

0 件の賞賛
返信

4,005件の閲覧回数
snan1z
Contributor I
I attached my flash's datasheet.
0 件の賞賛
返信