[RFC 03/10] mtd: spi-nor: Configure read latency for read commands

Cyrille Pitchen cyrille.pitchen at wedev4u.fr
Thu Dec 7 06:58:31 PST 2017


Le 07/12/2017 à 10:03, Prabhakar Kushwaha a écrit :
> Hi Cyrille,
> 
>> -----Original Message-----
>> From: Cyrille Pitchen [mailto:cyrille.pitchen at wedev4u.fr]
>> Sent: Wednesday, December 06, 2017 4:16 PM
>> To: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>; linux-
>> mtd at lists.infradead.org
>> Cc: boris.brezillon at free-electrons.com; computersforpeace at gmail.com;
>> dedekind1 at gmail.com
>> Subject: Re: [RFC 03/10] mtd: spi-nor: Configure read latency for read commands
>>
>> Hi Prabhakar,
>>
>> Le 06/12/2017 à 09:15, Prabhakar Kushwaha a écrit :
>>> All read commands have read latency (dummy cycle). It defines a
>>> period between the end of address or mode and the beginning of
>>> read data returning to the host. Flashes have default read latency.
>>> This default read latency may not match with the selected latency.
>>>
>>
>> The read latency is either hard-coded (0 mode cycles and 8 wait-states)
>> for Fast Read 1-1-z operations or read from the Basic Flash Parameter
>> Table programmed as one mandatory table of the JEDEC JESD126B
>> specification when SFDP tables are supported by the memory parts.
>>
>> In all cases, those values are factory settings. I don't understand why
>> there would be a mismatch between the default read latency and the
>> selected latency if any boot-loader or flash programming tool has ever
>> changed the memory settings.
>>
>> Could you please explain in which case you found a mismatch ?
>>
> If we only talk about 1-1-z than yes. The Default value is always "0/8". 
> 
> This mismatch start to come when we see 1-2-2 or 1-4-4 read protocols.
> For eg. S25FL128S/S25FL256S default dummy latency is 00. Which is 4 for  1-2-2 or 1-4-4.
>

If the memory is still configured to use its factory settings, for instance
latency code 00 for Spansion memories, and if this memory is complient with
the JEDEC JESD216 speficition, then we read from the Basic Flash Parameter
Table (BFPT), the only always mandatory SFDP table, to retrieve the number
of mode cycles and wait-states to be used with Fast Read 1-2-2 and 1-4-4:

- Fast Read 1-2-2 settings are written in the 4th DWORD of the BFPT.
- Fast Read 1-4-4 settings are written in the 3rd DWORD of the BFPT.

Please refer to the JESD216 specification and to the sfdp_bfpt_reads[]
array.

Hence, as long as you don't change the latency code of your Spansion memory
and keep it in its factory state, a proper value is set in nor->read_dummy
based on what have been read from the SFDP table (BFPT).

You should not have any mismatch between what was set in nor->read_dummy
and what you memory expects.
 
> I saw your review comments of using SFDP for 1-2-2 and 1-4-4. 
> Let me explore this path if we really require this patch..
> 
> Thanks for guidance!!
> 
> --pk
> 
> 
> 
> 




More information about the linux-mtd mailing list