From b62db2b095023e0066ce93c82f1bdc8308bf3cf9 Mon Sep 17 00:00:00 2001 From: Denis Tolstov Date: Mon, 3 Apr 2023 02:06:07 +0300 Subject: [PATCH] boards/stm32f411-minimum: Unmap USBHOST GPIOs * OTG_FS_VBUS, OTG_FS_ID conflict with USART1. These are not connected to USB-C in any WeAct Studio MiniF4 board revisions. * PC9 PWRON & PD5 OVER do not exist on UFQFPN48. --- .../stm32/stm32f411-minimum/src/stm32_usb.c | 14 ++------- .../stm32f411-minimum/src/stm32f411-minimum.h | 31 ------------------- 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/boards/arm/stm32/stm32f411-minimum/src/stm32_usb.c b/boards/arm/stm32/stm32f411-minimum/src/stm32_usb.c index 29a0679131..f6458d68e3 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/stm32_usb.c +++ b/boards/arm/stm32/stm32f411-minimum/src/stm32_usb.c @@ -117,8 +117,8 @@ static int usbhost_waiter(int argc, char *argv[]) * Name: stm32_usbinitialize * * Description: - * Called from stm32_usbinitialize very early in inialization to setup - * USB-related GPIO pins for the STM32F411 Discovery board. + * Called from stm32_boardinitialize very early in inialization to setup + * USB-related GPIO pins for the WeAct Studio MiniF4 board. * ****************************************************************************/ @@ -126,17 +126,9 @@ void stm32_usbinitialize(void) { /* The OTG FS has an internal soft pull-up. No GPIO configuration is * required - */ - - /* Configure the OTG FS VBUS sensing GPIO, Power On, and Overcurrent + * This board has no connections for VBUS, Power On, or Overcurrent * GPIOs */ - -#ifdef CONFIG_STM32_OTGFS - stm32_configgpio(GPIO_OTGFS_VBUS); - stm32_configgpio(GPIO_OTGFS_PWRON); - stm32_configgpio(GPIO_OTGFS_OVER); -#endif } /**************************************************************************** diff --git a/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum.h b/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum.h index 3406d8da1d..12ed9ba9d9 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum.h +++ b/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum.h @@ -60,37 +60,6 @@ #define GPIO_BTN_USER \ (GPIO_INPUT |GPIO_FLOAT |GPIO_EXTI | GPIO_PORTA | GPIO_PIN0) -/* SPI1 off */ - -#define GPIO_SPI1_MOSI_OFF (GPIO_INPUT | GPIO_PULLDOWN | \ - GPIO_PORTA | GPIO_PIN7) -#define GPIO_SPI1_MISO_OFF (GPIO_INPUT | GPIO_PULLDOWN | \ - GPIO_PORTA | GPIO_PIN6) -#define GPIO_SPI1_SCK_OFF (GPIO_INPUT | GPIO_PULLDOWN | \ - GPIO_PORTA | GPIO_PIN5) - -/* USB OTG FS - * - * PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED) - * PC0 OTG_FS_PowerSwitchOn - * PD5 OTG_FS_Overcurrent - */ - -#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|\ - GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN9) -#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|\ - GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN0) - -#ifdef CONFIG_USBHOST -# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_EXTI|GPIO_FLOAT|\ - GPIO_SPEED_100MHz|GPIO_PUSHPULL|\ - GPIO_PORTD|GPIO_PIN5) - -#else -# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|\ - GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN5) -#endif - /* procfs File System */ #ifdef CONFIG_FS_PROCFS