summaryrefslogtreecommitdiff
path: root/board/glados_pd
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-11-02 10:51:56 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-11-04 07:08:35 -0800
commit4f090ad68e76f2df0bf688942e39b30ba2312459 (patch)
treedcca7dc0f8a1a5afb443a17f9b4cb3a53d7e6cf9 /board/glados_pd
parente8b998f2cc938d5982f15e23fb35c1c92410c3c2 (diff)
downloadchrome-ec-4f090ad68e76f2df0bf688942e39b30ba2312459.tar.gz
oak_pd: change oak_pd to be a sym link to glados_pd
Make oak_pd a sym link to glados_pd. A few small changes necessary to make this possible: - glados_pd now sets the VBUS present power status bit as oak_pd does and as is appropriate for TCPCI spec. - oak_pd now has watchdog enabled (not sure why it was previously disabled). - add a flag in gpio.inc to define EC_INT pin on B5 for oak_pd and A14 for glaods_pd (and all other boards pointing to glados_pd). Note: this breaks oak board rev 1, where EC_INT was on A14. BUG=none BRANCH=none TEST=make -j buildall Load on glados and make sure zinger works. Change-Id: I28f4ee106e44e2819919f1826508fc1fc05bb2a1 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/310193
Diffstat (limited to 'board/glados_pd')
-rw-r--r--board/glados_pd/board.c11
-rw-r--r--board/glados_pd/board.h3
-rw-r--r--board/glados_pd/gpio.inc20
3 files changed, 15 insertions, 19 deletions
diff --git a/board/glados_pd/board.c b/board/glados_pd/board.c
index 791d29a097..f03af33041 100644
--- a/board/glados_pd/board.c
+++ b/board/glados_pd/board.c
@@ -17,6 +17,7 @@
#include "system.h"
#include "task.h"
#include "usb_pd.h"
+#include "usb_pd_tcpc.h"
#include "util.h"
#define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ## args)
@@ -32,16 +33,6 @@ void pd_send_ec_int(void)
gpio_set_level(GPIO_EC_INT, !ec_int_status);
}
-void vbus0_evt(enum gpio_signal signal)
-{
- task_wake(TASK_ID_PD_C0);
-}
-
-void vbus1_evt(enum gpio_signal signal)
-{
- task_wake(TASK_ID_PD_C1);
-}
-
void board_config_pre_init(void)
{
/* enable SYSCFG clock */
diff --git a/board/glados_pd/board.h b/board/glados_pd/board.h
index e87ef45e82..b576a257e9 100644
--- a/board/glados_pd/board.h
+++ b/board/glados_pd/board.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* gladoes_pd board configuration */
+/* glados_pd board configuration */
#ifndef __CROS_EC_BOARD_H
#define __CROS_EC_BOARD_H
@@ -63,6 +63,7 @@
#define CONFIG_USB_PD_INTERNAL_COMP
#define CONFIG_USB_PD_PORT_COUNT 2
#define CONFIG_USB_PD_TCPC
+#define CONFIG_USB_PD_TCPM_VBUS
#define CONFIG_USBC_VCONN
#define CONFIG_VBOOT_HASH
#define CONFIG_WATCHDOG
diff --git a/board/glados_pd/gpio.inc b/board/glados_pd/gpio.inc
index 67f52124d6..689b37d052 100644
--- a/board/glados_pd/gpio.inc
+++ b/board/glados_pd/gpio.inc
@@ -6,8 +6,8 @@
*/
/* Interrupts */
-GPIO_INT(USB_C0_VBUS_WAKE_L, PIN(C, 14), GPIO_INT_BOTH, vbus0_evt)
-GPIO_INT(USB_C1_VBUS_WAKE_L, PIN(C, 15), GPIO_INT_BOTH, vbus1_evt)
+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)
/* PD RX/TX */
GPIO(USB_C0_CC1_PD, PIN(A, 2), GPIO_ANALOG)
@@ -22,11 +22,11 @@ GPIO(USB_C1_CC2_TX_SEL, PIN(B, 0), GPIO_OUT_LOW) /* C1_CC2_TX_SEL */
GPIO(USB_C0_CC2_TX_DATA, PIN(A, 6), GPIO_INPUT)
GPIO(USB_PD_VBUS_WAKE, PIN(C, 13), GPIO_INPUT)
-GPIO(PP3300_USB_PD_EN, PIN(A, 15), GPIO_OUT_HIGH)
-GPIO(USB_C0_CC1_VCONN1_EN, PIN(B, 1), GPIO_OUT_LOW)
-GPIO(USB_C0_CC2_VCONN1_EN, PIN(B, 2), GPIO_OUT_LOW)
-GPIO(USB_C1_CC1_VCONN1_EN, PIN(B, 9), GPIO_OUT_LOW)
-GPIO(USB_C1_CC2_VCONN1_EN, PIN(F, 0), GPIO_OUT_LOW)
+GPIO(PP3300_USB_PD_EN, PIN(A, 15), GPIO_OUT_HIGH)
+GPIO(USB_C0_CC1_VCONN1_EN, PIN(B, 1), GPIO_OUT_LOW)
+GPIO(USB_C0_CC2_VCONN1_EN, PIN(B, 2), GPIO_OUT_LOW)
+GPIO(USB_C1_CC1_VCONN1_EN, PIN(B, 9), GPIO_OUT_LOW)
+GPIO(USB_C1_CC2_VCONN1_EN, PIN(F, 0), GPIO_OUT_LOW)
GPIO(USB_C0_HOST_HIGH, PIN(A, 3), GPIO_OUT_LOW)
GPIO(USB_C1_HOST_HIGH, PIN(A, 7), GPIO_OUT_LOW)
@@ -42,8 +42,12 @@ GPIO(USB_C1_CC2_ODL, PIN(A, 8), GPIO_ODR_LOW)
GPIO(SLAVE_I2C_SCL, PIN(B, 6), GPIO_INPUT)
GPIO(SLAVE_I2C_SDA, PIN(B, 7), GPIO_INPUT)
-/* Case closed debugging. */
+#ifdef BOARD_OAK_PD
+GPIO(EC_INT, PIN(B, 5), GPIO_OUT_HIGH)
+#else
GPIO(EC_INT, PIN(A, 14), GPIO_OUT_HIGH)
+#endif
+
UNIMPLEMENTED(WP_L)
UNIMPLEMENTED(ENTERING_RW)