summaryrefslogtreecommitdiff
path: root/board/glados_pd
diff options
context:
space:
mode:
Diffstat (limited to 'board/glados_pd')
-rw-r--r--board/glados_pd/board.c1
-rw-r--r--board/glados_pd/board.h6
-rw-r--r--board/glados_pd/gpio.inc16
3 files changed, 22 insertions, 1 deletions
diff --git a/board/glados_pd/board.c b/board/glados_pd/board.c
index f03af33041..230cc1ea2d 100644
--- a/board/glados_pd/board.c
+++ b/board/glados_pd/board.c
@@ -14,6 +14,7 @@
#include "host_command.h"
#include "i2c.h"
#include "registers.h"
+#include "switch.h"
#include "system.h"
#include "task.h"
#include "usb_pd.h"
diff --git a/board/glados_pd/board.h b/board/glados_pd/board.h
index b576a257e9..d4924b189b 100644
--- a/board/glados_pd/board.h
+++ b/board/glados_pd/board.h
@@ -69,6 +69,12 @@
#define CONFIG_WATCHDOG
#undef CONFIG_WATCHDOG_HELP
+/*
+ * TODO(crosbug.com/p/50519): Remove CONFIG_SYSTEM_UNLOCKED prior to building
+ * MP FW.
+ */
+#define CONFIG_SYSTEM_UNLOCKED
+
#ifdef HAS_TASK_CONSOLE
#undef CONFIG_CONSOLE_HISTORY
#define CONFIG_CONSOLE_HISTORY 2
diff --git a/board/glados_pd/gpio.inc b/board/glados_pd/gpio.inc
index df0020e958..083085d094 100644
--- a/board/glados_pd/gpio.inc
+++ b/board/glados_pd/gpio.inc
@@ -12,6 +12,21 @@
GPIO_INT(USB_C0_VBUS_WAKE_L, PIN(C, 14), GPIO_INT_BOTH, pd_vbus_evt_p0)
GPIO_INT(USB_C1_VBUS_WAKE_L, PIN(C, 15), GPIO_INT_BOTH, pd_vbus_evt_p1)
+/*
+ * Older boards have A13 connected to a test point with no PU / PD, so we must
+ * enable an internal PU.
+ * Newer boards have A13 connected to 3.3V / GND through a 100K resistor, so
+ * we must not enable an internal PU. All MP boards will use the newer config.
+ * TODO(crosbug.com/p/50518): Remove CONFIG_SYSTEM_UNLOCKED prior to building
+ * MP FW.
+ */
+#ifdef CONFIG_SYSTEM_UNLOCKED
+GPIO_INT(WP_L, PIN(A, 13), GPIO_INT_BOTH | GPIO_PULL_UP,
+ switch_interrupt)
+#else
+GPIO_INT(WP_L, PIN(A, 13), GPIO_INT_BOTH, switch_interrupt)
+#endif
+
/* PD RX/TX */
GPIO(USB_C0_CC1_PD, PIN(A, 2), GPIO_ANALOG)
GPIO(USB_C_REF, PIN(A, 1), GPIO_ANALOG)
@@ -51,7 +66,6 @@ GPIO(EC_INT, PIN(B, 5), GPIO_OUT_HIGH)
GPIO(EC_INT, PIN(A, 14), GPIO_ODR_HIGH)
#endif
-UNIMPLEMENTED(WP_L)
UNIMPLEMENTED(ENTERING_RW)
#if 0