summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/guybrush/Kconfig16
-rw-r--r--src/mainboard/google/guybrush/Makefile.inc1
-rw-r--r--src/mainboard/google/guybrush/chromeos.c9
3 files changed, 26 insertions, 0 deletions
diff --git a/src/mainboard/google/guybrush/Kconfig b/src/mainboard/google/guybrush/Kconfig
index c259d25fb5..e5f138258f 100644
--- a/src/mainboard/google/guybrush/Kconfig
+++ b/src/mainboard/google/guybrush/Kconfig
@@ -111,6 +111,22 @@ config NORMAL_READ_SPI_SPEED
config ALT_SPI_SPEED
default 0 # 66MHz
+config OVERRIDE_EFS_SPI_SPEED
+ int
+ default 3 if EM100
+ default 4 # 100MHz
+ help
+ Override EFS SPI Speed Configuration to be applied based on certain
+ board version.
+
+config OVERRIDE_EFS_SPI_SPEED_MIN_BOARD
+ hex
+ default 0x4 if BOARD_GOOGLE_GUYBRUSH
+ default 0xffffffff
+ help
+ Minimum board version starting which the Override EFS SPI Speed
+ configuration has to be applied.
+
endif # !EM100
config VARIANT_DIR
diff --git a/src/mainboard/google/guybrush/Makefile.inc b/src/mainboard/google/guybrush/Makefile.inc
index f3140ddbdb..6bc3288276 100644
--- a/src/mainboard/google/guybrush/Makefile.inc
+++ b/src/mainboard/google/guybrush/Makefile.inc
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
bootblock-y += bootblock.c
+bootblock-$(CONFIG_CHROMEOS) += chromeos.c
ifneq ($(wildcard $(MAINBOARD_BLOBS_DIR)/APCB_CZN_D4.bin),)
$(info APCB sources present.)
diff --git a/src/mainboard/google/guybrush/chromeos.c b/src/mainboard/google/guybrush/chromeos.c
index c1621d917e..a43b3032bb 100644
--- a/src/mainboard/google/guybrush/chromeos.c
+++ b/src/mainboard/google/guybrush/chromeos.c
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include <amdblocks/spi.h>
#include <baseboard/gpio.h>
#include <boardid.h>
#include <boot/coreboot_tables.h>
@@ -36,3 +37,11 @@ int get_ec_is_trusted(void)
/* EC is trusted if not in RW. */
return !gpio_get(GPIO_EC_IN_RW);
}
+
+void mainboard_spi_fast_speed_override(uint8_t *fast_speed)
+{
+ uint32_t board_ver = board_id();
+
+ if (board_ver >= CONFIG_OVERRIDE_EFS_SPI_SPEED_MIN_BOARD)
+ *fast_speed = CONFIG_OVERRIDE_EFS_SPI_SPEED;
+}