Aspeed SPI driver upstreaming

Patrick Williams patrick at stwcx.xyz
Sat May 21 07:10:51 AEST 2022


On Mon, May 16, 2022 at 02:18:24PM -0400, Brad Bishop wrote:
> Hi Patrick
> 
> On Thu, Jan 09, 2020 at 10:43:17AM -0600, Patrick Williams wrote:
> >It looks like this patch set is still the MTD-only implementation, which
> >is useful for SPI-NOR chips but not useful for non-flash devices such as
> >TPMs.  Is there any work or thought into how we could do a generic SPI
> >controller and then layer the MTD above it?
> 
> I wonder if it is "just" a matter of implementing one of the low level 
> controller methods described here:
> https://www.kernel.org/doc/html/latest/spi/spi-summary.html?highlight=spi#spi-master-methods
> along side the spi-mem callbacks...

I don't know the details here.  There was some dispute between the MTD
maintainers and work that others were doing in this area that has made
it difficult for us to get additional patches in until someone refactors
the Aspeed driver how upstream wants.  (last I was aware)

> >We have some system designs where we have both a NOR device and a TPM on
> >the same SPI bus.  What we're currently doing is using the
> >(non-upstream) aspeed-spi driver which lets us use both the TPM and
> >MTD/SPI-NOR driver, but since it doesn't have the calibration routines
> >the SPI-NOR runs at a slower speed than optimal.
> 
> Are you still using the aspeed-spi driver?  Have you had any issues with 
> using it?

I am not using the aspeed-spi driver in these conditions.  After
initially setting this up we did some testing with the TPM driver and
realized that it wasn't working.  It turns out that the Aspeed hardware
is incapable of bi-directional transactions (bytes going out MOSI and in
MISO at the same time), which is required by the TCG TPM protocol.
We've ended up having to use the GPIO-SPI bitbang driver for talking
with SPI-based TPMs.

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220520/6972fb4b/attachment.sig>


More information about the openbmc mailing list