summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-10-31 13:27:54 +0700
committerGitHub <[email protected]>2023-10-31 13:27:54 +0700
commit4c01c5a714e535fdc89ba005b5453e454817d4c5 (patch)
tree1c16fa45ff830a8691b2df24a91b832b079d4eeb /src/common
parenta91b720c2e9af142cc7b26801381e84cf4e50953 (diff)
parent3e140756dc5e3761209bf5b399621e6c0ed1dadd (diff)
Merge pull request #2300 from hathach/add-u5a5
Add support for stm32u5a5 (highspeed with built-in femtoPHY)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_mcu.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h
index 8807ff8aa..1797f0bc4 100644
--- a/src/common/tusb_mcu.h
+++ b/src/common/tusb_mcu.h
@@ -217,9 +217,7 @@
// TypeC controller
#define TUP_USBIP_TYPEC_STM32
-
#define TUP_DCD_ENDPOINT_MAX 8
-
#define TUP_TYPEC_RHPORTS_NUM 1
#elif TU_CHECK_MCU(OPT_MCU_STM32G0)
@@ -261,14 +259,21 @@
#elif TU_CHECK_MCU(OPT_MCU_STM32U5)
#define TUP_USBIP_DWC2
#define TUP_USBIP_DWC2_STM32
- #define TUP_DCD_ENDPOINT_MAX 6
+
+ // U59x/5Ax/5Fx/5Gx are highspeed with built-in HS PHY
+ #if defined(STM32U595xx) || defined(STM32U599xx) || defined(STM32U5A5xx) || defined(STM32U5A9xx) || \
+ defined(STM32U5F7xx) || defined(STM32U5F9xx) || defined(STM32U5G7xx) || defined(STM32U5G9xx)
+ #define TUP_DCD_ENDPOINT_MAX 9
+ #define TUP_RHPORT_HIGHSPEED 1
+ #else
+ #define TUP_DCD_ENDPOINT_MAX 6
+ #endif
#elif TU_CHECK_MCU(OPT_MCU_STM32L5)
#define TUP_USBIP_FSDEV
#define TUP_USBIP_FSDEV_STM32
#define TUP_DCD_ENDPOINT_MAX 8
-
//--------------------------------------------------------------------+
// Sony
//--------------------------------------------------------------------+