diff options
author | Scott Collyer <scollyer@google.com> | 2019-04-18 15:19:28 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-20 03:58:33 -0700 |
commit | afbb1b511cdf5ab36ce2f6969ac701322fe91517 (patch) | |
tree | 6c3c7cc11abf6606634a09cf80ce310cc8c25891 /board/hatch | |
parent | e25a0bc9539161c0222166b2d63057a4ecca4f7a (diff) | |
download | chrome-ec-afbb1b511cdf5ab36ce2f6969ac701322fe91517.tar.gz |
hatch/kohaku: Account for different bc1.2 chips
This CL moves bc1.2 configuration from baseboard.c/.h to the
board.c/.h files for hatch and kohaku.
BUG=b:130197995
BRANCH=none
TEST=make -j BOARD=hatch and make -j BOARD=kohaku both are successful
Change-Id: I2aa44d37a7a1d23196a766c95c59737838e9e09f
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1574788
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/hatch')
-rw-r--r-- | board/hatch/board.c | 13 | ||||
-rw-r--r-- | board/hatch/board.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/board/hatch/board.c b/board/hatch/board.c index 4149445231..bd126051ef 100644 --- a/board/hatch/board.c +++ b/board/hatch/board.c @@ -13,6 +13,7 @@ #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi160.h" #include "driver/als_opt3001.h" +#include "driver/bc12/pi3usb9201.h" #include "driver/ppc/sn5s330.h" #include "driver/tcpm/anx7447.h" #include "driver/tcpm/ps8xxx.h" @@ -150,6 +151,18 @@ struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = { } }; +const struct pi3usb2901_config_t pi3usb2901_bc12_chips[] = { + [USB_PD_PORT_TCPC_0] = { + .i2c_port = I2C_PORT_PPC0, + .i2c_addr = PI3USB9201_I2C_ADDR_3, + }, + + [USB_PD_PORT_TCPC_1] = { + .i2c_port = I2C_PORT_TCPC1, + .i2c_addr = PI3USB9201_I2C_ADDR_3, + }, +}; + /******************************************************************************/ /* Sensors */ /* Base Sensor mutex */ diff --git a/board/hatch/board.h b/board/hatch/board.h index ae8ceec43a..869372096d 100644 --- a/board/hatch/board.h +++ b/board/hatch/board.h @@ -64,6 +64,9 @@ #define CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY #define GPIO_USB1_ILIM_SEL GPIO_EN_USB_A_LOW_PWR_OD +/* BC 1.2 */ +#define CONFIG_BC12_DETECT_PI3USB9201 + /* Volume Button feature */ #define CONFIG_VOLUME_BUTTONS #define GPIO_VOLUME_UP_L GPIO_EC_VOLUP_BTN_ODL |