From 9ba1ba8fa13dc63a3075f41c4944f22ea12021e6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 22 Feb 2022 18:39:02 -0800 Subject: [PATCH] Guard clock setup for USB2 --- hw/bsp/imxrt/family.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/bsp/imxrt/family.c b/hw/bsp/imxrt/family.c index 03be3b3d..a811a7e4 100644 --- a/hw/bsp/imxrt/family.c +++ b/hw/bsp/imxrt/family.c @@ -98,10 +98,6 @@ void board_init(void) CLOCK_EnableUsbhs0PhyPllClock(kCLOCK_Usbphy480M, 480000000U); CLOCK_EnableUsbhs0Clock(kCLOCK_Usb480M, 480000000U); - // USB1 - CLOCK_EnableUsbhs1PhyPllClock(kCLOCK_Usbphy480M, 480000000U); - CLOCK_EnableUsbhs1Clock(kCLOCK_Usb480M, 480000000U); - USBPHY_Type* usb_phy; // RT105x RT106x have dual USB controller. @@ -125,6 +121,10 @@ void board_init(void) // RT105x RT106x have dual USB controller. #ifdef USBPHY2 + // USB1 + CLOCK_EnableUsbhs1PhyPllClock(kCLOCK_Usbphy480M, 480000000U); + CLOCK_EnableUsbhs1Clock(kCLOCK_Usb480M, 480000000U); + usb_phy = USBPHY2; // Enable PHY support for Low speed device + LS via FS Hub