zephyr/drivers/usb
Marcin Niestroj f72ef5c237 drivers: usb: stm32: fix support of STM32U5 OTG_HS with embedded PHY
Introduce new binding "st,stm32u5-otghs-phy" for OTG_HS PHY. This allows to
configure clock source and handle STM32U5 specific OTG_HS PHY behavior in
driver implementation in a more readable way.

Move OTG_HS PHY clock selection (previously <&rcc STM32_SRC_HSI48
ICKLK_SEL(0)>) from OTG_HS node to OTG_HS PHY node.

Rename USBPHYC_SEL -> OTGHS_SEL which matches the definition in the stm32u5
CCIPR2 register (RM0456 Rev 5, Section 11.8.47).

Support enabling OTG_HS PHY clock, which is bit 15 (OTGHSPHYEN) in
RCC_AHB2ENR1. Change OTG_HS clock to be bit 14 (OTGEN).

Calculate in runtime OTG_HS PHY clock source frequency. Try to match that
to supported (16, 19.2, 20, 24, 26, 32 MHz) frequencies and select proper
option with HAL_SYSCFG_SetOTGPHYReferenceClockSelection() API (instead of
hardcoded 16 MHz selection).

Co-authored-by: Adrian Chadd <adrian.chadd@meta.com>
Signed-off-by: Adrian Chadd <adrian.chadd@meta.com>
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-12-11 08:00:03 +01:00
..
bc12 drivers: bc12: Place API into iterable section 2024-12-03 19:56:37 +01:00
common nrf_usbd_common: Do not trigger DMA in low power mode 2024-11-26 14:45:01 +00:00
device drivers: usb: stm32: fix support of STM32U5 OTG_HS with embedded PHY 2024-12-11 08:00:03 +01:00
udc drivers: usb: udc: fix return api description 2024-12-06 12:13:08 +01:00
uhc
uvb linker: drivers: Use Z_LINK_ITERABLE_SUBALIGN 2024-04-20 13:45:25 -04:00
CMakeLists.txt nrfx_usbd: Rename to nrf_usbd_common 2023-11-07 14:06:51 +01:00
Kconfig nrfx_usbd: Rename to nrf_usbd_common 2023-11-07 14:06:51 +01:00