From 80cc4fe762c3b36e0bcf884d3fc4b3e001352232 Mon Sep 17 00:00:00 2001 From: Zick Wei Date: Thu, 1 Jul 2021 16:48:47 +0800 Subject: redrix: remove db options There's no daughter board on redrix, so remove relate code. BUG=b:190954036 BRANCH=none TEST=make BOARD=redrix Signed-off-by: Zick Wei Change-Id: Iac6633fa30fedc867e121ba9a9d20a46b7c362d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2999413 Reviewed-by: caveh jalali --- board/redrix/usbc_config.c | 53 +++++++++++----------------------------------- 1 file changed, 12 insertions(+), 41 deletions(-) (limited to 'board/redrix/usbc_config.c') diff --git a/board/redrix/usbc_config.c b/board/redrix/usbc_config.c index 8307d18b84..f5d4a0310c 100644 --- a/board/redrix/usbc_config.c +++ b/board/redrix/usbc_config.c @@ -187,17 +187,6 @@ struct ioexpander_config_t ioex_config[] = { }; BUILD_ASSERT(ARRAY_SIZE(ioex_config) == CONFIG_IO_EXPANDER_PORT_COUNT); -void config_usb_db_type(void) -{ - enum ec_cfg_usb_db_type db_type = ec_cfg_usb_db_type(); - - /* - * TODO(b/180434685): implement multiple DB types - */ - - CPRINTS("Configured USB DB type number is %d", db_type); -} - __override int bb_retimer_power_enable(const struct usb_mux *me, bool enable) { enum ioex_signal rst_signal; @@ -238,14 +227,13 @@ __override int bb_retimer_power_enable(const struct usb_mux *me, bool enable) void board_reset_pd_mcu(void) { /* - * TODO(b/179648104): figure out correct timing + * TODO(b/193461268): figure out correct timing */ gpio_set_level(GPIO_USB_C0_C2_TCPC_RST_ODL, 0); - if (ec_cfg_usb_db_type() != DB_USB_ABSENT) { - gpio_set_level(GPIO_USB_C1_RST_ODL, 0); - gpio_set_level(GPIO_USB_C1_RT_RST_R_ODL, 0); - } + gpio_set_level(GPIO_USB_C1_RST_ODL, 0); + gpio_set_level(GPIO_USB_C1_RT_RST_R_ODL, 0); + /* * delay for power-on to reset-off and min. assertion time @@ -254,10 +242,8 @@ void board_reset_pd_mcu(void) msleep(20); gpio_set_level(GPIO_USB_C0_C2_TCPC_RST_ODL, 1); - if (ec_cfg_usb_db_type() != DB_USB_ABSENT) { - gpio_set_level(GPIO_USB_C1_RST_ODL, 1); - gpio_set_level(GPIO_USB_C1_RT_RST_R_ODL, 1); - } + gpio_set_level(GPIO_USB_C1_RST_ODL, 1); + gpio_set_level(GPIO_USB_C1_RT_RST_R_ODL, 1); /* wait for chips to come up */ @@ -289,11 +275,9 @@ static void board_tcpc_init(void) gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_ODL); gpio_enable_interrupt(GPIO_USB_C2_BC12_INT_ODL); - if (ec_cfg_usb_db_type() != DB_USB_ABSENT) { - gpio_enable_interrupt(GPIO_USB_C1_PPC_INT_ODL); - gpio_enable_interrupt(GPIO_USB_C1_TCPC_INT_ODL); - gpio_enable_interrupt(GPIO_USB_C1_BC12_INT_ODL); - } + gpio_enable_interrupt(GPIO_USB_C1_PPC_INT_ODL); + gpio_enable_interrupt(GPIO_USB_C1_TCPC_INT_ODL); + gpio_enable_interrupt(GPIO_USB_C1_BC12_INT_ODL); } DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_CHIPSET); @@ -304,8 +288,7 @@ uint16_t tcpc_get_alert_status(void) if (gpio_get_level(GPIO_USB_C0_C2_TCPC_INT_ODL) == 0) status |= PD_STATUS_TCPC_ALERT_0 | PD_STATUS_TCPC_ALERT_2; - if ((ec_cfg_usb_db_type() != DB_USB_ABSENT) && - gpio_get_level(GPIO_USB_C1_TCPC_INT_ODL) == 0) + if (gpio_get_level(GPIO_USB_C1_TCPC_INT_ODL) == 0) status |= PD_STATUS_TCPC_ALERT_1; return status; @@ -315,8 +298,7 @@ int ppc_get_alert_status(int port) { if (port == USBC_PORT_C0) return gpio_get_level(GPIO_USB_C0_PPC_INT_ODL) == 0; - else if ((port == USBC_PORT_C1) && - (ec_cfg_usb_db_type() != DB_USB_ABSENT)) + else if (port == USBC_PORT_C1) return gpio_get_level(GPIO_USB_C1_PPC_INT_ODL) == 0; else if (port == USBC_PORT_C2) return gpio_get_level(GPIO_USB_C2_PPC_INT_ODL) == 0; @@ -330,8 +312,6 @@ void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(USBC_PORT_C0); break; case GPIO_USB_C1_TCPC_INT_ODL: - if (ec_cfg_usb_db_type() == DB_USB_ABSENT) - break; schedule_deferred_pd_interrupt(USBC_PORT_C1); break; default: @@ -346,8 +326,6 @@ void bc12_interrupt(enum gpio_signal signal) task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12); break; case GPIO_USB_C1_BC12_INT_ODL: - if (ec_cfg_usb_db_type() == DB_USB_ABSENT) - break; task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12); break; case GPIO_USB_C2_BC12_INT_ODL: @@ -365,14 +343,7 @@ void ppc_interrupt(enum gpio_signal signal) syv682x_interrupt(USBC_PORT_C0); break; case GPIO_USB_C1_PPC_INT_ODL: - switch (ec_cfg_usb_db_type()) { - case DB_USB_ABSENT: - case DB_USB_ABSENT2: - break; - case DB_USB3_PS8815: - nx20p348x_interrupt(USBC_PORT_C1); - break; - } + nx20p348x_interrupt(USBC_PORT_C1); break; case GPIO_USB_C2_PPC_INT_ODL: syv682x_interrupt(USBC_PORT_C2); -- cgit v1.2.1