diff --git a/board/servo_v4/board.c b/board/servo_v4/board.c index 337d9a1fba..eaf0a58b28 100644 --- a/board/servo_v4/board.c +++ b/board/servo_v4/board.c @@ -28,6 +28,8 @@ #include "usb-stream.h" #include "util.h" +#include "gpio_list.h" + #define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ## args) /****************************************************************************** @@ -65,60 +67,6 @@ void board_config_pre_init(void) STM32_SYSCFG_CFGR1 |= (1 << 24); } -/****************************************************************************** - * Build GPIO tables and expose a subset of the GPIOs over USB. - */ - -#include "gpio_list.h" - -static enum gpio_signal const usb_gpio_list[] = { -/* Outputs */ -GPIO_DUT_CHG_EN, /* 0 */ -GPIO_HOST_OR_CHG_CTL, -GPIO_DP_HPD, -GPIO_SBU_UART_SEL, -GPIO_HOST_USB_HUB_RESET_L, -GPIO_FASTBOOT_DUTHUB_MUX_SEL, /* 5 */ -GPIO_SBU_MUX_EN, -GPIO_FASTBOOT_DUTHUB_MUX_EN_L, -GPIO_DUT_HUB_USB_RESET_L, -GPIO_ATMEL_HWB_L, -GPIO_CMUX_EN, /* 10 */ -GPIO_EMMC_MUX_EN_L, -GPIO_EMMC_PWR_EN, - - -/* Inputs */ -GPIO_USERVO_FAULT_L, -GPIO_USB_FAULT_L, -GPIO_DONGLE_DET, /* 15 */ - -GPIO_USB_DET_PP_DUT, -GPIO_USB_DET_PP_CHG, - -GPIO_USB_DUT_CC2_RPUSB, -GPIO_USB_DUT_CC2_RD, -GPIO_USB_DUT_CC2_RA, /* 20 */ -GPIO_USB_DUT_CC1_RP3A0, -GPIO_USB_DUT_CC1_RP1A5, -GPIO_USB_DUT_CC1_RPUSB, -GPIO_USB_DUT_CC1_RD, -GPIO_USB_DUT_CC1_RA, /* 25 */ -GPIO_USB_DUT_CC2_RP3A0, -GPIO_USB_DUT_CC2_RP1A5, - -}; - -/* - * This instantiates struct usb_gpio_config const usb_gpio, plus several other - * variables, all named something beginning with usb_gpio_ - */ -USB_GPIO_CONFIG(usb_gpio, - usb_gpio_list, - USB_IFACE_GPIO, - USB_EP_GPIO); - - /****************************************************************************** * Set up USB PD */ diff --git a/board/servo_v4/board.h b/board/servo_v4/board.h index aef30865b6..2b027af5c1 100644 --- a/board/servo_v4/board.h +++ b/board/servo_v4/board.h @@ -46,7 +46,7 @@ /* USB interface indexes (use define rather than enum to expand them) */ #define USB_IFACE_CONSOLE 0 -#define USB_IFACE_GPIO 1 +#define USB_IFACE_EMPTY 1 #define USB_IFACE_I2C 2 #define USB_IFACE_USART3_STREAM 3 #define USB_IFACE_USART4_STREAM 4 @@ -56,15 +56,13 @@ /* USB endpoint indexes (use define rather than enum to expand them) */ #define USB_EP_CONTROL 0 #define USB_EP_CONSOLE 1 -#define USB_EP_GPIO 2 +#define USB_EP_EMPTY 2 #define USB_EP_I2C 3 #define USB_EP_USART3_STREAM 4 #define USB_EP_USART4_STREAM 5 #define USB_EP_UPDATE 6 #define USB_EP_COUNT 7 -/* Enable control of GPIOs over USB */ -#define CONFIG_USB_GPIO /* Enable console recasting of GPIO type. */ #define CONFIG_CMD_GPIO_EXTENDED