NAND: add Samsung K9LBG08UXD identifier
Subsystems (2)
PATCH 1/1 NAND: add Samsung K9LBG08UXD identifier
The Samsung K9LBG08UXD parts are 32Gbytes x 8 bits 3.3V parts with the 0xD7 identifier. Add this to the list of known devices IDs.
--- drivers/mtd/nand/nand_ids.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand_ids.c +3 -0
@@ -111,6 +111,9 @@ struct nand_flash_dev nand_flash_ids[] = { {"NAND 2GiB 1,8V 16-bit", 0xB5, 0, 2048, 0, LP_OPTIONS16}, {"NAND 2GiB 3,3V 16-bit", 0xC5, 0, 2048, 0, LP_OPTIONS16}, +/* 32 Gigabit */ + {"NAND 4GiB 3,3V 8-bit", 0xD7, 0, 4096, 0, LP_OPTIONS16}, +/* * Renesas AND 1 Gigabit. Those chips do not support extended id and * have a strange page/block layout ! The chosen minimum erasesize is
PATCH 1/1 NAND: add Samsung K9LBG08UXD identifier
Rebased version for this nand chip has one problem in detecting its page size using in nand_base.c.
If we set page size 0 in nand_ids.c, we would get the calculation result as page size 2048, while the true page size is 4096.
I think it is reasonable to set the 32Gigabit nand as 4k page by default, as all nand been product in this size has more than 4k page.
The Samsung K9LBG08UXD parts are 32Gbytes x 8 bits 3.3V parts with the 0xD7 identifier. Add these to the list of known devices IDs.
--- drivers/mtd/nand/nand_ids.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand_ids.c +3 -0
@@ -110,6 +110,9 @@ struct nand_flash_dev nand_flash_ids[] = { {"NAND 2GiB 1,8V 16-bit", 0xB5, 0, 2048, 0, LP_OPTIONS16}, {"NAND 2GiB 3,3V 16-bit", 0xC5, 0, 2048, 0, LP_OPTIONS16}, +/* 32 Gigabit */ + {"NAND 4GiB 3,3V 8-bit", 0xD7, 4096, 4096, 0, LP_OPTIONS}, +/* * Renesas AND 1 Gigabit. Those chips do not support extended id and * have a strange page/block layout ! The chosen minimum erasesize is
Quoted 23 lines · Lei Wen
The Samsung K9LBG08UXD parts are 32Gbytes x 8 bits 3.3V parts with the
0xD7identifier. Add this to the list of known devices IDs.Signed-off-by Lei Wen <[email protected]>---
?drivers/mtd/nand/nand_ids.c | ? ?3 +++
?1 files changed, 3 insertions(+), 0 deletions(-)drivers/mtd/nand/nand_ids.c +3
-0@@ -111,6 +111,9 @@ struct nand_flash_dev nand_flash_ids[] = { ? ? ? ?{"NAND 2GiB 1,8V 16-bit", ? ? ? 0xB5, 0, 2048, 0, LP_OPTIONS16}, ? ? ? ?{"NAND 2GiB 3,3V 16-bit", ? ? ? 0xC5, 0, 2048, 0, LP_OPTIONS16}, + ? ? ? /* 32 Gigabit */ + ? ? ? {"NAND 4GiB 3,3V 8-bit", ? ? ? ?0xD7, 0, 4096, 0, LP_OPTIONS16}, +? ? ? ?/*
? ? ? ? * Renesas AND 1 Gigabit. Those chips do not support extended id and ? ? ? ? * have a strange page/block layout ! ?The chosen minimum erasesize is
PATCH 1/1 NAND: add Samsung K9LBG08UXD identifier
Quoted 4 lines · Lei Wen
Rebased version for this nand chip has one problem in detecting its page size using in
nand_base.c.
If we set page size 0 innand_ids.c, we would get the calculation result as page size 2048, while the true page size is 4096.
Is the ID data bad, or is there a bug in nand_get_flash_type(), or is it some new ID format that needs support?
Quoted 3 lines
I think it is reasonable to set the 32Gigabit nand as 4k page by default, as all nand been product in this size has more than 4k page.
"more than"? Are there larger page size NANDs out there?
And if so, wouldn't hard-coding the page size at 4096 bytes be a problem?
Is there zero possibility that a 2k page NAND in this size could be made in the future (e.g. for compatibility with controllers that don't support 4k pages)?
-Scott
PATCH 1/1 NAND: add Samsung K9LBG08UXD identifier
Quoted 8 lines · Scott Wood
Quoted 4 lines · Lei Wen
Rebased version for this nand chip has one problem in detecting its page size using in
nand_base.c.
If we set page size 0 innand_ids.c, we would get the calculation result as page size 2048, while the true page size is 4096.Is the ID data bad, or is there a bug in
nand_get_flash_type(), or is it some new ID format that needs support?
Samsung seem modify the ID name rule, which make the calculation method nand_get_flash_type doesn't work.
In mainline linux code, it give a hardcode way to identify this type of nand with new calculation method.
Quoted 6 lines
Quoted 4 lines
I think it is reasonable to set the 32Gigabit nand as 4k page by default, as all nand been product in this size has more than 4k page.
"more than"? ?Are there larger page size NANDs out there?
8k page nand exists, but they are for even larger nand, like 64Gb, or 128Gb.
Quoted 6 lines
And if so, wouldn't hard-coding the page size at 4096 bytes be a problem?
Is there zero possibility that a 2k page NAND in this size could be made in the future (e.g. for compatibility with controllers that don't support 4k pages)?
Maybe we could post another patch for that kind of nand?...
Quoted 4 lines
-Scott
PATCH 1/1 NAND: add Samsung K9LBG08UXD identifier
Quoted 7 lines · On Tue, 20 Jul 2010 08:43:55 +0800 Lei Wen <[email protected]> wrote:
Quoted 6 lines · Scott Wood
Quoted 4 lines · Lei Wen
Rebased version for this nand chip has one problem in detecting its page size using in
nand_base.c.
If we set page size 0 innand_ids.c, we would get the calculation result as page size 2048, while the true page size is 4096.
Quoted 7 lines
Quoted 2 lines
Is the ID data bad, or is there a bug in
nand_get_flash_type(), or is it some new ID format that needs support?Samsung seem modify the ID name rule, which make the calculation method
nand_get_flash_typedoesn't work.
In mainline linux code, it give a hardcode way to identify this type of nand with new calculation method.
Let's do the same thing Linux does, then.
It looks like it's not just writesize that is different...
Quoted 5 lines
Quoted 3 lines
Is there zero possibility that a 2k page NAND in this size could be made in the future (e.g. for compatibility with controllers that don't support 4k pages)?
Maybe we could post another patch for that kind of nand?
My point is just that we should make autodetection work if it's practical.
-Scott
PATCH 1/1 NAND: add Samsung K9LBG08UXD identifier
2010/7/21 Scott Wood <[email protected]>:
Quoted 13 lines
Quoted 10 lines · On Tue, 20 Jul 2010 08:43:55 +0800 Lei Wen <[email protected]> wrote:
Quoted 8 lines · Scott Wood
Quoted 4 lines · Lei Wen
Rebased version for this nand chip has one problem in detecting its page size using in
nand_base.c.
If we set page size 0 innand_ids.c, we would get the calculation result as page size 2048, while the true page size is 4096.Is the ID data bad, or is there a bug in
nand_get_flash_type(), or is it some new ID format that needs support?
Quoted 6 lines
Quoted 4 lines
Samsung seem modify the ID name rule, which make the calculation method
nand_get_flash_typedoesn't work.
In mainline linux code, it give a hardcode way to identify this type of nand with new calculation method.Let's do the same thing Linux does, then.
In fact, Linux(nand_base.c) does not handle the pagesize, oobsize correctly for the new NAND.
And actually, it's real difficult for providing one common caculation rule for all the NAND flash since
the NAND ID data layout is not much the same as each other. Maybe, this is why there is not such patch
in linux to fix this issue.
Quoted 19 lines
It looks like it's not just writesize that is different...
Quoted 5 lines
Quoted 3 lines
Is there zero possibility that a 2k page NAND in this size could be made in the future (e.g. for compatibility with controllers that don't support 4k pages)?
Maybe we could post another patch for that kind of nand?
My point is just that we should make autodetection work if it's practical.
-Scott
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 1/1 NAND: add Samsung K9LBG08UXD identifier
Quoted 19 lines · On Wed, 21 Jul 2010 13:59:14 +0800 Jason Liu <[email protected]> wrote:
2010/7/21 Scott Wood <[email protected]>:
Quoted 18 lines
Quoted 14 lines · On Tue, 20 Jul 2010 08:43:55 +0800 Lei Wen <[email protected]> wrote:
Quoted 8 lines · Scott Wood
Quoted 4 lines · Lei Wen
Rebased version for this nand chip has one problem in detecting its page size using in
nand_base.c.
If we set page size 0 innand_ids.c, we would get the calculation result as page size 2048, while the true page size is 4096.Is the ID data bad, or is there a bug in
nand_get_flash_type(), or is it some new ID format that needs support?Samsung seem modify the ID name rule, which make the calculation method
nand_get_flash_typedoesn't work.
In mainline linux code, it give a hardcode way to identify this type of nand with new calculation method.
Quoted 4 lines
Quoted 1 line
Let's do the same thing Linux does, then.
In fact,
Linux(nand_base.c)does not handle the pagesize, oobsize correctly for the new NAND.
What should it be doing instead for this chip?
Quoted 5 lines
And actually, it's real difficult for providing one common caculation rule for all the NAND flash since
the NAND ID data layout is not much the same as each other. Maybe, this is why there is not such patch
in linux to fix this issue.
It doesn't need to be one common calculation, as long as enough of the ID is common that we can figure out which calculation to use. How many variants are there, and is how complicated is it to figure out which variant it is?
Alternatively, hard-coding it may be the only way to stay sane -- but in that case, we need to make sure we've got a good enough match. Do we need to add the manufacturer to the ID table? I'm assuming that something motivated the switch away from putting writesize/erasesize in the ID table.
And it looks like if pagesize is hardcoded, erasesize must be as well.
-Scott