Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63307 )
Change subject: soc/amd/common/block/spi: Disable SPI Clock Pulldown ......................................................................
soc/amd/common/block/spi: Disable SPI Clock Pulldown
SPI Clock pulldown is enabled by default. When the bus is idle, this causes the clock signal to be pulled down to 1.3V. Disable the SPI Clock pulldown so that it is parked correctly at idle state.
BUG=b:226634752 TEST=Build and boot to OS in Skyrim. Ensure that the SPI clock pulldown is disabled.
Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com Change-Id: If62a1f51ac3d68e7896baac3c696c4f73d900f6d --- M src/soc/amd/common/block/include/amdblocks/acpimmio.h M src/soc/amd/common/block/spi/fch_spi.c 2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/63307/1
diff --git a/src/soc/amd/common/block/include/amdblocks/acpimmio.h b/src/soc/amd/common/block/include/amdblocks/acpimmio.h index 2d632f6..6694e80 100644 --- a/src/soc/amd/common/block/include/amdblocks/acpimmio.h +++ b/src/soc/amd/common/block/include/amdblocks/acpimmio.h @@ -32,6 +32,8 @@ #define SLPTYPE_CONTROL_EN (1 << 5) #define KBRSTEN (1 << 4) #define PM_RST_STATUS 0xc0 +#define PM_SPI_PAD_PUPD 0x90 +#define PM_SPI_CLK_PD_EN (1 << 11)
/* * Earlier devices enable the ACPIMMIO bank decodes in PMx24. All discrete FCHs diff --git a/src/soc/amd/common/block/spi/fch_spi.c b/src/soc/amd/common/block/spi/fch_spi.c index 5ef900c..a3a721a 100644 --- a/src/soc/amd/common/block/spi/fch_spi.c +++ b/src/soc/amd/common/block/spi/fch_spi.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <amdblocks/acpimmio.h> #include <amdblocks/chip.h> #include <amdblocks/lpc.h> #include <amdblocks/psp_efs.h> @@ -125,4 +126,9 @@ lpc_enable_spi_prefetch(); fch_spi_configure_4dw_burst(); fch_spi_config_modes(); + /* + * SPI Clock Pulldown is enabled by default. Disable SPI Clock Pulldown so that + * the clock signal is parked correctly at idle state. + */ + pm_write32(PM_SPI_PAD_PUPD, pm_read32(PM_SPI_PAD_PUPD) & ~PM_SPI_CLK_PD_EN); }