summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_common.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2020-06-18 12:36:21 -0700
committerFurquan Shaikh <furquan@google.com>2020-06-25 07:59:23 +0000
commit39a6145e4123ee3ca6e9c1dab70a546d955d962b (patch)
tree9a230a256f245d9a5a4667a5fb7a6ab0d5ea513b /src/mainboard/google/zork/variants/baseboard/gpio_baseboard_common.c
parent28da35417bcde79edbf826fef7d02bbfe5c714cf (diff)
downloadcoreboot-39a6145e4123ee3ca6e9c1dab70a546d955d962b.tar.gz
coreboot-39a6145e4123ee3ca6e9c1dab70a546d955d962b.tar.bz2
coreboot-39a6145e4123ee3ca6e9c1dab70a546d955d962b.zip
mb/google/zork: Move variant_early_gpio_table to gpio_baseboard_common.c
This change moves the GPIOs that need to be configured for early access in coreboot to early_gpio_table[] in gpio_baseboard_common.c. These GPIOs include: * Pads to talk to EC * Pads to talk to TPM * Pads to talk to serial console These should be configured in the first stage that runs coreboot i.e. in case of VBOOT_STARTS_BEFORE_BOOTBLOCK, it should be done as part of verstage (which starts on PSP), else it should be done as part of bootblock (which is the first stage that runs on x86). This change drops GPIO_137 from early_gpio_table since that is not really required in early stages. BUG=b:154351731 TEST=Verified that trembyle still boots. Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: Ifbdbb02cbfc65ddb68f0ae75cf4b1f2ea1656b91 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2252709 Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42719 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/mainboard/google/zork/variants/baseboard/gpio_baseboard_common.c')
-rw-r--r--src/mainboard/google/zork/variants/baseboard/gpio_baseboard_common.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_common.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_common.c
new file mode 100644
index 000000000000..e903700d0f63
--- /dev/null
+++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_common.c
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/variants.h>
+#include <soc/gpio.h>
+#include <stdlib.h>
+#include <boardid.h>
+#include <variant/gpio.h>
+
+static const struct soc_amd_gpio early_gpio_table[] = {
+ /* H1_FCH_INT_ODL */
+ PAD_INT(GPIO_3, PULL_UP, EDGE_LOW, STATUS),
+ /* I2C3_SCL - H1 */
+ PAD_NF(GPIO_19, I2C3_SCL, PULL_UP),
+ /* I2C3_SDA - H1 */
+ PAD_NF(GPIO_20, I2C3_SDA, PULL_UP),
+ /* FCH_ESPI_EC_CS_L */
+ PAD_NF(GPIO_30, ESPI_CS_L, PULL_NONE),
+ /* ESPI_ALERT_L (may be unused) */
+ PAD_NF(GPIO_108, ESPI_ALERT_L, PULL_UP),
+ /* UART0_RXD - DEBUG */
+ PAD_NF(GPIO_136, UART0_RXD, PULL_NONE),
+ /* UART0_TXD - DEBUG */
+ PAD_NF(GPIO_138, UART0_TXD, PULL_NONE),
+};
+
+const __weak struct soc_amd_gpio *variant_early_gpio_table(size_t *size)
+{
+ *size = ARRAY_SIZE(early_gpio_table);
+ return early_gpio_table;
+}