From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Stoll, Eberhard" <eberhard.stoll@kontron.de>
Cc: "Miquel Raynal" <miquel.raynal@bootlin.com>,
"Eberhard Stoll" <estl@gmx.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
"Mark Brown" <broonie@kernel.org>,
"Schrempf, Frieder" <frieder.schrempf@kontron.de>,
"Amit Kumar Mahapatra" <amit.kumar-mahapatra@amd.com>,
"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Krishna Yarlagadda" <kyarlagadda@nvidia.com>,
"Leonard Göhrs" <l.goehrs@pengutronix.de>,
"Yang Yingliang" <yangyingliang@huawei.com>
Subject: Re: AW: [PATCH 1/4] spi: Add parameter for clock to rx delay
Date: Fri, 27 Oct 2023 14:46:42 +0300 [thread overview]
Message-ID: <ZTujIs2O+GYKIPlU@smile.fi.intel.com> (raw)
In-Reply-To: <DB9PR10MB82468A8BD333B12D3FCB3C43F1DCA@DB9PR10MB8246.EURPRD10.PROD.OUTLOOK.COM>
On Fri, Oct 27, 2023 at 08:38:54AM +0000, Stoll, Eberhard wrote:
...
> > Can you be more specific? I am wondering how big the need is.
>
> In our case it's a QSPI NAND chip (Winbond W25N02KV). This device
> can operate at 104MHz SPI clock. But it also has a tCLQV value of 7ns.
> The tCLQV value limits the SPI clock speed for this device to 2x7ns
> (if it is not adjustable in the SPI controller) which is approximately
> 70MHz.
>
> Without the ability to set the tCLQV value, the SPI clock has to be
> limited to 70MHz in device tree for this bus.
>
> In our case the Winbond W25N02KV chip is a replacement of an
> older chip. The older chip can operate at 104MHz and does not
> have the tCLQV restrictions as this new one.
> The new chip is mostly is better than the data sheet and meet the
> timing requirements for 104MHz. But on higher temperatures
> devices fail.
>
> In device tree QSPI NAND chips are configured by a compatible
> property of 'spi-nand'. The mtd layer detects the real device
> and fetches the properties of this device from the appropriate
> driver.
>
> So for our case (boards containing the old and new chip) we well
> have to reduce the SPI clock for the entire QSPI bus to 70MHz, even
> for the elder chips which can operate well also with 104MHz.
So, to me sounds like device tree source issue. I.e. you need to provide
different DT(b)s depending on the platform (and how it should be).
The cleanest solution (as I see not the first time people I trying quirks like
this to be part of the subsystems / drivers) is to make DT core (OF) to have
conditionals or boot-time modifications allowed.
This, what you are doing, does not scale and smells like an ugly hack.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-10-27 11:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 15:23 [PATCH 0/4] Add tCLQV parameter to tweak SPI timings Eberhard Stoll
2023-10-26 15:23 ` Eberhard Stoll
2023-10-26 15:23 ` [PATCH 1/4] spi: Add parameter for clock to rx delay Eberhard Stoll
2023-10-26 22:56 ` Miquel Raynal
2023-10-27 8:38 ` AW: " Stoll, Eberhard
2023-10-27 11:46 ` Andy Shevchenko [this message]
[not found] ` <ZTvbFc+kFMotVUkh@finisterre.sirena.org.uk>
2023-10-30 8:48 ` Andy Shevchenko
2023-10-30 9:28 ` AW: " Stoll, Eberhard
2023-10-26 15:23 ` [PATCH 2/4] mtd: spinand: Add support for clock to rx delay setting Eberhard Stoll
2023-10-26 15:23 ` Eberhard Stoll
2023-10-26 15:23 ` [PATCH 3/4] mtd: spinand: winbond: Add rx sample delay for W25N02KV Eberhard Stoll
2023-10-26 15:23 ` Eberhard Stoll
2023-10-26 15:23 ` [PATCH 4/4] spi: spi-fsl-qspi: Add support for rx data sample point adjustment Eberhard Stoll
2023-10-26 20:03 ` kernel test robot
2023-10-27 6:51 ` Frieder Schrempf
2023-10-27 16:07 ` Mark Brown
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=ZTujIs2O+GYKIPlU@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=amit.kumar-mahapatra@amd.com \
--cc=broonie@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=eberhard.stoll@kontron.de \
--cc=estl@gmx.net \
--cc=frieder.schrempf@kontron.de \
--cc=geert+renesas@glider.be \
--cc=kyarlagadda@nvidia.com \
--cc=l.goehrs@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=yangyingliang@huawei.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 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.