From a2921db3f6c8f2d8748871a1a0a5c5722edceb73 Mon Sep 17 00:00:00 2001 From: wgzAIIT <820906721@qq.com> Date: Fri, 1 Apr 2022 10:15:39 +0800 Subject: [PATCH] change support usb1 to usb2 on xidatong --- .../aiit_board/xidatong/include/board.h | 1 + .../aiit_board/xidatong/src/imxrt_usbhost.c | 2 +- .../arm/src/imxrt/hardware/imxrt_usbotg.h | 5 +++ .../arm/src/imxrt/hardware/imxrt_usbphy.h | 32 +++++++++++++------ .../hardware/rt105x/imxrt105x_memorymap.h | 2 +- .../arch/arm/src/imxrt/imxrt_clockconfig.c | 26 +++++++-------- .../nuttx/arch/arm/src/imxrt/imxrt_ehci.c | 6 ++-- .../nuttx/arch/arm/src/imxrt/imxrt_lowputc.c | 4 +-- .../nuttx/arch/arm/src/imxrt/imxrt_lpi2c.c | 4 +-- .../nuttx/arch/arm/src/imxrt/imxrt_lpspi.c | 8 ++--- .../nuttx/arch/arm/src/imxrt/imxrt_usbdev.c | 18 +++++------ 11 files changed, 63 insertions(+), 45 deletions(-) diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/aiit_board/xidatong/include/board.h b/Ubiquitous/Nuttx_Fusion_XiUOS/aiit_board/xidatong/include/board.h index e6021288c..49181683a 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/aiit_board/xidatong/include/board.h +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/aiit_board/xidatong/include/board.h @@ -128,6 +128,7 @@ #define IMXRT_SYS_PLL_SELECT CCM_ANALOG_PLL_SYS_DIV_SELECT_22 #define IMXRT_USB1_PLL_DIV_SELECT CCM_ANALOG_PLL_USB1_DIV_SELECT_20 +#define IMXRT_USB2_PLL_DIV_SELECT CCM_ANALOG_PLL_USB2_DIV_SELECT_20 // #define BOARD_CPU_FREQUENCY \ // (BOARD_XTAL_FREQUENCY * (IMXRT_ARM_PLL_DIV_SELECT / 2)) / IMXRT_ARM_PODF_DIVIDER diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/aiit_board/xidatong/src/imxrt_usbhost.c b/Ubiquitous/Nuttx_Fusion_XiUOS/aiit_board/xidatong/src/imxrt_usbhost.c index 335a3f687..46cc10e63 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/aiit_board/xidatong/src/imxrt_usbhost.c +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/aiit_board/xidatong/src/imxrt_usbhost.c @@ -138,7 +138,7 @@ int imxrt_usbhost_initialize(void) /* Make sure we don't accidentally switch on USB bus power */ - *((uint32_t *)IMXRT_USBNC_USB_OTG1_CTRL) = USBNC_PWR_POL; + *((uint32_t *)IMXRT_USBNC_USB_OTG2_CTRL) = USBNC_PWR_POL; *((uint32_t *)0x400d9030) = (1 << 21); *((uint32_t *)0x400d9000) = 0; diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/imxrt_usbotg.h b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/imxrt_usbotg.h index 5921081a2..3d83733ce 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/imxrt_usbotg.h +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/imxrt_usbotg.h @@ -117,7 +117,9 @@ /* USB Non-core memory map & register definition */ #define IMXRT_USBNC_USB_OTG1_CTRL_OFFSET 0x0800 /* OTG1 Control Register */ +#define IMXRT_USBNC_USB_OTG2_CTRL_OFFSET 0x0800 /* OTG2 Control Register */ #define IMXRT_USBNC_USB_OTG1_PHY_CTRL_0_OFFSET 0x0818 /* OTG1 Phy Control Register */ +#define IMXRT_USBNC_USB_OTG2_PHY_CTRL_0_OFFSET 0x0818 /* OTG2 Phy Control Register */ /* USBOTG register (virtual) addresses **************************************/ @@ -201,6 +203,9 @@ #define IMXRT_USBNC_USB_OTG1_CTRL (IMXRT_USB_BASE + IMXRT_USBNC_USB_OTG1_CTRL_OFFSET) #define IMXRT_USBNC_USB_OTG1_PHY_CTRL_0 (IMXRT_USB_BASE + IMXRT_USBNC_USB_OTG1_PHY_CTRL_0_OFFSET) +#define IMXRT_USBNC_USB_OTG2_CTRL (IMXRT_USB_BASE + IMXRT_USBNC_USB_OTG2_CTRL_OFFSET) +#define IMXRT_USBNC_USB_OTG2_PHY_CTRL_0 (IMXRT_USB_BASE + IMXRT_USBNC_USB_OTG2_PHY_CTRL_0_OFFSET) + /* USBOTG register bit definitions ******************************************/ /* Device/host capability registers */ diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/imxrt_usbphy.h b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/imxrt_usbphy.h index 1d4b7ff4c..ec30f0aee 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/imxrt_usbphy.h +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/imxrt_usbphy.h @@ -32,23 +32,35 @@ * Pre-processor Definitions ****************************************************************************/ -#define IMXRT_USBPHY_BASE_OFFSET 0x1000 /* USB PHY Base */ +#define IMXRT_USBPHY1_BASE_OFFSET 0x1000 /* USB PHY1 Base */ +#define IMXRT_USBPHY2_BASE_OFFSET 0x2000 /* USB PHY2 Base */ -#define IMXRT_USBPHY_BASE (IMXRT_ANATOP_BASE + IMXRT_USBPHY_BASE_OFFSET) /* USB PHY Base */ +#define IMXRT_USBPHY1_BASE (IMXRT_ANATOP_BASE + IMXRT_USBPHY1_BASE_OFFSET) /* USB PHY1 Base */ +#define IMXRT_USBPHY2_BASE (IMXRT_ANATOP_BASE + IMXRT_USBPHY2_BASE_OFFSET) /* USB PHY2 Base */ /* Register Offsets *********************************************************/ -#define IMXRT_USBPHY1_PWD_OFFSET 0x0000 /* USBPHY1 USB PHY Power-Down Register */ -#define IMXRT_USBPHY1_PWD_CLR_OFFSET 0x0008 /* USBPHY1 USB PHY Power-Down Register Clear */ -#define IMXRT_USBPHY1_CTRL_OFFSET 0x0030 /* USBPHY1 USB PHY General Control Register */ -#define IMXRT_USBPHY1_CTRL_CLR_OFFSET 0x0038 /* USBPHY1 USB PHY General Control Register Clear */ +#define IMXRT_USBPHY1_PWD_OFFSET 0x0000 /* USBPHY1 USB PHY1 Power-Down Register */ +#define IMXRT_USBPHY1_PWD_CLR_OFFSET 0x0008 /* USBPHY1 USB PHY1 Power-Down Register Clear */ +#define IMXRT_USBPHY1_CTRL_OFFSET 0x0030 /* USBPHY1 USB PHY1 General Control Register */ +#define IMXRT_USBPHY1_CTRL_CLR_OFFSET 0x0038 /* USBPHY1 USB PHY1 General Control Register Clear */ + +#define IMXRT_USBPHY2_PWD_OFFSET 0x0000 /* USBPHY2 USB PHY Power-Down Register */ +#define IMXRT_USBPHY2_PWD_CLR_OFFSET 0x0008 /* USBPHY2 USB PHY Power-Down Register Clear */ +#define IMXRT_USBPHY2_CTRL_OFFSET 0x0030 /* USBPHY2 USB PHY General Control Register */ +#define IMXRT_USBPHY2_CTRL_CLR_OFFSET 0x0038 /* USBPHY2 USB PHY General Control Register Clear */ /* Register addresses *******************************************************/ -#define IMXRT_USBPHY1_PWD (IMXRT_USBPHY_BASE + IMXRT_USBPHY1_PWD_OFFSET) /* USBPHY1 USB PHY Power-Down Register */ -#define IMXRT_USBPHY1_PWD_CLR (IMXRT_USBPHY_BASE + IMXRT_USBPHY1_PWD_CLR_OFFSET) /* USBPHY1 USB PHY Power-Down Register Clear */ -#define IMXRT_USBPHY1_CTRL (IMXRT_USBPHY_BASE + IMXRT_USBPHY1_CTRL_OFFSET) /* USBPHY1 USB PHY General Control Register */ -#define IMXRT_USBPHY1_CTRL_CLR (IMXRT_USBPHY_BASE + IMXRT_USBPHY1_CTRL_CLR_OFFSET) /* USBPHY1 USB PHY General Control Register Clear */ +#define IMXRT_USBPHY1_PWD (IMXRT_USBPHY1_BASE + IMXRT_USBPHY1_PWD_OFFSET) /* USBPHY1 USB PHY1 Power-Down Register */ +#define IMXRT_USBPHY1_PWD_CLR (IMXRT_USBPHY1_BASE + IMXRT_USBPHY1_PWD_CLR_OFFSET) /* USBPHY1 USB PHY1 Power-Down Register Clear */ +#define IMXRT_USBPHY1_CTRL (IMXRT_USBPHY1_BASE + IMXRT_USBPHY1_CTRL_OFFSET) /* USBPHY1 USB PHY1 General Control Register */ +#define IMXRT_USBPHY1_CTRL_CLR (IMXRT_USBPHY1_BASE + IMXRT_USBPHY1_CTRL_CLR_OFFSET) /* USBPHY1 USB PHY1 General Control Register Clear */ + +#define IMXRT_USBPHY2_PWD (IMXRT_USBPHY2_BASE + IMXRT_USBPHY2_PWD_OFFSET) /* USBPHY2 USB PHY2 Power-Down Register */ +#define IMXRT_USBPHY2_PWD_CLR (IMXRT_USBPHY2_BASE + IMXRT_USBPHY2_PWD_CLR_OFFSET) /* USBPHY2 USB PHY2 Power-Down Register Clear */ +#define IMXRT_USBPHY2_CTRL (IMXRT_USBPHY2_BASE + IMXRT_USBPHY2_CTRL_OFFSET) /* USBPHY2 USB PHY2 General Control Register */ +#define IMXRT_USBPHY2_CTRL_CLR (IMXRT_USBPHY2_BASE + IMXRT_USBPHY2_CTRL_CLR_OFFSET) /* USBPHY2 USB PHY2 General Control Register Clear */ /* Register Bit Definitions *************************************************/ diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_memorymap.h b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_memorymap.h index f6afcb4a5..dc42ac2e8 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_memorymap.h +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/hardware/rt105x/imxrt105x_memorymap.h @@ -232,7 +232,7 @@ /* 0x402d4000 16KB Reserved */ #define IMXRT_ENET_BASE 0x402d8000 /* 16KB ENET */ #define IMXRT_USBPL301_BASE 0x402dc000 /* 16KB USB(PL301) */ -#define IMXRT_USB_BASE 0x402e0000 /* 16KB USB(USB) */ +#define IMXRT_USB_BASE 0x402e0200 /* 16KB USB(USB) */ /* 0x402e4000 16KB Reserved */ diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_clockconfig.c b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_clockconfig.c index b0aa5d62d..97fef0a96 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_clockconfig.c +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_clockconfig.c @@ -250,14 +250,14 @@ static void imxrt_pllsetup(void) CCM_ANALOG_PFD_480_PFD3_CLKGATE, IMXRT_CCM_ANALOG_PFD_480); - reg = IMXRT_USB1_PLL_DIV_SELECT | - CCM_ANALOG_PLL_USB1_ENABLE | - CCM_ANALOG_PLL_USB1_EN_USB_CLKS | - CCM_ANALOG_PLL_USB1_POWER; - putreg32(reg, IMXRT_CCM_ANALOG_PLL_USB1); + reg = IMXRT_USB2_PLL_DIV_SELECT | + CCM_ANALOG_PLL_USB2_ENABLE | + CCM_ANALOG_PLL_USB2_EN_USB_CLKS | + CCM_ANALOG_PLL_USB2_POWER; + putreg32(reg, IMXRT_CCM_ANALOG_PLL_USB2); - while ((getreg32(IMXRT_CCM_ANALOG_PLL_USB1) & - CCM_ANALOG_PLL_USB1_LOCK) == 0) + while ((getreg32(IMXRT_CCM_ANALOG_PLL_USB2) & + CCM_ANALOG_PLL_USB2_LOCK) == 0) { } @@ -320,13 +320,13 @@ static void imxrt_pllsetup(void) CCM_ANALOG_PFD_480_PFD3_CLKGATE, IMXRT_CCM_ANALOG_PFD_480); - reg = CCM_ANALOG_PLL_USB1_DIV_SELECT(IMXRT_USB1_PLL_DIV_SELECT) | - CCM_ANALOG_PLL_USB1_ENABLE | CCM_ANALOG_PLL_USB1_EN_USB_CLKS | - CCM_ANALOG_PLL_USB1_POWER; - putreg32(reg, IMXRT_CCM_ANALOG_PLL_USB1); + reg = CCM_ANALOG_PLL_USB2_DIV_SELECT(IMXRT_USB2_PLL_DIV_SELECT) | + CCM_ANALOG_PLL_USB2_ENABLE | CCM_ANALOG_PLL_USB2_EN_USB_CLKS | + CCM_ANALOG_PLL_USB2_POWER; + putreg32(reg, IMXRT_CCM_ANALOG_PLL_USB2); - while ((getreg32(IMXRT_CCM_ANALOG_PLL_USB1) & - CCM_ANALOG_PLL_USB1_LOCK) == 0) + while ((getreg32(IMXRT_CCM_ANALOG_PLL_USB2) & + CCM_ANALOG_PLL_USB2_LOCK) == 0) { } diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_ehci.c b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_ehci.c index ff83ee178..e5b28c3f0 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_ehci.c +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_ehci.c @@ -5363,10 +5363,10 @@ FAR struct usbhost_connection_s *imxrt_ehci_initialize(int controller) /* Interrupt Configuration ************************************************/ - ret = irq_attach(IMXRT_IRQ_USBOTG1, imxrt_ehci_interrupt, NULL); + ret = irq_attach(IMXRT_IRQ_USBOTG2, imxrt_ehci_interrupt, NULL); if (ret != 0) { - usbhost_trace1(EHCI_TRACE1_IRQATTACH_FAILED, IMXRT_IRQ_USBOTG1); + usbhost_trace1(EHCI_TRACE1_IRQATTACH_FAILED, IMXRT_IRQ_USBOTG2); return NULL; } @@ -5378,7 +5378,7 @@ FAR struct usbhost_connection_s *imxrt_ehci_initialize(int controller) /* Enable interrupts at the interrupt controller */ - up_enable_irq(IMXRT_IRQ_USBOTG1); + up_enable_irq(IMXRT_IRQ_USBOTG2); /* Drive Vbus +5V (the smoke test) */ diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lowputc.c b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lowputc.c index 682d1fec9..3649ec4f7 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lowputc.c +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lowputc.c @@ -386,8 +386,8 @@ int imxrt_lpuart_configure(uint32_t base, } else { - if ((getreg32(IMXRT_CCM_ANALOG_PLL_USB1) & - CCM_ANALOG_PLL_USB1_DIV_SELECT_MASK) != 0) + if ((getreg32(IMXRT_CCM_ANALOG_PLL_USB2) & + CCM_ANALOG_PLL_USB2_DIV_SELECT_MASK) != 0) { pll3_div = 22; } diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lpi2c.c b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lpi2c.c index 76fa24cc4..20d8e1914 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lpi2c.c +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lpi2c.c @@ -1054,8 +1054,8 @@ static void imxrt_lpi2c_setclock(FAR struct imxrt_lpi2c_priv_s *priv, } else { - if ((getreg32(IMXRT_CCM_ANALOG_PLL_USB1) & - CCM_ANALOG_PLL_USB1_DIV_SELECT_MASK) != 0) + if ((getreg32(IMXRT_CCM_ANALOG_PLL_USB2) & + CCM_ANALOG_PLL_USB2_DIV_SELECT_MASK) != 0) { pll3_div = 22; } diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lpspi.c b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lpspi.c index ccf50c13f..3abe7d9d2 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lpspi.c +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_lpspi.c @@ -702,8 +702,8 @@ static inline void imxrt_lpspi_master_set_delays( uint32_t clock_div_prescaler; uint32_t additional_scaler; - if ((getreg32(IMXRT_CCM_ANALOG_PLL_USB1) & - CCM_ANALOG_PLL_USB1_DIV_SELECT_MASK) != 0) + if ((getreg32(IMXRT_CCM_ANALOG_PLL_USB2) & + CCM_ANALOG_PLL_USB2_DIV_SELECT_MASK) != 0) { pll3_div = 22; } @@ -915,8 +915,8 @@ static uint32_t imxrt_lpspi_setfrequency(FAR struct spi_dev_s *dev, LPSPI_CR_MEN, 0); } - if ((getreg32(IMXRT_CCM_ANALOG_PLL_USB1) & - CCM_ANALOG_PLL_USB1_DIV_SELECT_MASK) != 0) + if ((getreg32(IMXRT_CCM_ANALOG_PLL_USB2) & + CCM_ANALOG_PLL_USB2_DIV_SELECT_MASK) != 0) { pll3_div = 22; } diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_usbdev.c b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_usbdev.c index 69f6f000b..3f0d6ff03 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_usbdev.c +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/arch/arm/src/imxrt/imxrt_usbdev.c @@ -2879,7 +2879,7 @@ void arm_usbinitialize(void) /* Soft reset PHY and enable clock */ - putreg32(USBPHY_CTRL_SFTRST | USBPHY_CTRL_CLKGATE, IMXRT_USBPHY1_CTRL_CLR); + putreg32(USBPHY_CTRL_SFTRST | USBPHY_CTRL_CLKGATE, IMXRT_USBPHY2_CTRL_CLR); /* Disconnect device */ @@ -2898,7 +2898,7 @@ void arm_usbinitialize(void) * CCM_ANALOG_USBPHYx_PLL_480_CTRLn. */ - imxrt_putreg(0, IMXRT_USBPHY1_PWD); + imxrt_putreg(0, IMXRT_USBPHY2_PWD); /* Program the controller to be the USB device controller */ @@ -2907,8 +2907,8 @@ void arm_usbinitialize(void) /* Attach USB controller interrupt handler */ - irq_attach(IMXRT_IRQ_USBOTG1, imxrt_usbinterrupt, NULL); - up_enable_irq(IMXRT_IRQ_USBOTG1); + irq_attach(IMXRT_IRQ_USBOTG2, imxrt_usbinterrupt, NULL); + up_enable_irq(IMXRT_IRQ_USBOTG2); leave_critical_section(flags); @@ -2945,8 +2945,8 @@ void arm_usbuninitialize(void) /* Disable and detach IRQs */ - up_disable_irq(IMXRT_IRQ_USBOTG1); - irq_detach(IMXRT_IRQ_USBOTG1); + up_disable_irq(IMXRT_IRQ_USBOTG2); + irq_detach(IMXRT_IRQ_USBOTG2); /* Reset the controller */ @@ -2958,7 +2958,7 @@ void arm_usbuninitialize(void) /* Power down the PHY */ - imxrt_putreg(0xffffffff, IMXRT_USBPHY1_PWD); + imxrt_putreg(0xffffffff, IMXRT_USBPHY2_PWD); /* Stop clock * NOTE: This will interfere with USB OTG 2 and should probably be removed @@ -3016,7 +3016,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) { /* Enable USB controller interrupts */ - up_enable_irq(IMXRT_IRQ_USBOTG1); + up_enable_irq(IMXRT_IRQ_USBOTG2); } return ret; @@ -3051,7 +3051,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) /* Disable USB controller interrupts */ - up_disable_irq(IMXRT_IRQ_USBOTG1); + up_disable_irq(IMXRT_IRQ_USBOTG2); /* Unhook the driver */