summaryrefslogtreecommitdiff
path: root/board/glados/board.h
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-05-25 11:35:21 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-04 07:40:46 +0000
commit5d08c5d78ddfa50ba157f2608d15079e4e4bfdfc (patch)
tree6abc7f9a962f404d368ebd3985b07ce3085e4c55 /board/glados/board.h
parentf58eff670034fe460c6082f964598ef47ffddde2 (diff)
downloadchrome-ec-1.8.0.tar.gz
glados_pd: add initial support for glados PDv1.8.0
Initial support for glados PD. Charging and PD communication only work on port 0. BUG=none BRANCH=none TEST=make BOARD=glados, make BOARD=glados_pd Connect hoho to glados and verify power contract successful. Connect zinger to glados and verify power contract and charging. Change-Id: I42e7b8d154a79de2f8502648d9af7d4cfc00a266 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/273138 Reviewed-by: Shawn N <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/275127 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Trybot-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/glados/board.h')
-rw-r--r--board/glados/board.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/board/glados/board.h b/board/glados/board.h
index 393c12182d..e7476cb3ff 100644
--- a/board/glados/board.h
+++ b/board/glados/board.h
@@ -31,6 +31,13 @@
#define CONFIG_POWER_BUTTON
#define CONFIG_POWER_BUTTON_X86
#define CONFIG_POWER_COMMON
+#define CONFIG_USB_POWER_DELIVERY
+#define CONFIG_USB_PD_ALT_MODE
+#define CONFIG_USB_PD_ALT_MODE_DFP
+#define CONFIG_USB_PD_CUSTOM_VDM
+#define CONFIG_USB_PD_DUAL_ROLE
+#define CONFIG_USB_PD_PORT_COUNT 1
+#define CONFIG_USB_PD_TCPM_TCPCI
#define CONFIG_SCI_GPIO GPIO_PCH_SCI_L
#define CONFIG_SPI_PORT 1
@@ -50,6 +57,7 @@
#define I2C_PORT_BATTERY MEC1322_I2C0_0
#define I2C_PORT_CHARGER MEC1322_I2C0_0
#define I2C_PORT_PD_MCU MEC1322_I2C1
+#define I2C_PORT_TCPC MEC1322_I2C1
#define I2C_PORT_ALS MEC1322_I2C2
#define I2C_PORT_ACCEL MEC1322_I2C2
#define I2C_PORT_PMIC MEC1322_I2C3
@@ -72,8 +80,29 @@ enum power_signal {
POWER_SIGNAL_COUNT
};
+/* start as a sink in case we have no other power supply/battery */
+#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
+
+/* TODO: determine the following board specific type-C power constants */
+/*
+ * delay to turn on the power supply max is ~16ms.
+ * delay to turn off the power supply max is about ~180ms.
+ */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */
+
+/* Define typical operating power and max power */
+#define PD_OPERATING_POWER_MW 15000
+#define PD_MAX_POWER_MW 60000
+#define PD_MAX_CURRENT_MA 3000
+#define PD_MAX_VOLTAGE_MV 20000
+
/* Discharge battery when on AC power for factory test. */
int board_discharge_on_ac(int enable);
+
+/* Reset PD MCU */
+void board_reset_pd_mcu(void);
+
#endif /* !__ASSEMBLER__ */
#endif /* __BOARD_H */