linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@sifive.com>
To: Tudor.Ambarus@microchip.com, sudip.mukherjee@sifive.com
Cc: p.yadav@ti.com, michael@walle.cc, miquel.raynal@bootlin.com,
	richard@nod.at, vigneshr@ti.com, greentime.hu@sifive.com,
	jude.onyenegecha@sifive.com, william.salmon@sifive.com,
	adnan.chowdhury@sifive.com, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mtd: spi-nor: add support for Quad Page Program to no_sfdp_flags
Date: Fri, 29 Jul 2022 09:10:07 +0100	[thread overview]
Message-ID: <bee82951-47c9-20bc-3cb2-3a52f67a4728@sifive.com> (raw)
In-Reply-To: <d5662307-200e-171d-58fd-8f26dc02c771@microchip.com>

On 29/07/2022 08:48, Tudor.Ambarus@microchip.com wrote:
> On 7/22/22 13:24, Sudip Mukherjee wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> Hi Tudor,
>>
> 
> Hi!
> 
>> On Mon, Jul 18, 2022 at 7:49 PM Sudip Mukherjee
>> <sudip.mukherjee@sifive.com> wrote:
>>>
>>> On Mon, Jul 18, 2022 at 6:02 PM <Tudor.Ambarus@microchip.com> wrote:
>>>>
>>>> On 7/12/22 19:38, Sudip Mukherjee wrote:
>>>>> [You don't often get email from sudip.mukherjee@sifive.com. 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.
>>
>> I tried decoding this SFDP table and I think the parameters table says
>> it has "3-Byte only addressing".
>> So, I guess that means it does not support 4-byte Address Instruction
>> Table. And the datasheet
>> says it supports "Quad Input Page Program (3-byte Address)".
>> My existing patchset works for Quad Input Page Program, and I can send
>> a v2 with the previous
>> patch and this merged together (as you suggested) or I can try
>> enabling sfdp for this chip and then use
> 
> You should definitely enable SFDP and get rid of the NO_SFDP_FLAGS flags,
> regardless of the 1-1-4 PP outcome.
> 
>> a fixup_flags to enable "Quad Input Page Program" which I think will
>> be more complicated.
>> Which one will you suggest?
>>
> 
> First I'd like to understand what "much better performance" means. Would
> you run some speed tests please? mtd-utils should have a speedtest, otherwise
> you can use the in kernel mtd_speedtest module. Page programs are slow anyway,
> using 4 lines may not make any difference. But let's see.
> 
> About your question, it depends on how common is 1-1-4 pp. If it's common and
> desirable we can introduce a flash info flag.

We have an issue with the SPI controller where if it isn't in the above 
1 bit modes it has to block the CPU as the feature to hold the clock is
not enabled in the 1bit "old" modes. In the old modes, if the FIFO gets
to the empty stage then the CS gets de-selected. If we can enable the
4bit mode, we can also set the clock-suspend flag which means the code
does not have to block the core it is running on to ensure it gets the
data out in time.

At the moment speed tests are not easy as we are on entirely emulated
hardware, we could try some but the results may not represent what the
real chip can perform.

-- 
Ben

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2022-07-29  8:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 16:38 [PATCH 0/3] Add Quad Input Page Program to chips with no SFDP table Sudip Mukherjee
2022-07-12 16:38 ` [PATCH 1/3] mtd: spi-nor: extend no_sfdp_flags to use u16 Sudip Mukherjee
2022-07-18 16:58   ` Tudor.Ambarus
2022-07-12 16:38 ` [PATCH 2/3] mtd: spi-nor: add support for Quad Page Program to no_sfdp_flags Sudip Mukherjee
2022-07-18 17:02   ` Tudor.Ambarus
2022-07-18 18:49     ` Sudip Mukherjee
2022-07-22 10:24       ` Sudip Mukherjee
2022-07-29  7:48         ` Tudor.Ambarus
2022-07-29  8:10           ` Ben Dooks [this message]
2022-07-29 10:07             ` Tudor.Ambarus
2022-07-29  7:35       ` Tudor.Ambarus
2022-07-12 16:38 ` [PATCH 3/3] mtd: spi-nor: issi: is25wp256: Enable Quad Input Page Program Sudip Mukherjee
2022-07-18  7:39   ` Michael Walle
2022-07-18 14:56     ` Sudip Mukherjee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bee82951-47c9-20bc-3cb2-3a52f67a4728@sifive.com \
    --to=ben.dooks@sifive.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=adnan.chowdhury@sifive.com \
    --cc=greentime.hu@sifive.com \
    --cc=jude.onyenegecha@sifive.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael@walle.cc \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.yadav@ti.com \
    --cc=richard@nod.at \
    --cc=sudip.mukherjee@sifive.com \
    --cc=vigneshr@ti.com \
    --cc=william.salmon@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).