diff options
author | Ting Shen <phoenixshen@google.com> | 2021-07-15 17:56:44 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-29 09:59:09 +0000 |
commit | 966c2a9fd8e24807f49235d02a88ad34106e0145 (patch) | |
tree | 55b7eba8014e18909194d2fb55a03fd8802cf5a9 /baseboard/cherry | |
parent | 11be0bd36e7a91c0469f917f6ec767df14c2c80f (diff) | |
download | chrome-ec-966c2a9fd8e24807f49235d02a88ad34106e0145.tar.gz |
tomato: enable port 0 bc12 function
Tomoto port 0 bc1.2 solution is changed from PI3USB9201 to MT6360.
Update board code to reflect this HW change.
BUG=b:192422592
TEST=manually test bc1.2 detection
BRANCH=main
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I855815b5c8d85c9807455fe658a38bdac59b1399
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3031241
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'baseboard/cherry')
-rw-r--r-- | baseboard/cherry/baseboard.c | 8 | ||||
-rw-r--r-- | baseboard/cherry/baseboard.h | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/baseboard/cherry/baseboard.c b/baseboard/cherry/baseboard.c index fb90dfe5ff..507febf712 100644 --- a/baseboard/cherry/baseboard.c +++ b/baseboard/cherry/baseboard.c @@ -151,7 +151,7 @@ const struct mt6360_config_t mt6360_config = { .i2c_addr_flags = MT6360_PMU_I2C_ADDR_FLAGS, }; -const struct pi3usb9201_config_t +__maybe_unused const struct pi3usb9201_config_t pi3usb9201_bc12_chips[CONFIG_USB_PD_PORT_MAX_COUNT] = { [0] = { .i2c_port = I2C_PORT_USB0, @@ -161,7 +161,13 @@ const struct pi3usb9201_config_t }; struct bc12_config bc12_ports[CONFIG_USB_PD_PORT_MAX_COUNT] = { +#ifdef CONFIG_BC12_DETECT_PI3USB9201 { .drv = &pi3usb9201_drv }, +#elif defined(CONFIG_BC12_DETECT_MT6360) + { .drv = &mt6360_drv }, +#else +#error must pick one of PI3USB9201 or MT6360 for port 0 +#endif { .drv = &rt1718s_bc12_drv }, }; diff --git a/baseboard/cherry/baseboard.h b/baseboard/cherry/baseboard.h index e3575c517c..83a3557149 100644 --- a/baseboard/cherry/baseboard.h +++ b/baseboard/cherry/baseboard.h @@ -49,8 +49,10 @@ #define CONFIG_BATTERY_SMART /* BC12 */ -#define CONFIG_BC12_DETECT_MT6360 +#ifdef BOARD_CHERRY #define CONFIG_BC12_DETECT_PI3USB9201 +#endif +#define CONFIG_BC12_DETECT_MT6360 #undef CONFIG_BC12_SINGLE_DRIVER #define CONFIG_USB_CHARGER |