stm32f20xxx: add BOARD_DISABLE_USBOTG_HSULPI flag

This commit is contained in:
Simon Piriou 2017-03-11 18:15:18 +01:00
parent 1654f85037
commit 70d8f0189d
2 changed files with 10 additions and 0 deletions

View File

@ -195,7 +195,13 @@ static inline void rcc_enableahb1(void)
#ifdef CONFIG_STM32_OTGHS
/* USB OTG HS */
#ifndef BOARD_DISABLE_USBOTG_HSULPI
/* Enable clocking for OTG and external PHY */
regval |= (RCC_AHB1ENR_OTGHSEN | RCC_AHB1ENR_OTGHSULPIEN);
#else
regval |= (RCC_AHB1ENR_OTGHSEN);
#endif
#endif
putreg32(regval, STM32_RCC_AHB1ENR); /* Enable peripherals */

View File

@ -146,6 +146,10 @@
#define STM32_APB2_TIM10_CLKIN (2*STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM11_CLKIN (2*STM32_PCLK2_FREQUENCY)
/* USB OTG HS definitions ***********************************************************/
/* Do not enable external PHY clock or OTG_HS module will not work */
#define BOARD_DISABLE_USBOTG_HSULPI 1
/* Alternate function pin selections ************************************************/
/* UART1 */