Attention is currently required from: Jason Glenesk, Marshall Dawson, Fred Reitberger, Felix Held. Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63095 )
Change subject: soc/amd/sabrina: Add espi_switch_to_spi2_pads ......................................................................
soc/amd/sabrina: Add espi_switch_to_spi2_pads
The way to select the pads has changed from Cezanne. We don't have a public PPR for these definitions yet, so I hard coded the values.
BUG=b:226635441 TEST=Build skyrim
Signed-off-by: Raul E Rangel rrangel@chromium.org Change-Id: I96baf6b9c169ed61d221352b29ac676bca40da21 --- M src/soc/amd/sabrina/Makefile.inc A src/soc/amd/sabrina/espi_util.c A src/soc/amd/sabrina/include/soc/espi.h 3 files changed, 23 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/63095/1
diff --git a/src/soc/amd/sabrina/Makefile.inc b/src/soc/amd/sabrina/Makefile.inc index 74124d2..99abda8 100644 --- a/src/soc/amd/sabrina/Makefile.inc +++ b/src/soc/amd/sabrina/Makefile.inc @@ -12,6 +12,7 @@
bootblock-y += bootblock.c bootblock-y += early_fch.c +bootblock-y += espi_util.c bootblock-y += gpio.c bootblock-y += i2c.c bootblock-y += reset.c diff --git a/src/soc/amd/sabrina/espi_util.c b/src/soc/amd/sabrina/espi_util.c new file mode 100644 index 0000000..993fc10 --- /dev/null +++ b/src/soc/amd/sabrina/espi_util.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <amdblocks/spi.h> +#include <soc/espi.h> +#include <types.h> + +void espi_switch_to_spi2_pads(void) +{ + uint8_t reg = spi_read8(0x10); + + reg |= BIT(2); + + spi_write8(0x10, reg); +} diff --git a/src/soc/amd/sabrina/include/soc/espi.h b/src/soc/amd/sabrina/include/soc/espi.h new file mode 100644 index 0000000..d7de153 --- /dev/null +++ b/src/soc/amd/sabrina/include/soc/espi.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef AMD_SABRINA_ESPI_H +#define AMD_SABRINA_ESPI_H + +void espi_switch_to_spi2_pads(void); + +#endif /* AMD_SABRINA_ESPI_H */