From 1046eb499bad9acdd5e4d9c6a2f4fb27da983bba Mon Sep 17 00:00:00 2001 From: Marcin Niestroj Date: Tue, 8 Oct 2024 20:37:25 +0200 Subject: [PATCH] boards: st: nucleo_u5a5zj_q: enable USB HS Provide configuration for USB HS with embedded USB HS PHY. Disable USB_DC_STM32_CLOCK_CHECK, since USB PLL is expected to be sourced by 16MHz clock, instead of 48MHz. Signed-off-by: Marcin Niestroj --- boards/st/nucleo_u5a5zj_q/Kconfig.defconfig | 5 +++++ boards/st/nucleo_u5a5zj_q/doc/index.rst | 2 ++ boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts | 17 +++++++++++++++++ boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.yaml | 1 + 4 files changed, 25 insertions(+) create mode 100644 boards/st/nucleo_u5a5zj_q/Kconfig.defconfig diff --git a/boards/st/nucleo_u5a5zj_q/Kconfig.defconfig b/boards/st/nucleo_u5a5zj_q/Kconfig.defconfig new file mode 100644 index 00000000000000..e114349bfd626f --- /dev/null +++ b/boards/st/nucleo_u5a5zj_q/Kconfig.defconfig @@ -0,0 +1,5 @@ +# Copyright (c) 2024 Marcin Niestroj +# SPDX-License-Identifier: Apache-2.0 + +configdefault USB_DC_STM32_CLOCK_CHECK + default n diff --git a/boards/st/nucleo_u5a5zj_q/doc/index.rst b/boards/st/nucleo_u5a5zj_q/doc/index.rst index ea919c4f10ee72..62717c05f88a46 100644 --- a/boards/st/nucleo_u5a5zj_q/doc/index.rst +++ b/boards/st/nucleo_u5a5zj_q/doc/index.rst @@ -204,6 +204,8 @@ The Zephyr nucleo_u5a5zj_q board configuration supports the following hardware f +-----------+------------+-------------------------------------+ | RTC | on-chip | rtc | +-----------+------------+-------------------------------------+ +| USB | on-chip | USB high-speed host/device bus | ++-----------+------------+-------------------------------------+ Other hardware features are not yet supported on this Zephyr port. diff --git a/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts b/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts index a9907afe61429f..ecefffe7ebebd5 100644 --- a/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts +++ b/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts @@ -32,6 +32,14 @@ volt-sensor0 = &vref1; volt-sensor1 = &vbat4; }; + + soc { + usbphyc: usbphyc@40017c00 { + compatible = "st,stm32-usbphyc"; + reg = <0x40017c00 0x400>; + #phy-cells = <0>; + }; + }; }; &flash0 { @@ -74,3 +82,12 @@ &gpdma1 { status = "okay"; }; + +zephyr_udc0: &usbotg_hs { + pinctrl-0 = <&usb_otg_hs_dm_pa11 &usb_otg_hs_dp_pa12>; + pinctrl-names = "default"; + clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x0000c000>, + <&rcc STM32_SRC_HSE USBPHYC_SEL(0)>; + phys = <&usbphyc>; + status = "okay"; +}; diff --git a/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.yaml b/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.yaml index cd937080414106..57c0712ffedb11 100644 --- a/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.yaml +++ b/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.yaml @@ -21,5 +21,6 @@ supported: - backup_sram - dma - rtc + - usb_device ram: 2450 flash: 4096