summaryrefslogtreecommitdiff
path: root/src/mainboard/system76/bonw14/gpio_early.c
diff options
context:
space:
mode:
authorJeremy Soller <jeremy@system76.com>2021-10-27 15:45:41 -0600
committerPatrick Georgi <pgeorgi@google.com>2021-11-02 20:48:29 +0000
commitfdaccd875da610954e3bc1136fad8a3c70ceae71 (patch)
treee6444aaeb61e51d84c6d52b979fddffb1e82f93f /src/mainboard/system76/bonw14/gpio_early.c
parentf74e42a542ab5a678b40a0e32d03f6a2449e45c9 (diff)
mb/system76/bonw14: Add System76 Bonobo Workstation 14
Change-Id: I55a827f8d6a5421c36f77049935630f4db4ba04d Signed-off-by: Jeremy Soller <jeremy@system76.com> Signed-off-by: Tim Crawford <tcrawford@system76.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49173 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/mainboard/system76/bonw14/gpio_early.c')
-rw-r--r--src/mainboard/system76/bonw14/gpio_early.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mainboard/system76/bonw14/gpio_early.c b/src/mainboard/system76/bonw14/gpio_early.c
new file mode 100644
index 0000000000..42bbe42467
--- /dev/null
+++ b/src/mainboard/system76/bonw14/gpio_early.c
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <mainboard/gpio.h>
+#include <soc/gpio.h>
+
+static const struct pad_config early_gpio_table[] = {
+ PAD_CFG_NF(GPP_C20, NONE, PLTRST, NF1), // UART2_RXD
+ PAD_CFG_NF(GPP_C21, NONE, PLTRST, NF1), // UART2_TXD
+ PAD_CFG_TERM_GPO(GPP_F22, 1, UP_20K, DEEP), // DGPU_RST#_PCH
+ PAD_CFG_TERM_GPO(GPP_K22, 0, UP_5K, DEEP), // GPU_PWR_EN#
+};
+
+void mainboard_configure_early_gpios(void)
+{
+ gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
+}