diff options
author | Yu-Ping Wu <yupingso@google.com> | 2019-08-16 13:38:32 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-08-21 09:27:39 +0000 |
commit | 4b3047833f9bce984e2710b98be5100f684cc337 (patch) | |
tree | fc8f38d2196f0233f2274a5147a2072a588a3dfd /src/soc/mediatek/common/include | |
parent | 7fc006f7452ff944184e2091d670a647b96f9aac (diff) |
mediatek: Use GPIO based SPI CS
Some boards (e.g., Kukui) need GPIO based CS for SPI0. This patch
changes the pinmux and binds the pins to the correponding SPIs.
When using GPIO based SPI CS, we need to manually make CS log/high
before/after SPI transactions.
BUG=b:132311067
BRANCH=none
TEST=Verified that b/132311067 is irreproducible
Change-Id: I61653fb19242b6ee6be9a45545a8b66e5c9c7cad
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33165
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/soc/mediatek/common/include')
-rw-r--r-- | src/soc/mediatek/common/include/soc/spi_common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/soc/mediatek/common/include/soc/spi_common.h b/src/soc/mediatek/common/include/soc/spi_common.h index 81a9098180..1ecb94dab0 100644 --- a/src/soc/mediatek/common/include/soc/spi_common.h +++ b/src/soc/mediatek/common/include/soc/spi_common.h @@ -16,6 +16,7 @@ #ifndef MTK_COMMON_SPI_H #define MTK_COMMON_SPI_H +#include <soc/gpio_base.h> #include <spi-generic.h> enum { @@ -77,6 +78,7 @@ struct mtk_spi_bus { struct mtk_spi_regs *regs; int initialized; int state; + gpio_t cs_gpio; }; extern const struct spi_ctrlr spi_ctrlr; |