summaryrefslogtreecommitdiff
path: root/board/grunt
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-03-08 13:45:23 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-03-09 20:05:12 -0800
commitb593d1c05b150fdad68c474ef0e521d5d9c3acea (patch)
tree546dcfa832ba504bb4fed52d2fd6c2ea79edd2b2 /board/grunt
parentbc766130becff13136baa53070749899dce687f6 (diff)
downloadchrome-ec-b593d1c05b150fdad68c474ef0e521d5d9c3acea.tar.gz
bc12: add support for active low/high on all gpio signals
yorp inverts both bc12 signals and the bc12 driver needs to handle the inverted logic BRANCH=none BUG=b:74127309 TEST=none Change-Id: I6848375fc652251aecb553c3f53d62a5f775bec4 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/956321 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/grunt')
-rw-r--r--board/grunt/board.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/grunt/board.c b/board/grunt/board.c
index d87f074e09..597ff0fa10 100644
--- a/board/grunt/board.c
+++ b/board/grunt/board.c
@@ -17,6 +17,7 @@
#include "driver/accel_kionix.h"
#include "driver/accel_kx022.h"
#include "driver/accelgyro_bmi160.h"
+#include "driver/bc12/bq24392.h"
#include "driver/led/lm3630a.h"
#include "driver/ppc/sn5s330.h"
#include "driver/tcpm/anx74xx.h"
@@ -200,6 +201,20 @@ const struct ppc_config_t ppc_chips[] = {
};
const unsigned int ppc_cnt = ARRAY_SIZE(ppc_chips);
+/* BC 1.2 chip Configuration */
+const struct bq24392_config_t bq24392_config[CONFIG_USB_PD_PORT_COUNT] = {
+ [USB_PD_PORT_ANX74XX] = {
+ .chip_enable_pin = GPIO_USB_C0_BC12_VBUS_ON_L,
+ .chg_det_pin = GPIO_USB_C0_BC12_CHG_DET,
+ .flags = BQ24392_FLAGS_ENABLE_ACTIVE_LOW,
+ },
+ [USB_PD_PORT_PS8751] = {
+ .chip_enable_pin = GPIO_USB_C1_BC12_VBUS_ON_L,
+ .chg_det_pin = GPIO_USB_C1_BC12_CHG_DET,
+ .flags = BQ24392_FLAGS_ENABLE_ACTIVE_LOW,
+ },
+};
+
const int usb_port_enable[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT] = {
GPIO_EN_USB_A0_5V,
GPIO_EN_USB_A1_5V,