chore: squash previous commits from other branches
This commit is contained in:
@@ -322,6 +322,15 @@
|
||||
// MCU with on-chip HS Phy
|
||||
#define TUP_RHPORT_HIGHSPEED 1
|
||||
|
||||
#elif TU_CHECK_MCU(OPT_MCU_STM32N6)
|
||||
#define TUP_USBIP_DWC2
|
||||
#define TUP_USBIP_DWC2_STM32
|
||||
|
||||
#define TUP_DCD_ENDPOINT_MAX 9
|
||||
|
||||
// MCU with on-chip HS Phy
|
||||
#define TUP_RHPORT_HIGHSPEED 2
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Sony
|
||||
//--------------------------------------------------------------------+
|
||||
|
@@ -425,6 +425,11 @@ bool dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
|
||||
// Clear A override, force B Valid
|
||||
dwc2->gotgctl = (dwc2->gotgctl & ~GOTGCTL_AVALOEN) | GOTGCTL_BVALOEN | GOTGCTL_BVALOVAL;
|
||||
|
||||
#if CFG_TUSB_MCU == OPT_MCU_STM32N6
|
||||
// No hardware detection of Vbus B-session is available on the STM32N6
|
||||
dwc2->stm32_gccfg |= STM32_GCCFG_VBVALOVAL;
|
||||
#endif
|
||||
|
||||
// Enable required interrupts
|
||||
dwc2->gintmsk |= GINTMSK_OTGINT | GINTMSK_USBSUSPM | GINTMSK_USBRST | GINTMSK_ENUMDNEM | GINTMSK_WUIM;
|
||||
|
||||
|
@@ -22,6 +22,7 @@ dwc2_reg_value = {
|
||||
'ST H743/H750': [0x2300, 0x4F54330A, 0, 0x229FE190, 0x03B8D2E8, 0xE3F00030],
|
||||
'ST L476 FS': [0x2000, 0x4F54310A, 0, 0x229ED520, 0x0200D1E8, 0x17F08030],
|
||||
'ST U5A5 HS': [0x5000, 0x4F54411A, 0, 0x228FE052, 0x03B882E8, 0xE2103E30],
|
||||
'ST N6xx HS': [0x5000, 0x4F54411A, 0, 0x228FE052, 0x03B882E8, 0xE2103E30],
|
||||
'XMC4500': [0xAEC000, 0x4F54292A, 0, 0x228F5930, 0x027A01E5, 0xDBF08030],
|
||||
'GD32VF103': [0x1000, 0, 0, 0, 0, 0],
|
||||
}
|
||||
|
@@ -77,6 +77,17 @@ extern "C" {
|
||||
#define EP_MAX_HS 9
|
||||
#define EP_FIFO_SIZE_HS 4096
|
||||
|
||||
#elif CFG_TUSB_MCU == OPT_MCU_STM32N6
|
||||
#include "stm32n6xx.h"
|
||||
#define EP_MAX_FS 6
|
||||
#define EP_FIFO_SIZE_FS 1280
|
||||
|
||||
#define EP_MAX_HS 9
|
||||
#define EP_FIFO_SIZE_HS 4096
|
||||
|
||||
#define USB_OTG_HS_PERIPH_BASE USB1_OTG_HS_BASE
|
||||
#define OTG_HS_IRQn USB1_OTG_HS_IRQn
|
||||
|
||||
#elif CFG_TUSB_MCU == OPT_MCU_STM32F7
|
||||
#include "stm32f7xx.h"
|
||||
#define EP_MAX_FS 6
|
||||
|
@@ -381,6 +381,10 @@ bool hcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
|
||||
|
||||
// force host mode and wait for mode switch
|
||||
dwc2->gusbcfg = (dwc2->gusbcfg & ~GUSBCFG_FDMOD) | GUSBCFG_FHMOD;
|
||||
#if CFG_TUSB_MCU == OPT_MCU_STM32N6
|
||||
// No hardware detection of Vbus B-session is available on the STM32N6
|
||||
dwc2->stm32_gccfg &= ~STM32_GCCFG_VBVALOVAL;
|
||||
#endif
|
||||
while ((dwc2->gintsts & GINTSTS_CMOD) != GINTSTS_CMODE_HOST) {}
|
||||
|
||||
// configure fixed-allocated fifo scheme
|
||||
|
@@ -94,6 +94,7 @@
|
||||
#define OPT_MCU_STM32U0 316 ///< ST U0
|
||||
#define OPT_MCU_STM32H7RS 317 ///< ST F7RS
|
||||
#define OPT_MCU_STM32C0 318 ///< ST C0
|
||||
#define OPT_MCU_STM32N6 319 ///< ST N6
|
||||
|
||||
// Sony
|
||||
#define OPT_MCU_CXD56 400 ///< SONY CXD56
|
||||
|
Reference in New Issue
Block a user