diff --git a/arch/arm/src/stm32/Kconfig b/arch/arm/src/stm32/Kconfig index 8a236a99d07..7945671f89c 100644 --- a/arch/arm/src/stm32/Kconfig +++ b/arch/arm/src/stm32/Kconfig @@ -548,6 +548,7 @@ endchoice config STM32_STM32L15XX bool default n + select STM32_HAVE_USBDEV config STM32_ENERGYLITE bool @@ -564,10 +565,12 @@ config STM32_VALUELINE config STM32_CONNECTIVITYLINE bool default n + select STM32_HAVE_OTGFS config STM32_PERFORMANCELINE bool default n + select STM32_HAVE_USBDEV config STM32_HIGHDENSITY bool @@ -584,14 +587,17 @@ config STM32_LOWDENSITY config STM32_STM32F20XX bool default n + select STM32_HAVE_OTGFS config STM32_STM32F30XX bool default n + select STM32_HAVE_USBDEV config STM32_STM32F40XX bool default n + select STM32_HAVE_OTGFS # This is really 427/437, but we treat the two the same. config STM32_STM32F427 @@ -611,6 +617,14 @@ config STM32_DFU menu "STM32 Peripheral Support" +config STM32_HAVE_USBDEV + bool + default n + +config STM32_HAVE_OTGFS + bool + default n + config STM32_ADC1 bool "ADC1" default n @@ -755,7 +769,7 @@ config STM32_LTDC config STM32_OTGFS bool "OTG FS" default n - depends on STM32_STM32F20XX || STM32_STM32F40XX + depends on STM32_HAVE_OTGFS config STM32_OTGHS bool "OTG HS" @@ -980,7 +994,7 @@ config STM32_UART8 config STM32_USB bool "USB Device" default n - depends on (STM32_STM32F10XX && !STM32_VALUELINE) || STM32_STM32L15XX || STM32_STM32F30XX + depends on STM32_HAVE_USBDEV select USBDEV config STM32_LCD diff --git a/arch/arm/src/stm32/chip/stm32f103vc_pinmap.h b/arch/arm/src/stm32/chip/stm32f103vc_pinmap.h index 52a513215d7..4e770321a42 100644 --- a/arch/arm/src/stm32/chip/stm32f103vc_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32f103vc_pinmap.h @@ -155,17 +155,10 @@ #define GPIO_I2S3_SD (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5) #define GPIO_I2S3_WS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN15) -#if 0 /* Needs further investigation */ #define GPIO_MCO (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) -#endif -#if 0 /* Needs further investigation */ -#define GPIO_OTG_FSDM (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN11) -#define GPIO_OTG_FSDP (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN12) -#define GPIO_OTG_FSID (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN10) -#define GPIO_OTG_FSSOF (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) -#define GPIO_OTG_FSVBUS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) -#endif +#define GPIO_USB_DM (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN11) +#define GPIO_USB_DP (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN12) #if defined(CONFIG_STM32_SPI1_REMAP) # define GPIO_SPI1_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15) diff --git a/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h b/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h index 054a7337db0..710780061c7 100644 --- a/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32f105vb_pinmap.h @@ -148,17 +148,13 @@ #define GPIO_I2S3_SD (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5) #define GPIO_I2S3_WS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN15) -#if 0 /* Needs further investigation */ #define GPIO_MCO (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) -#endif -#if 0 /* Needs further investigation */ -#define GPIO_OTG_FSDM (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN11) -#define GPIO_OTG_FSDP (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN12) -#define GPIO_OTG_FSID (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN10) -#define GPIO_OTG_FSSOF (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) -#define GPIO_OTG_FSVBUS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) -#endif +#define GPIO_OTGFS_DM (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN11) +#define GPIO_OTGFS_DP (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN12) +#define GPIO_OTGFS_ID (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN10) +#define GPIO_OTGFS_SOF (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) +#define GPIO_OTGFS_VBUS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) #if defined(CONFIG_STM32_SPI1_REMAP) # define GPIO_SPI1_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15) diff --git a/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h b/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h index 541163c56a0..450cc6b068b 100644 --- a/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32f107vc_pinmap.h @@ -156,13 +156,11 @@ #define GPIO_MCO (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) -#if 0 /* Needs further investigation */ -#define GPIO_OTG_FSDM (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN11) -#define GPIO_OTG_FSDP (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN12) -#define GPIO_OTG_FSID (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN10) -#define GPIO_OTG_FSSOF (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) -#define GPIO_OTG_FSVBUS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) -#endif +#define GPIO_OTGFS_DM (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN11) +#define GPIO_OTGFS_DP (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN12) +#define GPIO_OTGFS_ID (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN10) +#define GPIO_OTGFS_SOF (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) +#define GPIO_OTGFS_VBUS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) #if defined(CONFIG_STM32_SPI1_REMAP) # define GPIO_SPI1_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15) diff --git a/arch/arm/src/stm32/chip/stm32l15xxx_pinmap.h b/arch/arm/src/stm32/chip/stm32l15xxx_pinmap.h index d30d9961c83..f0547c9ef15 100644 --- a/arch/arm/src/stm32/chip/stm32l15xxx_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32l15xxx_pinmap.h @@ -534,7 +534,7 @@ /* USB */ #define GPIO_USB_DM (GPIO_ALT | GPIO_AF10 | GPIO_SPEED_40MHz | GPIO_PUSHPULL | GPIO_PORTA | GPIO_PIN11) -#define GPIO_USG_DP (GPIO_ALT | GPIO_AF10 | GPIO_SPEED_40MHz | GPIO_PUSHPULL | GPIO_PORTA | GPIO_PIN12) +#define GPIO_USB_DP (GPIO_ALT | GPIO_AF10 | GPIO_SPEED_40MHz | GPIO_PUSHPULL | GPIO_PORTA | GPIO_PIN12) /* Wakeup inputs */