spi: Add helper functions for bit-banging
Sometimes when bringing up a new board it can take a while until you
have all the peripheral drivers ready. For those cases it is nice to be
able to bitbang certain protocols so that you can already get further in
the boot flow while those drivers are still being worked on. We already
have this support for I2C, but it would be nice to have something for
SPI as well, since without SPI you're not going to boot very far.
This patch adds a couple of helper functions that platforms can use to
implement bit-banging SPI with minimal effort. It also adds a proof of
concept implementation using the RK3399.
Signed-off-by: Julius Werner <firstname.lastname@example.org>
Tested-by: build bot (Jenkins) <email@example.com>
Reviewed-by: Aaron Durbin <firstname.lastname@example.org>
4 files changed