From: Neil Armstrong <neil.armstrong@linaro.org>
To: Carlo Caione <ccaione@baylibre.com>,
Kamlesh Gurudasani <kamlesh.gurudasani@gmail.com>,
Mark Brown <broonie@kernel.org>,
Jerome Brunet <jbrunet@baylibre.com>,
David Airlie <airlied@gmail.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Kevin Hilman <khilman@baylibre.com>,
Daniel Vetter <daniel@ffwll.ch>
Cc: linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-spi@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] spi: meson-spicc: Lower CS between bursts
Date: Thu, 17 Nov 2022 09:54:40 +0100 [thread overview]
Message-ID: <098b923b-ff46-5ef5-9c21-19c974c9274f@linaro.org> (raw)
In-Reply-To: <20221116-s905x_spi_ili9486-v1-3-630401cb62d5@baylibre.com>
Hi,
On 17/11/2022 09:47, Carlo Caione wrote:
> On some hardware (reproduced on S905X) when a large payload is
> transmitted over SPI in bursts at the end of each burst, the clock line
> briefly fluctuates creating spurious clock transitions that are being
> recognised by the connected device as a genuine pulses, creating an
> offset in the data being transmitted.
>
> Lower the GPIO CS between bursts to avoid the clock being interpreted as
> valid.
I'm afraid this will actually break SPI NORs for example where CS actually splits
transactions.
Isn't Amjad change enough ? The CLK pull-up should avoid this.
If it's not the case, then it's an HW issue and the CLK line pull-up is too weak and an
external pull should then be added.
>
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>
> ---
> drivers/spi/spi-meson-spicc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
> index d47f2623a60f..af8d74b53519 100644
> --- a/drivers/spi/spi-meson-spicc.c
> +++ b/drivers/spi/spi-meson-spicc.c
> @@ -291,6 +291,10 @@ static inline void meson_spicc_setup_burst(struct meson_spicc_device *spicc)
> static irqreturn_t meson_spicc_irq(int irq, void *data)
> {
> struct meson_spicc_device *spicc = (void *) data;
> + struct spi_device *spi_dev;
> +
> + spi_dev = spicc->message->spi;
> + gpiod_set_value(spi_dev->cs_gpiod, 0);
>
> writel_bits_relaxed(SPICC_TC, SPICC_TC, spicc->base + SPICC_STATREG);
>
> @@ -309,6 +313,8 @@ static irqreturn_t meson_spicc_irq(int irq, void *data)
> /* Setup burst */
> meson_spicc_setup_burst(spicc);
>
> + gpiod_set_value(spi_dev->cs_gpiod, 1);
> +
> /* Start burst */
> writel_bits_relaxed(SPICC_XCH, SPICC_XCH, spicc->base + SPICC_CONREG);
>
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2022-11-17 8:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 8:47 [PATCH 0/3] Fix SPICC and ILI9486 drivers Carlo Caione
2022-11-17 8:47 ` [PATCH 1/3] drm/tiny: rpi-lcd-35: Enable driver module autoloading Carlo Caione
2022-11-17 8:47 ` [PATCH 2/3] drm/tiny: ili9486: Do not assume 8-bit only SPI controllers Carlo Caione
2022-11-17 11:09 ` Mark Brown
2022-11-17 13:40 ` Carlo Caione
2022-11-17 14:59 ` Mark Brown
2022-11-18 10:36 ` Carlo Caione
2022-11-18 15:44 ` Mark Brown
2022-11-18 19:02 ` Carlo Caione
2022-11-17 8:47 ` [PATCH 3/3] spi: meson-spicc: Lower CS between bursts Carlo Caione
2022-11-17 8:54 ` Neil Armstrong [this message]
2022-11-17 14:05 ` Carlo Caione
2022-11-17 10:59 ` 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=098b923b-ff46-5ef5-9c21-19c974c9274f@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=airlied@gmail.com \
--cc=broonie@kernel.org \
--cc=ccaione@baylibre.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jbrunet@baylibre.com \
--cc=kamlesh.gurudasani@gmail.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.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
all inboxes | Powered by JetHome®