All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Jander <david@protonic.nl>
To: Fabio Estevam <festevam@gmail.com>
Cc: frieder.schrempf@kontron.de, broonie@kernel.org,
	mkl@pengutronix.de, linux-spi@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] spi: spi-imx: Revert "spi: spi-imx: add PIO polling support"
Date: Fri, 11 Nov 2022 13:59:19 +0100	[thread overview]
Message-ID: <20221111135919.63daed2d@erd992> (raw)
In-Reply-To: <CAOMZO5CH9S_RYpLNZbRxChzSVkkZTAd+qpxz1Ycj2UUPROTXpw@mail.gmail.com>


Dear Fabio,

On Fri, 11 Nov 2022 08:33:03 -0300
Fabio Estevam <festevam@gmail.com> wrote:

> Hi David,
> 
> On Fri, Nov 11, 2022 at 6:50 AM David Jander <david@protonic.nl> wrote:
> 
> > The effect of this patch is that it will cause short SPI transfers to have a
> > lot less latency than without this patch, so could it be that we are looking
> > at a timing related bug in the MTD driver, or some other timing issue?
> > Your SPI clock is 80MHz, but the datasheet of the MACRONIX MX25R1635F
> > specifies a maximum clock of 33MHz. Is your NOR flash chip capable of this
> > clock-rate?  
> 
> Thanks for your suggestions.
> 
> I have tried passing spi-max-frequency = <33000000>, and I don't see
> the failure anymore.
> 
> Looking at the MX25R1635F datasheet the maximum SPI frequency is:
> 
> 80MHz: when L/H bit is 1 - High Performance mode.
> 33MHz: when L/H bit is 0 - Ultra Low Power mode.
> 
> "L/H switch bit The Low Power / High Performance bit is a volatile bit.
> User can change the value of L/H switch bit to keep Ultra Low Power
> mode or High Performance mode.
> Please check Ordering Information for the L/H Switch default support"

Oh, my bad, sorry. I didn't read far enough into the DS. I just wanted to point
out that AFAIK, if you use a clock higher than 33MHz, you probably also need
"m25p,fast-read" in the DT:

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/mtd/spi-nor/core.c#n2550

Not sure if that can cause the issues you are seeing though.

Best regards,

-- 
David Jander
Protonic Holland.

  reply	other threads:[~2022-11-11 12:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  0:30 [PATCH] spi: spi-imx: Revert "spi: spi-imx: add PIO polling support" Fabio Estevam
2022-11-11  9:50 ` David Jander
2022-11-11 11:33   ` Fabio Estevam
2022-11-11 12:59     ` David Jander [this message]
2022-11-14  8:30       ` Frieder Schrempf
2022-11-14 11:29         ` Mark Brown
2022-11-15 10:51           ` Frieder Schrempf
2022-11-15 12:09             ` Frieder Schrempf
2022-11-15 12:55             ` Marc Kleine-Budde
2022-11-15 14:46               ` Frieder Schrempf
2022-11-15 15:45                 ` Fabio Estevam
2022-11-15 15:46                 ` Marc Kleine-Budde
2022-11-15 16:05                   ` Frieder Schrempf
2022-11-15 16:52                 ` Marc Kleine-Budde
2022-11-15 17:11                   ` Frieder Schrempf
2022-11-15 18:01                     ` Marc Kleine-Budde
2022-11-15 17:17                   ` Fabio Estevam
2022-11-14 13:01         ` Fabio Estevam

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=20221111135919.63daed2d@erd992 \
    --to=david@protonic.nl \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=linux-spi@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=stable@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.