Re: [PATCH 2/3] mtd: spi-nor: add support for Quad Page Program to no_sfdp_flags
From: Tudor.Ambarus
Date: Fri Jul 29 2022 - 03:36:13 EST
On 7/18/22 21:49, Sudip Mukherjee wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Mon, Jul 18, 2022 at 6:02 PM <Tudor.Ambarus@xxxxxxxxxxxxx> wrote:
>>
>> On 7/12/22 19:38, Sudip Mukherjee wrote:
>>> [You don't often get email from sudip.mukherjee@xxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>>>
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> Some flash chips which does not have a SFDP table can support Quad
>>> Input Page Program. Enable it in hwcaps if defined.
>>>
>
> <snip>
>
>>> diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
>>> index 58fbedc94080f..dde636bdb1a7c 100644
>>> --- a/drivers/mtd/spi-nor/core.h
>>> +++ b/drivers/mtd/spi-nor/core.h
>>> @@ -462,6 +462,7 @@ struct spi_nor_fixups {
>>> * SPI_NOR_OCTAL_READ: flash supports Octal Read.
>>> * SPI_NOR_OCTAL_DTR_READ: flash supports octal DTR Read.
>>> * SPI_NOR_OCTAL_DTR_PP: flash supports Octal DTR Page Program.
>>> + * SPI_NOR_QUAD_PP: flash supports Quad Input Page Program.
>>
>> You don't need this flag if your flash supports the 4-byte Address
>> Instruction Table. Does you flash support it? Can you dump all the
>> SFDP tables, please?
>
> Not sure what the correct way to dump sfdp is. I did this from sysfs.
>
> # cat sfdp | xxd
> 00000000: 5346 4450 0601 01ff 0006 0110 3000 00ff SFDP........0...
We really need a decoder for this :D.
5346 4450 - sfdp signature
0601 01ff - 2nd dword, 2 parameter tables
0006 0110 - BFPT of 16 dwords
3000 00ff - parameter header, 2nd dword
> 00000010: 9d05 0103 8000 0002 ffff ffff ffff ffff ................
9d05 0103 ID LSB = 0x9d, table with 3 dwords
8000 0002 ID MSB = 0x02 -> looks like a function specific vendor table
So the flash does not support the 4-byte Address Instruction table, we
can't retrieve the Quad PP from SFDP.
> 00000020: ffff ffff ffff ffff ffff ffff ffff ffff ................
> 00000030: e520 f9ff ffff ff0f 44eb 086b 083b 80bb . ......D..k.;..
> 00000040: feff ffff ffff 00ff ffff 44eb 0c20 0f52 ..........D.. .R
> 00000050: 10d8 00ff 234a c900 82d8 11ce cccd 6846 ....#J........hF
> 00000060: 7a75 7a75 f7ae d55c 4a42 2cff f030 faa9 zuzu...\JB,..0..
> 00000070: ffff ffff ffff ffff ffff ffff ffff ffff ................
> 00000080: 5019 5016 9ff9 c064 8fef ffff P.P....d....
>
>
> --
> Regards
> Sudip
--
Cheers,
ta