From 4b3047833f9bce984e2710b98be5100f684cc337 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Fri, 16 Aug 2019 13:38:32 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/33165 Tested-by: build bot (Jenkins) Reviewed-by: Hung-Te Lin Reviewed-by: Julius Werner --- src/soc/mediatek/common/include/soc/spi_common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/soc/mediatek/common/include') 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 #include 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; -- cgit v1.2.3