From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: "Klotz, Oliver" <Oliver.Klotz@knorr-bremse.com>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>,
"barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: SPI NOR w25q128 "flash operation timed out"
Date: Thu, 9 Mar 2023 20:52:52 +0300 [thread overview]
Message-ID: <CAP1tNvRu6qFrbRhJ3Wyam3hG7hgxxd19OQ+hN=T+huog4SOhLg@mail.gmail.com> (raw)
In-Reply-To: <VI1PR04MB5007DBB5A110F7B04EC03BB6BFB59@VI1PR04MB5007.eurprd04.prod.outlook.com>
Hello.
чт, 9 мар. 2023 г. в 20:39, Klotz, Oliver <Oliver.Klotz@knorr-bremse.com>:
>
> Hello Ahmad,
>
> while doing the bisecting it turned out, that the issue with w25q128 is not related to a specific Barebox version
> but to 2nd chip select of the SPI bus.
>
> In older products we are using Barebox-2016.07.0 and there is just the SPI NOR as single SPI slave (spi0_cs0).
> In the pinmux only spi0_cs0 is multiplexed. And this binary works fine on SOM with n25q128a13 as well as w25q128.
>
> In newer products we are using Barebox-2021.07.0 and there we have a TPM (spi0_cs1) as 2nd SPI slave.
> Since Barebox doesn´t support TPM I have removed the TPM slave node from spi0, but sp0_cs1 is still pinmuxed.
> This is just because I reuse pinmux section from the Linux dts.
>
> Whenever sp0_cs1 is pinmuxed I observe timeouts with w25q128.
> Strange thing here is that exactly the same binary works without issues on SOM with n25q128a13.
>
> Also in the Linux dts the spi0_cs1 doesn´t cause any issue and TPM as well as w25q128 are working perfectly fine.
>
> So removing the spi0_cs1 from the Barebox dts fixes my issue - please refer to dts below.
>
> Although I have a working solution I would appreciate your thoughts on this.
>
> Best regards,
> Oliver
>
>
> spi0_pins_default: spi0_pins_default {
> pinctrl-single,pins = <
> AM33XX_IOPAD(0x950, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (A17) spi0_sclk.spi0_sclk */
> AM33XX_IOPAD(0x954, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B17) spi0_d0.spi0_d0 */
> AM33XX_IOPAD(0x958, PIN_INPUT_PULLDOWN | MUX_MODE0) /* (B16) spi0_d1.spi0_d1 */
> AM33XX_IOPAD(0x95c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* (A16) spi0_cs0.spi0_cs0 */
> #if 0
> /* Do not mux spi0_cs1 which is for TPM, but causes timeouts to Winbond w25q128 SPI flash. */
> AM33XX_IOPAD(0x960, PIN_OUTPUT_PULLUP | MUX_MODE0) /* (C15) spi0_cs1.spi0_cs1 */
> #endif
> >;
> };
...
A click on the SCLK on the chipselect switch may have an effect.
Try this:
AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE0)
AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE0)
AM33XX_IOPAD(0x958, PIN_INPUT | MUX_MODE0)
AM33XX_IOPAD(0x95c, PIN_OUTPUT_PULLUP | MUX_MODE0)
prev parent reply other threads:[~2023-03-09 17:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 8:22 Klotz, Oliver
2023-02-17 8:58 ` Ahmad Fatoum
2023-03-09 17:37 ` Klotz, Oliver
2023-03-09 17:52 ` Alexander Shiyan [this message]
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='CAP1tNvRu6qFrbRhJ3Wyam3hG7hgxxd19OQ+hN=T+huog4SOhLg@mail.gmail.com' \
--to=eagle.alexander923@gmail.com \
--cc=Oliver.Klotz@knorr-bremse.com \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox