diff options
author | Caveh Jalali <caveh@chromium.org> | 2020-08-05 02:59:43 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-07 04:58:18 +0000 |
commit | 50fe466db13375ad239c721601b4227ef28337bf (patch) | |
tree | 58dca676453170fde35cd3a8e170b6efcacf1902 /board/volteer | |
parent | f3c24093d37253e6cb2804a20dd7f4871d3a1723 (diff) | |
download | chrome-ec-50fe466db13375ad239c721601b4227ef28337bf.tar.gz |
volteer: add support for passive USB DB
This adds support for the passive USB daughterboard. This
configuration is very similar to port C0, except that the PPC is a
SYV682.
BRANCH=none
BUG=b:158673460
TEST=verified PD charging works
Change-Id: Ie657b68d4e8160fca30468cf4ff267b37448edd6
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2338974
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/volteer')
-rw-r--r-- | board/volteer/board.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/board/volteer/board.c b/board/volteer/board.c index 1ea7727e7e..7a88d8b165 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -261,13 +261,19 @@ static const struct usb_mux usbc1_usb3_db_retimer = { .next_mux = NULL, }; -static const struct usb_mux mux_config_p1_usb3 = { +static const struct usb_mux mux_config_p1_usb3_active = { .usb_port = USBC_PORT_C1, .driver = &virtual_usb_mux_driver, .hpd_update = &virtual_hpd_update, .next_mux = &usbc1_usb3_db_retimer, }; +static const struct usb_mux mux_config_p1_usb3_passive = { + .usb_port = USBC_PORT_C1, + .driver = &virtual_usb_mux_driver, + .hpd_update = &virtual_hpd_update, +}; + /******************************************************************************/ /* USB-A charging control */ @@ -324,11 +330,25 @@ void board_reset_pd_mcu(void) * Parade PS8815 TCPC (integrated retimer) * Diodes PI3USB9201 BC 1.2 chip (same as USB4 board) * Silergy SYV682A PPC (same as USB4 board) + * Virtual mux with stacked retimer */ -static void config_db_usb3(void) +static void config_db_usb3_active(void) { tcpc_config[USBC_PORT_C1] = tcpc_config_p1_usb3; - usb_muxes[USBC_PORT_C1] = mux_config_p1_usb3; + usb_muxes[USBC_PORT_C1] = mux_config_p1_usb3_active; +} + +/* + * Set up support for the passive USB3 daughterboard: + * TUSB422 TCPC (already the default) + * PI3USB9201 BC 1.2 chip (already the default) + * Silergy SYV682A PPC (already the default) + * Virtual mux without stacked retimer + */ + +static void config_db_usb3_passive(void) +{ + usb_muxes[USBC_PORT_C1] = mux_config_p1_usb3_passive; } static const char *db_type_prefix = "USB DB type: "; @@ -358,9 +378,13 @@ __override void board_cbi_init(void) CPRINTS("%sUSB4 Gen3", db_type_prefix); break; case DB_USB3_ACTIVE: - config_db_usb3(); + config_db_usb3_active(); CPRINTS("%sUSB3 Active", db_type_prefix); break; + case DB_USB3_PASSIVE: + config_db_usb3_passive(); + CPRINTS("%sUSB3 Passive", db_type_prefix); + break; default: CPRINTS("%sID %d not supported", db_type_prefix, usb_db); } @@ -397,4 +421,3 @@ void ppc_interrupt(enum gpio_signal signal) break; } } - |