qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] m25p80: Fix wrong jedec id for Numonyx n25q128


From: walimis
Subject: Re: [Qemu-devel] [PATCH] m25p80: Fix wrong jedec id for Numonyx n25q128
Date: Tue, 20 Nov 2012 14:05:06 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Nov 20, 2012 at 02:32:33PM +1000, Peter Crosthwaite wrote:
>Hi Liming,
>
>On Mon, Nov 19, 2012 at 11:03 PM, Liming Wang <address@hidden> wrote:
>> The jedec id of "n25q128" should be 0x20bb18, not 0x20ba18.
>>
>> Signed-off-by: Liming Wang <address@hidden>
>> ---
>>  hw/m25p80.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/m25p80.c b/hw/m25p80.c
>> index 3895e73..58ae754 100644
>> --- a/hw/m25p80.c
>> +++ b/hw/m25p80.c
>> @@ -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) },

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

>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

>
>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
>
>>      { },
>>  };
>> --
>> 1.7.9.5
>>
>>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]