samples: cdc_acm: add DT overlay to support snps,dwc2 on nucleo_f413zh

Add DT overlay to be able to support and test usb_dc_dw driver
(snps,dwc2) on nucleo_f413zh board. This disables STM32 shim
driver described and configured on the SoC and board level.

Obviously,it works with other STM32F4 boards as well, but we
do not have a mechanism to apply it generically yet, upcoming
snippet support may fix that. Until then, we need something for
development and as an example.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2023-02-11 00:34:04 +01:00 committed by Fabio Baltieri
parent c4e188cff3
commit 0724453c64

View file

@ -0,0 +1,30 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/delete-node/ &zephyr_udc0;
/ {
soc {
dwc2_fsotg0: usb@50000000 {
compatible = "st,stm32f4-fsotg", "snps,dwc2";
reg = <0x50000000 0x40000>;
interrupts = <67 0>;
interrupt-names = "fsotg";
clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x00000080>,
<&rcc STM32_SRC_PLL_Q NO_SEL>;
status = "disabled";
};
};
};
zephyr_udc0: &dwc2_fsotg0 {
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
pinctrl-names = "default";
status = "okay";
cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};