From c50dc646789a4489a1bb3e3f33db3459d1d26529 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Mon, 15 Jun 2020 10:50:44 -0600 Subject: voxel: Move USB DB checks from baseboard Update Voxel USB daughterboard options to match project configuration. BUG=b:155497872 BRANCH=none TEST=make BOARD=voxel TEST=make buildall Cq-Depend: chromium:2247617, chromium:2248238, chromium:2248239 Cq-Depend: chromium:2248240, chromium:2248241, chromium:2252484 Signed-off-by: Keith Short Change-Id: I7846bee072025f23328060150094e96863c2bdea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2248242 Reviewed-by: caveh jalali --- board/voxel/board.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'board/voxel/board.c') diff --git a/board/voxel/board.c b/board/voxel/board.c index 89eda9c0e8..e360809aa8 100644 --- a/board/voxel/board.c +++ b/board/voxel/board.c @@ -8,6 +8,7 @@ #include "button.h" #include "common.h" #include "accelgyro.h" +#include "cbi_ec_fw_config.h" #include "driver/accel_bma2x2.h" #include "driver/accelgyro_bmi260.h" #include "driver/als_tcs3400.h" @@ -37,21 +38,11 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) /* - * Reconfigure Volteer GPIOs based on the board ID + * FW_CONFIG defaults for Voxel if the CBI data is not initialized. */ -__override void config_volteer_gpios(void) -{ - /* Legacy support for the first board build */ - if (get_board_id() == 0) { - CPRINTS("Configuring GPIOs for board ID 0"); - CPRINTS("VOLUME_UP button disabled"); - - /* Reassign USB_C1_RT_RST_ODL */ - bb_controls[USBC_PORT_C1].retimer_rst_gpio = - GPIO_USB_C1_RT_RST_ODL_BOARDID_0; - ps8xxx_rst_odl = GPIO_USB_C1_RT_RST_ODL_BOARDID_0; - } -} +union volteer_cbi_fw_config fw_config_defaults = { + .usb_db = DB_USB4_GEN3, +}; static void board_init(void) { @@ -220,3 +211,16 @@ const struct pwm_t pwm_channels[] = { }, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); + +void board_reset_pd_mcu(void) +{ + /* + * Only the Burnside Bridge retimers provide a reset pin, but this is + * already handled by the bb_retimer.c driver. + */ +} + +__override void board_cbi_init(void) +{ + /* TODO(b/159025739): Voxel: check FW_CONFIG fields for USB DB type */ +} -- cgit v1.2.1