Skip to content

Conversation

mathieuchopstm
Copy link
Contributor

Add USB support for STM32WBA6 series:

  • add node in SoC DTSI
  • add missing macro in DT bindings header
  • add WBA6 support in UDC driver + rework how PHY is handled
  • add USB node configuration to nucleo_wba65ri board

Tested that samples/subsys/usb/cdc_acm builds, runs and works as expected.

(Also tested that it still works on nucleo_u5a5zj_q to ensure no regression)

Fixes #96705

Add missing OTGHS_SEL macro to STM32WBA clock header. This macro applies
only to certain SoCs of STM32WBA6x series.

Signed-off-by: Mathieu Choplain <[email protected]>
Add missing nodes for USB feature to STM32WBA6x DTSI.

(Note: only WBA65 DTSI exists today, but USB is available in other SoCs of
the series - this should be reworked later)

Signed-off-by: Mathieu Choplain <[email protected]>
Add support for USB on STM32WBA6x series, along with a tiny rework of how
the st,stm32u5-otghs-phy is handled to make the code more generic by
actually consuming DT information.

Signed-off-by: Mathieu Choplain <[email protected]>
Configure and enable the USB controller on Nucleo-WBA65RI.

Signed-off-by: Mathieu Choplain <[email protected]>
Copy link

Comment on lines +1275 to +1279
#if defined(CONFIG_SOC_SERIES_STM32U5X)
LL_APB3_GRP1_EnableClock(LL_APB3_GRP1_PERIPH_SYSCFG);
#elif defined(CONFIG_SOC_SERIES_STM32WBAX)
LL_APB7_GRP1_EnableClock(LL_APB7_GRP1_PERIPH_SYSCFG);
#else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, use of __HAL_RCC_SYSCFG_CLK_ENABLE() would enhance readability.

/* OTG HS clock source is 32 MHz HSE */
clock-reference = "SYSCFG_OTG_HS_PHY_CLK_32MHz";
status = "okay";
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alos add - usbd to .yaml file.

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nucleo_wba65ri: USB device support is missing

5 participants