From 7726f27bc1a5b1c2f0287c892b4659959bed1885 Mon Sep 17 00:00:00 2001 From: Philip Molloy Date: Tue, 30 Jan 2024 12:28:26 +0100 Subject: [PATCH] boards: adi_sdp_k1: add usb cdc support This adds support for the usb cdc on the k1 board Tested using samples/subsys/usb/cdc_acm Co-developed-by: Axel Haslam Signed-off-by: Axel Haslam Signed-off-by: Philip Molloy --- boards/adi/sdp_k1/adi_sdp_k1.dts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/boards/adi/sdp_k1/adi_sdp_k1.dts b/boards/adi/sdp_k1/adi_sdp_k1.dts index 91aea8c60d..52c68f90c1 100644 --- a/boards/adi/sdp_k1/adi_sdp_k1.dts +++ b/boards/adi/sdp_k1/adi_sdp_k1.dts @@ -41,6 +41,12 @@ }; }; + otghs_ulpi_phy: otghs_ulpis_phy { + compatible = "usb-ulpi-phy"; + reset-gpios = <&gpiod 7 (GPIO_ACTIVE_LOW)>; + #phy-cells = <0>; + }; + aliases { led0 = &status_led; }; @@ -78,3 +84,25 @@ current-speed = <115200>; status = "okay"; }; + +zephyr_udc0: &usbotg_hs { + pinctrl-0 = <&usb_otg_hs_ulpi_ck_pa5 + &usb_otg_hs_ulpi_d0_pa3 + &usb_otg_hs_ulpi_d1_pb0 + &usb_otg_hs_ulpi_d2_pb1 + &usb_otg_hs_ulpi_d3_pb10 + &usb_otg_hs_ulpi_d4_pb11 + &usb_otg_hs_ulpi_d5_pb12 + &usb_otg_hs_ulpi_d6_pb13 + &usb_otg_hs_ulpi_d7_pb5 + &usb_otg_hs_ulpi_stp_pc0 + &usb_otg_hs_ulpi_dir_pc2 + &usb_otg_hs_ulpi_nxt_pc3>; + pinctrl-names = "default"; + maximum-speed = "high-speed"; + /* Enable OTGHSULPIEN rather than OTGHSEN */ + clocks = <&rcc STM32_CLOCK_BUS_AHB1 0x60000000>, + <&rcc STM32_SRC_PLL_Q NO_SEL>; + phys = <&otghs_ulpi_phy>; + status = "okay"; +};