soc: mimxrt1180: Add USB Device support

This was tested on the MIMXRT1180 EVK board

Signed-off-by: Tim Wang <tim.wang@nxp.com>
This commit is contained in:
Tim Wang 2025-03-12 15:10:10 +08:00 committed by Benjamin Cabé
commit 25fcfff154
3 changed files with 31 additions and 0 deletions

View file

@ -85,3 +85,15 @@ zephyr_udc0: &usb1 {
tx-cal-45-dp-ohms = <6>;
tx-cal-45-dm-ohms = <6>;
};
zephyr_udc1: &usb2{
status = "okay";
phy-handle = <&usbphy2>;
};
&usbphy2 {
status = "okay";
tx-d-cal = <7>;
tx-cal-45-dp-ohms = <6>;
tx-cal-45-dm-ohms = <6>;
};

View file

@ -84,3 +84,15 @@ zephyr_udc0: &usb1 {
tx-cal-45-dp-ohms = <6>;
tx-cal-45-dm-ohms = <6>;
};
zephyr_udc1: &usb2{
status = "okay";
phy-handle = <&usbphy2>;
};
&usbphy2 {
status = "okay";
tx-d-cal = <7>;
tx-cal-45-dp-ohms = <6>;
tx-cal-45-dm-ohms = <6>;
};

View file

@ -571,6 +571,13 @@ __weak void clock_init(void)
DT_PROP_BY_PHANDLE(DT_NODELABEL(usb1), clocks, clock_frequency));
#endif
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb2)) && CONFIG_UDC_NXP_EHCI
CLOCK_EnableUsbhs1PhyPllClock(kCLOCK_Usb480M,
DT_PROP_BY_PHANDLE(DT_NODELABEL(usb2), clocks, clock_frequency));
CLOCK_EnableUsbhs1Clock(kCLOCK_Usb480M,
DT_PROP_BY_PHANDLE(DT_NODELABEL(usb2), clocks, clock_frequency));
#endif
#ifdef CONFIG_IMX_USDHC
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay)