zephyr/drivers/usb/device
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
..
CMakeLists.txt drivers: usb: device: support Nuvoton NuMaker series USBD controller driver 2024-02-02 10:07:43 +01:00
Kconfig drivers: usb: stm32: fix support of STM32U5 OTG_HS with embedded PHY 2024-12-11 08:00:03 +01:00
usb_dc_dw.c drivers: use DT_INST_NODE_HAS_COMPAT 2024-04-26 20:04:38 +01:00
usb_dc_dw_stm32.h drivers: use DT_INST_NODE_HAS_COMPAT 2024-04-26 20:04:38 +01:00
usb_dc_it82xx2.c drivers: Fix uninitialized variable warning. 2024-11-12 15:58:47 -06:00
usb_dc_kinetis.c drivers: usb: Use VREG only if present for NXP Kinetis usb 2024-10-25 05:11:44 +01:00
usb_dc_mcux.c zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY 2024-10-03 17:06:52 +01:00
usb_dc_native_posix.c drivers: usb: native posix: add option for enabling high speed support 2024-06-12 17:15:58 -05:00
usb_dc_native_posix_adapt.c drivers: usb: native posix: add option for enabling high speed support 2024-06-12 17:15:58 -05:00
usb_dc_native_posix_adapt.h
usb_dc_nrfx.c zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY 2024-10-03 17:06:52 +01:00
usb_dc_numaker.c drivers: usb: device: support Nuvoton NuMaker series USBD controller driver 2024-02-02 10:07:43 +01:00
usb_dc_rpi_pico.c drivers: usb_dc_rpi_pico: Implemented vbus detection handling 2024-10-17 10:47:15 -04:00
usb_dc_sam0.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
usb_dc_sam_usbc.c drivers: usb: fix common misspellings in USB drivers 2023-07-26 10:46:01 +02:00
usb_dc_sam_usbhs.c drivers: usb: fix common misspellings in USB drivers 2023-07-26 10:46:01 +02:00
usb_dc_smartbond.c drivers: usb: device: Fix disable sequece 2024-06-26 09:20:51 -04:00
usb_dc_stm32.c drivers: usb: stm32: fix support of STM32U5 OTG_HS with embedded PHY 2024-12-11 08:00:03 +01:00