summaryrefslogtreecommitdiff
path: root/board/volteer/usbc_config.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-07 12:24:10 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-09 05:10:59 +0000
commitb1b5659062f4ba8ff7de2df4dcebd339084a90e6 (patch)
tree796ea02c96dd13bbb864996ca450f47070b5376d /board/volteer/usbc_config.c
parent2fa27104aa0e97f3c750aa3b04acfc76db5e7123 (diff)
downloadchrome-ec-b1b5659062f4ba8ff7de2df4dcebd339084a90e6.tar.gz
Create a public header for pi3usb9201
Add a separate public header for this chip so we can include it from Zephyr. Update Volteer's usbc_config file to use that header, so it builds on Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I45bb196a3c6de9bebefd3d06125d1cedd33666a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615619 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'board/volteer/usbc_config.c')
-rw-r--r--board/volteer/usbc_config.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/volteer/usbc_config.c b/board/volteer/usbc_config.c
index a731138478..4a6a68a83c 100644
--- a/board/volteer/usbc_config.c
+++ b/board/volteer/usbc_config.c
@@ -9,6 +9,7 @@
#include "usbc_config.h"
#include "usbc_ppc.h"
#include "usb_mux.h"
+#include "driver/bc12/pi3usb9201_public.h"
#include "driver/ppc/sn5s330_public.h"
#include "driver/ppc/syv682x_public.h"
#include "driver/tcpm/ps8xxx_public.h"
@@ -191,3 +192,17 @@ struct tcpc_config_t tcpc_config[] = {
};
BUILD_ASSERT(ARRAY_SIZE(tcpc_config) == USBC_PORT_COUNT);
BUILD_ASSERT(CONFIG_USB_PD_PORT_MAX_COUNT == USBC_PORT_COUNT);
+
+/******************************************************************************/
+/* BC1.2 charger detect configuration */
+const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = {
+ [USBC_PORT_C0] = {
+ .i2c_port = I2C_PORT_USB_C0,
+ .i2c_addr_flags = PI3USB9201_I2C_ADDR_3_FLAGS,
+ },
+ [USBC_PORT_C1] = {
+ .i2c_port = I2C_PORT_USB_C1,
+ .i2c_addr_flags = PI3USB9201_I2C_ADDR_3_FLAGS,
+ },
+};
+BUILD_ASSERT(ARRAY_SIZE(pi3usb9201_bc12_chips) == USBC_PORT_COUNT);