Add support to STM32 USB OTG-HS to re-define what is passed into HAL_SYSCFG_SetOTGPHYReferenceClockSelection() #79823
Labels
area: USB
Universal Serial Bus
Enhancement
Changes/Updates/Additions to existing features
platform: STM32
ST Micro STM32
Is your enhancement proposal related to a problem? Please describe.
The current Zephyr STM32 USB OTG-HS driver hard-codes a 16MHz clock source into the HSE clock.
From drivers/usb/device/usb_dc_stm32.c:
This means if you're using a different clock (in my case a 24MHz crystal), it needs a code change.
In my case I'm using an STMU5 part, the definitions are in the STM32 HAL:
stm32cube/stm32u5xx/drivers/include/stm32u5xx_hal.h
Update Oct 16 - I've now verified that changing it to SELECT_4 works fine for my 24MHz crystal on the board.
Describe the solution you'd like
It would be nice to either show up as a device-tree config, or a Kconfig option. I'm going to prototype both.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: