summaryrefslogtreecommitdiff
path: root/src/mainboard/google/volteer
diff options
context:
space:
mode:
authorHsuan-ting Chen <roccochen@google.com>2021-10-27 10:59:41 +0000
committerFelix Held <felix-coreboot@felixheld.de>2021-11-15 12:00:12 +0000
commit642508aa9c44daaad6963df76630d0271cf0930e (patch)
tree48fc09455e47c1e09566a73931c96f8a1a45707b /src/mainboard/google/volteer
parent436eac827aea4839169f2421006df42b8c5c379f (diff)
Reland "vboot_logic: Set VB2_CONTEXT_EC_TRUSTED in verstage_main"
This reverts commit adb393bdd6cd6734fa2672bd174aca4588a68016. This relands commit 6260bf712a836762b18d80082505e981e040f4bc. Reason for revert: The original CL did not handle some devices correctly. With the fixes: * commit 36721a4 (mb/google/brya: Add GPIO_IN_RW to all variants' early GPIO tables) * commit 3bfe46c (mb/google/guybrush: Add GPIO EC in RW to early GPIO tables) * commit 3a30cf9 (mb/google/guybrush: Build chromeos.c in verstage This CL also fix the following platforms: * Change to always trusted: cyan. * Add to early GPIO table: dedede, eve, fizz, glados, hatch, octopus, poppy, reef, volteer. * Add to both Makefile and early GPIO table: zork. For mb/intel: * adlrvp: Add support for get_ec_is_trusted(). * glkrvp: Add support for get_ec_is_trusted() with always trusted. * kblrvp: Add support for get_ec_is_trusted() with always trusted. * kunimitsu: Add support for get_ec_is_trusted() and initialize it as early GPIO. * shadowmountain: Add support for get_ec_is_trusted() and initialize it as early GPIO. * tglrvp: Add support for get_ec_is_trusted() with always trusted. For qemu-q35: Add support for get_ec_is_trusted() with always trusted. We could attempt another land. Change-Id: I66b8b99d6e6bf259b18573f9f6010f9254357bf9 Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58253 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard/google/volteer')
-rw-r--r--src/mainboard/google/volteer/chromeos.c6
-rw-r--r--src/mainboard/google/volteer/variants/baseboard/gpio.c3
-rw-r--r--src/mainboard/google/volteer/variants/collis/gpio.c3
-rw-r--r--src/mainboard/google/volteer/variants/copano/gpio.c3
-rw-r--r--src/mainboard/google/volteer/variants/halvor/gpio.c3
-rw-r--r--src/mainboard/google/volteer/variants/terrador/gpio.c3
-rw-r--r--src/mainboard/google/volteer/variants/todor/gpio.c3
-rw-r--r--src/mainboard/google/volteer/variants/voema/gpio.c3
8 files changed, 27 insertions, 0 deletions
diff --git a/src/mainboard/google/volteer/chromeos.c b/src/mainboard/google/volteer/chromeos.c
index 20469d6297..9b8e2f5296 100644
--- a/src/mainboard/google/volteer/chromeos.c
+++ b/src/mainboard/google/volteer/chromeos.c
@@ -34,3 +34,9 @@ void mainboard_chromeos_acpi_generate(void)
gpios = variant_cros_gpios(&num);
chromeos_acpi_gpio_generate(gpios, num);
}
+
+int get_ec_is_trusted(void)
+{
+ /* EC is trusted if not in RW. */
+ return !gpio_get(GPIO_EC_IN_RW);
+}
diff --git a/src/mainboard/google/volteer/variants/baseboard/gpio.c b/src/mainboard/google/volteer/variants/baseboard/gpio.c
index ac8c5c2706..05c757ce97 100644
--- a/src/mainboard/google/volteer/variants/baseboard/gpio.c
+++ b/src/mainboard/google/volteer/variants/baseboard/gpio.c
@@ -432,6 +432,9 @@ static const struct pad_config early_gpio_table[] = {
/* F11 : THC1_SPI2_CLK ==> EN_PP3300_WWAN */
PAD_CFG_GPO(GPP_F11, 1, DEEP),
+
+ /* A9 : I2S2_TXD ==> EC_IN_RW_OD */
+ PAD_CFG_GPI(GPP_A9, NONE, DEEP),
};
const struct pad_config *__weak variant_base_gpio_table(size_t *num)
diff --git a/src/mainboard/google/volteer/variants/collis/gpio.c b/src/mainboard/google/volteer/variants/collis/gpio.c
index 03bd91ef48..86919b90a2 100644
--- a/src/mainboard/google/volteer/variants/collis/gpio.c
+++ b/src/mainboard/google/volteer/variants/collis/gpio.c
@@ -204,6 +204,9 @@ static const struct pad_config early_gpio_table[] = {
/* E12 : SPI1_MISO_IO1 ==> PEN_ALERT_ODL */
PAD_CFG_GPI(GPP_E12, NONE, DEEP),
+
+ /* F17 : WWAN_RF_DISABLE_ODL ==> EC_IN_RW_OD */
+ PAD_CFG_GPI(GPP_F17, NONE, DEEP),
};
const struct pad_config *variant_early_gpio_table(size_t *num)
diff --git a/src/mainboard/google/volteer/variants/copano/gpio.c b/src/mainboard/google/volteer/variants/copano/gpio.c
index bec58e53e2..933aebb938 100644
--- a/src/mainboard/google/volteer/variants/copano/gpio.c
+++ b/src/mainboard/google/volteer/variants/copano/gpio.c
@@ -220,6 +220,9 @@ static const struct pad_config early_gpio_table[] = {
/* E12 : SPI1_MISO_IO1 ==> PEN_ALERT_ODL */
PAD_CFG_GPI(GPP_E12, NONE, DEEP),
+
+ /* F17 : WWAN_RF_DISABLE_ODL ==> EC_IN_RW_OD */
+ PAD_CFG_GPI(GPP_F17, NONE, DEEP),
};
const struct pad_config *variant_early_gpio_table(size_t *num)
diff --git a/src/mainboard/google/volteer/variants/halvor/gpio.c b/src/mainboard/google/volteer/variants/halvor/gpio.c
index 7d6725a95b..994df04452 100644
--- a/src/mainboard/google/volteer/variants/halvor/gpio.c
+++ b/src/mainboard/google/volteer/variants/halvor/gpio.c
@@ -233,6 +233,9 @@ static const struct pad_config early_gpio_table[] = {
/* D16 : ISH_UART0_CTS# ==> EN_PP3300_SD */
PAD_CFG_GPO(GPP_D16, 1, DEEP),
+ /* F17 : WWAN_RF_DISABLE_ODL ==> EC_IN_RW_OD */
+ PAD_CFG_GPI(GPP_F17, NONE, DEEP),
+
/* H11 : SRCCLKREQ5# ==> WLAN_PERST_L */
PAD_CFG_GPO(GPP_H11, 1, DEEP),
};
diff --git a/src/mainboard/google/volteer/variants/terrador/gpio.c b/src/mainboard/google/volteer/variants/terrador/gpio.c
index 69760c13ff..0febca898f 100644
--- a/src/mainboard/google/volteer/variants/terrador/gpio.c
+++ b/src/mainboard/google/volteer/variants/terrador/gpio.c
@@ -221,6 +221,9 @@ static const struct pad_config early_gpio_table[] = {
/* E12 : SPI1_MISO_IO1 ==> PEN_ALERT_ODL */
PAD_CFG_GPI(GPP_E12, NONE, DEEP),
+
+ /* F17 : WWAN_RF_DISABLE_ODL ==> EC_IN_RW_OD */
+ PAD_CFG_GPI(GPP_F17, NONE, DEEP),
};
const struct pad_config *variant_early_gpio_table(size_t *num)
diff --git a/src/mainboard/google/volteer/variants/todor/gpio.c b/src/mainboard/google/volteer/variants/todor/gpio.c
index 5611ccabae..e699027320 100644
--- a/src/mainboard/google/volteer/variants/todor/gpio.c
+++ b/src/mainboard/google/volteer/variants/todor/gpio.c
@@ -231,6 +231,9 @@ static const struct pad_config early_gpio_table[] = {
/* E12 : SPI1_MISO_IO1 ==> PEN_ALERT_ODL */
PAD_CFG_GPI(GPP_E12, NONE, DEEP),
+
+ /* F17 : WWAN_RF_DISABLE_ODL ==> EC_IN_RW_OD */
+ PAD_CFG_GPI(GPP_F17, NONE, DEEP),
};
const struct pad_config *variant_early_gpio_table(size_t *num)
diff --git a/src/mainboard/google/volteer/variants/voema/gpio.c b/src/mainboard/google/volteer/variants/voema/gpio.c
index 70b7f52340..4f3f799cff 100644
--- a/src/mainboard/google/volteer/variants/voema/gpio.c
+++ b/src/mainboard/google/volteer/variants/voema/gpio.c
@@ -219,6 +219,9 @@ static const struct pad_config early_gpio_table[] = {
/* E12 : SPI1_MISO_IO1 ==> PEN_ALERT_ODL */
PAD_CFG_GPI(GPP_E12, NONE, DEEP),
+
+ /* F17 : WWAN_RF_DISABLE_ODL ==> EC_IN_RW_OD */
+ PAD_CFG_GPI(GPP_F17, NONE, DEEP),
};
const struct pad_config *variant_early_gpio_table(size_t *num)