Skip to contentSkip to conversation

m25p80: Fix wrong jedec id for Numonyx n25q128

PATCH In review Liming Wang 2 participants 4 messages Nov 19, 2012 – Nov 29, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m25p80: Fix wrong jedec id for Numonyx n25q128

The jedec id of "n25q128" should be 0x20bb18, not 0x20ba18.

---
 hw/m25p80.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/m25p80.c +1 -1
index 3895e73..58ae754 100644
@@ -177,7 +177,7 @@ static const FlashPartInfo known_devices[] = {
     { INFO("w25q64",      0xef4017,      0,  64 << 10, 128, ER_4K) },
 
     /* Numonyx -- n25q128 */
-    { INFO("n25q128",      0x20ba18,      0,  64 << 10, 256, 0) },
+    { INFO("n25q128",      0x20bb18,      0,  64 << 10, 256, 0) },
 
     { },
 };
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Liming,

Quoted 12 lines · Liming Wang

The jedec id of "n25q128" should be 0x20bb18, not 0x20ba18.

---
 hw/m25p80.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/m25p80.c +0 -0
index 3895e73..58ae754 100644

hw/m25p80.c static const FlashPartInfo known_devices[] = { · line 181

Quoted 6 lines
hw/m25p80.c +1 -1
@@ -177,7 +177,7 @@ static const FlashPartInfo known_devices[] = {
     { INFO("w25q64",      0xef4017,      0,  64 << 10, 128, ER_4K) },
 
     /* Numonyx -- n25q128 */
-    { INFO("n25q128",      0x20ba18,      0,  64 << 10, 256, 0) },
+    { INFO("n25q128",      0x20bb18,      0,  64 << 10, 256, 0) },
 

Im not sure this is right. Ive looked through the datasheets for this part. Rev 1.0 (Feb 2010) of the data sheet has the 0x20bb18 Jedec code but Rev 7 (Feb 2011) has 0x20ba18. We have however, noticed here with some actual parts that the Jedec code varies from one board to the next between these two. The mainline Linux Kernel uses 0x20ba18 (drivers/mtd/devices/m25p80.c):

665

666         /* Micron */
667         { "n25q128",  INFO(0x20ba18, 0, 64 * 1024, 256, 0) },
668         { "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K) },

669

And the Xilinx Linux kernel has both:

	/* Micron */
	{ "n25q128",  INFO(0x20ba18, 0, 64 * 1024, 256, 0) },
	{ "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K) },
	/* Numonyx flash n25q128 - FIXME check the name */
	{ "n25q128",   INFO(0x20bb18, 0, 64 * 1024, 256, 0) },

I think 20ba18 is correct given its specifed by the more recent datasheets, but if you are comparing to an earlier revision Zynq board then you may see a diff. Also if you are using Linux, check your kernel to see if you have the 0x20ba10 line as older versions of the Xilinx kernel may only have 0x20bb18. May be a case of just a revup of your kernel.

Another solution is to add both to QEMU, although having to distinguish between the two different parts with the same name is messy.

Regards,
Peter

Quoted 6 lines
hw/m25p80.c +0 -1
     { },
 };
--

1.7.9.5

author
#2 lore raw
Quoted 29 lines · Peter Crosthwaite

Hi Liming,

Quoted 12 lines · Liming Wang

The jedec id of "n25q128" should be 0x20bb18, not 0x20ba18.

---
 hw/m25p80.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/m25p80.c +0 -0
index 3895e73..58ae754 100644

hw/m25p80.c static const FlashPartInfo known_devices[] = { · line 181

Quoted 6 lines
hw/m25p80.c +1 -1
@@ -177,7 +177,7 @@ static const FlashPartInfo known_devices[] = {
     { INFO("w25q64",      0xef4017,      0,  64 << 10, 128, ER_4K) },
 
     /* Numonyx -- n25q128 */
-    { INFO("n25q128",      0x20ba18,      0,  64 << 10, 256, 0) },
+    { INFO("n25q128",      0x20bb18,      0,  64 << 10, 256, 0) },
 

Im not sure this is right. Ive looked through the datasheets for this part. Rev 1.0 (Feb 2010) of the data sheet has the 0x20bb18 Jedec code but Rev 7 (Feb 2011) has 0x20ba18. We have however, noticed here with some actual parts that the Jedec code varies from one board to the next between these two. The mainline Linux Kernel uses 0x20ba18 (drivers/mtd/devices/m25p80.c):

Quoted 3 lines

665
666 /* Micron */
667 { "n25q128", INFO(0x20ba18, 0, 64 * 1024, 256, 0) },

Yes, it is. Sorry, I did't look at te mainline Linux kernel.

Quoted 10 lines

668 { "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K) },
669

And the Xilinx Linux kernel has both:

	/* Micron */
	{ "n25q128",  INFO(0x20ba18, 0, 64 * 1024, 256, 0) },
	{ "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K) },
	/* Numonyx flash n25q128 - FIXME check the name */
	{ "n25q128",   INFO(0x20bb18, 0, 64 * 1024, 256, 0) },

I don't know what's the Xilinx Linux kernel you used.
But from Xilinx Linux git tree, master brach, the file "drivers/mtd/devices/m25p80.c":
http://git.xilinx.com/?p=linux-xlnx.git;a=blob;f=drivers/mtd/devices/m25p80.c;h=9d11fdeb375bb097ec2eb13497a1e67ad8babbb8;hb=refs/heads/master

has only 0x20bb18 jedec code for "n25q128":

712 /* Numonyx flash n25q128 */
713 { "n25q128", INFO(0x20bb18, 0, 64 * 1024, 256, 0) },

I looked more deeply in the n25q128 flash and I found there are two type of "n25q128" flashes.

1. One type is with 1.8V supply voltage:
http://www.micron.com/products/nor-flash/serial-nor-flash#fullPart&236=128Mb&490=N25Q&192=1.7V-2.0V

It has prefix of "N25Q128A11". The datasheet is located in:
http://www.micron.com/~/media/Documents/Products/Data%20Sheet/NOR%20Flash/Serial%20NOR/N25Q/n25q_128mb_1_8v_65nm.pdf
In the first page, it tells that the jedec code is 0xbb18.

1. One type is with 3V supply voltage:
http://www.micron.com/products/nor-flash/serial-nor-flash#fullPart&236=128Mb&490=N25Q&192=2.7V-3.6V

It has prefix of "N25Q128A13". The datasheet is located in:
http://www.micron.com/~/media/Documents/Products/Data%20Sheet/NOR%20Flash/Serial%20NOR/N25Q/N25Q_128_3_Volt_with_boot_sector.pdf
In the first page, it tells that the jedec code is 0xba18.

So I think both 0x20bb18 and 0x20ba18 are right. It depends on what type flash is used in the Xilinx board and what Xilinx Linux kernel you use.

For my Xilinx zc702 board, I found it has the one 1.8V flash(N25Q128A11E40) and my Xilinx kernel has just 0x20bb18 jedec code.
How about your Xilinx board?

And I found there is confusion in Xilinx zc702 board manual:
It declares it uses one N25Q128A13BSF40F flash, but with supply voltage 1.8V.

Qemu maybe has no need to change, but Linux kernel needs to change to distinguish the two type of flashes.

Regards,
Liming Wang

Quoted 21 lines

I think 20ba18 is correct given its specifed by the more recent datasheets, but if you are comparing to an earlier revision Zynq board then you may see a diff. Also if you are using Linux, check your kernel to see if you have the 0x20ba10 line as older versions of the Xilinx kernel may only have 0x20bb18. May be a case of just a revup of your kernel.

Another solution is to add both to QEMU, although having to distinguish between the two different parts with the same name is messy.

Regards,
Peter

Quoted 6 lines
hw/m25p80.c +0 -1
     { },
 };
--

1.7.9.5

author
#3 lore raw
In reply to Peter Crosthwaite
Quoted 29 lines · Peter Crosthwaite

Hi Liming,

Quoted 12 lines · Liming Wang

The jedec id of "n25q128" should be 0x20bb18, not 0x20ba18.

---
 hw/m25p80.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/m25p80.c +0 -0
index 3895e73..58ae754 100644

hw/m25p80.c static const FlashPartInfo known_devices[] = { · line 181

Quoted 6 lines
hw/m25p80.c +1 -1
@@ -177,7 +177,7 @@ static const FlashPartInfo known_devices[] = {
     { INFO("w25q64",      0xef4017,      0,  64 << 10, 128, ER_4K) },
 
     /* Numonyx -- n25q128 */
-    { INFO("n25q128",      0x20ba18,      0,  64 << 10, 256, 0) },
+    { INFO("n25q128",      0x20bb18,      0,  64 << 10, 256, 0) },
 

Im not sure this is right. Ive looked through the datasheets for this part. Rev 1.0 (Feb 2010) of the data sheet has the 0x20bb18 Jedec code but Rev 7 (Feb 2011) has 0x20ba18. We have however, noticed here with some actual parts that the Jedec code varies from one board to the next between these two. The mainline Linux Kernel uses 0x20ba18 (drivers/mtd/devices/m25p80.c):

Quoted 4 lines

665

666         /* Micron */
667         { "n25q128",  INFO(0x20ba18, 0, 64 * 1024, 256, 0) },
668         { "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K) },

I have submitted a patch to mainline kernel to add 0x20bb18 jedec code.

http://git.infradead.org/users/dedekind/l2-mtd.git/commit/0f722de047e3e041d33446b570f8c960ad188965

Anyway, I think we don't need this patch.

Regards,
Liming Wang

Quoted 30 lines

669

And the Xilinx Linux kernel has both:

	/* Micron */
	{ "n25q128",  INFO(0x20ba18, 0, 64 * 1024, 256, 0) },
	{ "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K) },
	/* Numonyx flash n25q128 - FIXME check the name */
	{ "n25q128",   INFO(0x20bb18, 0, 64 * 1024, 256, 0) },

I think 20ba18 is correct given its specifed by the more recent datasheets, but if you are comparing to an earlier revision Zynq board then you may see a diff. Also if you are using Linux, check your kernel to see if you have the 0x20ba10 line as older versions of the Xilinx kernel may only have 0x20bb18. May be a case of just a revup of your kernel.

Another solution is to add both to QEMU, although having to distinguish between the two different parts with the same name is messy.

Regards,
Peter

Quoted 6 lines
hw/m25p80.c +0 -1
     { },
 };
--

1.7.9.5