summaryrefslogtreecommitdiff
path: root/board/gingerbread/board.h
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-02-16 10:18:08 -0800
committerCommit Bot <commit-bot@chromium.org>2021-03-24 04:49:27 +0000
commita6200934f5a9c01d37cffb9fc1e170234f60863e (patch)
treef1891eaffd01da4f3de227fab736bb43dfe95006 /board/gingerbread/board.h
parent7c931ff4a420dba06ca6528610aecdb963c76634 (diff)
downloadchrome-ec-a6200934f5a9c01d37cffb9fc1e170234f60863e.tar.gz
honeybuns: Enable USB-EP support
This CL adds configs/structs required for USB-EP support for both quiche and gingerbread. This CL also adds usbc support code to RO so that Rd is being presented on both CC lines in RO. In addition, there is some clean up for I2C port names and the debug gpio utility function. BUG=b:172493899 BRANCH=None TEST=tested on quiche and verified that the USB-EP was enumerated RST EP0 3220 RST EP0 3220 RST EP0 3220 RST EP0 3220 SETAD ae [8.069004 Jumping to image RW] Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I8d65ba55eecc2b82047a8cd433611f639af0c5ed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2699453 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Sam Hurst <shurst@google.com> Commit-Queue: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'board/gingerbread/board.h')
-rw-r--r--board/gingerbread/board.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/board/gingerbread/board.h b/board/gingerbread/board.h
index ccabbcf579..75780a3fb2 100644
--- a/board/gingerbread/board.h
+++ b/board/gingerbread/board.h
@@ -22,10 +22,19 @@
#define USB_PD_PORT_DP 1
#define CONFIG_USB_PD_PORT_MAX_COUNT 1
-
-/* USB Type A Features */
-
-/* BC 1.2 */
+#define CONFIG_USB_PID 0x5049
+#define CONFIG_USB_BCD_DEV 0x0001 /* v 0.01 */
+#define CONFIG_USB_PD_IDENTITY_HW_VERS 1
+#define CONFIG_USB_PD_IDENTITY_SW_VERS 1
+
+/* I2C port names */
+#define I2C_PORT_I2C1 0
+#define I2C_PORT_I2C2 1
+#define I2C_PORT_I2C3 2
+/* Required symbolic I2C port names */
+#define I2C_PORT_MP4245 I2C_PORT_I2C3
+#define I2C_PORT_EEPROM I2C_PORT_I2C1
+#define MP4245_SLAVE_ADDR MP4245_I2C_ADDR_0_FLAGS
/*
* Macros for GPIO signals used in common code that don't match the
@@ -35,14 +44,21 @@
*/
#define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW
#define GPIO_WP_L GPIO_EC_WP_L
-
-
+#define GPIO_WP GPIO_EC_WP_L
#ifndef __ASSEMBLER__
-#include "gpio_signal.h"
#include "registers.h"
+#define GPIO_TRIGGER_1 GPIO_EC_HUB1_RESET_L
+#define GPIO_TRIGGER_2 GPIO_EC_HUB2_RESET_L
+
+enum debug_gpio {
+ TRIGGER_1 = 0,
+ TRIGGER_2,
+};
+
+void board_debug_gpio(int trigger, int enable, int pulse_usec);
#endif /* !__ASSEMBLER__ */