AST2600: Linux driver support for SPI controller
patrick at stwcx.xyz
Tue Jul 20 04:38:57 AEST 2021
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the openbmc