summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2022-07-11 15:53:24 +0700
committerGitHub <[email protected]>2022-07-11 15:53:24 +0700
commit0bfb9d62de3a13b685437b503e2170550662bb96 (patch)
treef4033fe91fe68653ab207c8f95b8ce9ad4eff3a1
parentecb899408bb95c5c0d50ebe2d887cd746104c534 (diff)
parent6da1e93edd4547a5ec5a1681cd1cb31803564993 (diff)
Merge pull request #1543 from robert-hh/1170_0.13.0
mimxrt: Change the definitions for MIMXRT boards.
-rw-r--r--examples/host/bare_api/only.txt2
-rw-r--r--examples/host/cdc_msc_hid/only.txt2
-rw-r--r--examples/host/hid_controller/only.txt2
-rw-r--r--hw/bsp/board_mcu.h2
-rw-r--r--hw/bsp/f1c100s/README.md2
-rw-r--r--hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h4
-rw-r--r--hw/bsp/imxrt/family.mk2
m---------hw/mcu/nxp/mcux-sdk0
-rw-r--r--src/class/audio/audio_device.c4
-rw-r--r--src/common/tusb_mcu.h2
-rw-r--r--src/portable/chipidea/ci_hs/ci_hs_imxrt.h8
-rw-r--r--src/portable/chipidea/ci_hs/dcd_ci_hs.c2
-rw-r--r--src/portable/chipidea/ci_hs/hcd_ci_hs.c4
-rw-r--r--src/portable/nxp/transdimension/dcd_transdimension.c6
-rw-r--r--src/portable/nxp/transdimension/hcd_transdimension.c6
-rw-r--r--src/tusb_option.h4
16 files changed, 34 insertions, 18 deletions
diff --git a/examples/host/bare_api/only.txt b/examples/host/bare_api/only.txt
index 7fe4e3f5c..fa9c14857 100644
--- a/examples/host/bare_api/only.txt
+++ b/examples/host/bare_api/only.txt
@@ -3,7 +3,9 @@ mcu:LPC177X_8X
mcu:LPC18XX
mcu:LPC40XX
mcu:LPC43XX
+mcu:MIMXRT
mcu:MIMXRT10XX
+mcu:MIMXRT11XX
mcu:RP2040
mcu:MSP432E4
mcu:RX65X
diff --git a/examples/host/cdc_msc_hid/only.txt b/examples/host/cdc_msc_hid/only.txt
index 7fe4e3f5c..fa9c14857 100644
--- a/examples/host/cdc_msc_hid/only.txt
+++ b/examples/host/cdc_msc_hid/only.txt
@@ -3,7 +3,9 @@ mcu:LPC177X_8X
mcu:LPC18XX
mcu:LPC40XX
mcu:LPC43XX
+mcu:MIMXRT
mcu:MIMXRT10XX
+mcu:MIMXRT11XX
mcu:RP2040
mcu:MSP432E4
mcu:RX65X
diff --git a/examples/host/hid_controller/only.txt b/examples/host/hid_controller/only.txt
index 7fe4e3f5c..fa9c14857 100644
--- a/examples/host/hid_controller/only.txt
+++ b/examples/host/hid_controller/only.txt
@@ -3,7 +3,9 @@ mcu:LPC177X_8X
mcu:LPC18XX
mcu:LPC40XX
mcu:LPC43XX
+mcu:MIMXRT
mcu:MIMXRT10XX
+mcu:MIMXRT11XX
mcu:RP2040
mcu:MSP432E4
mcu:RX65X
diff --git a/hw/bsp/board_mcu.h b/hw/bsp/board_mcu.h
index 8202479cb..5c309a21d 100644
--- a/hw/bsp/board_mcu.h
+++ b/hw/bsp/board_mcu.h
@@ -110,7 +110,7 @@
#elif CFG_TUSB_MCU == OPT_MCU_VALENTYUSB_EPTRI
// no header needed
-#elif CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
+#elif CFG_TUSB_MCU == OPT_MCU_MIMXRT
#include "fsl_device_registers.h"
#elif CFG_TUSB_MCU == OPT_MCU_NUC120
diff --git a/hw/bsp/f1c100s/README.md b/hw/bsp/f1c100s/README.md
index 325044716..4aa1e153b 100644
--- a/hw/bsp/f1c100s/README.md
+++ b/hw/bsp/f1c100s/README.md
@@ -17,4 +17,4 @@ Flash: `make BOARD=f1c100s flash` will write the image to SPI flash, and then re
## TODO
-* Add F1C100s to `#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX` high speed MCU check in examples (maybe we should extract the logic?) \ No newline at end of file
+* Add F1C100s to `#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT` high speed MCU check in examples (maybe we should extract the logic?) \ No newline at end of file
diff --git a/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h b/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h
index 928fbd727..0472f608c 100644
--- a/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h
@@ -45,7 +45,7 @@
// UART
#define UART_PORT LPUART1
-#define UART_RX_PINMUX IOMUXC_GPIO_AD_B0_13_LPUART1_RX
-#define UART_TX_PINMUX IOMUXC_GPIO_AD_B0_12_LPUART1_TX
+#define UART_RX_PINMUX IOMUXC_GPIO_AD_B0_13_LPUART1_RXD
+#define UART_TX_PINMUX IOMUXC_GPIO_AD_B0_12_LPUART1_TXD
#endif /* BOARD_H_ */
diff --git a/hw/bsp/imxrt/family.mk b/hw/bsp/imxrt/family.mk
index 0a55b740b..846ecd255 100644
--- a/hw/bsp/imxrt/family.mk
+++ b/hw/bsp/imxrt/family.mk
@@ -13,7 +13,7 @@ CFLAGS += \
-D__ARMVFP__=0 -D__ARMFPV5__=0\
-DXIP_EXTERNAL_FLASH=1 \
-DXIP_BOOT_HEADER_ENABLE=1 \
- -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX
+ -DCFG_TUSB_MCU=OPT_MCU_MIMXRT
ifdef BOARD_TUD_RHPORT
CFLAGS += -DBOARD_TUD_RHPORT=$(BOARD_TUD_RHPORT)
diff --git a/hw/mcu/nxp/mcux-sdk b/hw/mcu/nxp/mcux-sdk
-Subproject cb21c660991c92e90ece99ccb63a4bc611899c3
+Subproject ae2ab01d9d70ad00cd0e935c2552bd5f0e5c029
diff --git a/src/class/audio/audio_device.c b/src/class/audio/audio_device.c
index 6df68c559..473d1e910 100644
--- a/src/class/audio/audio_device.c
+++ b/src/class/audio/audio_device.c
@@ -66,7 +66,7 @@
// Use ring buffer if it's available, some MCUs need extra RAM requirements
#ifndef TUD_AUDIO_PREFER_RING_BUFFER
-#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
+#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT
#define TUD_AUDIO_PREFER_RING_BUFFER 0
#else
#define TUD_AUDIO_PREFER_RING_BUFFER 1
@@ -102,7 +102,7 @@
CFG_TUSB_MCU == OPT_MCU_GD32VF103 || \
CFG_TUSB_MCU == OPT_MCU_LPC18XX || \
CFG_TUSB_MCU == OPT_MCU_LPC43XX || \
- CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || \
+ CFG_TUSB_MCU == OPT_MCU_MIMXRT || \
CFG_TUSB_MCU == OPT_MCU_MSP432E4
#if TUD_AUDIO_PREFER_RING_BUFFER
#define USE_LINEAR_BUFFER 0
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h
index 383a8d686..baa82fc14 100644
--- a/src/common/tusb_mcu.h
+++ b/src/common/tusb_mcu.h
@@ -75,7 +75,7 @@
// TODO USB0 has 5, USB1 has 6
#define TUP_DCD_ENDPOINT_MAX 6
-#elif TU_CHECK_MCU(OPT_MCU_MIMXRT10XX)
+#elif TU_CHECK_MCU(OPT_MCU_MIMXRT)
#define TUP_USBIP_CHIPIDEA_HS
#define TUP_USBIP_EHCI
diff --git a/src/portable/chipidea/ci_hs/ci_hs_imxrt.h b/src/portable/chipidea/ci_hs/ci_hs_imxrt.h
index 78ca5a5a2..2de0d9cb4 100644
--- a/src/portable/chipidea/ci_hs/ci_hs_imxrt.h
+++ b/src/portable/chipidea/ci_hs/ci_hs_imxrt.h
@@ -29,6 +29,14 @@
#include "fsl_device_registers.h"
+#if !defined(USB1_BASE) && defined(USB_OTG1_BASE)
+#define USB1_BASE USB_OTG1_BASE
+#endif
+
+#if !defined(USB2_BASE) && defined(USB_OTG2_BASE)
+#define USB2_BASE USB_OTG2_BASE
+#endif
+
static const ci_hs_controller_t _ci_controller[] =
{
// RT1010 and RT1020 only has 1 USB controller
diff --git a/src/portable/chipidea/ci_hs/dcd_ci_hs.c b/src/portable/chipidea/ci_hs/dcd_ci_hs.c
index 41d2f1870..c7cc3e0e8 100644
--- a/src/portable/chipidea/ci_hs/dcd_ci_hs.c
+++ b/src/portable/chipidea/ci_hs/dcd_ci_hs.c
@@ -34,7 +34,7 @@
#include "device/dcd.h"
#include "ci_hs_type.h"
-#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
+#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
#include "ci_hs_imxrt.h"
#elif TU_CHECK_MCU(OPT_MCU_LPC18XX, OPT_MCU_LPC43XX)
#include "ci_hs_lpc18_43.h"
diff --git a/src/portable/chipidea/ci_hs/hcd_ci_hs.c b/src/portable/chipidea/ci_hs/hcd_ci_hs.c
index 221721b0f..d0396daea 100644
--- a/src/portable/chipidea/ci_hs/hcd_ci_hs.c
+++ b/src/portable/chipidea/ci_hs/hcd_ci_hs.c
@@ -29,7 +29,7 @@
// Chipidea Highspeed USB IP implement EHCI for host functionality
#if CFG_TUH_ENABLED && \
- (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX)
+ (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT)
//--------------------------------------------------------------------+
// INCLUDE
@@ -39,7 +39,7 @@
#include "portable/ehci/ehci_api.h"
#include "ci_hs_type.h"
-#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
+#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
#include "ci_hs_imxrt.h"
#elif TU_CHECK_MCU(OPT_MCU_LPC18XX, OPT_MCU_LPC43XX)
#include "ci_hs_lpc18_43.h"
diff --git a/src/portable/nxp/transdimension/dcd_transdimension.c b/src/portable/nxp/transdimension/dcd_transdimension.c
index 2347e1dae..1f27a6872 100644
--- a/src/portable/nxp/transdimension/dcd_transdimension.c
+++ b/src/portable/nxp/transdimension/dcd_transdimension.c
@@ -27,14 +27,14 @@
#include "tusb_option.h"
#if CFG_TUD_ENABLED && \
- (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX)
+ (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT)
#warning "transdimenion is renamed to chipidea (portable/chipidea/ci_hs) to match other opensource naming convention such as linux. This file will be removed in the future, please update your makefile accordingly"
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
-#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
+#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
#include "fsl_device_registers.h"
#define INCLUDE_FSL_DEVICE_REGISTERS
#else
@@ -153,7 +153,7 @@ typedef struct
const uint8_t ep_count; // Max bi-directional Endpoints
}dcd_controller_t;
-#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
+#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
static const dcd_controller_t _dcd_controller[] =
{
// RT1010 and RT1020 only has 1 USB controller
diff --git a/src/portable/nxp/transdimension/hcd_transdimension.c b/src/portable/nxp/transdimension/hcd_transdimension.c
index 2d0830981..392764ff6 100644
--- a/src/portable/nxp/transdimension/hcd_transdimension.c
+++ b/src/portable/nxp/transdimension/hcd_transdimension.c
@@ -29,14 +29,14 @@
// NXP Trans-Dimension USB IP implement EHCI for host functionality
#if CFG_TUH_ENABLED && \
- (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX)
+ (CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT)
#warning "transdimenion is renamed to chipidea (portable/chipidea/ci_hs) to match other opensource naming convention such as linux. This file will be removed in the future, please update your makefile accordingly"
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
-#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
+#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
#include "fsl_device_registers.h"
#else
// LPCOpen for 18xx & 43xx
@@ -58,7 +58,7 @@ typedef struct
const IRQn_Type irqnum; // IRQ number
}hcd_controller_t;
-#if CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX
+#if CFG_TUSB_MCU == OPT_MCU_MIMXRT
static const hcd_controller_t _hcd_controller[] =
{
// RT1010 and RT1020 only has 1 USB controller
diff --git a/src/tusb_option.h b/src/tusb_option.h
index 206d23e72..70ef1c399 100644
--- a/src/tusb_option.h
+++ b/src/tusb_option.h
@@ -98,7 +98,9 @@ typedef int make_iso_compilers_happy;
#define OPT_MCU_VALENTYUSB_EPTRI 600 ///< Fomu eptri config
// NXP iMX RT
-#define OPT_MCU_MIMXRT10XX 700 ///< NXP iMX RT10xx
+#define OPT_MCU_MIMXRT 700 ///< NXP iMX RT Series
+#define OPT_MCU_MIMXRT10XX OPT_MCU_MIMXRT ///< RT10xx
+#define OPT_MCU_MIMXRT11XX OPT_MCU_MIMXRT ///< RT11xx
// Nuvoton
#define OPT_MCU_NUC121 800