summaryrefslogtreecommitdiff
path: root/board/marzipan/usbc_config.c
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2021-03-23 10:08:00 +0800
committerCommit Bot <commit-bot@chromium.org>2021-03-23 23:17:38 +0000
commit854c16c9bdcb285b1258e1a88a29737f8f8d603a (patch)
tree3fe52bce4666bfeffc21fac9a6574c827b277c61 /board/marzipan/usbc_config.c
parentf8f4e0c36a674963c725f8876728d23ece8cc3ff (diff)
downloadchrome-ec-854c16c9bdcb285b1258e1a88a29737f8f8d603a.tar.gz
marzipan: Initial EC image
Create the initial EC image for the marzipan variant by copying the lazor reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.5.0). BUG=b:182018606 BRANCH=firmware-trogdor-13577.B-master TEST=make BOARD=marzipan Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I8d15d2de1d104d85c12b86a7f2137d17bf2f2bdd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2780455 Reviewed-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'board/marzipan/usbc_config.c')
-rw-r--r--board/marzipan/usbc_config.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/board/marzipan/usbc_config.c b/board/marzipan/usbc_config.c
new file mode 100644
index 0000000000..3704a94197
--- /dev/null
+++ b/board/marzipan/usbc_config.c
@@ -0,0 +1,28 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Marzipan board-specific USB-C configuration */
+
+#include "usb_pd.h"
+#include "usbc_config.h"
+
+/* GPIO Interrupt Handlers */
+void tcpc_alert_event(enum gpio_signal signal)
+{
+ int port = -1;
+
+ switch (signal) {
+ case GPIO_USB_C0_PD_INT_ODL:
+ port = 0;
+ break;
+ case GPIO_USB_C1_PD_INT_ODL:
+ port = 1;
+ break;
+ default:
+ return;
+ }
+
+ schedule_deferred_pd_interrupt(port);
+}