summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <[email protected]>2022-02-22 18:39:02 -0800
committerScott Shawcroft <[email protected]>2022-02-22 18:39:02 -0800
commit9ba1ba8fa13dc63a3075f41c4944f22ea12021e6 (patch)
treee53d81a66bec272f6e6367d953a7fb2158beb0b0
parentd7495975914645d147b7b9752df9e3bab7bdcfb6 (diff)
Guard clock setup for USB2
-rw-r--r--hw/bsp/imxrt/family.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/bsp/imxrt/family.c b/hw/bsp/imxrt/family.c
index 03be3b3dc..a811a7e40 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