archive mirror
 help / color / mirror / Atom feed
From: Patrick Williams <>
Subject: Re: AST2600: Linux driver support for SPI controller
Date: Mon, 19 Jul 2021 13:38:57 -0500	[thread overview]
Message-ID: <YPXGwaOaCiE0I04a@heinlein> (raw)
In-Reply-To: <>

[-- Attachment #1: Type: text/plain, Size: 1561 bytes --]

On Mon, Jul 19, 2021 at 06:32:34PM +0530, VINOTHKUMAR RK wrote:
> This is regarding SPI controller driver support in OpenBMC.
> Here is the scenario: Three devices connected *over same SPI controller* as
> mentioned below:
> Firmware SPI Memory Controller (BSPI): (0x1E620000):
>     - Flash 0 (CS0)
>     - Flash 1 (CS1)
>     - MCU/CPLD (CS2)

I would strongly recommend splitting your hardware design so that the MCU/CPLD
is on another SPI bus.  The aspeed-smc driver doesn't currently support using it
for other devices and I think it would be fairly difficult to do so.  There are
patches available for using the other two SPI engines if they are not already
upstream though and those patches use the more generic SPI subsystem.

The AST2xxx hardware is fairly limited in SPI traffic though, so you will need
to analyze your MCU/CPLD protocol and determine if the hardware can even deal
with your protocol.  There is a single byte FIFO and the hardware only allows a
read *or* write byte per 8 clock cycle.  Thus, even though SPI is a
bi-directional bus, the hardware available in the AST2xxx doesn't allow it.

> Do we've any other driver support or a solution to handle all the three
> devices? Any help/suggestions would be appreciated.

We have had a few devices where this was not sufficient for the protocol that
those devices exposed and we had to revert to using the spi-gpio driver.  This
is another reason why it is much easier if you split that hardware off from your
BMC's flash device.

Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2021-07-19 18:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 13:02 AST2600: Linux driver support for SPI controller VINOTHKUMAR RK
2021-07-19 16:32 ` Milton Miller II
2021-07-19 18:38 ` Patrick Williams [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:

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

  git send-email \
    --in-reply-to=YPXGwaOaCiE0I04a@heinlein \ \ \ \

* 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).