diff --git a/mcux/middleware/mcux-sdk-middleware-usb/ChangeLogKSDK.txt b/mcux/middleware/mcux-sdk-middleware-usb/ChangeLogKSDK.txt index b6f622e34..ef2e06c98 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/ChangeLogKSDK.txt +++ b/mcux/middleware/mcux-sdk-middleware-usb/ChangeLogKSDK.txt @@ -2,7 +2,30 @@ @page middleware_log Middleware Change Log @section USB USB stack for MCUXpresso SDK - The current version of USB stack is 2.9.0. + The current version of USB stack is 2.10.0. + - 2.10.0 + - New features and demos: + - Implement the USB Host ECM. + - Add new USB host example: usb_host_cdc_ecm + - Add one new USB host audio example: usb_host_audio_unified. + - eUSB support on EHCI. + - Add L1 LPM low power feature on EHCI for device and host. + - Improvement: + - Enable cache maintenance in the usb_host_msd_fatfs, usb_device_msc_disk and usb_device_msc_ramdisk examples on the RT1040-EVK, RT1050-EVKB, RT1060-EVKC and RT1170-EVKB platforms. + - Improve Host VNIC to be more compatible with other USB devices. + - Add USB_DEVICE_CONFIG_SOF_NOTIFICATION for device stack. + - Clear the pending FR_Swap during initialization to prevent the FR_Swap from affecting the later PD negotiation. + - Bug fixes: + - Fix on IP3511 driver that SETUP bit is cleared by mistake. + - Fix on IP3516 driver that cannot do multiple ISO endpoints transfers at the same time. + - Fix on IP3516 driver that the Token Done interrupt is cleared but the last completed transfer is not processed. + - Fix on IP3516 driver that the transfer will continue when receiving a short packet. + - Fix on host audio class driver that entities cannot be distinguished between recorder and speaker. + - 2.9.1 + - Improvement: + - Update EHCI controller driver for basic support of eUSB. + - Replace the hard code in audio cases with macro. + - Uniform the Chapter9 for device lite cases. - 2.9.0 - Improvement: - Change ROOT2 as enabled by default in device stack. @@ -31,7 +54,7 @@ - Update dev_composite_hid_audio_unified_bm demo to suppport independent mute/unmute and volume control. - 2.8.1 - Improvement: - - update USB audio demos to use audio component (components\audio). + - update USB audio demos to use audio component (components/audio). - Add the checking of function call return value. - Add audio multiple channels demo (usb_device_composite_audio_multi_ch_unified) on RT600 audio board. - Fix audio noise on sync mode and improve overflow/underflow checking method. diff --git a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device.h b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device.h index 5f2f49834..d5b14a5b9 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device.h @@ -131,6 +131,9 @@ typedef enum _usb_device_event kUSB_DeviceEventGetConfiguration, /*!< Get current configuration index */ kUSB_DeviceEventGetInterface, /*!< Get current interface alternate setting value */ kUSB_DeviceEventSetBHNPEnable, +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) + kUSB_DeviceEventSOF, /*!< Start of Frame received */ +#endif #if (defined(USB_DEVICE_CONFIG_CHARGER_DETECT) && (USB_DEVICE_CONFIG_CHARGER_DETECT > 0U)) kUSB_DeviceEventDcdDetectionfinished, /*!< The DCD detection finished */ #endif diff --git a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_dci.c b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_dci.c index 979feec83..84660bb11 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_dci.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_dci.c @@ -33,10 +33,6 @@ #include "usb_device_dwc3.h" #endif -#if (defined(USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) -#include "fsl_cache.h" -#endif - /******************************************************************************* * Definitions ******************************************************************************/ @@ -46,12 +42,6 @@ #define FSL_COMPONENT_ID "middleware.usb.device_stack" #endif -#if defined __CORTEX_M && (__CORTEX_M == 7U) -#if (defined(USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) -#warning USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE is not supported. -#endif -#endif - /******************************************************************************* * Prototypes ******************************************************************************/ @@ -291,12 +281,6 @@ static usb_status_t USB_DeviceTransfer(usb_device_handle handle, OSA_EXIT_CRITICAL(); if (0U != (endpointAddress & USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_MASK)) { -#if (defined(USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - if (0U != length) - { - DCACHE_CleanByRange((uint32_t)buffer, length); - } -#endif /* Call the controller send interface, the callbackFn is initialized in USB_DeviceGetControllerInterface */ status = deviceHandle->controllerInterface->deviceSend(deviceHandle->controllerHandle, endpointAddress, @@ -304,12 +288,6 @@ static usb_status_t USB_DeviceTransfer(usb_device_handle handle, } else { -#if (defined(USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - if (length) - { - DCACHE_CleanInvalidateByRange((uint32_t)buffer, length); - } -#endif /* Call the controller receive interface, the callbackFn is initialized in USB_DeviceGetControllerInterface */ status = deviceHandle->controllerInterface->deviceRecv(deviceHandle->controllerHandle, endpointAddress, @@ -581,6 +559,26 @@ static usb_status_t USB_DeviceDcdDetectFinihsedNotification(usb_device_struct_t } #endif +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) +/*! + * @brief Handle the SOF notification. + * + * This function is used to handle the SOF notification. + * + * @param handle The device handle. It equals the value returned from USB_DeviceInit. + * @param message The device callback message handle. + * + * @return A USB error code or kStatus_USB_Success. + */ +static usb_status_t USB_DeviceSOFNotification(usb_device_struct_t *handle, + usb_device_callback_message_struct_t *message) +{ + /* Call device callback to notify the application that the SOF packet is received. + the deviceCallback is the second parameter of USB_DeviceInit */ + return handle->deviceCallback(handle, kUSB_DeviceEventSOF, NULL); +} +#endif + /*! * @brief Handle the attach notification. * @@ -636,6 +634,11 @@ static usb_status_t USB_DeviceNotification(usb_device_struct_t *handle, usb_devi status = USB_DeviceDcdDetectFinihsedNotification(handle, message); break; #endif +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) + case kUSB_DeviceNotifySOF: + status = USB_DeviceSOFNotification(handle, message); + break; +#endif default: if (endpoint < USB_DEVICE_CONFIG_ENDPOINTS) diff --git a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_dci.h b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_dci.h index d8f9555f4..c6368e006 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_dci.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_dci.h @@ -33,6 +33,9 @@ typedef enum _usb_device_notification kUSB_DeviceNotifyError, /*!< Errors happened in bus */ kUSB_DeviceNotifyDetach, /*!< Device disconnected from a host */ kUSB_DeviceNotifyAttach, /*!< Device connected to a host */ +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) + kUSB_DeviceNotifySOF, /*!< Start of Frame received */ +#endif #if (defined(USB_DEVICE_CONFIG_CHARGER_DETECT) && (USB_DEVICE_CONFIG_CHARGER_DETECT > 0U)) kUSB_DeviceNotifyDcdDetectFinished, /*!< Device charger detection finished */ #endif diff --git a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_ehci.c b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_ehci.c index 8243e9812..459c1fd4f 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_ehci.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_ehci.c @@ -39,6 +39,10 @@ #if defined FSL_FEATURE_MEMORY_HAS_ADDRESS_OFFSET && FSL_FEATURE_MEMORY_HAS_ADDRESS_OFFSET #include "fsl_memory.h" #endif +#if (defined(USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) +#include "fsl_cache.h" +#endif + /******************************************************************************* * Definitions ******************************************************************************/ @@ -70,7 +74,9 @@ static void USB_DeviceEhciCancelControlPipe(usb_device_ehci_state_struct_t *ehci static void USB_DeviceEhciInterruptTokenDone(usb_device_ehci_state_struct_t *ehciState); static void USB_DeviceEhciInterruptPortChange(usb_device_ehci_state_struct_t *ehciState); static void USB_DeviceEhciInterruptReset(usb_device_ehci_state_struct_t *ehciState); -static void USB_DeviceEhciInterruptSof(usb_device_ehci_state_struct_t *ehciState); +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) +static void USB_DeviceEhciInterruptSOF(usb_device_ehci_state_struct_t *ehciState); +#endif /* USB_DEVICE_CONFIG_SOF_NOTIFICATIONS */ #if (defined(USB_DEVICE_CONFIG_LOW_POWER_MODE) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) static void USB_DeviceEhciInterruptSuspend(usb_device_ehci_state_struct_t *ehciState); #endif /* USB_DEVICE_CONFIG_LOW_POWER_MODE */ @@ -78,6 +84,8 @@ static usb_status_t USB_DeviceEhciTransfer(usb_device_ehci_state_struct_t *ehciS uint8_t endpointAddress, uint8_t *buffer, uint32_t length); +static usb_status_t USB_DeviceEhciNotification(usb_device_ehci_state_struct_t *ehciState, + usb_device_callback_message_struct_t *message); /******************************************************************************* * Variables @@ -206,7 +214,19 @@ static void USB_DeviceEhciSetDefaultState(usb_device_ehci_state_struct_t *ehciSt #if (defined(USB_DEVICE_CONFIG_LOW_POWER_MODE) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) | USBHS_USBINTR_SLE_MASK #endif /* USB_DEVICE_CONFIG_LOW_POWER_MODE */ +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) + | USBHS_USBINTR_SRE_MASK +#endif /* USB_DEVICE_CONFIG_SOF_NOTIFICATIONS */ ); + + /* Enable USB LPM L1 entry interrupt and exit interrupt */ +#if ((defined(USB_DEVICE_CONFIG_LOW_POWER_MODE)) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) +#if ((defined(USB_DEVICE_CONFIG_LPM_L1)) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) + ehciState->registerBase->USBINTR |= USB_USBINTR_LPM_L1_ENTRYIE_MASK; + ehciState->registerNcBase->LPM_CSR0 |= USBNC_LPM_CSR0_LPM_EN_MASK; + ehciState->registerNcBase->LPM_CSR1 |= USBNC_LPM_CSR1_LPM_DEV_RES_MASK; +#endif +#endif /* Clear reset flag */ ehciState->isResetting = 0U; } @@ -500,7 +520,8 @@ static void USB_DeviceEhciCancelControlPipe(usb_device_ehci_state_struct_t *ehci uint8_t direction) { usb_device_ehci_dtd_struct_t *currentDtd; - uint32_t index = ((uint32_t)endpoint << 1U) + (uint32_t)direction; + uint32_t index = ((uint32_t)endpoint << 1U) + (uint32_t)direction; + uint32_t primeBit = 1UL << (endpoint + 16U * direction); usb_device_callback_message_struct_t message; message.buffer = NULL; @@ -526,12 +547,30 @@ static void USB_DeviceEhciCancelControlPipe(usb_device_ehci_state_struct_t *ehci if (0U != (currentDtd->dtdTokenUnion.dtdTokenBitmap.status & USB_DEVICE_ECHI_DTD_STATUS_ACTIVE)) { message.length = USB_CANCELLED_TRANSFER_LENGTH; + /* Flush the endpoint to stop a transfer. */ + do + { + /* Set the corresponding bit(s) in the EPFLUSH register */ + ehciState->registerBase->EPFLUSH |= primeBit; + + /* Wait until all bits in the EPFLUSH register are cleared. */ + while (0U != (ehciState->registerBase->EPFLUSH & primeBit)) + { + } + /* + * Read the EPSR register to ensure that for all endpoints + * commanded to be flushed, that the corresponding bits + * are now cleared. + */ + } while (0U != (ehciState->registerBase->EPSR & primeBit)); } else { message.length += (currentDtd->reservedUnion.originalBufferInfo.originalBufferLength - currentDtd->dtdTokenUnion.dtdTokenBitmap.totalBytes); } + /* Clear the endpoint transfer done status */ + ehciState->registerBase->EPCOMPLETE = primeBit; /* Move the dtd head pointer to next. */ /* If the pointer of the head equals to the tail, set the dtd queue to null. */ @@ -558,16 +597,7 @@ static void USB_DeviceEhciCancelControlPipe(usb_device_ehci_state_struct_t *ehci { message.code = endpoint | (uint8_t)((uint32_t)direction << 0x07U); message.isSetup = 0U; -#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) - { -#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) - usb_echo("notification error\n"); -#endif - } -#else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); -#endif + (void)USB_DeviceEhciNotification(ehciState, &message); message.buffer = NULL; message.length = 0U; } @@ -632,16 +662,7 @@ static void USB_DeviceEhciInterruptTokenDone(usb_device_ehci_state_struct_t *ehc /* Fill the setup packet to the backup buffer */ USB_DeviceEhciFillSetupBuffer(ehciState, endpoint); /* Notify the up layer the EHCI status changed. */ -#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) - { -#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) - usb_echo("notification error\n"); -#endif - } -#else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); -#endif + (void)USB_DeviceEhciNotification(ehciState, &message); } } } @@ -777,16 +798,7 @@ static void USB_DeviceEhciInterruptTokenDone(usb_device_ehci_state_struct_t *ehc { message.code = endpoint | (uint8_t)((uint32_t)direction << 0x07U); message.isSetup = 0U; -#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) - { -#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) - usb_echo("notification error\n"); -#endif - } -#else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); -#endif + (void)USB_DeviceEhciNotification(ehciState, &message); message.buffer = NULL; message.length = 0U; } @@ -872,16 +884,7 @@ static void USB_DeviceEhciInterruptPortChange(usb_device_ehci_state_struct_t *eh if (0U != ehciState->isResetting) { message.code = (uint8_t)kUSB_DeviceNotifyBusReset; -#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) - { -#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) - usb_echo("notification error\n"); -#endif - } -#else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); -#endif + (void)USB_DeviceEhciNotification(ehciState, &message); ehciState->isResetting = 0U; } } @@ -889,18 +892,19 @@ static void USB_DeviceEhciInterruptPortChange(usb_device_ehci_state_struct_t *eh #if (defined(USB_DEVICE_CONFIG_LOW_POWER_MODE) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) if ((0U != ehciState->isSuspending) && (0U == (ehciState->registerBase->PORTSC1 & USBHS_PORTSC1_SUSP_MASK))) { +#if (defined(USB_DEVICE_CONFIG_LPM_L1) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) + /* pollinng if the device exits the L1 state */ + while (!(ehciState->registerBase->USBSTS & USB_USBSTS_LPM_L1_EXITI_MASK)) + { + __NOP(); + } + ehciState->registerBase->USBSTS |= USB_USBSTS_LPM_L1_EXITI_MASK; +#endif /* Set the resume flag */ ehciState->isSuspending = 0U; message.code = (uint8_t)kUSB_DeviceNotifyResume; -#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) - { - return kStatus_USB_Error; - } -#else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); -#endif + (void)USB_DeviceEhciNotification(ehciState, &message); } #endif /* USB_DEVICE_CONFIG_LOW_POWER_MODE */ } @@ -942,30 +946,32 @@ static void USB_DeviceEhciInterruptReset(usb_device_ehci_state_struct_t *ehciSta message.code = (uint8_t)kUSB_DeviceNotifyBusReset; message.length = 0U; message.isSetup = 0U; -#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) - { -#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) - usb_echo("notification error\n"); -#endif - } -#else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); -#endif + (void)USB_DeviceEhciNotification(ehciState, &message); } } +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) /*! - * @brief Handle the sof interrupt. + * @brief Handle Start of Frame (SOF) Interrupt. * - * The function is used to handle the sof interrupt. + * The function is used to handle the SOF interrupt. * * @param ehciState Pointer of the device EHCI state structure. * */ -static void USB_DeviceEhciInterruptSof(usb_device_ehci_state_struct_t *ehciState) +static void USB_DeviceEhciInterruptSOF(usb_device_ehci_state_struct_t *ehciState) { + usb_device_callback_message_struct_t message; + + message.buffer = (uint8_t *)NULL; + message.code = (uint8_t)kUSB_DeviceNotifySOF; + message.length = 0U; + message.isSetup = 0U; + + /* Notify upper layer */ + (void)USB_DeviceEhciNotification(ehciState, &message); } +#endif /* USB_DEVICE_CONFIG_SOF_NOTIFICATIONS */ #if (defined(USB_DEVICE_CONFIG_LOW_POWER_MODE) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) /*! @@ -984,7 +990,11 @@ static void USB_DeviceEhciInterruptSuspend(usb_device_ehci_state_struct_t *ehciS #if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U)) #else #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - if (0U != (ehciState->registerPhyBase->USB1_VBUS_DET_STAT & USBPHY_USB1_VBUS_DET_STAT_VBUS_VALID_3V_MASK)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) + { +#endif + if (0U != (ehciState->registerPhyBase->USB1_VBUS_DET_STAT & USBPHY_USB1_VBUS_DET_STAT_VBUS_VALID_3V_MASK)) #endif #endif { @@ -993,17 +1003,40 @@ static void USB_DeviceEhciInterruptSuspend(usb_device_ehci_state_struct_t *ehciS message.length = 0U; message.isSetup = 0U; message.code = (uint8_t)kUSB_DeviceNotifySuspend; -#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) - { - return kStatus_USB_Error; - } + (void)USB_DeviceEhciNotification(ehciState, &message); + } +#if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U)) #else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); -#endif +#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) } +#endif +#endif +#endif } } + +#if (defined(USB_DEVICE_CONFIG_LPM_L1) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) +static usb_status_t USB_DeviceEhciInterruptLPMSleep(usb_device_ehci_state_struct_t *ehciState) +{ + usb_device_callback_message_struct_t message; + + message.buffer = &ehciState->lpmRemoteWakeUp; + message.code = (uint8_t)kUSB_DeviceNotifyLPMSleep; + message.length = 0U; + message.isSetup = 0U; + + /*TODO: maybe need 3us delay */ + + ehciState->lpmRemoteWakeUp = + (uint8_t)((ehciState->registerNcBase->LPM_CSR1 & USBNC_LPM_CSR1_LPM_DEV_RWKENRCVD_MASK) >> + USBNC_LPM_CSR1_LPM_DEV_RWKENRCVD_SHIFT); + + /* Notify up layer the USB suspend signal detected. */ + return USB_DeviceEhciNotification(ehciState, &message); +} +#endif + #endif /* USB_DEVICE_CONFIG_LOW_POWER_MODE */ /*! @@ -1055,6 +1088,13 @@ static usb_status_t USB_DeviceEhciTransfer(usb_device_ehci_state_struct_t *ehciS return kStatus_USB_Error; } +#if (defined(USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) + if (0U != length) + { + DCACHE_CleanByRange((uint32_t)buffer, length); + } +#endif + if (0U == dtdRequestCount) { dtdRequestCount = 1U; @@ -1276,12 +1316,12 @@ static usb_hsdcd_status_t USB_DeviceEhciIsrHSDCDCallback(void *handle, uint32_t message.isSetup = 0U; message.code = (uint8_t)kUSB_DeviceNotifyDcdDetectFinished; #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) + if (kStatus_USB_Success != USB_DeviceEhciNotification(ehciState, &message)) { return kStatus_hsdcd_Error; } #else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); + (void)USB_DeviceEhciNotification(ehciState, &message); #endif return error; @@ -1313,23 +1353,62 @@ static usb_phydcd_status_t USB_DeviceEhciIsrPHYDCDCallback(void *handle, uint32_ } /*messsgae buffer contain event information*/ - message.buffer = (uint8_t *)param; - message.length = 0U; + message.buffer = (uint8_t *)param; + message.length = 0U; message.isSetup = 0U; - message.code = (uint8_t)kUSB_DeviceNotifyDcdDetectFinished; + message.code = (uint8_t)kUSB_DeviceNotifyDcdDetectFinished; #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) + if (kStatus_USB_Success != USB_DeviceEhciNotification(ehciState, &message)) { - return kStatus_USB_Error; + return kStatus_phydcd_Error; } #else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); + (void)USB_DeviceEhciNotification(ehciState, &message); #endif return error; } #endif +/*! + * @brief Notify the device that the controller status changed. + * + * This function is used to notify the device that the controller status changed. + * + * @param ehciState Pointer of the device EHCI state structure. + * @param message The device callback message handle. + * + * @return A USB error code or kStatus_USB_Success. + */ +static usb_status_t USB_DeviceEhciNotification(usb_device_ehci_state_struct_t *ehciState, + usb_device_callback_message_struct_t *message) +{ + usb_status_t error; + +#if (defined(USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) + /* If valid OUT packet, invalidate data in cache */ + if ((message->code < kUSB_DeviceNotifyBusReset) && (message->buffer != NULL) && (message->length != 0U) && + (message->length != USB_CANCELLED_TRANSFER_LENGTH)) + { + DCACHE_InvalidateByRange((uint32_t)message->buffer, message->length); + } +#endif + + error = USB_DeviceNotificationTrigger(ehciState->deviceHandle, message); +#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) + if (kStatus_USB_Success != error) + { +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif + } +#else + error = kStatus_USB_Success; +#endif + + return error; +} + /*! * @brief Initialize the USB device EHCI instance. * @@ -1407,19 +1486,29 @@ usb_status_t USB_DeviceEhciInit(uint8_t controllerId, ehciState->registerBase = (USBHS_Type *)ehci_base[controllerId - (uint8_t)kUSB_ControllerEhci0]; #if (defined(USB_DEVICE_CONFIG_LOW_POWER_MODE) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - ehciState->registerPhyBase = (USBPHY_Type *)USB_EhciPhyGetBase(controllerId); +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif + { + ehciState->registerPhyBase = (USBPHY_Type *)USB_EhciPhyGetBase(controllerId); + } #endif - #if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U)) ehciState->registerNcBase = (USBNC_Type *)USB_EhciGetBase(controllerId, &usbnc_base[0], sizeof(usbnc_base) / sizeof(uint32_t)); #endif #endif - /* Reset the controller. */ - ehciState->registerBase->USBCMD |= USBHS_USBCMD_RST_MASK; - while (0U != (ehciState->registerBase->USBCMD & USBHS_USBCMD_RST_MASK)) + /* For eUSB, do not need to reset controller. */ +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif { + /* Reset the controller. */ + ehciState->registerBase->USBCMD |= USBHS_USBCMD_RST_MASK; + while (0U != (ehciState->registerBase->USBCMD & USBHS_USBCMD_RST_MASK)) + { + } } /* Get the HW's endpoint count */ @@ -1455,13 +1544,13 @@ usb_status_t USB_DeviceEhciInit(uint8_t controllerId, /* Device is connected to a host. */ message.code = (uint8_t)kUSB_DeviceNotifyAttach; #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if ((kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) || + if ((kStatus_USB_Success != USB_DeviceEhciNotification(ehciState, &message)) || (kStatus_hsdcd_Success != USB_HSDCD_Control(ehciState->dcdHandle, kUSB_DeviceHSDcdRun, NULL))) { return kStatus_USB_Error; } #else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); + (void)USB_DeviceEhciNotification(ehciState, &message); (void)USB_HSDCD_Control(ehciState->dcdHandle, kUSB_DeviceHSDcdRun, NULL); #endif } @@ -1470,7 +1559,7 @@ usb_status_t USB_DeviceEhciInit(uint8_t controllerId, index = controllerId - (uint8_t)kUSB_ControllerEhci0; - phyDcdParamConfig.dcdCallback = USB_DeviceEhciIsrPHYDCDCallback; + phyDcdParamConfig.dcdCallback = USB_DeviceEhciIsrPHYDCDCallback; phyDcdParamConfig.dcdCallbackParam = (void *)ehciState; phyDcdError = @@ -1485,13 +1574,13 @@ usb_status_t USB_DeviceEhciInit(uint8_t controllerId, /* Device is connected to a host. */ message.code = (uint8_t)kUSB_DeviceNotifyAttach; #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if ((kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) || + if ((kStatus_USB_Success != USB_DeviceEhciNotification(ehciState, &message)) || (kStatus_USB_Success != USB_HSDCD_Control(ehciState->dcdHandle, kUSB_DevicePHYDcdRun, NULL))) { return kStatus_USB_Error; } #else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); + (void)USB_DeviceEhciNotification(ehciState, &message); (void)USB_PHYDCD_Control(ehciState->dcdHandle, kUSB_DevicePHYDcdRun, NULL); #endif } @@ -1768,12 +1857,12 @@ usb_status_t USB_DeviceEhciCancel(usb_device_controller_handle ehciHandle, uint8 message.code = ep; message.isSetup = 0U; #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) + if (kStatus_USB_Success != USB_DeviceEhciNotification(ehciState, &message)) { return kStatus_USB_Error; } #else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); + (void)USB_DeviceEhciNotification(ehciState, &message); #endif message.buffer = NULL; } @@ -1801,6 +1890,9 @@ usb_status_t USB_DeviceEhciControl(usb_device_controller_handle ehciHandle, usb_ #endif uint16_t *temp16; uint8_t *temp8; +#if (defined(USB_DEVICE_CONFIG_LOW_POWER_MODE) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) + OSA_SR_ALLOC(); +#endif #if ((defined(USB_DEVICE_CONFIG_REMOTE_WAKEUP)) && (USB_DEVICE_CONFIG_REMOTE_WAKEUP > 0U)) usb_device_struct_t *deviceHandle; @@ -1937,38 +2029,66 @@ usb_status_t USB_DeviceEhciControl(usb_device_controller_handle ehciHandle, usb_ ehciState->registerBase->PORTSC1 &= ~USBHS_PORTSC1_FPR_MASK; error = kStatus_USB_Success; break; +#if (defined(USB_DEVICE_CONFIG_LPM_L1) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) + case kUSB_DeviceControlSleepResume: +#if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U)) + ehciState->registerNcBase->USB_OTGn_CTRL &= ~USBNC_USB_OTGn_CTRL_WIE_MASK; +#endif + ehciState->registerBase->PORTSC1 &= ~USBHS_PORTSC1_PHCD_MASK; + ehciState->registerBase->PORTSC1 |= USBHS_PORTSC1_FPR_MASK; + error = kStatus_USB_Success; + break; +#endif #endif /* USB_DEVICE_CONFIG_REMOTE_WAKEUP */ case kUSB_DeviceControlSuspend: ehciState->registerBase->OTGSC |= 0x007F0000U; + OSA_ENTER_CRITICAL(); #if (defined(FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT) && (FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT > 0U)) /* ehciState->registerBase->PLL_CONTROL_1 |= USBC_PLL_CONTROL_1_PLL_SUSPEND_EN(1); */ #endif #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - ehciState->registerPhyBase->PWD = 0xFFFFFFFFU; - /* ehciState->registerBase->OTGCTL |= ((1U<<10) | (1U<<17) | (1U<<16)); */ - while (0U != (ehciState->registerPhyBase->CTRL & (USBPHY_CTRL_UTMI_SUSPENDM_MASK))) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif { - __NOP(); + ehciState->registerPhyBase->PWD = 0xFFFFFFFFU; + /* ehciState->registerBase->OTGCTL |= ((1U<<10) | (1U<<17) | (1U<<16)); */ } #endif /* ehciState->registerPhyBase->CTRL |= ((1U << 21) | (1U << 22) | (1U << 23)); */ ehciState->registerBase->USBSTS |= USBHS_USBSTS_SRI_MASK; #if (defined(FSL_FEATURE_USBPHY_28FDSOI) && (FSL_FEATURE_USBPHY_28FDSOI > 0U)) #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - ehciState->registerPhyBase->USB1_VBUS_DETECT_SET |= USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK; +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif + { + ehciState->registerPhyBase->USB1_VBUS_DETECT_SET |= USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK; + } #endif #endif ehciState->registerBase->PORTSC1 |= USBHS_PORTSC1_PHCD_MASK; #if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U)) #if (defined(USBPHY_CTRL_ENVBUSCHG_WKUP_MASK)) #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - ehciState->registerPhyBase->CTRL |= USBPHY_CTRL_ENVBUSCHG_WKUP_MASK | USBPHY_CTRL_ENIDCHG_WKUP_MASK | - USBPHY_CTRL_ENDPDMCHG_WKUP_MASK | USBPHY_CTRL_ENIRQRESUMEDETECT_MASK; +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif + { + ehciState->registerPhyBase->CTRL |= USBPHY_CTRL_ENVBUSCHG_WKUP_MASK | USBPHY_CTRL_ENIDCHG_WKUP_MASK | + USBPHY_CTRL_ENDPDMCHG_WKUP_MASK | + USBPHY_CTRL_ENIRQRESUMEDETECT_MASK; + } #endif #endif +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + ehciState->registerNcBase->USB_OTGn_CTRL |= + USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK | USBNC_USB_OTGn_CTRL_WKUP_DPDM_EN_MASK; +#else ehciState->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WKUP_ID_EN_MASK | USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK | USBNC_USB_OTGn_CTRL_WKUP_DPDM_EN_MASK; +#endif ehciState->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WIE_MASK; #else #if (defined(FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT) && (FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT > 0U)) @@ -1978,11 +2098,87 @@ usb_status_t USB_DeviceEhciControl(usb_device_controller_handle ehciHandle, usb_ #endif #endif #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - ehciState->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK; +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif + { + ehciState->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK; + } #endif ehciState->isSuspending = 1U; - error = kStatus_USB_Success; + OSA_EXIT_CRITICAL(); + error = kStatus_USB_Success; break; + +#if (defined(USB_DEVICE_CONFIG_LPM_L1) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) + case kUSB_DeviceControlSleep: + ehciState->registerBase->OTGSC |= 0x007F0000U; + OSA_ENTER_CRITICAL(); +#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif + { + ehciState->registerPhyBase->PWD = 0xFFFFFFFFU; + /* ehciState->registerBase->OTGCTL |= ((1U<<10) | (1U<<17) | (1U<<16)); */ + } +#endif + ehciState->registerBase->USBSTS |= USBHS_USBSTS_SRI_MASK; +#if (defined(FSL_FEATURE_USBPHY_28FDSOI) && (FSL_FEATURE_USBPHY_28FDSOI > 0U)) +#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif + { + ehciState->registerPhyBase->USB1_VBUS_DETECT_SET |= USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK; + } +#endif +#endif + /* ehciState->registerBase->PORTSC1 |= USBHS_PORTSC1_PHCD_MASK;*/ +#if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U)) +#if (defined(USBPHY_CTRL_ENVBUSCHG_WKUP_MASK)) +#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif + { + ehciState->registerPhyBase->CTRL |= USBPHY_CTRL_ENVBUSCHG_WKUP_MASK | USBPHY_CTRL_ENIDCHG_WKUP_MASK | + USBPHY_CTRL_ENDPDMCHG_WKUP_MASK | + USBPHY_CTRL_ENIRQRESUMEDETECT_MASK; + } +#endif +#endif +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + ehciState->registerNcBase->USB_OTGn_CTRL |= + USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK | USBNC_USB_OTGn_CTRL_WKUP_DPDM_EN_MASK; +#else + ehciState->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WKUP_ID_EN_MASK | + USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK | + USBNC_USB_OTGn_CTRL_WKUP_DPDM_EN_MASK; +#endif + ehciState->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WIE_MASK; +#else +#if (defined(FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT) && (FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT > 0U)) + PMU->WAKEUP_PM2_MASK1 |= PMU_WAKEUP_PM2_MASK1_USB(1); +#else + ehciState->registerBase->USBGENCTRL = USBHS_USBGENCTRL_WU_IE_MASK; +#endif +#endif +#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciState->registerBase)) +#endif + { + ehciState->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK; + } +#endif + /* TODO: wait 3us delay */ + ehciState->isSuspending = 1U; + OSA_EXIT_CRITICAL(); + error = kStatus_USB_Success; + break; +#endif + #endif /* USB_DEVICE_CONFIG_LOW_POWER_MODE */ case kUSB_DeviceControlSetDefaultStatus: for (uint8_t count = 0U; count < USB_DEVICE_CONFIG_ENDPOINTS; count++) @@ -2172,16 +2368,7 @@ void USB_DeviceEhciIsrFunction(void *deviceHandle) { /* Device is connected to a host. */ message.code = (uint8_t)kUSB_DeviceNotifyAttach; -#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) - { -#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) - usb_echo("notification triigger error\n"); -#endif - } -#else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); -#endif + (void)USB_DeviceEhciNotification(ehciState, &message); #if (defined(FSL_FEATURE_SOC_USBHSDCD_COUNT) && (FSL_FEATURE_SOC_USBHSDCD_COUNT > 0U)) && \ (defined(USB_DEVICE_CONFIG_CHARGER_DETECT) && (USB_DEVICE_CONFIG_CHARGER_DETECT > 0U)) @@ -2213,16 +2400,7 @@ void USB_DeviceEhciIsrFunction(void *deviceHandle) { /* Device is disconnected from a host. */ message.code = (uint8_t)kUSB_DeviceNotifyDetach; -#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) - if (kStatus_USB_Success != USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message)) - { -#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) - usb_echo("notification trigger error\n"); -#endif - } -#else - (void)USB_DeviceNotificationTrigger(ehciState->deviceHandle, &message); -#endif + (void)USB_DeviceEhciNotification(ehciState, &message); } } #endif /* USB_DEVICE_CONFIG_DETACH_ENABLE */ @@ -2263,13 +2441,21 @@ void USB_DeviceEhciIsrFunction(void *deviceHandle) /* Suspend interrupt */ USB_DeviceEhciInterruptSuspend(ehciState); } +#if (defined(USB_DEVICE_CONFIG_LPM_L1) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) + if (0U != (status & USB_USBSTS_LPM_L1_ENTRYI_MASK)) + { + USB_DeviceEhciInterruptLPMSleep(ehciState); + } +#endif #endif /* USB_DEVICE_CONFIG_LOW_POWER_MODE */ +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) if (0U != (status & USBHS_USBSTS_SRI_MASK)) { - /* Sof interrupt */ - USB_DeviceEhciInterruptSof(ehciState); + /* SOF interrupt */ + USB_DeviceEhciInterruptSOF(ehciState); } +#endif } #endif /* USB_DEVICE_CONFIG_EHCI */ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_ehci.h b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_ehci.h index ae658e134..603565b19 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_ehci.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_ehci.h @@ -167,6 +167,11 @@ typedef struct _usb_device_ehci_state_struct uint8_t controllerId; /*!< Controller ID */ uint8_t speed; /*!< Current speed of EHCI */ uint8_t isSuspending; /*!< Is suspending of the PORT */ +#if (defined(USB_DEVICE_CONFIG_LOW_POWER_MODE) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) +#if (defined(USB_DEVICE_CONFIG_LPM_L1) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) + uint8_t lpmRemoteWakeUp; +#endif +#endif } usb_device_ehci_state_struct_t; #if defined(__cplusplus) diff --git a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_khci.c b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_khci.c index 018f8d480..75f53515b 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_khci.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_khci.c @@ -240,14 +240,20 @@ static void USB_DeviceKhciSetDefaultState(usb_device_khci_state_struct_t *khciSt | USB_INTEN_TOKDNEEN_MASK | USB_INTEN_STALLEN_MASK; #if (defined(USB_DEVICE_CONFIG_LOW_POWER_MODE) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) - /* Enable suspend interruprt */ + /* Enable suspend interrupt */ interruptFlag |= USB_INTEN_SLEEPEN_MASK; #endif /* USB_DEVICE_CONFIG_LOW_POWER_MODE */ #if defined(USB_DEVICE_CONFIG_ERROR_HANDLING) && (USB_DEVICE_CONFIG_ERROR_HANDLING > 0U) - /* Enable error interruprt */ + /* Enable error interrupt */ interruptFlag |= USB_INTEN_ERROREN_MASK; #endif /* USB_DEVICE_CONFIG_ERROR_HANDLING */ + +#if defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U) + /* Enable SOF interrupt */ + interruptFlag |= USB_INTEN_SOFTOKEN_MASK; +#endif /* USB_DEVICE_CONFIG_SOF_NOTIFICATIONS */ + /* Write the interrupt enable register */ khciState->registerBase->INTEN = interruptFlag; @@ -953,7 +959,9 @@ static void USB_DeviceKhciInterruptSleep(usb_device_khci_state_struct_t *khciSta #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_DeviceNotificationTrigger(khciState->deviceHandle, &message)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceNotificationTrigger(khciState->deviceHandle, &message); @@ -993,7 +1001,9 @@ static void USB_DeviceKhciInterruptResume(usb_device_khci_state_struct_t *khciSt #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_DeviceNotificationTrigger(khciState->deviceHandle, &message)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceNotificationTrigger(khciState->deviceHandle, &message); @@ -1028,7 +1038,9 @@ static void USB_DeviceKhciInterruptVbusRising(usb_device_khci_state_struct_t *kh #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_DeviceNotificationTrigger(khciState->deviceHandle, &message)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceNotificationTrigger(khciState->deviceHandle, &message); @@ -1061,7 +1073,9 @@ static void USB_DeviceKhciInterruptVbusFalling(usb_device_khci_state_struct_t *k #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_DeviceNotificationTrigger(khciState->deviceHandle, &message)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceNotificationTrigger(khciState->deviceHandle, &message); @@ -1069,22 +1083,40 @@ static void USB_DeviceKhciInterruptVbusFalling(usb_device_khci_state_struct_t *k } #endif /* USB_DEVICE_CONFIG_DETACH_ENABLE || FSL_FEATURE_USB_KHCI_VBUS_DETECT_ENABLED */ -#if 0U +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) /*! - * @brief Handle the sof interrupt. + * @brief Handle Start of Frame (SOF) Interrupt. * * The function is used to handle the sof interrupt. * * @param khciState Pointer of the device KHCI state structure. * */ -void USB_DeviceKhciInterruptSof(usb_device_khci_state_struct_t *khciState) +static void USB_DeviceKhciInterruptSOF(usb_device_khci_state_struct_t *khciState) { - khciState->registerBase->ISTAT = (USB_INTEN_SOFTOKEN_MASK); + usb_device_callback_message_struct_t message; + khciState->registerBase->ISTAT = (USB_INTEN_SOFTOKEN_MASK); khciState->registerBase->ISTAT = (USB_INTEN_RESUMEEN_MASK); -} + + message.buffer = (uint8_t *)NULL; + message.code = (uint8_t)kUSB_DeviceNotifySOF; + message.length = 0U; + message.isSetup = 0U; + + /* Notify upper layer */ +#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) + if (kStatus_USB_Success != USB_DeviceNotificationTrigger(khciState->deviceHandle, &message)) + { +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); #endif + } +#else + (void)USB_DeviceNotificationTrigger(khciState->deviceHandle, &message); +#endif +} +#endif /* USB_DEVICE_CONFIG_SOF_NOTIFICATIONS */ /*! * @brief Handle endpoint stalled interrupt. @@ -1143,7 +1175,9 @@ static void USB_DeviceKhciInterruptError(usb_device_khci_state_struct_t *khciSta #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_DeviceNotificationTrigger(khciState->deviceHandle, &message)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceNotificationTrigger(khciState->deviceHandle, &message); @@ -1756,11 +1790,11 @@ void USB_DeviceKhciIsrFunction(void *deviceHandle) } #endif /* USB_DEVICE_CONFIG_DETACH_ENABLE && FSL_FEATURE_USB_KHCI_VBUS_DETECT_ENABLED */ -#if 0U - /* Sof token interrupt */ +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) + /* SOF token interrupt */ if (0U != (status & USB_INTEN_SOFTOKEN_MASK)) { - USB_DeviceKhciInterruptSof(khciState); + USB_DeviceKhciInterruptSOF(khciState); } #endif diff --git a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_lpcip3511.c b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_lpcip3511.c index 356bd5852..5d86c38f2 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_lpcip3511.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/device/usb_device_lpcip3511.c @@ -125,6 +125,11 @@ #define USB_LPC3511IP_DEVCMDSTAT_INTERRUPT_WC_MASK (0x0F000000u) +#define USB_LPC3511IP_DEVCMDSTAT_W1C_MASK (USB_LPC3511IP_DEVCMDSTAT_SETUP_MASK | \ + USB_LPC3511IP_DEVCMDSTAT_DCON_C_MASK | \ + USB_LPC3511IP_DEVCMDSTAT_DSUS_C_MASK | \ + USB_LPC3511IP_DEVCMDSTAT_DRES_C_MASK) + #define USB_LPC3511IP_ENDPOINT_SET_ENDPOINT_AND(lpcState, index, odd, value) \ *((volatile uint32_t *)(((uint32_t)((lpcState)->epCommandStatusList)) | ((uint32_t)(index) << 3) | \ ((((uint32_t)(odd)) & 1UL) << 2U))) &= (value) @@ -496,7 +501,11 @@ static void USB_DeviceLpc3511IpSetDefaultState(usb_device_lpc3511ip_state_struct lpc3511IpState->registerBase->INTSTAT = (USB_LPC3511IP_INTSTAT_FRAME_INT_MASK | USB_LPC3511IP_MAX_PHY_ENDPOINT_MASK); /* enable interrupts */ - lpc3511IpState->registerBase->INTEN = USB_LPC3511IP_INTSTAT_DEV_INT_MASK | USB_LPC3511IP_MAX_PHY_ENDPOINT_MASK; + lpc3511IpState->registerBase->INTEN = +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) + USB_LPC3511IP_INTSTAT_FRAME_INT_MASK | +#endif + USB_LPC3511IP_INTSTAT_DEV_INT_MASK | USB_LPC3511IP_MAX_PHY_ENDPOINT_MASK; /* Clear reset flag */ lpc3511IpState->isResetting = 0U; @@ -769,7 +778,8 @@ static usb_status_t USB_DeviceLpc3511IpEndpointStall(usb_device_lpc3511ip_state_ if ((0U != lpc3511IpState->controllerSpeed) && (USB_ENDPOINT_INTERRUPT == epState->stateUnion.stateBitField.endpointType)) { - lpc3511IpState->registerBase->DEVCMDSTAT |= + lpc3511IpState->registerBase->DEVCMDSTAT = + (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | (USB_LPC3511IP_DEVCMDSTAT_INTONNAK_AO_MASK | USB_LPC3511IP_DEVCMDSTAT_INTONNAK_AI_MASK); epState->stateUnion.stateBitField.epControlDefault &= (~((USB_LPC3511IP_ENDPOINT_ENDPOINT_TYPE_MASK | USB_LPC3511IP_ENDPOINT_RFTV_MASK) >> @@ -1154,7 +1164,7 @@ static void USB_DeviceLpc3511IpInterruptToken(usb_device_lpc3511ip_state_struct_ if (length <= 1U) { lpc3511IpState->registerBase->DEVCMDSTAT &= - ~(USB_LPC3511IP_DEVCMDSTAT_INTONNAK_AO_MASK | USB_LPC3511IP_DEVCMDSTAT_INTONNAK_AI_MASK); + ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_INTONNAK_AO_MASK | USB_LPC3511IP_DEVCMDSTAT_INTONNAK_AI_MASK); } epState->stateUnion.stateBitField.epControlDefault &= (~((USB_LPC3511IP_ENDPOINT_TOGGLE_RESET_MASK) >> USB_LPC3511IP_ENDPOINT_CONFIGURE_BITS_SHIFT)); @@ -1233,7 +1243,7 @@ static void USB_DeviceLpc3511IpInterruptToken(usb_device_lpc3511ip_state_struct_ lpc3511IpState->registerBase->INTSTAT = 0x03u; /* clear interrupt */ /* W1 to clear the setup flag */ - lpc3511IpState->registerBase->DEVCMDSTAT |= USB_LPC3511IP_DEVCMDSTAT_SETUP_MASK; + lpc3511IpState->registerBase->DEVCMDSTAT = (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | USB_LPC3511IP_DEVCMDSTAT_SETUP_MASK; } else { @@ -1491,7 +1501,9 @@ static void USB_DeviceLpc3511IpInterruptDetach(usb_device_lpc3511ip_state_struct #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_DeviceNotificationTrigger(lpc3511IpState->deviceHandle, &message)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceNotificationTrigger(lpc3511IpState->deviceHandle, &message); @@ -1519,7 +1531,9 @@ static void USB_DeviceLpc3511IpInterruptAttach(usb_device_lpc3511ip_state_struct #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_DeviceNotificationTrigger(lpc3511IpState->deviceHandle, &message)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceNotificationTrigger(lpc3511IpState->deviceHandle, &message); @@ -1688,21 +1702,21 @@ usb_status_t USB_DeviceLpc3511IpInit(uint8_t controllerId, /* disable the controller */ lpc3511IpState->registerBase->DEVCMDSTAT &= - (~(USB_LPC3511IP_DEVCMDSTAT_DCON_MASK | USB_LPC3511IP_DEVCMDSTAT_DEV_EN_MASK | + (~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_DCON_MASK | USB_LPC3511IP_DEVCMDSTAT_DEV_EN_MASK | USB_LPC3511IP_DEVCMDSTAT_LPM_SUP_MASK)); /* reset and enalbe the controller */ USB_DeviceLpc3511IpSetDefaultState(lpc3511IpState); /* enable USB */ - lpc3511IpState->registerBase->DEVCMDSTAT |= (USB_LPC3511IP_DEVCMDSTAT_DEV_EN_MASK + lpc3511IpState->registerBase->DEVCMDSTAT = (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | (USB_LPC3511IP_DEVCMDSTAT_DEV_EN_MASK #if ((defined(USB_DEVICE_CONFIG_LOW_POWER_MODE)) && (USB_DEVICE_CONFIG_LOW_POWER_MODE > 0U)) #else | USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK #endif ); #if (defined(USB_DEVICE_CONFIG_LPM_L1) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) - lpc3511IpState->registerBase->DEVCMDSTAT |= USB_LPC3511IP_DEVCMDSTAT_LPM_SUP_MASK; + lpc3511IpState->registerBase->DEVCMDSTAT = (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | USB_LPC3511IP_DEVCMDSTAT_LPM_SUP_MASK; lpc3511IpState->registerBase->LPM |= USB_LPC3511IP_USB_LPM_HIRD_SW(4); - lpc3511IpState->registerBase->DEVCMDSTAT &= ~(USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK); + lpc3511IpState->registerBase->DEVCMDSTAT &= ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK); #endif lpc3511IpState->deviceHandle = handle; *controllerHandle = lpc3511IpState; @@ -1732,11 +1746,11 @@ usb_status_t USB_DeviceLpc3511IpDeinit(usb_device_controller_handle controllerHa /*no action, just for misra4.7*/ } #if (defined(USB_DEVICE_CONFIG_LPM_L1) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) - lpc3511IpState->registerBase->DEVCMDSTAT &= ~USB_LPC3511IP_DEVCMDSTAT_LPM_SUP_MASK; + lpc3511IpState->registerBase->DEVCMDSTAT &= ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_LPM_SUP_MASK); #endif /* disable the controller */ lpc3511IpState->registerBase->DEVCMDSTAT &= - (~(USB_LPC3511IP_DEVCMDSTAT_DCON_MASK | USB_LPC3511IP_DEVCMDSTAT_DEV_EN_MASK | + (~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_DCON_MASK | USB_LPC3511IP_DEVCMDSTAT_DEV_EN_MASK | USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK)); #if (defined(USB_DEVICE_CONFIG_CHARGER_DETECT) && (USB_DEVICE_CONFIG_CHARGER_DETECT > 0U)) && \ (defined(FSL_FEATURE_SOC_USBHSDCD_COUNT) && (FSL_FEATURE_SOC_USBHSDCD_COUNT > 0U)) @@ -1971,7 +1985,8 @@ static usb_status_t USB_DeviceLpc3511IpTransaction(usb_device_lpc3511ip_state_st /* users can use NVIC to disable/enable the USB interrupt to improve the system performance */ OSA_ENTER_CRITICAL(); - lpc3511IpState->registerBase->DEVCMDSTAT |= + lpc3511IpState->registerBase->DEVCMDSTAT = + (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | (USB_LPC3511IP_DEVCMDSTAT_INTONNAK_AO_MASK | USB_LPC3511IP_DEVCMDSTAT_INTONNAK_AI_MASK); #if (defined USB_DEVICE_IP3511_DOUBLE_BUFFER_ENABLE) && (USB_DEVICE_IP3511_DOUBLE_BUFFER_ENABLE) @@ -2271,7 +2286,7 @@ static usb_status_t USB_DeviceLpc3511IpControlPreSetDeviceAddress(usb_device_con { tmp8Value = *((uint8_t *)param); tmp32Value = lpc3511IpState->registerBase->DEVCMDSTAT; - tmp32Value &= (~USB_LPC3511IP_DEVCMDSTAT_DEV_ADDR_MASK); + tmp32Value &= ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_DEV_ADDR_MASK); tmp32Value |= ((uint32_t)tmp8Value & USB_LPC3511IP_DEVCMDSTAT_DEV_ADDR_MASK); lpc3511IpState->registerBase->DEVCMDSTAT = tmp32Value; error = kStatus_USB_Success; @@ -2308,14 +2323,14 @@ usb_status_t USB_DeviceLpc3511IpControl(usb_device_controller_handle controllerH switch (type) { case kUSB_DeviceControlRun: - lpc3511IpState->registerBase->DEVCMDSTAT |= (USB_LPC3511IP_DEVCMDSTAT_DCON_MASK); - lpc3511IpState->registerBase->DEVCMDSTAT &= ~(USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK); + lpc3511IpState->registerBase->DEVCMDSTAT = (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | (USB_LPC3511IP_DEVCMDSTAT_DCON_MASK); + lpc3511IpState->registerBase->DEVCMDSTAT &= ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK); error = kStatus_USB_Success; break; case kUSB_DeviceControlStop: - lpc3511IpState->registerBase->DEVCMDSTAT |= USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK; - lpc3511IpState->registerBase->DEVCMDSTAT &= (~USB_LPC3511IP_DEVCMDSTAT_DCON_MASK); + lpc3511IpState->registerBase->DEVCMDSTAT = (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK; + lpc3511IpState->registerBase->DEVCMDSTAT &= ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_DCON_MASK); error = kStatus_USB_Success; break; @@ -2446,28 +2461,28 @@ usb_status_t USB_DeviceLpc3511IpControl(usb_device_controller_handle controllerH #if defined(USB_DEVICE_CONFIG_REMOTE_WAKEUP) && (USB_DEVICE_CONFIG_REMOTE_WAKEUP > 0U) case kUSB_DeviceControlResume: /* todo: turn on USB clock and enable the USB clock source */ - lpc3511IpState->registerBase->DEVCMDSTAT |= USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK; - lpc3511IpState->registerBase->DEVCMDSTAT &= ~USB_LPC3511IP_DEVCMDSTAT_DSUS_MASK; + lpc3511IpState->registerBase->DEVCMDSTAT = (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK; + lpc3511IpState->registerBase->DEVCMDSTAT &= ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_DSUS_MASK); while (0U != (lpc3511IpState->registerBase->DEVCMDSTAT & USB_LPC3511IP_DEVCMDSTAT_DSUS_MASK)) { } /* the W1C bits */ lpc3511IpState->registerBase->DEVCMDSTAT &= - ~(USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK | USB_LPC3511IP_DEVCMDSTAT_INTERRUPT_WC_MASK); + ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK | USB_LPC3511IP_DEVCMDSTAT_INTERRUPT_WC_MASK); error = kStatus_USB_Success; break; #if (defined(USB_DEVICE_CONFIG_LPM_L1) && (USB_DEVICE_CONFIG_LPM_L1 > 0U)) case kUSB_DeviceControlSleepResume: /* todo: turn on USB clock and enable the USB clock source */ - lpc3511IpState->registerBase->DEVCMDSTAT |= USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK; - lpc3511IpState->registerBase->DEVCMDSTAT &= ~USB_LPC3511IP_DEVCMDSTAT_LPM_SUS_MASK; + lpc3511IpState->registerBase->DEVCMDSTAT = (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK; + lpc3511IpState->registerBase->DEVCMDSTAT &= ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_LPM_SUS_MASK); while (0U != (lpc3511IpState->registerBase->DEVCMDSTAT & USB_LPC3511IP_DEVCMDSTAT_LPM_SUS_MASK)) { __NOP(); } /* the W1C bits */ lpc3511IpState->registerBase->DEVCMDSTAT &= - ~(USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK | USB_LPC3511IP_DEVCMDSTAT_INTERRUPT_WC_MASK); + ~(USB_LPC3511IP_DEVCMDSTAT_W1C_MASK | USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK | USB_LPC3511IP_DEVCMDSTAT_INTERRUPT_WC_MASK); error = kStatus_USB_Success; break; #endif @@ -2514,7 +2529,8 @@ usb_status_t USB_DeviceLpc3511IpControl(usb_device_controller_handle controllerH { tmp8Value = *((uint8_t *)param); #if ((defined(USB_DEVICE_CONFIG_LPCIP3511HS)) && (USB_DEVICE_CONFIG_LPCIP3511HS > 0U)) - lpc3511IpState->registerBase->DEVCMDSTAT |= + lpc3511IpState->registerBase->DEVCMDSTAT = + (lpc3511IpState->registerBase->DEVCMDSTAT & ~USB_LPC3511IP_DEVCMDSTAT_W1C_MASK) | ((uint32_t)(tmp8Value) << USBHSD_DEVCMDSTAT_PHY_TEST_MODE_SHIFT); #endif error = kStatus_USB_Success; @@ -2573,6 +2589,38 @@ usb_status_t USB_DeviceLpc3511IpControl(usb_device_controller_handle controllerH return error; } +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) +/*! + * @brief Handle Start of Frame (SOF) Interrupt. + * + * The function is used to notify the upper layer that an SOF has occurred. + * + * @param lpc3511IpState Pointer of the controller state structure. + * + */ +static void USB_DeviceLpc3511IpInterruptSOF(usb_device_lpc3511ip_state_struct_t *lpc3511IpState) +{ + usb_device_callback_message_struct_t message; + + message.buffer = (uint8_t *)NULL; + message.code = (uint8_t)kUSB_DeviceNotifySOF; + message.length = 0U; + message.isSetup = 0U; + + /* Notify upper layer */ +#if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) + if (kStatus_USB_Success != USB_DeviceNotificationTrigger(lpc3511IpState->deviceHandle, &message)) + { +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif + } +#else + (void)USB_DeviceNotificationTrigger(lpc3511IpState->deviceHandle, &message); +#endif +} +#endif /* USB_DEVICE_CONFIG_SOF_NOTIFICATIONS */ + void USB_DeviceLpcIp3511IsrFunction(void *deviceHandle) { usb_device_struct_t *handle = (usb_device_struct_t *)deviceHandle; @@ -2643,7 +2691,9 @@ void USB_DeviceLpcIp3511IsrFunction(void *deviceHandle) #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_HSDCD_Control(lpc3511IpState->dcdHandle, kUSB_DeviceHSDcdRun, NULL)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_HSDCD_Control(lpc3511IpState->dcdHandle, kUSB_DeviceHSDcdRun, NULL); @@ -2708,7 +2758,9 @@ void USB_DeviceLpcIp3511IsrFunction(void *deviceHandle) #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_DeviceLpc3511IpInterruptSuspend(lpc3511IpState)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceLpc3511IpInterruptSuspend(lpc3511IpState); @@ -2720,7 +2772,9 @@ void USB_DeviceLpcIp3511IsrFunction(void *deviceHandle) #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != (void)USB_DeviceLpc3511IpInterruptLPMSleep(lpc3511IpState)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceLpc3511IpInterruptLPMSleep(lpc3511IpState); @@ -2732,7 +2786,9 @@ void USB_DeviceLpcIp3511IsrFunction(void *deviceHandle) #if (defined(USB_DEVICE_CONFIG_RETURN_VALUE_CHECK) && (USB_DEVICE_CONFIG_RETURN_VALUE_CHECK > 0U)) if (kStatus_USB_Success != USB_DeviceLpc3511IpInterruptResume(lpc3511IpState)) { - return kStatus_USB_Error; +#if (defined(DEVICE_ECHO) && (DEVICE_ECHO > 0U)) + usb_echo("notification error\n"); +#endif } #else (void)USB_DeviceLpc3511IpInterruptResume(lpc3511IpState); @@ -2787,9 +2843,10 @@ void USB_DeviceLpcIp3511IsrFunction(void *deviceHandle) } } -#if 0U +#if (defined(USB_DEVICE_CONFIG_SOF_NOTIFICATIONS) && (USB_DEVICE_CONFIG_SOF_NOTIFICATIONS > 0U)) if (interruptStatus & USB_LPC3511IP_INTSTAT_FRAME_INT_MASK) { + USB_DeviceLpc3511IpInterruptSOF(lpc3511IpState); } #endif } diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_audio.c b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_audio.c index 0ef06a6be..f96455d61 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_audio.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_audio.c @@ -455,13 +455,19 @@ usb_status_t USB_HostAudioStreamSetInterface(usb_host_class_handle classHandle, void *callbackParam) { usb_status_t status; + uint8_t entity_id = 0U; + uint32_t length = 0U, ep = 0U; + void *temp; audio_instance_t *audioPtr = (audio_instance_t *)classHandle; - usb_host_interface_t *interface_ptr; + usb_host_interface_t *interface_ptr = NULL; + usb_host_interface_t *ctrlInterface_ptr = NULL; usb_host_transfer_t *transfer; audio_descriptor_union_t ptr1; - uint32_t length = 0U, ep = 0U; - void *temp; + usb_audio_2_0_ctrl_fu_desc_t *fu_ptr; + audio_descriptor_union_t ctrl_ptr; usb_descriptor_endpoint_t *endpointDesc; + usb_audio_stream_spepific_as_intf_desc_t *as_general; + if (classHandle == NULL) { return kStatus_USB_InvalidParameter; @@ -598,6 +604,393 @@ usb_status_t USB_HostAudioStreamSetInterface(usb_host_class_handle classHandle, ptr1.bufr += ptr1.common->bLength; } + if (NULL != audioPtr->asIntfDesc) + { + as_general = (usb_audio_stream_spepific_as_intf_desc_t *)audioPtr->asIntfDesc; + entity_id = as_general->bterminallink; + ctrlInterface_ptr = (usb_host_interface_t *)audioPtr->controlIntfHandle; + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + /* find audio input or output terminal firstly bases on as general descriptor */ + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_INPUT) + { + if ((audioPtr->itDesc == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) + { + audioPtr->itDesc = (void *)temp; + break; + } + } + else if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_OUTPUT) + { + if ((audioPtr->otDesc == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) + { + audioPtr->otDesc = (void *)temp; + entity_id = ctrl_ptr.common->bData[5]; /* entity_id is fu or su id */ + break; + } + } + else + { + /*no action*/ + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + + if (NULL != audioPtr->itDesc) + { + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_FEATURE) + { + if ((audioPtr->fuDesc == NULL) && (ctrl_ptr.common->bData[2] == entity_id)) + { + audioPtr->fuDesc = (void *)temp; + break; + } + } + else if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_MIXER) + { + if (audioPtr->fuDesc == NULL) + { + usb_audio_2_0_ctrl_mu_desc_t *mix_unit = (usb_audio_2_0_ctrl_mu_desc_t *)temp; + for (uint8_t i = 0; i < mix_unit->bNrInPins; i++) + { + if (entity_id == mix_unit->baSourceID[i]) + { + /* save entity id for mix unit */ + entity_id = mix_unit->bunitid; + break; + } + } + } + } + else + { + /*no action*/ + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + + if (NULL != audioPtr->fuDesc) + { + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + fu_ptr= (usb_audio_2_0_ctrl_fu_desc_t *)audioPtr->fuDesc; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_OUTPUT) + { + if ((audioPtr->otDesc == NULL) && (ctrl_ptr.common->bData[5] == fu_ptr->bunitid)) + { + audioPtr->otDesc = (void *)temp; + if (AUDIO_DEVICE_VERSION_02 == audioPtr->deviceAudioVersion) + { + entity_id = ctrl_ptr.common->bData[6]; /* clock source id */ + } + break; + } + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + + if (AUDIO_DEVICE_VERSION_02 == audioPtr->deviceAudioVersion) + { + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_CLOCK_SOURE) + { + if ((audioPtr->clockSource == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) + { + audioPtr->clockSource = (void *)temp; + break; + } + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + + } + } + else if (entity_id != as_general->bterminallink) /* entity_id is mix unit id */ + { + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_FEATURE) + { + if ((audioPtr->fuDesc == NULL) && (ctrl_ptr.common->bData[2] == entity_id)) + { + audioPtr->fuDesc = (void *)temp; + entity_id = ctrl_ptr.common->bData[1]; /* entity_id is fu id */ + break; + } + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + + } + + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_OUTPUT) + { + if ((audioPtr->otDesc == NULL) && (ctrl_ptr.common->bData[5] == entity_id)) + { + audioPtr->otDesc = (void *)temp; + if (AUDIO_DEVICE_VERSION_02 == audioPtr->deviceAudioVersion) + { + entity_id = ctrl_ptr.common->bData[6]; /* clock source id */ + } + break; + } + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + + if (AUDIO_DEVICE_VERSION_02 == audioPtr->deviceAudioVersion) + { + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_CLOCK_SOURE) + { + if ((audioPtr->clockSource == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) + { + audioPtr->clockSource = (void *)temp; + break; + } + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + } + } + else + { + /* no action */ + } + } + else if (NULL != audioPtr->otDesc) + { + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_FEATURE) + { + if ((audioPtr->fuDesc == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) /* entity_id is fu id */ + { + audioPtr->fuDesc = (void *)temp; + entity_id = ctrl_ptr.common->bData[2]; /* entity_id is it id */ + break; + } + } + else if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_SELECTOR) + { + if ((audioPtr->fuDesc == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) /* entity_id is su id */ + { + entity_id = ctrl_ptr.common->bData[3]; /* entity_id is fu id */ + break; + } + } + else + { + /* no action */ + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + + } + + if (NULL != audioPtr->fuDesc) + { + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_INPUT) + { + if ((audioPtr->itDesc == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) /* entity_id is it id */ + { + audioPtr->itDesc = (void *)temp; + if (AUDIO_DEVICE_VERSION_02 == audioPtr->deviceAudioVersion) + { + entity_id = ctrl_ptr.common->bData[5]; /* entity_id is clock source id */ + } + break; + } + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + + if (AUDIO_DEVICE_VERSION_02 == audioPtr->deviceAudioVersion) + { + if (NULL == audioPtr->itDesc) + { + return kStatus_USB_Error; + } + + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_CLOCK_SOURE) + { + if ((audioPtr->clockSource == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) /* entity_id is clock source id */ + { + audioPtr->clockSource = (void *)temp; + break; + } + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + } + + + } + else + { + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_FEATURE) + { + if ((audioPtr->fuDesc == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) /* entity_id is fu id */ + { + audioPtr->fuDesc = (void *)temp; + entity_id = ctrl_ptr.common->bData[2]; /* entity_id is it id */ + break; + } + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + + if (NULL == audioPtr->fuDesc) + { + return kStatus_USB_Error; + } + + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_INPUT) + { + if ((audioPtr->itDesc == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) /* entity_id is it id */ + { + audioPtr->itDesc = (void *)temp; + if (AUDIO_DEVICE_VERSION_02 == audioPtr->deviceAudioVersion) + { + entity_id = ctrl_ptr.common->bData[5]; /* entity_id is clock source id */ + } + break; + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + } + + if (AUDIO_DEVICE_VERSION_02 == audioPtr->deviceAudioVersion) + { + if (NULL == audioPtr->itDesc) + { + return kStatus_USB_Error; + } + + ctrl_ptr.bufr = ctrlInterface_ptr->interfaceExtension; + length = 0U; + while (length < ctrlInterface_ptr->interfaceExtensionLength) + { + if (ctrl_ptr.common->bDescriptorType == 0x24U) + { + temp = (void *)ctrl_ptr.bufr; + if (ctrl_ptr.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_CLOCK_SOURE) + { + if ((audioPtr->itDesc == NULL) && (ctrl_ptr.common->bData[1] == entity_id)) /* entity_id is clock source id */ + { + audioPtr->clockSource = (void *)temp; + break; + } + } + } + ctrl_ptr.bufr += ctrl_ptr.common->bLength; + length += ctrl_ptr.common->bLength; + } + } + } + } + } + else + { + return kStatus_USB_Error; + } + if (alternateSetting == 0U) { if (callbackFn != NULL) @@ -718,34 +1111,6 @@ usb_status_t USB_HostAudioControlSetInterface(usb_host_class_handle classHandle, header = (void *)&commonHeader->bcdcdc; audioPtr->deviceAudioVersion = USB_SHORT_FROM_LITTLE_ENDIAN_ADDRESS(((uint8_t *)header)); } - else if (ptr1.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_INPUT) - { - if (audioPtr->itDesc == NULL) - { - audioPtr->itDesc = (void *)temp; - } - } - else if (ptr1.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_OUTPUT) - { - if (audioPtr->otDesc == NULL) - { - audioPtr->otDesc = (void *)temp; - } - } - else if (ptr1.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_FEATURE) - { - if (audioPtr->fuDesc == NULL) - { - audioPtr->fuDesc = (void *)temp; - } - } - else if (ptr1.common->bData[0] == USB_AUDIO_DESC_SUBTYPE_CS_CLOCK_SOURE) - { - if (audioPtr->clockSource == NULL) - { - audioPtr->clockSource = (void *)temp; - } - } else { /*no action*/ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_audio.h b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_audio.h index c6e4fd5c3..0c90ed833 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_audio.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_audio.h @@ -375,6 +375,19 @@ typedef struct _usb_audio_2_0_ctrl_fu_desc uint8_t bmaControls0[4]; /*!< The Controls bitmap for master channel 0:*/ } usb_audio_2_0_ctrl_fu_desc_t; + +/*! @brief Audio control interface feature unit descriptor structure */ +typedef struct _usb_audio_2_0_ctrl_mu_desc +{ + uint8_t blength; /*!< Total size of the output terminal descriptor*/ + uint8_t bdescriptortype; /*!< Descriptor type of audio output terminal descriptor*/ + uint8_t bdescriptorsubtype; /*!< Subtype of audio output terminal descriptor*/ + uint8_t bunitid; /*!< Constant uniquely identifying the unit within the audio function. This value is used in all + requests to address this unit*/ + uint8_t bNrInPins; /*!< Number of Input Pins of this Unit: p*/ + uint8_t baSourceID[4]; +} usb_audio_2_0_ctrl_mu_desc_t; + /*! @brief Audio as isochronous audio data endpoint descriptor structure */ typedef struct _usb_audio_2_0_stream_specific_iso_endp_desc { diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc.c b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc.c index 5123aaaf2..b74fbab2e 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc.c @@ -650,6 +650,35 @@ usb_status_t USB_HostCdcSetDataInterface(usb_host_class_handle classHandle, } } +#if defined(USB_HOST_CONFIG_CDC_ECM) && USB_HOST_CONFIG_CDC_ECM + usb_host_interface_t *ifPointer = (usb_host_interface_t *)interfaceHandle; + usb_descriptor_union_t *ifBuffer = (usb_descriptor_union_t *)(ifPointer->interfaceExtension); + uint32_t extIndex = 0; + + for (; extIndex < ifPointer->interfaceExtensionLength; + extIndex += ifBuffer->common.bLength, + ifBuffer = (usb_descriptor_union_t *)((uint8_t *)ifBuffer + ifBuffer->common.bLength)) + { + if (ifBuffer->common.bDescriptorType == USB_DESCRIPTOR_TYPE_INTERFACE && + ifBuffer->interface.bAlternateSetting == alternateSetting) + { + ifPointer->epCount = ifBuffer->interface.bNumEndpoints; + break; + } + } + + for (uint32_t epIndex = 0; epIndex < ifPointer->epCount && extIndex < ifPointer->interfaceExtensionLength; + extIndex += ifBuffer->common.bLength, + ifBuffer = (usb_descriptor_union_t *)((uint8_t *)ifBuffer + ifBuffer->common.bLength)) + { + if (ifBuffer->common.bDescriptorType == USB_DESCRIPTOR_TYPE_ENDPOINT) + { + ifPointer->epList[epIndex].epDesc = (usb_descriptor_endpoint_t *)ifBuffer; + epIndex++; + } + } +#endif + if (alternateSetting == 0U) { if (callbackFn != NULL) @@ -1300,4 +1329,77 @@ usb_status_t USB_HostCdcGetAcmDescriptor(usb_host_class_handle classHandle, return status; } +usb_status_t USB_HostCdcGetEcmDescriptor(usb_host_class_handle classHandle, + usb_host_cdc_head_function_desc_struct_t **headDesc, + usb_host_cdc_union_interface_desc_struct_t **unionInterfaceDesc, + usb_host_cdc_ethernet_networking_desc_struct_t **ethernetNetworkingDesc) +{ + usb_status_t status = kStatus_USB_Success; + + usb_host_cdc_head_function_desc_struct_t *ifHeadDesc = NULL; + usb_host_cdc_union_interface_desc_struct_t *ifUnionInterfaceDesc = NULL; + usb_host_cdc_ethernet_networking_desc_struct_t *ifEthernetNetworkingDesc = NULL; + + usb_host_cdc_instance_struct_t *cdcInstance = (usb_host_cdc_instance_struct_t *)classHandle; + usb_host_interface_t *ifPointer = (usb_host_interface_t *)cdcInstance->controlInterfaceHandle; + usb_descriptor_union_t *ifBuffer = (usb_descriptor_union_t *)(ifPointer->interfaceExtension); + usb_cdc_func_desc_struct_t *funcBuffer; + + for (uint32_t ifIndex = 0; ifIndex < ifPointer->interfaceExtensionLength; ifIndex += ifBuffer->common.bLength, + ifBuffer = (usb_descriptor_union_t *)((uint8_t *)ifBuffer + ifBuffer->common.bLength)) + { + if (ifBuffer->common.bDescriptorType == 0x24U) + { + funcBuffer = (usb_cdc_func_desc_struct_t *)ifBuffer; + switch (funcBuffer->common.bDescriptorSubtype) + { + case USB_HOST_DESC_SUBTYPE_HEADER: + ifHeadDesc = &funcBuffer->head; + if ((((uint32_t)(ifHeadDesc->bcdCDC[1U]) << 8U) + ifHeadDesc->bcdCDC[0U]) > 0x0110U) + { + status = kStatus_USB_Error; + } + break; + + case USB_HOST_DESC_SUBTYPE_UNION: + if (funcBuffer->unionDesc.bControlInterface == ifPointer->interfaceDesc->bInterfaceNumber) + { + ifUnionInterfaceDesc = &funcBuffer->unionDesc; + } + else + { + status = kStatus_USB_Error; + } + break; + + case USB_HOST_DESC_SUBTYPE_ECM: + ifEthernetNetworkingDesc = &funcBuffer->ecm; + cdcInstance->headDesc = ifHeadDesc; + cdcInstance->unionInterfaceDesc = ifUnionInterfaceDesc; + cdcInstance->ethernetNetworkingDesc = ifEthernetNetworkingDesc; + if (headDesc) + { + *headDesc = cdcInstance->headDesc; + } + if (unionInterfaceDesc) + { + *unionInterfaceDesc = cdcInstance->unionInterfaceDesc; + } + if (ethernetNetworkingDesc) + { + *ethernetNetworkingDesc = cdcInstance->ethernetNetworkingDesc; + } + break; + + default: + break; + } + if (status != kStatus_USB_Success) + { + break; + } + } + } + return status; +} #endif diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc.h b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc.h index bff5a6b2d..044a316d6 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc.h @@ -17,7 +17,6 @@ /******************************************************************************* * Definitions ******************************************************************************/ - /* Class-specific request */ /* CDC 1.2 */ /*! @brief CDC class-specific request (SEND_ENCAPSULATED_COMMAND) */ @@ -32,6 +31,11 @@ /*! @brief CDC class-specific request (SET_CONTROL_LINE_STATE) */ #define USB_HOST_CDC_SET_CONTROL_LINE_STATE 0x22U +/*! @brief CDC Class-specific Management Element Notifications */ +#define USB_HOST_CDC_NOTIFICATION_NETWORK_CONNECTION (0x00U) +#define USB_HOST_CDC_NOTIFICATION_RESPONSE_AVAILABLE (0x01U) +#define USB_HOST_CDC_NOTIFICATION_CONNECTION_SPEED_CHANGE (0x2AU) + /*! @brief CDC class-specific notifications(SerialState) bitmap*/ #define USB_HOST_ACM_UART_STATE_BITMAP_BTXCARRITER 0x01U /*! @brief CDC class-specific notifications(SerialState) bitmap*/ @@ -65,6 +69,8 @@ #define USB_HOST_DESC_SUBTYPE_CS 0x07U /*! @brief CDC class-specific bDescriptor SubType in functional descriptors*/ #define USB_HOST_DESC_SUBTYPE_TOM 0x08U +/*! @brief CDC class-specific bDescriptor SubType in functional descriptors*/ +#define USB_HOST_DESC_SUBTYPE_ECM 0x0FU /*See the CDC specification page20*/ /*! @brief CDC class-specific code, Communications Interface Class Code*/ @@ -185,6 +191,21 @@ typedef struct _usb_host_cdc_tom_desc_struct uint8_t bmCapabilities; /*!deviceHandle; + usb_host_transfer_t *transfer; + usb_host_process_descriptor_param_t descriptorParam; + + cdcEcmInstance->controlCallbackFn = callbackFn; + cdcEcmInstance->controlCallbackParam = callbackParam; + + status = USB_HostMallocTransfer(deviceInstance->hostHandle, &transfer); + if (status != kStatus_USB_Success) + { + usb_echo("Malloc get string descriptor transfer error.\r\n"); + return status; + } + + transfer->setupPacket->bmRequestType = USB_REQUEST_TYPE_DIR_IN; + transfer->setupPacket->bRequest = USB_REQUEST_STANDARD_GET_DESCRIPTOR; + transfer->callbackFn = USB_HostCdcEcmGetMacStringDescriptorPipeCallback; + transfer->callbackParam = cdcEcmInstance; + + descriptorParam.descriptorBuffer = buffer; + descriptorParam.descriptorType = USB_DESCRIPTOR_TYPE_STRING; + descriptorParam.descriptorIndex = index; + descriptorParam.descriptorLength = bufferLength; + descriptorParam.languageId = langID; + + return USB_HostStandardSetGetDescriptor(deviceInstance, transfer, &descriptorParam); +} + +static void USB_HostCdcEcmGetMacStringDescriptorPipeCallback(void *param, + usb_host_transfer_t *transfer, + usb_status_t status) +{ + usb_host_cdc_instance_struct_t *cdcEcmInstance = (usb_host_cdc_instance_struct_t *)param; + if (cdcEcmInstance->controlCallbackFn != NULL) + { + cdcEcmInstance->controlCallbackFn(cdcEcmInstance->controlCallbackParam, transfer->transferBuffer, + transfer->transferSofar, status); + } + (void)USB_HostFreeTransfer(cdcEcmInstance->hostHandle, transfer); + + return; +} + +uint32_t USB_HostCdcEcmPowerManagementPatternFilterData(USB_HostCdcEcmPowerManagementPatternFilter_t *param, + uint8_t *dataBuf) +{ + uint8_t *p = dataBuf; + volatile uint32_t len = 0; + *p++ = param->MaskSize & 0xFF; + *p++ = (param->MaskSize >> 8) & 0xFF; + len += 2; + + for (int i = 0; i < param->MaskSize; i++) + { + *p++ = param->Mask[i]; + len++; + } + for (int i = 0; i < strlen((char *)param->Pattern); i++) + { + *p++ = param->Pattern[i]; + len++; + } + + return len; +} +#endif diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc_ecm.h b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc_ecm.h new file mode 100644 index 000000000..7d982f6a6 --- /dev/null +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc_ecm.h @@ -0,0 +1,281 @@ +/** + * Copyright 2024 NXP + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef __USB_HOST_CDC_ECM_H__ +#define __USB_HOST_CDC_ECM_H__ + +/*! + * @addtogroup usb_host_cdc_ecm_drv + * @{ + */ + +/******************************************************************************* + * Includes + ******************************************************************************/ + +/******************************************************************************* + * Definitions + ******************************************************************************/ +/*! @brief Class-Specific Codes */ +#define USB_HOST_CDC_ECM_CLASS_CODE (0x02U) +#define USB_HOST_CDC_ECM_SUBCLASS_CODE (0x06U) +#define USB_HOST_CDC_ECM_PROTOCOL_CODE (0x00U) + +/*! @brief Class-Specific Request Codes for Ethernet subclass */ +#define CDC_ECM_SET_ETHERNET_MULTICAST_FILTER (0x40U) +#define CDC_ECM_SET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER (0x41U) +#define CDC_ECM_GET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER (0x42U) +#define CDC_ECM_SET_ETHERNET_PACKET_FILTER (0x43U) +#define CDC_ECM_GET_ETHERNET_STATISTIC (0x44U) + +/*! @brief Ethernet Packet Filter Bitmap */ +#define CDC_ECM_ETH_PACKET_FILTER_PROMISCUOUS (0x01U) +#define CDC_ECM_ETH_PACKET_FILTER_ALL_MULTICAST (0x02U) +#define CDC_ECM_ETH_PACKET_FILTER_DIRECTED (0x04U) +#define CDC_ECM_ETH_PACKET_FILTER_BROADCAST (0x08U) +#define CDC_ECM_ETH_PACKET_FILTER_MULTICAST (0x10U) + +/*! @brief Ethernet Statistics Capabilities */ +typedef enum _usb_host_cdc_ecm_eth_stats_cap_enum +{ + XMIT_OK = 0, /*!< Frames transmitted without errors */ + RVC_OK, /*!< Frames received without errors */ + XMIT_ERROR, /*!< Frames not transmitted, or transmitted with errors */ + RCV_ERROR, /*!< Frames received with errors that are not delivered to the USB host. */ + RCV_NO_BUFFER, /*!< Frame missed, no buffers */ + DIRECTED_BYTES_XMIT, /*!< Directed bytes transmitted without errors */ + DIRECTED_FRAMES_XMIT, /*!< Directed frames transmitted without errors */ + MULTICAST_BYTES_XMIT, /*!< Multicast bytes transmitted without errors */ + MULTICAST_FRAMES_XMIT, /*!< Multicast frames transmitted without errors */ + BROADCAST_BYTES_XMIT, /*!< Broadcast bytes transmitted without errors */ + BROADCAST_FRAMES_XMIT, /*!< Broadcast frames transmitted without errors */ + DIRECTED_BYTES_RCV, /*!< Directed bytes received without errors */ + DIRECTED_FRAMES_RCV, /*!< Directed frames received without errors */ + MULTICAST_BYTES_RCV, /*!< Multicast bytes received without errors */ + MULTICAST_FRAMES_RCV, /*!< Multicast frames received without errors */ + BROADCAST_BYTES_RCV, /*!< Broadcast bytes received without errors */ + BROADCAST_FRAMES_RCV, /*!< Broadcast frames received without errors */ + RCV_CRC_ERROR, /*!< Frames received with circular redundancy check (CRC) or frame check sequence (FCS) error */ + TRANSMIT_QUEUE_LENGTH, /*!< Length of transmit queue */ + RCV_ERROR_ALIGNMENT, /*!< Frames received with alignment error */ + XMIT_ONE_COLLISION, /*!< Frames transmitted with one collision */ + XMIT_MORE_COLLISIONS, /*!< Frames transmitted with more than one collision */ + XMIT_DEFERRED, /*!< Frames transmitted after deferral */ + XMIT_MAX_COLLISIONS, /*!< Frames not transmitted due to collisions */ + RCV_OVERRUN, /*!< Frames not received due to overrun */ + XMIT_UNDERRUN, /*!< Frames not transmitted due to underrun */ + XMIT_HEARTBEAT_FAILURE, /*!< Frames transmitted with heartbeat failure */ + XMIT_TIMES_CRS_LOST, /*!< Times carrier sense signal lost during transmission */ + XMIT_LATE_COLLISIONS, /*!< Late collisions detected */ + ETH_STATS_CAP_COUNT /*!< The count of Ethernet Statistics Capabilities */ +} USB_HostCdcEcmEthStatsCap_t; + +/*! @brief Ethernet Statistics Capabilities Bitmap */ +#define CDC_ECM_ETH_STATS_BITMAP(type) ((uint32_t)(1 << type)) + +/*! @brief Ethernet Statistics Feature Selector Codes */ +#define CDC_ECM_ETH_STATS_FEATURE_SEL_CODE(type) ((uint8_t)(type + 1)) + +/*! @brief Default maximum Ethernet frame size */ +#define CDC_ECM_FRAME_MAX_FRAMELEN (1514U) + +/*! @brief Power Management Pattern Filter Structure */ +typedef struct +{ + uint16_t MaskSize; + uint8_t *Mask; + uint8_t *Pattern; +} USB_HostCdcEcmPowerManagementPatternFilter_t; + +/*! @brief Parameters of Request SetEthernetMulticastFilters */ +typedef struct +{ + uint16_t filterNumSum; + uint8_t (*multicastAddressList)[6]; +} USB_HostCdcEcmSetEthernetMulticastFiltersParam_t; + +/*! @brief Parameters of Request SetEthernetPowerManagementPatternFilter */ +typedef struct +{ + uint16_t filternum; + USB_HostCdcEcmPowerManagementPatternFilter_t *filterData; +} USB_HostCdcEcmSetEthernetPowerManagementPatternFilterParam_t; + +/*! @brief Parameters of Request GetEthernetPowerManagementPatternFilter */ +typedef struct +{ + uint16_t filternum; + uint16_t patternActive; +} USB_HostCdcEcmGetEthernetPowerManagementPatternFilterParam_t; + +/*! @brief Parameters of Request SetEthernetPacketFilter */ +typedef uint16_t USB_HostCdcEcmSetEthernetPacketFilterParam_t; + +/*! @brief Parameters of Request GetEthernetStatistic */ +typedef struct +{ + uint16_t featureSelector; + uint32_t statistics; +} USB_HostCdcEcmGetEthernetStatisticParam_t; + +/*! @brief Parameters of CDC-ECM Class-Specific Request */ +typedef union +{ + USB_HostCdcEcmSetEthernetMulticastFiltersParam_t SetEthernetMulticastFilters; + USB_HostCdcEcmSetEthernetPowerManagementPatternFilterParam_t SetEthernetPowerManagementPatternFilter; + USB_HostCdcEcmGetEthernetPowerManagementPatternFilterParam_t GetEthernetPowerManagementPatternFilter; + USB_HostCdcEcmSetEthernetPacketFilterParam_t SetEthernetPacketFilter; + USB_HostCdcEcmGetEthernetStatisticParam_t GetEthernetStatistic; +} USB_HostCdcEcmRequestParam_t; + +/******************************************************************************* + * Prototypes + ******************************************************************************/ +/*! + * @name USB CDC-ECM host class driver + * @{ + */ + +/*! + * @brief Set the Ethernet device multicast filters as specified in the sequential list of 48 bit Ethernet multicast + * addresses. + * @param classHandle The class handle. + * @param filterNumSum The sum of filters to be set. + * @param filterData The data of filters. + * @param callbackFn This callback is called after this function completes. + * @param callbackParam The parameter in the callback function. + * @return An error code or kStatus_USB_Success. + */ +usb_status_t USB_HostCdcEcmSetEthernetMulticastFilters(usb_host_class_handle classHandle, + uint16_t filterNumSum, + uint8_t (*filterData)[6], + transfer_callback_t callbackFn, + void *callbackParam); + +/*! + * @brief Set up the specified Ethernet power management pattern filter as described in the data structure. + * @param classHandle The class handle. + * @param filterNum The number of the specific pattern filter to be set. + * @param buffer The data of pattern filters. + * @param bufferLength The length of pattern filters. + * @param callbackFn This callback is called after this function completes. + * @param callbackParam The parameter in the callback function. + * @return An error code or kStatus_USB_Success. + */ +usb_status_t USB_HostCdcEcmSetEthernetPowerManagementPatternFilter(usb_host_class_handle classHandle, + uint16_t filterNum, + uint8_t *buffer, + uint16_t bufferLength, + transfer_callback_t callbackFn, + void *callbackParam); + +/*! + * @brief Retrieves the status of the specified Ethernet power management pattern filter from the device. + * @param classHandle The class handle. + * @param filterNum The number of the specific pattern filter to be set. + * @param buffer The pattern filter active. + * @param callbackFn This callback is called after this function completes. + * @param callbackParam The parameter in the callback function. + * @returns An error code or kStatus_USB_Success. + */ +usb_status_t USB_HostCdcEcmGetEthernetPowerManagementPatternFilter(usb_host_class_handle classHandle, + uint16_t filterNum, + uint8_t (*buffer)[2], + transfer_callback_t callbackFn, + void *callbackParam); + +/*! + * @brief Configure device Ethernet packet filter settings. + * @param classHandle The class handle. + * @param packetFilterBitmap The config of the packet filter to be set. + * @param callbackFn This callback is called after this function completes. + * @param callbackParam The parameter in the callback function. + * @returns An error code or kStatus_USB_Success. + */ +usb_status_t USB_HostCdcEcmSetEthernetPacketFilter(usb_host_class_handle classHandle, + uint16_t packetFilterBitmap, + transfer_callback_t callbackFn, + void *callbackParam); + +/*! + * @brief Retrieve a statistic based on the feature selector. + * @param classHandle The class handle. + * @param featureSelector The ethernet statistics feature selector to be set. + * @param buffer The receiving address for Ethernet statistics. + * @param callbackFn This callback is called after this function completes. + * @param callbackParam The parameter in the callback function. + * @returns An error code or kStatus_USB_Success. + */ +usb_status_t USB_HostCdcEcmGetEthernetStatistic(usb_host_class_handle classHandle, + uint16_t featureSelector, + uint8_t (*buffer)[4], + transfer_callback_t callbackFn, + void *callbackParam); + +/*! + * @brief Receive data. + * @param classHandle The class handle. + * @param buffer Received data. + * @param bufferLength The length of data. + * @param callbackFn This callback is called after this function completes. + * @param callbackParam The parameter in the callback function. + * @returns An error code or kStatus_USB_Success. + */ +usb_status_t USB_HostCdcEcmDataRecv(usb_host_class_handle classHandle, + uint8_t *buffer, + uint32_t bufferLength, + transfer_callback_t callbackFn, + void *callbackParam); + +/*! + * @brief Send data. + * @param classHandle The class handle. + * @param buffer Data to be sent. + * @param bufferLength The length of data. + * @param maxSegmentSize The max segment size of the data to be sent. + * @param callbackFn This callback is called after this function completes. + * @param callbackParam The parameter in the callback function. + * @returns An error code or kStatus_USB_Success. + */ +usb_status_t USB_HostCdcEcmDataSend(usb_host_class_handle classHandle, + uint8_t *buffer, + uint32_t bufferLength, + uint16_t maxSegmentSize, + transfer_callback_t callbackFn, + void *callbackParam); + +/*! + * @brief Get CDC-ECM MAC string descriptor. + * @param classHandle The class handle. + * @param index The index of string descriptor where MAC is in it. + * @param langID Language ID of string descriptor. + * @param buffer The string to be received. + * @param bufferLength The length of string. + * @param callbackFn This callback is called after this function completes. + * @param callbackParam The parameter in the callback function. + * @returns An error code or kStatus_USB_Success. + */ +usb_status_t USB_HostCdcEcmGetMacStringDescriptor(usb_host_class_handle classHandle, + uint16_t index, + uint16_t langID, + uint8_t *buffer, + uint16_t bufferLength, + transfer_callback_t callbackFn, + void *callbackParam); + +/*! + * @brief Encapsulating a Power Management Pattern Filter. + * @param param Information of Power Management Pattern Filter. + * @param dataBuf The buffer to store Encapsulated Power Management Pattern Filter. + * @returns The length of Power Management Pattern Filter. + */ +uint32_t USB_HostCdcEcmPowerManagementPatternFilterData(USB_HostCdcEcmPowerManagementPatternFilter_t *param, + uint8_t *dataBuf); + +/*! @} */ +/*! @} */ +#endif diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc_rndis.h b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc_rndis.h index 49062a570..8c174097f 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc_rndis.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_cdc_rndis.h @@ -144,12 +144,26 @@ #define RNDIS_MAX_TRANSFER_PACKET_SIZE (0x4000U) #define RNDIS_FRAME_MAX_FRAMELEN (1518U) /*!< Default maximum Ethernet frame size. */ -/*! @brief CDC class-specific code, Base Class E0h (Wireless Controller) */ -#define USB_HOST_CDC_RNDIS_CLASS_CODE 0xE0U -/*! @brief RF Controller*/ -#define USB_HOST_CDC_RNDIS_SUBCLASS_CODE 0x01U -/*Remote NDIS. */ -#define USB_HOST_CDC_RNDIS_PROTOCOL_CODE 0x03U +/*! @brief Communications Device class-specific code, Base Class 02h (Communications and CDC Control) */ +#define USB_HOST_CDC_RNDIS_CLASS_CODE (0x02U) +/*! @brief Communication Interface Class SubClass code for Abstract Control Model */ +#define USB_HOST_CDC_RNDIS_SUBCLASS_CODE (0x02U) +/*! @brief Communication Interface Class Protocol code for vendor specific protocol */ +#define USB_HOST_CDC_RNDIS_PROTOCOL_CODE (0xFFU) + +/*! @brief Wireless Controller class-specific code, Base Class E0h (Wireless Controller) */ +#define USB_HOST_WC_RNDIS_CLASS_CODE (0xE0U) +/*! @brief Wireless Controller Class SubClass code */ +#define USB_HOST_WC_RNDIS_SUBCLASS_CODE (0x01U) +/*! @brief Wireless Controller Class Protocol code for Remote NDIS */ +#define USB_HOST_WC_RNDIS_PROTOCOL_CODE (0x03U) + +/*! @brief Miscellaneous class-specific code, Base Class EFh (Miscellaneous) */ +#define USB_HOST_MISC_RNDIS_CLASS_CODE (0xEFU) +/*! @brief Miscellaneous Class SubClass code */ +#define USB_HOST_MISC_RNDIS_SUBCLASS_CODE (0x04U) +/*! @brief Miscellaneous Class Protocol code for RNDIS over Ethernet */ +#define USB_HOST_MISC_RNDIS_PROTOCOL_CODE (0x01U) /*this is the minimum byte length of the buffer posted by host*/ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_hub.c b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_hub.c index 998b70a84..1986162d1 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_hub.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_hub.c @@ -184,10 +184,10 @@ usb_status_t USB_HostHubInit(usb_device_handle deviceHandle, usb_host_class_hand } #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - hubInstance->hubDescriptor = (uint8_t *)SDK_Malloc(7 + (USB_HOST_HUB_MAX_PORT >> 3) + 1, USB_CACHE_LINESIZE); - hubInstance->portStatusBuffer = (uint8_t *)SDK_Malloc(4, USB_CACHE_LINESIZE); - hubInstance->hubStatusBuffer = (uint8_t *)SDK_Malloc(4, USB_CACHE_LINESIZE); - hubInstance->hubBitmapBuffer = (uint8_t *)SDK_Malloc((USB_HOST_HUB_MAX_PORT >> 3) + 1, USB_CACHE_LINESIZE); + hubInstance->hubDescriptor = (uint8_t *)OSA_MemoryAllocateAlign(7 + (USB_HOST_HUB_MAX_PORT >> 3) + 1, USB_CACHE_LINESIZE); + hubInstance->portStatusBuffer = (uint8_t *)OSA_MemoryAllocateAlign(4, USB_CACHE_LINESIZE); + hubInstance->hubStatusBuffer = (uint8_t *)OSA_MemoryAllocateAlign(4, USB_CACHE_LINESIZE); + hubInstance->hubBitmapBuffer = (uint8_t *)OSA_MemoryAllocateAlign((USB_HOST_HUB_MAX_PORT >> 3) + 1, USB_CACHE_LINESIZE); #endif /* initialize hub instance structure */ @@ -346,10 +346,10 @@ usb_status_t USB_HostHubDeinit(usb_device_handle deviceHandle, usb_host_class_ha /* notify host driver that the interface will not be used */ (void)USB_HostCloseDeviceInterface(deviceHandle, hubInstance->interfaceHandle); #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - SDK_Free(hubInstance->hubDescriptor); - SDK_Free(hubInstance->portStatusBuffer); - SDK_Free(hubInstance->hubStatusBuffer); - SDK_Free(hubInstance->hubBitmapBuffer); + OSA_MemoryFreeAlign(hubInstance->hubDescriptor); + OSA_MemoryFreeAlign(hubInstance->portStatusBuffer); + OSA_MemoryFreeAlign(hubInstance->hubStatusBuffer); + OSA_MemoryFreeAlign(hubInstance->hubBitmapBuffer); #endif OSA_MemoryFree(hubInstance); } diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_msd.c b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_msd.c index 377cf3802..2e7207685 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_msd.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_msd.c @@ -352,9 +352,9 @@ static void USB_HostMsdCswCallback(void *param, usb_host_transfer_t *transfer, u { /* kStatus_USB_Success */ if ((transfer->transferSofar == USB_HOST_UFI_CSW_LENGTH) && - (msdInstance->msdCommand.cswBlock.CSWSignature == USB_LONG_TO_LITTLE_ENDIAN(USB_HOST_MSD_CSW_SIGNATURE))) + (msdInstance->msdCommand.cswBlock->CSWSignature == USB_LONG_TO_LITTLE_ENDIAN(USB_HOST_MSD_CSW_SIGNATURE))) { - switch (msdInstance->msdCommand.cswBlock.CSWStatus) + switch (msdInstance->msdCommand.cswBlock->CSWStatus) { case 0: USB_HostMsdCommandDone(msdInstance, kStatus_USB_Success); @@ -635,7 +635,7 @@ static usb_status_t USB_HostMsdProcessCommand(usb_host_msd_instance_t *msdInstan { case kMSD_CommandTransferCBW: /* ufi CBW phase */ transfer->direction = USB_OUT; - transfer->transferBuffer = (uint8_t *)(&(msdInstance->msdCommand.cbwBlock)); + transfer->transferBuffer = (uint8_t *)msdInstance->msdCommand.cbwBlock; transfer->transferLength = USB_HOST_UFI_CBW_LENGTH; transfer->callbackFn = USB_HostMsdCbwCallback; transfer->callbackParam = msdInstance; @@ -688,7 +688,7 @@ static usb_status_t USB_HostMsdProcessCommand(usb_host_msd_instance_t *msdInstan break; case kMSD_CommandTransferCSW: /* ufi CSW phase */ transfer->direction = USB_IN; - transfer->transferBuffer = (uint8_t *)&msdInstance->msdCommand.cswBlock; + transfer->transferBuffer = (uint8_t *)msdInstance->msdCommand.cswBlock; transfer->transferLength = USB_HOST_UFI_CSW_LENGTH; transfer->callbackFn = USB_HostMsdCswCallback; transfer->callbackParam = msdInstance; @@ -736,7 +736,7 @@ usb_status_t USB_HostMsdCommand(usb_host_class_handle classHandle, uint8_t byteValues[10]) { usb_host_msd_instance_t *msdInstance = (usb_host_msd_instance_t *)classHandle; - usb_host_cbw_t *cbwPointer = &(msdInstance->msdCommand.cbwBlock); + usb_host_cbw_t *cbwPointer = msdInstance->msdCommand.cbwBlock; uint8_t index = 0; if (classHandle == NULL) @@ -908,6 +908,16 @@ usb_status_t USB_HostMsdInit(usb_device_handle deviceHandle, usb_host_class_hand return kStatus_USB_AllocFail; } +#if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) + msdInstance->msdCommand.cbwBlock = + (usb_host_cbw_t *)OSA_MemoryAllocateAlign(sizeof(usb_host_cbw_t), USB_CACHE_LINESIZE); + msdInstance->msdCommand.cswBlock = + (usb_host_csw_t *)OSA_MemoryAllocateAlign(sizeof(usb_host_csw_t), USB_CACHE_LINESIZE); +#else + msdInstance->msdCommand.cbwBlock = (usb_host_cbw_t *)OSA_MemoryAllocate(sizeof(usb_host_cbw_t)); + msdInstance->msdCommand.cswBlock = (usb_host_csw_t *)OSA_MemoryAllocate(sizeof(usb_host_csw_t)); +#endif + /* initialize msd instance */ msdInstance->deviceHandle = deviceHandle; msdInstance->interfaceHandle = NULL; @@ -917,7 +927,7 @@ usb_status_t USB_HostMsdInit(usb_device_handle deviceHandle, usb_host_class_hand (void)USB_HostHelperGetPeripheralInformation(deviceHandle, (uint32_t)kUSB_HostGetDeviceControlPipe, &infoValue); temp = (uint32_t *)infoValue; msdInstance->controlPipe = (usb_host_pipe_handle)temp; - msdInstance->msdCommand.cbwBlock.CBWSignature = USB_LONG_TO_LITTLE_ENDIAN(USB_HOST_MSD_CBW_SIGNATURE); + msdInstance->msdCommand.cbwBlock->CBWSignature = USB_LONG_TO_LITTLE_ENDIAN(USB_HOST_MSD_CBW_SIGNATURE); status = USB_HostMallocTransfer(msdInstance->hostHandle, &(msdInstance->msdCommand.transfer)); if (status != kStatus_USB_Success) { @@ -1082,6 +1092,13 @@ usb_status_t USB_HostMsdDeinit(usb_device_handle deviceHandle, usb_host_class_ha } (void)USB_HostCloseDeviceInterface( deviceHandle, msdInstance->interfaceHandle); /* notify host driver the interface is closed */ +#if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) + OSA_MemoryFreeAlign(msdInstance->msdCommand.cbwBlock); + OSA_MemoryFreeAlign(msdInstance->msdCommand.cswBlock); +#else + OSA_MemoryFree(msdInstance->msdCommand.cbwBlock); + OSA_MemoryFree(msdInstance->msdCommand.cswBlock); +#endif OSA_MemoryFree(msdInstance); } else diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_msd.h b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_msd.h index 7d74acee4..32d744ada 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_msd.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/class/usb_host_msd.h @@ -116,8 +116,8 @@ typedef struct _usb_host_csw /*! @brief MSC UFI command information structure */ typedef struct _usb_host_msd_command { - usb_host_cbw_t cbwBlock; /*!< CBW data block*/ - usb_host_csw_t cswBlock; /*!< CSW data block*/ + usb_host_cbw_t *cbwBlock; /*!< CBW data block*/ + usb_host_csw_t *cswBlock; /*!< CSW data block*/ uint8_t *dataBuffer; /*!< Data buffer pointer*/ uint32_t dataLength; /*!< Data buffer length*/ uint32_t dataSofar; /*!< Successful transfer data length*/ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_devices.c b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_devices.c index 953dc2d8b..240319a37 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_devices.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_devices.c @@ -453,7 +453,7 @@ static usb_status_t USB_HostProcessCallback(usb_host_device_instance_t *deviceIn if (deviceInstance->configurationDesc != NULL) { #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - SDK_Free(deviceInstance->configurationDesc); + OSA_MemoryFreeAlign(deviceInstance->configurationDesc); #else OSA_MemoryFree(deviceInstance->configurationDesc); #endif @@ -475,7 +475,7 @@ static usb_status_t USB_HostProcessCallback(usb_host_device_instance_t *deviceIn { #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) deviceInstance->configurationDesc = - (uint8_t *)SDK_Malloc((deviceInstance->configurationLen & 0xFFFCu) + 4, USB_CACHE_LINESIZE); + (uint8_t *)OSA_MemoryAllocateAlign((deviceInstance->configurationLen & 0xFFFCu) + 4, USB_CACHE_LINESIZE); #else deviceInstance->configurationDesc = (uint8_t *)OSA_MemoryAllocate((((uint32_t)deviceInstance->configurationLen) & 0xFFFCU) + 4UL); @@ -485,7 +485,7 @@ static usb_status_t USB_HostProcessCallback(usb_host_device_instance_t *deviceIn { #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) deviceInstance->configurationDesc = - (uint8_t *)SDK_Malloc(deviceInstance->configurationLen, USB_CACHE_LINESIZE); + (uint8_t *)OSA_MemoryAllocateAlign(deviceInstance->configurationLen, USB_CACHE_LINESIZE); #else deviceInstance->configurationDesc = (uint8_t *)OSA_MemoryAllocate(deviceInstance->configurationLen); #endif @@ -751,7 +751,7 @@ static void USB_HostReleaseDeviceResource(usb_host_instance_t *hostInstance, usb if (deviceInstance->configurationDesc != NULL) { #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - SDK_Free(deviceInstance->configurationDesc); + OSA_MemoryFreeAlign(deviceInstance->configurationDesc); #else OSA_MemoryFree(deviceInstance->configurationDesc); #endif @@ -761,7 +761,7 @@ static void USB_HostReleaseDeviceResource(usb_host_instance_t *hostInstance, usb level = deviceInstance->level; #endif #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - SDK_Free(deviceInstance->deviceDescriptor); + OSA_MemoryFreeAlign(deviceInstance->deviceDescriptor); #else OSA_MemoryFree(deviceInstance->deviceDescriptor); #endif @@ -1091,7 +1091,7 @@ usb_status_t USB_HostAttachDevice(usb_host_handle hostHandle, newInstance->deviceAttachState = (uint8_t)kStatus_device_Attached; #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) newInstance->deviceDescriptor = - (usb_descriptor_device_t *)SDK_Malloc(sizeof(usb_descriptor_device_t) + 9, USB_CACHE_LINESIZE); + (usb_descriptor_device_t *)OSA_MemoryAllocateAlign(sizeof(usb_descriptor_device_t) + 9, USB_CACHE_LINESIZE); #else newInstance->deviceDescriptor = (usb_descriptor_device_t *)OSA_MemoryAllocate(sizeof(usb_descriptor_device_t) + 9U); #endif @@ -1101,7 +1101,7 @@ usb_status_t USB_HostAttachDevice(usb_host_handle hostHandle, usb_echo("allocate newInstance->deviceDescriptor fail\r\n"); #endif #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - SDK_Free(newInstance->deviceDescriptor); + OSA_MemoryFreeAlign(newInstance->deviceDescriptor); #else OSA_MemoryFree(newInstance->deviceDescriptor); #endif @@ -1138,7 +1138,7 @@ usb_status_t USB_HostAttachDevice(usb_host_handle hostHandle, #endif (void)USB_HostUnlock(); #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - SDK_Free(newInstance->deviceDescriptor); + OSA_MemoryFreeAlign(newInstance->deviceDescriptor); #else OSA_MemoryFree(newInstance->deviceDescriptor); #endif @@ -1168,7 +1168,7 @@ usb_status_t USB_HostAttachDevice(usb_host_handle hostHandle, /* don't need release resource, resource is released when detach */ *deviceHandle = newInstance; #if ((defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) - SDK_Free(newInstance->deviceDescriptor); + OSA_MemoryFreeAlign(newInstance->deviceDescriptor); #else OSA_MemoryFree(newInstance->deviceDescriptor); #endif diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ehci.c b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ehci.c index 157280e34..08e943062 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ehci.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ehci.c @@ -24,6 +24,9 @@ #if (defined(FSL_FEATURE_MEMORY_HAS_ADDRESS_OFFSET) && (FSL_FEATURE_MEMORY_HAS_ADDRESS_OFFSET > 0U)) #include "fsl_memory.h" #endif +#if ((defined USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) +#include "fsl_cache.h" +#endif /******************************************************************************* * Definitions @@ -545,6 +548,16 @@ static void USB_HostEhciTimer0(usb_host_ehci_instance_t *ehciInstance); * @param ehciInstance ehci instance pointer. */ static void USB_HostEhciTimer1(usb_host_ehci_instance_t *ehciInstance); + +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) +/*! + * @brief ehci host completed LPM interrupt process function + * + * @param ehciInstance ehci instance pointer. + */ +static void USB_HostEhciCompletedLPM(usb_host_ehci_instance_t *ehciInstance); +#endif + #endif #if ((defined USB_HOST_CONFIG_COMPLIANCE_TEST) && (USB_HOST_CONFIG_COMPLIANCE_TEST)) @@ -567,6 +580,14 @@ extern usb_status_t USB_HostStandardSetGetDescriptor(usb_host_device_instance_t void *param); #endif /* USB_HOST_CONFIG_COMPLIANCE_TEST */ +/*! + * @brief transfer callback. + * + * @param transfer transfer information. + * @param status transfer status. + */ +static void USB_HostEhciTransferCallback(usb_host_transfer_t *transfer, usb_status_t status); + /******************************************************************************* * Variables ******************************************************************************/ @@ -2330,7 +2351,7 @@ static usb_status_t USB_HostEhciQhQtdListDeinit(usb_host_ehci_instance_t *ehciIn 0U : (transfer->transferLength - transfer->transferSofar); /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, kStatus_USB_TransferCancel); + USB_HostEhciTransferCallback(transfer, kStatus_USB_TransferCancel); transfer = nextTransfer; } @@ -2434,7 +2455,7 @@ static usb_status_t USB_HostEhciTransferQtdListDeinit(usb_host_ehci_instance_t * 0U : (transfer->transferLength - transfer->transferSofar); /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, kStatus_USB_TransferCancel); + USB_HostEhciTransferCallback(transfer, kStatus_USB_TransferCancel); /* start this qh schedule */ vltQhPointer->transferOverlayResults[0] &= (~EHCI_HOST_QTD_STATUS_MASK); /* clear error status */ @@ -2977,7 +2998,7 @@ static usb_status_t USB_HostEhciSitdArrayDeinit(usb_host_ehci_instance_t *ehciIn (usb_host_ehci_sitd_t *)transfer->union1.unitHead, (usb_host_ehci_sitd_t *)transfer->union2.unitTail); /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, kStatus_USB_TransferCancel); + USB_HostEhciTransferCallback(transfer, kStatus_USB_TransferCancel); /* next transfer */ transfer = nextTransfer; } @@ -3328,7 +3349,7 @@ static usb_status_t USB_HostEhciItdArrayDeinit(usb_host_ehci_instance_t *ehciIns } transfer->transferSofar = doneLength; /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, kStatus_USB_TransferCancel); + USB_HostEhciTransferCallback(transfer, kStatus_USB_TransferCancel); /* next transfer */ transfer = nextTransfer; @@ -3567,11 +3588,18 @@ static usb_status_t USB_HostEhciCloseIso(usb_host_ehci_instance_t *ehciInstance, static usb_status_t USB_HostEhciResetIP(usb_host_ehci_instance_t *ehciInstance) { - /* reset controller */ - ehciInstance->ehciIpBase->USBCMD = USBHS_USBCMD_RST_MASK; - while (0U != (ehciInstance->ehciIpBase->USBCMD & USBHS_USBCMD_RST_MASK)) + /* For eUSB, do not need to reset controller. */ +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif { - } + /* reset controller */ + ehciInstance->ehciIpBase->USBCMD = USBHS_USBCMD_RST_MASK; + while (0U != (ehciInstance->ehciIpBase->USBCMD & USBHS_USBCMD_RST_MASK)) + { + } + } + /* set host mode */ #if (ENDIANNESS == USB_LITTLE_ENDIAN) ehciInstance->ehciIpBase->USBMODE |= 0x03U; @@ -3639,6 +3667,12 @@ static usb_status_t USB_HostEhciStartIP(usb_host_ehci_instance_t *ehciInstance) /* enable interrupt (USB interrupt enable + USB error interrupt enable + port change detect enable + system error * enable + interrupt on async advance enable) + general purpos Timer 0 Interrupt enable */ ehciInstance->ehciIpBase->USBINTR |= (0x1000037U); +#if ((defined(USB_HOST_CONFIG_LOW_POWER_MODE)) && (USB_HOST_CONFIG_LOW_POWER_MODE > 0U)) +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) + ehciInstance->ehciIpBase->USBINTR |= USB_USBINTR_LPM_HST_COMPIE_MASK; + ehciInstance->registerNcBase->LPM_CSR0 |= USBNC_LPM_CSR0_LPM_EN_MASK; +#endif +#endif return kStatus_USB_Success; } @@ -3810,7 +3844,78 @@ static usb_status_t USB_HostEhciControlBus(usb_host_ehci_instance_t *ehciInstanc status = kStatus_USB_Error; } break; -#endif + +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) + case kUSB_HostBusL1Sleep: + if (0U != (ehciInstance->ehciIpBase->PORTSC1 & USBHS_PORTSC1_CCS_MASK)) + { + volatile uint32_t lpm_count = 200000U; + OSA_SR_ALLOC(); + /* set timer1 */ + ehciInstance->ehciIpBase->GPTIMER1LD = (1 * 1000); /* 1ms */ + ehciInstance->ehciIpBase->GPTIMER1CTL |= + (USBHS_GPTIMER0CTL_RUN_MASK | USBHS_GPTIMER0CTL_MODE_MASK | USBHS_GPTIMER0CTL_RST_MASK); + USB_HostEhciLock(); + USB_HostEhciStopAsync(ehciInstance); + USB_HostEhciStopPeriodic(ehciInstance); + USB_HostEhciUnlock(); + while (0U != (ehciInstance->ehciIpBase->USBSTS & (USBHS_USBSTS_PS_MASK | USBHS_USBSTS_AS_MASK))) + { + __NOP(); + } + ehciInstance->ehciIpBase->PORTSC1 &= ~USBHS_PORTSC1_WKCN_MASK; + ehciInstance->ehciIpBase->PORTSC1 |= USBHS_PORTSC1_WKDS_MASK; + ehciInstance->matchTick = 0U; + ehciInstance->ehciIpBase->USBINTR |= (USBHS_USBINTR_TIE1_MASK); + usb_host_instance_t *hostPointer = (usb_host_instance_t *)ehciInstance->hostHandle; + portScRegister = ehciInstance->registerNcBase->LPM_CSR2; + portScRegister &= ~(USBNC_LPM_CSR2_LPM_HST_BESL_MASK | USBNC_LPM_CSR2_LPM_HST_RWKEN_MASK); + portScRegister |= (uint32_t)( + ((uint32_t)ehciInstance->hirdValue << USBNC_LPM_CSR2_LPM_HST_BESL_SHIFT) | + ((uint32_t)ehciInstance->L1remoteWakeupEnable << USBNC_LPM_CSR2_LPM_HST_RWKEN_SHIFT)); + ehciInstance->registerNcBase->LPM_CSR2 = portScRegister; + + usb_host_device_instance_t *deviceInstance; + + ehciInstance->busSuspendStatus = kBus_EhciL1StartSleep; + deviceInstance = (usb_host_device_instance_t *)hostPointer->suspendedDevice; + OSA_ENTER_CRITICAL(); + /* Workaroud for TKT0634948: begin */ + ehciInstance->ehciIpBase->USBSTS |= USB_USBSTS_SRI_MASK; + /* wait the next SOF */ + while ((0U == (ehciInstance->ehciIpBase->USBSTS & USB_USBSTS_SRI_MASK)) && (0U != lpm_count)) + { + lpm_count--; + } + ehciInstance->registerNcBase->LPM_CSR2 |= ((uint32_t)USBNC_LPM_CSR2_LPM_HST_SEND_MASK | + (((uint32_t)deviceInstance->setAddress << USBNC_LPM_CSR2_LPM_HST_DEVADD_SHIFT) & + (uint32_t)USBNC_LPM_CSR2_LPM_HST_DEVADD_MASK)); + /* Workaroud for TKT0634948: end */ + OSA_EXIT_CRITICAL(); + } + else + { + status = kStatus_USB_Error; + } + break; + + case kUSB_HostBusL1Resume: + ehciInstance->ehciIpBase->PORTSC1 &= ~(USBHS_PORTSC1_SUSP_MASK); /* Clear Suspend bit */ + ehciInstance->ehciIpBase->PORTSC1 &= ~USBHS_PORTSC1_PHCD_MASK; + if (ehciInstance->deviceAttached != (uint8_t)kEHCIDeviceDetached) + { + ehciInstance->busSuspendStatus = kBus_EhciL1StartResume; + ehciInstance->registerNcBase->USB_OTGn_CTRL &= ~USBNC_USB_OTGn_CTRL_WIE_MASK; + ehciInstance->ehciIpBase->USBCMD |= (USBHS_USBCMD_RS_MASK); + ehciInstance->ehciIpBase->PORTSC1 |= (USBHS_PORTSC1_FPR_MASK); /* Resume the device */ + } + else + { + status = kStatus_USB_Error; + } + break; +#endif /* USB_HOST_CONFIG_LPM_L1 */ +#endif /* USB_HOST_CONFIG_LOW_POWER_MODE */ default: status = kStatus_USB_Error; break; @@ -3818,6 +3923,17 @@ static usb_status_t USB_HostEhciControlBus(usb_host_ehci_instance_t *ehciInstanc return status; } +static void USB_HostEhciTransferCallback(usb_host_transfer_t *transfer, usb_status_t status) +{ +#if ((defined USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) + if ((transfer->direction == USB_IN) && (transfer->transferSofar > 0U)) + { + DCACHE_InvalidateByRange((uint32_t)transfer->transferBuffer, transfer->transferSofar); + } +#endif + transfer->callbackFn(transfer->callbackParam, transfer, status); +} + void USB_HostEhciTransactionDone(usb_host_ehci_instance_t *ehciInstance) { /* process async QH */ @@ -3886,13 +4002,13 @@ void USB_HostEhciTransactionDone(usb_host_ehci_instance_t *ehciInstance) if (0U != (qtdStatus & EHCI_HOST_QH_STATUS_NOSTALL_ERROR_MASK)) { /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, + USB_HostEhciTransferCallback(transfer, kStatus_USB_TransferFailed); /* transfer fail */ } else { /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, kStatus_USB_TransferStall); + USB_HostEhciTransferCallback(transfer, kStatus_USB_TransferStall); } } else @@ -3929,7 +4045,7 @@ void USB_HostEhciTransactionDone(usb_host_ehci_instance_t *ehciInstance) } } /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, + USB_HostEhciTransferCallback(transfer, kStatus_USB_Success); /* transfer success */ } } @@ -3998,13 +4114,13 @@ void USB_HostEhciTransactionDone(usb_host_ehci_instance_t *ehciInstance) if (0U != (qtdStatus & EHCI_HOST_QH_STATUS_NOSTALL_ERROR_MASK)) { /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, + USB_HostEhciTransferCallback(transfer, kStatus_USB_TransferFailed); /* transfer fail */ } else { /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, + USB_HostEhciTransferCallback(transfer, kStatus_USB_TransferStall); /* transfer stall */ } } @@ -4048,7 +4164,7 @@ void USB_HostEhciTransactionDone(usb_host_ehci_instance_t *ehciInstance) transfer->transferSofar = dataLength; isoPointer->ehciTransferHead = transfer->next; /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, + USB_HostEhciTransferCallback(transfer, kStatus_USB_Success); /* transfer callback success */ /* TODO: iso callback error */ } @@ -4073,7 +4189,7 @@ void USB_HostEhciTransactionDone(usb_host_ehci_instance_t *ehciInstance) transfer->transferSofar = transfer->transferLength - dataLength; isoPointer->ehciTransferHead = transfer->next; /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, + USB_HostEhciTransferCallback(transfer, kStatus_USB_Success); /* transfer callback success */ /* TODO: iso callback error */ } @@ -4170,9 +4286,14 @@ static void USB_HostEhciPortChange(usb_host_ehci_instance_t *ehciInstance) (uint8_t)((ehciInstance->ehciIpBase->PORTSC1 & USBHS_PORTSC1_PSPD_MASK) >> USBHS_PORTSC1_PSPD_SHIFT); /* enable ehci phy disconnection */ #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - if (ehciInstance->firstDeviceSpeed == USB_SPEED_HIGH) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif { - USB_EhcihostPhyDisconnectDetectCmd(ehciInstance->controllerId, 1); + if (ehciInstance->firstDeviceSpeed == USB_SPEED_HIGH) + { + USB_EhcihostPhyDisconnectDetectCmd(ehciInstance->controllerId, 1); + } } #endif @@ -4196,7 +4317,12 @@ static void USB_HostEhciPortChange(usb_host_ehci_instance_t *ehciInstance) #endif /* disable ehci phy disconnection */ #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - USB_EhcihostPhyDisconnectDetectCmd(ehciInstance->controllerId, 0); +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif + { + USB_EhcihostPhyDisconnectDetectCmd(ehciInstance->controllerId, 0); + } #endif USB_HostEhciLock(); /* disable async and periodic */ @@ -4338,7 +4464,7 @@ static void USB_HostEhciTimer0(usb_host_ehci_instance_t *ehciInstance) vltQhPointer->ehciTransferHead = transfer->next; vltQhPointer->timeOutValue = USB_HOST_EHCI_CONTROL_BULK_TIME_OUT_VALUE; /* callback function is different from the current condition */ - transfer->callbackFn(transfer->callbackParam, transfer, kStatus_USB_TransferFailed); + USB_HostEhciTransferCallback(transfer, kStatus_USB_TransferFailed); } } break; @@ -4380,22 +4506,37 @@ static void USB_HostEhciTimer1(usb_host_ehci_instance_t *ehciInstance) #endif #endif #if (defined(FSL_FEATURE_USBPHY_28FDSOI) && (FSL_FEATURE_USBPHY_28FDSOI > 0U)) - ehciInstance->registerPhyBase->USB1_VBUS_DETECT_SET |= - USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK; +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif + { + ehciInstance->registerPhyBase->USB1_VBUS_DETECT_SET |= + USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK; + } #endif ehciInstance->ehciIpBase->PORTSC1 |= USBHS_PORTSC1_PHCD_MASK; #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - ehciInstance->registerPhyBase->PWD = 0xFFFFFFFFU; - - while (0U != (ehciInstance->registerPhyBase->CTRL & (USBPHY_CTRL_UTMI_SUSPENDM_MASK))) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif { - __NOP(); + ehciInstance->registerPhyBase->PWD = 0xFFFFFFFFU; + + while (0U != (ehciInstance->registerPhyBase->CTRL & (USBPHY_CTRL_UTMI_SUSPENDM_MASK))) + { + __NOP(); + } } #endif #if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + ehciInstance->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK | + USBNC_USB_OTGn_CTRL_WKUP_DPDM_EN_MASK; +#else ehciInstance->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WKUP_ID_EN_MASK | USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK | - USBNC_USB_OTGn_CTRL_WKUP_DPDM_EN_MASK; + USBNC_USB_OTGn_CTRL_WKUP_DPDM_EN_MASK; +#endif ehciInstance->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WIE_MASK; #else #if (defined(FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT) && (FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT > 0U)) @@ -4404,7 +4545,12 @@ static void USB_HostEhciTimer1(usb_host_ehci_instance_t *ehciInstance) #endif #endif #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - ehciInstance->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK; +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif + { + ehciInstance->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK; + } #endif (void)hostPointer->deviceCallback(hostPointer->suspendedDevice, NULL, kUSB_HostEventSuspended); /* call host callback function */ @@ -4432,6 +4578,34 @@ static void USB_HostEhciTimer1(usb_host_ehci_instance_t *ehciInstance) ehciInstance->ehciIpBase->USBINTR &= ~(USBHS_USBINTR_TIE1_MASK); } } +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) + else if (kBus_EhciL1StartResume == ehciInstance->busSuspendStatus) + { + usb_host_instance_t *hostPointer = (usb_host_instance_t *)ehciInstance->hostHandle; + if (0U == (ehciInstance->ehciIpBase->PORTSC1 & USBHS_PORTSC1_FPR_MASK)) + { + while (!(ehciInstance->ehciIpBase->USBSTS & USB_USBSTS_LPM_L1_EXITI_MASK)) + { + __NOP(); + } + /* clear L1 Exit Interrupt status */ + ehciInstance->ehciIpBase->USBSTS |= USB_USBSTS_LPM_L1_EXITI_MASK; + ehciInstance->ehciIpBase->PORTSC1 &= ~USBHS_PORTSC1_WKDS_MASK; + if (0U != (ehciInstance->ehciIpBase->PORTSC1 & USBHS_PORTSC1_CCS_MASK)) + { + USB_HostEhciLock(); + USB_HostEhciStartAsync(ehciInstance); + USB_HostEhciStartPeriodic(ehciInstance); + USB_HostEhciUnlock(); + } + (void)hostPointer->deviceCallback(hostPointer->suspendedDevice, NULL, + kUSB_HostEventL1Resumed); /* call host callback function */ + hostPointer->suspendedDevice = NULL; + ehciInstance->busSuspendStatus = kBus_EhciIdle; + ehciInstance->ehciIpBase->USBINTR &= ~(USBHS_USBINTR_TIE1_MASK); + } + } +#endif else { } @@ -4442,6 +4616,122 @@ static void USB_HostEhciTimer1(usb_host_ehci_instance_t *ehciInstance) ehciInstance->ehciIpBase->USBINTR &= ~(USBHS_USBINTR_TIE1_MASK); } } + +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) +static void USB_HostEhciCompletedLPM(usb_host_ehci_instance_t *ehciInstance) +{ + uint32_t portStatus; + uint32_t portNcStatus; + + portStatus = ehciInstance->ehciIpBase->PORTSC1; + portNcStatus = ehciInstance->registerNcBase->LPM_CSR2; + + if (0U != (portStatus & USBHS_PORTSC1_CCS_MASK)) + { + if (((uint8_t)kBus_EhciL1StartSleep == ehciInstance->busSuspendStatus)) + { + usb_host_instance_t *hostPointer = (usb_host_instance_t *)ehciInstance->hostHandle; + if (0x01U == ((portNcStatus & USBNC_LPM_CSR2_LPM_HST_STSRCVD_MASK) >> USBNC_LPM_CSR2_LPM_HST_STSRCVD_SHIFT)) /* ACK */ + { + /* polling if host transitions to the L1 state and the PHY is put in L1 low power mode */ + while (!(ehciInstance->ehciIpBase->USBSTS & USB_USBSTS_LPM_L1_ENTRYI_MASK)) + { + __NOP(); + } + ehciInstance->ehciIpBase->USBSTS |= USB_USBSTS_LPM_L1_ENTRYI_MASK; + /* TODO: maybe use 3us delay */ + portStatus = ehciInstance->ehciIpBase->USBCMD; + portStatus &= ~USBHS_USBCMD_RS_MASK; + ehciInstance->ehciIpBase->USBCMD = portStatus; + ehciInstance->ehciIpBase->USBSTS |= USBHS_USBSTS_SRI_MASK; +#if (defined(FSL_FEATURE_USBPHY_28FDSOI) && (FSL_FEATURE_USBPHY_28FDSOI > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif + { + ehciInstance->registerPhyBase->USB1_VBUS_DETECT_SET |= + USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK; + } +#endif + +#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif + { + ehciInstance->registerPhyBase->PWD = 0xFFFFFFFFU; + + while (0U != (ehciInstance->registerPhyBase->CTRL & (USBPHY_CTRL_UTMI_SUSPENDM_MASK))) + { + __NOP(); + } + } +#endif +#if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + ehciInstance->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK | + USBNC_USB_OTGn_CTRL_WKUP_DPDM_EN_MASK; +#else + ehciInstance->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WKUP_ID_EN_MASK | + USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK | + USBNC_USB_OTGn_CTRL_WKUP_DPDM_EN_MASK; +#endif + ehciInstance->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WIE_MASK; +#endif + +#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif + { + ehciInstance->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK; + } +#endif + /* call host callback function, function is initialized in USB_HostInit */ + (void)hostPointer->deviceCallback(hostPointer->suspendedDevice, NULL, + kUSB_HostEventL1Sleeped); /* call host callback function */ + ehciInstance->busSuspendStatus = kBus_EhciL1Sleeped; + } + else if (0x03U == ((portNcStatus & USBNC_LPM_CSR2_LPM_HST_STSRCVD_MASK) >> USBNC_LPM_CSR2_LPM_HST_STSRCVD_SHIFT)) /* STALL */ + { + ehciInstance->busSuspendStatus = kBus_EhciIdle; + /* call host callback function, function is initialized in USB_HostInit */ + (void)hostPointer->deviceCallback( + hostPointer->suspendedDevice, NULL, + kUSB_HostEventL1SleepNotSupport); /* call host callback function */ + } + else if (0x02U == ((portNcStatus & USBNC_LPM_CSR2_LPM_HST_STSRCVD_MASK) >> USBNC_LPM_CSR2_LPM_HST_STSRCVD_SHIFT)) /* NYET */ + { + ehciInstance->busSuspendStatus = kBus_EhciIdle; + /* call host callback function, function is initialized in USB_HostInit */ + (void)hostPointer->deviceCallback(hostPointer->suspendedDevice, NULL, + kUSB_HostEventL1SleepNYET); /* call host callback function */ + } + else if ((0x00U == ((portNcStatus & USBNC_LPM_CSR2_LPM_HST_STSRCVD_MASK) >> USBNC_LPM_CSR2_LPM_HST_STSRCVD_SHIFT)) || + (0x04U == ((portNcStatus & USBNC_LPM_CSR2_LPM_HST_STSRCVD_MASK) >> USBNC_LPM_CSR2_LPM_HST_STSRCVD_SHIFT)) || + (0x05U == ((portNcStatus & USBNC_LPM_CSR2_LPM_HST_STSRCVD_MASK) >> USBNC_LPM_CSR2_LPM_HST_STSRCVD_SHIFT))) /* Invalid, Timeout, Error */ + { + ehciInstance->busSuspendStatus = kBus_EhciIdle; + /* call host callback function, function is initialized in USB_HostInit */ + (void)hostPointer->deviceCallback(hostPointer->suspendedDevice, NULL, + kUSB_HostEventL1SleepError); /* call host callback function */ + } + else + { + ehciInstance->busSuspendStatus = kBus_EhciIdle; + } + } + else + { + /* no action */ + } + } + else + { + /* no action */ + } +} +#endif #endif usb_status_t USB_HostEhciCreate(uint8_t controllerId, @@ -4483,7 +4773,12 @@ usb_status_t USB_HostEhciCreate(uint8_t controllerId, #if (defined(USB_HOST_CONFIG_LOW_POWER_MODE) && (USB_HOST_CONFIG_LOW_POWER_MODE > 0U)) #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U)) - ehciInstance->registerPhyBase = (USBPHY_Type *)USB_EhciPhyGetBase(controllerId); +#if defined(FSL_FEATURE_USBHS_SUPPORT_EUSBn) + if (0U == (uint32_t)FSL_FEATURE_USBHS_SUPPORT_EUSBn(ehciInstance->ehciIpBase)) +#endif + { + ehciInstance->registerPhyBase = (USBPHY_Type *)USB_EhciPhyGetBase(controllerId); + } #endif #if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U)) ehciInstance->registerNcBase = (USBNC_Type *)USB_EhciNCGetBase(controllerId); @@ -4912,6 +5207,17 @@ usb_status_t USB_HostEhciWritePipe(usb_host_controller_handle controllerHandle, uint32_t speed = 0U; #endif +#if ((defined USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) + if (transfer->transferLength > 0) + { + DCACHE_CleanByRange((uint32_t)transfer->transferBuffer, transfer->transferLength); + } + if (ehciPipePointer->pipeCommon.pipeType == USB_ENDPOINT_CONTROL) + { + DCACHE_CleanByRange((uint32_t)&transfer->setupPacket->bmRequestType, sizeof(usb_setup_struct_t)); + } +#endif + switch (ehciPipePointer->pipeCommon.pipeType) { case USB_ENDPOINT_BULK: @@ -4964,8 +5270,14 @@ usb_status_t USB_HostEhciIoctl(usb_host_controller_handle controllerHandle, uint usb_host_cancel_param_t *param; usb_host_ehci_pipe_t *ehciPipePointer; volatile usb_host_ehci_qh_t *vltQhPointer; +#if ((defined(USB_HOST_CONFIG_LOW_POWER_MODE)) && (USB_HOST_CONFIG_LOW_POWER_MODE > 0U)) +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) + uint8_t *lpmParam; +#endif +#endif uint32_t deviceAddress = 0; usb_host_controller_control_t controlCode = (usb_host_controller_control_t)ioctlEvent; + if (controllerHandle == NULL) { return kStatus_USB_InvalidHandle; @@ -4978,6 +5290,16 @@ usb_status_t USB_HostEhciIoctl(usb_host_controller_handle controllerHandle, uint status = USB_HostEhciCancelPipe(ehciInstance, (usb_host_ehci_pipe_t *)param->pipeHandle, param->transfer); break; +#if ((defined(USB_HOST_CONFIG_LOW_POWER_MODE)) && (USB_HOST_CONFIG_LOW_POWER_MODE > 0U)) +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) + case kUSB_HostL1Config: + lpmParam = (uint8_t *)ioctlParam; + ehciInstance->hirdValue = (*lpmParam) & 0xFU; + ehciInstance->L1remoteWakeupEnable = (((*lpmParam) & 0x80U) >> 7); + break; +#endif +#endif + case kUSB_HostBusControl: /* bus control */ status = USB_HostEhciControlBus(ehciInstance, *((uint8_t *)ioctlParam)); break; @@ -5060,6 +5382,12 @@ void USB_HostEhciTaskFunction(void *hostHandle) { USB_HostEhciTimer1(ehciInstance); } +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) + if (0U != (bitSet & EHCI_TASK_EVENT_HOST_COMPLETED_LPM)) /* L1 completed */ + { + USB_HostEhciCompletedLPM(ehciInstance); + } +#endif #endif if ((ehciInstance->deviceAttached == (uint8_t)kEHCIDeviceAttached)) @@ -5137,6 +5465,12 @@ void USB_HostEhciIsrFunction(void *hostHandle) /* ehciInstance->ehciIpBase->PORTSC1 |= USBHS_PORTSC1_FPR_MASK; */ ehciInstance->busSuspendStatus = kBus_EhciStartResume; } +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) + else if ((kBus_EhciL1Sleeped == ehciInstance->busSuspendStatus)) + { + ehciInstance->busSuspendStatus = kBus_EhciL1StartResume; + } +#endif else { /*no action*/ @@ -5264,6 +5598,12 @@ void USB_HostEhciIsrFunction(void *hostHandle) { (void)OSA_EventSet(ehciInstance->taskEventHandle, EHCI_TASK_EVENT_TIMER1); } +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) + if (0U != (interruptStatus & USB_USBSTS_LPM_HST_COMPI_MASK)) /* host completed L1 LPM transaction interrupt */ + { + (void)OSA_EventSet(ehciInstance->taskEventHandle, EHCI_TASK_EVENT_HOST_COMPLETED_LPM); + } +#endif #endif interruptStatus = ehciInstance->ehciIpBase->USBSTS; diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ehci.h b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ehci.h index f45ca9eb7..d3e8aa682 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ehci.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ehci.h @@ -103,6 +103,11 @@ #define EHCI_TASK_EVENT_PORT_CHANGE (0x08U) #define EHCI_TASK_EVENT_TIMER0 (0x10U) #define EHCI_TASK_EVENT_TIMER1 (0x20U) +#if ((defined(USB_HOST_CONFIG_LOW_POWER_MODE)) && (USB_HOST_CONFIG_LOW_POWER_MODE > 0U)) +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) +#define EHCI_TASK_EVENT_HOST_COMPLETED_LPM (0x40U) +#endif +#endif #define USB_HostEhciLock() (void)OSA_MutexLock(ehciInstance->ehciMutex, USB_OSA_WAIT_TIMEOUT) #define USB_HostEhciUnlock() (void)OSA_MutexUnlock(ehciInstance->ehciMutex) @@ -160,6 +165,10 @@ typedef enum _bus_ehci_suspend_request_state kBus_EhciStartSuspend, kBus_EhciSuspended, kBus_EhciStartResume, + kBus_EhciL1StartSleep, + kBus_EhciL1Sleeped, + kBus_EhciL1StartResume, + kBus_EhciHsError, } bus_ehci_suspend_request_state_t; #endif @@ -324,6 +333,10 @@ typedef struct _usb_host_ehci_instance uint8_t ehciSitdNumber; /*!< Idle SITD number*/ uint8_t ehciQtdNumber; /*!< Idle QTD number*/ #if ((defined(USB_HOST_CONFIG_LOW_POWER_MODE)) && (USB_HOST_CONFIG_LOW_POWER_MODE > 0U)) +#if ((defined(USB_HOST_CONFIG_LPM_L1)) && (USB_HOST_CONFIG_LPM_L1 > 0U)) + uint8_t hirdValue; + uint8_t L1remoteWakeupEnable; +#endif bus_ehci_suspend_request_state_t busSuspendStatus; /*!< Bus Suspend Status*/ #endif } usb_host_ehci_instance_t; diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_hci.c b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_hci.c index ffce73cae..fe0947af1 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_hci.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_hci.c @@ -12,9 +12,6 @@ #include "usb_host_hci.h" #include "usb_host_devices.h" #include "fsl_device_registers.h" -#if ((defined USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) -#include "fsl_cache.h" -#endif /******************************************************************************* * Definitions @@ -25,12 +22,6 @@ #define FSL_COMPONENT_ID "middleware.usb.host_stack" #endif -#if defined __CORTEX_M && (__CORTEX_M == 7U) -#if (defined(USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE > 0U)) -#warning USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE is not supported. -#endif -#endif - /******************************************************************************* * Prototypes ******************************************************************************/ @@ -407,12 +398,6 @@ usb_status_t USB_HostSend(usb_host_handle hostHandle, usb_host_pipe_handle pipeH } #endif /* call controller write pipe interface */ -#if ((defined USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) - if (transfer->transferLength > 0) - { - DCACHE_CleanByRange((uint32_t)transfer->transferBuffer, transfer->transferLength); - } -#endif /* the callbackFn is initialized in USB_HostGetControllerInterface */ status = hostInstance->controllerTable->controllerWritePipe(hostInstance->controllerHandle, pipeHandle, transfer); @@ -456,13 +441,6 @@ usb_status_t USB_HostSendSetup(usb_host_handle hostHandle, } #endif /* call controller write pipe interface */ -#if ((defined USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) - DCACHE_CleanByRange((uint32_t)&transfer->setupPacket->bmRequestType, sizeof(usb_setup_struct_t)); - if (transfer->transferLength > 0) - { - DCACHE_CleanInvalidateByRange((uint32_t)transfer->transferBuffer, transfer->transferLength); - } -#endif /* the callbackFn is initialized in USB_HostGetControllerInterface */ status = hostInstance->controllerTable->controllerWritePipe(hostInstance->controllerHandle, pipeHandle, transfer); @@ -495,12 +473,6 @@ usb_status_t USB_HostRecv(usb_host_handle hostHandle, usb_host_pipe_handle pipeH } #endif -#if ((defined USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE) && (USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE)) - if (transfer->transferLength > 0) - { - DCACHE_CleanInvalidateByRange((uint32_t)transfer->transferBuffer, transfer->transferLength); - } -#endif /* the callbackFn is initialized in USB_HostGetControllerInterface */ status = hostInstance->controllerTable->controllerReadPipe(hostInstance->controllerHandle, pipeHandle, transfer); diff --git a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ip3516hs.c b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ip3516hs.c index 7f7d905ab..3775de4dd 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ip3516hs.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/host/usb_host_ip3516hs.c @@ -2931,7 +2931,7 @@ static usb_status_t USB_HostIp3516HsTokenDone(usb_host_ip3516hs_state_struct_t * { if (0U != trDone) { - if ((0U == (pipe->trList->transferLength % pipe->pipeCommon.maxPacketSize)) && + if ((0U == (pipe->trList->transferSofar % pipe->pipeCommon.maxPacketSize)) && (pipe->trList->transferSofar < pipe->trList->transferLength)) { (void)USB_HostIp3516HsWriteBulkPipe(usbHostState, pipe, pipe->trList); @@ -3016,7 +3016,6 @@ static usb_status_t USB_HostIp3516HsTokenDone(usb_host_ip3516hs_state_struct_t * case USB_ENDPOINT_ISOCHRONOUS: #if 1 indexLength.indexLength = trCurrent->union2.frame; - trCurrent->union2.frame = 0u; if ((0U != s_UsbHostIp3516HsPtd[usbHostState->controllerId] .iso[indexLength.state.tdIndex] .stateUnion.stateBitField.A) && @@ -3028,7 +3027,7 @@ static usb_status_t USB_HostIp3516HsTokenDone(usb_host_ip3516hs_state_struct_t * pipe = (usb_host_ip3516hs_pipe_struct_t *)temp; continue; } - + trCurrent->union2.frame = 0u; pipe->bufferIndex = indexLength.state.bufferIndex; pipe->bufferLength = indexLength.state.bufferLength; if (USB_IN == trCurrent->direction) @@ -4017,6 +4016,7 @@ void USB_HostIp3516HsIsrFunction(void *hostHandle) interruptStatus = usbHostState->usbRegBase->USBSTS; interruptStatus &= usbHostState->usbRegBase->USBINTR; + usbHostState->usbRegBase->USBSTS = interruptStatus; /* clear interrupt */ if (0U != (interruptStatus & USB_HOST_IP3516HS_USBSTS_ISO_IRQ_MASK)) /* Write back done head */ { @@ -4061,8 +4061,6 @@ void USB_HostIp3516HsIsrFunction(void *hostHandle) { (void)OSA_EventSet(usbHostState->ip3516HsEvent, USB_HOST_IP3516HS_EVENT_PORT_CHANGE); } - - usbHostState->usbRegBase->USBSTS = interruptStatus; /* clear interrupt */ } #endif diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/dcd_config/hsdcd/usb_hsdcd_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/dcd_config/hsdcd/usb_hsdcd_config.h new file mode 100644 index 000000000..6bd9e41fd --- /dev/null +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/dcd_config/hsdcd/usb_hsdcd_config.h @@ -0,0 +1,23 @@ +/* + * Copyright 2023 NXP + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _USB_DEVICE_HSDCD_CONFIG_H_ +#define _USB_DEVICE_HSDCD_CONFIG_H_ +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/*${macro:start}*/ +/* USB DCD config*/ + +/*! @brief The clock speed, Numerical Value of Clock Speed in Binary. */ +/*The valid clock range is from 1 to 1023 when clock unit is MHz and 4 to 1023 when clock unit is kHz.this value depend + * on board desgin, different board may has different value*/ +/* This template provides default value 0, please set appropriate vaule referring to the existed usb_device_hid_mouse demo in SDK */ +#define USB_HSDCD_CLOCK_SPEED (0U) + +/*${macro:end}*/ + +#endif /* _USB_DEVICE_HSDCD_CONFIG_H_ */ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/dcd_config/phydcd/usb_phydcd_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/dcd_config/phydcd/usb_phydcd_config.h new file mode 100644 index 000000000..b53a35816 --- /dev/null +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/dcd_config/phydcd/usb_phydcd_config.h @@ -0,0 +1,19 @@ +/* + * Copyright 2023 NXP + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _USB_DEVICE_PHYDCD_CONFIG_H_ +#define _USB_DEVICE_PHYDCD_CONFIG_H_ +/******************************************************************************* + * Definitions + ******************************************************************************/ + +/*${macro:start}*/ +/* USB DCD config*/ + +/*reserved for future use*/ + +/*${macro:end}*/ + +#endif /* _USB_DEVICE_PHYDCD_CONFIG_H_ */ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ehci/usb_device_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ehci/usb_device_config.h index 36a806646..1b7d5ac20 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ehci/usb_device_config.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ehci/usb_device_config.h @@ -175,6 +175,9 @@ /*! @brief Whether handle the USB bus error. */ #define USB_DEVICE_CONFIG_ERROR_HANDLING (0U) +/*! @brief Whether the SOF interrupt is enabled or not. */ +#define USB_DEVICE_CONFIG_SOF_NOTIFICATIONS (0U) + /* @} */ #endif /* _USB_DEVICE_CONFIG_H_ */ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ip3511fs/usb_device_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ip3511fs/usb_device_config.h index c20a395ea..28a11d119 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ip3511fs/usb_device_config.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ip3511fs/usb_device_config.h @@ -175,6 +175,9 @@ /*! @brief Whether handle the USB bus error. */ #define USB_DEVICE_CONFIG_ERROR_HANDLING (0U) +/*! @brief Whether the SOF interrupt is enabled or not. */ +#define USB_DEVICE_CONFIG_SOF_NOTIFICATIONS (0U) + /* @} */ #endif /* _USB_DEVICE_CONFIG_H_ */ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ip3511hs/usb_device_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ip3511hs/usb_device_config.h index 987e54e36..e50b40131 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ip3511hs/usb_device_config.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/ip3511hs/usb_device_config.h @@ -175,6 +175,9 @@ /*! @brief Whether handle the USB bus error. */ #define USB_DEVICE_CONFIG_ERROR_HANDLING (0U) +/*! @brief Whether the SOF interrupt is enabled or not. */ +#define USB_DEVICE_CONFIG_SOF_NOTIFICATIONS (0U) + /* @} */ #endif /* _USB_DEVICE_CONFIG_H_ */ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/khci/usb_device_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/khci/usb_device_config.h index f2d39ba42..80130e6b7 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/khci/usb_device_config.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/device_config/khci/usb_device_config.h @@ -185,6 +185,9 @@ /*! @brief Whether handle the USB bus error. */ #define USB_DEVICE_CONFIG_ERROR_HANDLING (0U) +/*! @brief Whether the SOF interrupt is enabled or not. */ +#define USB_DEVICE_CONFIG_SOF_NOTIFICATIONS (0U) + /* @} */ #endif /* _USB_DEVICE_CONFIG_H_ */ diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ehci/usb_host_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ehci/usb_host_config.h index 72a081510..97255ef36 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ehci/usb_host_config.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ehci/usb_host_config.h @@ -220,6 +220,13 @@ */ #define USB_HOST_CONFIG_CDC (1U) +/** + * @brief host CDC ECM class instance count, meantime it indicates CDC ECM class enable or disable. + * - if 0, host CDC ECM class driver is disable. + * - if greater than 0, host CDC ECM class driver is enable. + */ +#define USB_HOST_CONFIG_CDC_ECM (1U) + /*! * @brief host CDC RNDSI class instance count, meantime it indicates CDC rndis class enable or disable. * - if 0, host CDC class driver is disable. diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ip3516hs/usb_host_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ip3516hs/usb_host_config.h index 61ceaf67c..51292007d 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ip3516hs/usb_host_config.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ip3516hs/usb_host_config.h @@ -220,6 +220,13 @@ */ #define USB_HOST_CONFIG_CDC (1U) +/** + * @brief host CDC ECM class instance count, meantime it indicates CDC ECM class enable or disable. + * - if 0, host CDC ECM class driver is disable. + * - if greater than 0, host CDC ECM class driver is enable. + */ +#define USB_HOST_CONFIG_CDC_ECM (1U) + /*! * @brief host CDC RNDSI class instance count, meantime it indicates CDC rndis class enable or disable. * - if 0, host CDC class driver is disable. diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/khci/usb_host_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/khci/usb_host_config.h index 1f97fae95..58bdf0c20 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/khci/usb_host_config.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/khci/usb_host_config.h @@ -220,6 +220,13 @@ */ #define USB_HOST_CONFIG_CDC (1U) +/** + * @brief host CDC ECM class instance count, meantime it indicates CDC ECM class enable or disable. + * - if 0, host CDC ECM class driver is disable. + * - if greater than 0, host CDC ECM class driver is enable. + */ +#define USB_HOST_CONFIG_CDC_ECM (1U) + /*! * @brief host CDC RNDSI class instance count, meantime it indicates CDC rndis class enable or disable. * - if 0, host CDC class driver is disable. diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ohci/usb_host_config.h b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ohci/usb_host_config.h index 609e6d7e8..8f7064d0f 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ohci/usb_host_config.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/npw/host_config/ohci/usb_host_config.h @@ -220,6 +220,13 @@ */ #define USB_HOST_CONFIG_CDC (1U) +/** + * @brief host CDC ECM class instance count, meantime it indicates CDC ECM class enable or disable. + * - if 0, host CDC ECM class driver is disable. + * - if greater than 0, host CDC ECM class driver is enable. + */ +#define USB_HOST_CONFIG_CDC_ECM (1U) + /*! * @brief host CDC RNDSI class instance count, meantime it indicates CDC rndis class enable or disable. * - if 0, host CDC class driver is disable. diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_audio.h b/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_audio.h index e3eab8106..813f53542 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_audio.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_audio.h @@ -86,7 +86,7 @@ #define USB_AUDIO_FORMAT_TYPE_UNDEFINED (0x00U) #define USB_AUDIO_FORMAT_TYPE_I (0x01U) #define USB_AUDIO_FORMAT_TYPE_II (0x02U) -#define USB_AUDIO_FORMAT_TYPE_III (0x03U +#define USB_AUDIO_FORMAT_TYPE_III (0x03U) #if (USB_DEVICE_CONFIG_AUDIO_CLASS_2_0) #define USB_AUDIO_FORMAT_TYPE_IV (0x04U) #define USB_AUDIO_FORMAT_EXT_FORMAT_TYPE_I (0x81U) diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_class.c b/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_class.c index 0f0bae1a7..6f72c8a05 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_class.c +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_class.c @@ -352,9 +352,15 @@ usb_status_t USB_DeviceClassEvent(usb_device_handle handle, usb_device_class_eve * kStatus_USB_InvalidRequest. */ if (kStatus_USB_InvalidRequest == errorReturn) { + /* For composite device, it should return kStatus_USB_Success once a valid request has been handled + */ + if (kStatus_USB_Success == status) + { + return kStatus_USB_Success; + } return kStatus_USB_InvalidRequest; } - /* For composite device, it should return kStatus_USB_Success once a valid request has been handled */ + /* For composite device, save kStatus_USB_Success status once a valid request has been handled */ if (kStatus_USB_Success == errorReturn) { status = kStatus_USB_Success; diff --git a/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_msc.h b/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_msc.h index fd820dc32..31c52624c 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_msc.h +++ b/mcux/middleware/mcux-sdk-middleware-usb/output/source/device/class/usb_device_msc.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2015 - 2016, Freescale Semiconductor, Inc. - * Copyright 2016 - 2017£¬2019 NXP + * Copyright 2016 - 2023 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause diff --git a/mcux/middleware/mcux-sdk-middleware-usb/set.middleware.usb.yml b/mcux/middleware/mcux-sdk-middleware-usb/set.middleware.usb.yml index 16373c327..cc9c889d6 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/set.middleware.usb.yml +++ b/mcux/middleware/mcux-sdk-middleware-usb/set.middleware.usb.yml @@ -1,4 +1,78 @@ --- +middleware.usb.phydcd_config_header: + section-type: component + contents: + repo_base_path: middleware/usb + project_base_path: source + cc-include: + - repo_relative_path: output/npw/dcd_config/phydcd + project_relative_path: generated + target_file: + - usb_phydcd_config.h + package_relative_path: output/npw/dcd_config/phydcd + files: + - source: middleware/usb/output/npw/dcd_config/phydcd/usb_phydcd_config.h + project_relative_path: generated + repo_relative_path: output/npw/dcd_config/phydcd + package_relative_path: output/npw/dcd_config/phydcd + type: c_include + config: true + - source: middleware/usb/middleware_usb_phydcd_config_header.cmake + type: workspace + toolchains: armgcc + hidden: true + package_base_path: middleware/usb + belong_to: set.middleware.usb + section_info: + description: USB device phydcd config header + version: 2.8.4 + type: project_template + full_name: USB device phydcd config header + display_name: USB device phydcd config header + taxonomy: + csub: phydcd_config_header + cclass: USB + cgroup: USB DCD + vendor: NXP + meta-name: middleware.usb.phydcd_config_header + cmake_module_name: middleware_usb_phydcd_config_header +middleware.usb.hsdcd_config_header: + section-type: component + contents: + repo_base_path: middleware/usb + project_base_path: source + cc-include: + - repo_relative_path: output/npw/dcd_config/hsdcd + project_relative_path: generated + target_file: + - usb_hsdcd_config.h + package_relative_path: output/npw/dcd_config/hsdcd + files: + - source: middleware/usb/output/npw/dcd_config/hsdcd/usb_hsdcd_config.h + project_relative_path: generated + repo_relative_path: output/npw/dcd_config/hsdcd + package_relative_path: output/npw/dcd_config/hsdcd + type: c_include + config: true + - source: middleware/usb/middleware_usb_hsdcd_config_header.cmake + type: workspace + toolchains: armgcc + hidden: true + package_base_path: middleware/usb + belong_to: set.middleware.usb + section_info: + description: USB device hsdcd config header + version: 2.8.4 + type: project_template + full_name: USB device hsdcd config header + display_name: USB device hsdcd config header + taxonomy: + csub: hsdcd_config_header + cclass: USB + cgroup: USB DCD + vendor: NXP + meta-name: middleware.usb.hsdcd_config_header + cmake_module_name: middleware_usb_hsdcd_config_header set.middleware.usb: section-type: set belong_to: set.middleware.usb @@ -11,7 +85,7 @@ set.middleware.usb: section_info: fixed_id: nxp_usb type: middleware - version: 2.9.0 + version: 2.9.1 display_name: USB Host, Device, OTG Stack description: Host, Device, OTG set_location: @@ -54,6 +128,9 @@ set.middleware.usb: usb.host.stack: cclass: USB cgroup: USB Host + usb.dcd: + cclass: USB + cgroup: USB DCD scr.middleware.usb: belong_to: set.middleware.usb section-type: scr @@ -61,7 +138,7 @@ scr.middleware.usb: license: - license.bsd-3 Name: USB - Version: 2.9.0 + Version: 2.9.1 Format: source code Description: NXP USB stack. This is a version of the USB stack that has been integrated with the MCUXpresso SDK. @@ -162,7 +239,7 @@ middleware.usb.device.khci_config_header: belong_to: set.middleware.usb section_info: description: USB device khci config header - version: 2.9.0 + version: 2.9.1 type: project_template full_name: USB device khci config header display_name: USB device khci config header @@ -212,7 +289,7 @@ middleware.usb.device.ip3511fs_config_header: belong_to: set.middleware.usb section_info: description: USB device ip3511fs config header - version: 2.9.0 + version: 2.9.1 type: project_template full_name: USB device ip3511fs config header display_name: USB device ip3511fs config header @@ -251,10 +328,13 @@ middleware.usb.device.ip3511fs_config_header: - LPC5516 - LPC5526 - LPC5528 + - LPC5534 + - LPC5536 - LPC55S14 - LPC55S16 - LPC55S26 - LPC55S28 + - LPC55S36 - LPC55S66 - LPC55S69 meta-name: middleware.usb.device.ip3511fs_config_header @@ -285,7 +365,7 @@ middleware.usb.device.ip3511hs_config_header: belong_to: set.middleware.usb section_info: description: USB device ip3511hs config header - version: 2.9.0 + version: 2.9.1 type: project_template full_name: USB device ip3511hs config header display_name: USB device ip3511hs config header @@ -361,7 +441,7 @@ middleware.usb.device.ehci_config_header: belong_to: set.middleware.usb section_info: description: USB device ehci config header - version: 2.9.0 + version: 2.9.1 type: project_template full_name: USB device ehci config header display_name: USB device ehci config header @@ -382,6 +462,7 @@ middleware.usb.device.ehci_config_header: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -427,7 +508,7 @@ middleware.usb.common_header: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Common Header description: Middleware usb common_header @@ -472,7 +553,7 @@ middleware.usb.device.common_header: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device Common Header description: Middleware usb device common_header @@ -519,7 +600,7 @@ middleware.usb.device.ip3511fs: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device IP3511FS Controller Driver(FS) description: Middleware usb device ip3511fs @@ -559,10 +640,13 @@ middleware.usb.device.ip3511fs: - LPC5516 - LPC5526 - LPC5528 + - LPC5534 + - LPC5536 - LPC55S14 - LPC55S16 - LPC55S26 - LPC55S28 + - LPC55S36 - LPC55S66 - LPC55S69 - middleware.usb.device.ip3511fs_config_header @@ -599,7 +683,7 @@ middleware.usb.device.ip3511hs: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device IP3511HS Controller Driver(HS) description: Middleware usb device ip3511hs @@ -656,6 +740,11 @@ middleware.usb.device.ip3511hs: - device_id: - MCIMX7U3xxxxx - MCIMX7U5xxxxx + - MIMX8UD3xxx08 + - MIMX8UD5xxx08 + - MIMX8UD7xxx08 + - MIMX8US3xxx08 + - MIMX8US5xxx08 - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -669,6 +758,7 @@ middleware.usb.device.ip3511hs: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1165xxxxx - MIMXRT1166xxxxx - MIMXRT1171xxxxx @@ -695,6 +785,11 @@ middleware.usb.device.ip3511hs: device_id: - MCIMX7U3xxxxx - MCIMX7U5xxxxx + - MIMX8UD3xxx08 + - MIMX8UD5xxx08 + - MIMX8UD7xxx08 + - MIMX8US3xxx08 + - MIMX8US5xxx08 - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -708,6 +803,7 @@ middleware.usb.device.ip3511hs: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1165xxxxx - MIMXRT1166xxxxx - MIMXRT1171xxxxx @@ -767,7 +863,7 @@ middleware.usb.device.khci: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device KHCI Controller Driver(FS) description: Middleware usb device khci @@ -824,7 +920,7 @@ middleware.usb.device.ehci: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device EHCI Controller Driver(HS) description: Middleware usb device ehci @@ -846,6 +942,7 @@ middleware.usb.device.ehci: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -865,6 +962,11 @@ middleware.usb.device.ehci: - device_id: - MCIMX7U3xxxxx - MCIMX7U5xxxxx + - MIMX8UD3xxx08 + - MIMX8UD5xxx08 + - MIMX8UD7xxx08 + - MIMX8US3xxx08 + - MIMX8US5xxx08 - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -878,6 +980,7 @@ middleware.usb.device.ehci: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1165xxxxx - MIMXRT1166xxxxx - MIMXRT1171xxxxx @@ -904,6 +1007,11 @@ middleware.usb.device.ehci: device_id: - MCIMX7U3xxxxx - MCIMX7U5xxxxx + - MIMX8UD3xxx08 + - MIMX8UD5xxx08 + - MIMX8UD7xxx08 + - MIMX8US3xxx08 + - MIMX8US5xxx08 - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -917,6 +1025,7 @@ middleware.usb.device.ehci: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1165xxxxx - MIMXRT1166xxxxx - MIMXRT1171xxxxx @@ -968,7 +1077,7 @@ middleware.usb.phy: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB PHY description: Middleware usb phy @@ -983,6 +1092,11 @@ middleware.usb.phy: - device_id: - MCIMX7U3xxxxx - MCIMX7U5xxxxx + - MIMX8UD3xxx08 + - MIMX8UD5xxx08 + - MIMX8UD7xxx08 + - MIMX8US3xxx08 + - MIMX8US5xxx08 - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -996,6 +1110,7 @@ middleware.usb.phy: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1165xxxxx - MIMXRT1166xxxxx - MIMXRT1171xxxxx @@ -1025,8 +1140,6 @@ middleware.usb.phy: - device_id: - MIMXRT1165xxxxx - MIMXRT1166xxxxx - - MIMXRT1171xxxxx - - MIMXRT1172xxxxx - MIMXRT1173xxxxx - MIMXRT1175xxxxx - MIMXRT1176xxxxx @@ -1034,8 +1147,6 @@ middleware.usb.phy: device_id: - MIMXRT1165xxxxx - MIMXRT1166xxxxx - - MIMXRT1171xxxxx - - MIMXRT1172xxxxx - MIMXRT1173xxxxx - MIMXRT1175xxxxx - MIMXRT1176xxxxx @@ -1086,7 +1197,7 @@ middleware.usb.device.stack.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device Stack description: Middleware usb device stack external @@ -1132,7 +1243,7 @@ middleware.usb.device.audio.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device Audio description: Middleware usb device audio external @@ -1177,7 +1288,7 @@ middleware.usb.device.cdc.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device CDC description: Middleware usb device cdc external @@ -1222,7 +1333,7 @@ middleware.usb.device.cdc.rndis.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device CDC RNDIS description: Middleware usb device cdc rndis external @@ -1268,7 +1379,7 @@ middleware.usb.device.hid.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device HID description: Middleware usb device hid external @@ -1313,7 +1424,7 @@ middleware.usb.device.dfu.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device DFU description: Middleware usb device dfu external @@ -1368,7 +1479,7 @@ middleware.usb.device.msd.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device MSD description: Middleware usb device msd external @@ -1413,7 +1524,7 @@ middleware.usb.device.phdc.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device PHDC description: Middleware usb device phdc external @@ -1458,7 +1569,7 @@ middleware.usb.device.video.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device Video description: Middleware usb device video external @@ -1503,7 +1614,7 @@ middleware.usb.device.ccid.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device CCID description: Middleware usb device ccid external @@ -1548,7 +1659,7 @@ middleware.usb.device.printer.external: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device Printer description: Middleware usb device printer external @@ -1563,6 +1674,128 @@ middleware.usb.device.printer.external: - middleware.usb.device.stack.external meta-name: middleware.usb.device.printer.external cmake_module_name: middleware_usb_device_printer_external +middleware.usb.phydcd: + section-type: component + contents: + repo_base_path: middleware/usb + project_base_path: usb + cc-include: + - repo_relative_path: dcd + project_relative_path: dcd + package_relative_path: dcd + files: + - source: middleware/usb/dcd/usb_phydcd.c + project_relative_path: dcd + repo_relative_path: dcd + package_relative_path: dcd + type: src + - source: middleware/usb/dcd/usb_phydcd.h + project_relative_path: dcd + repo_relative_path: dcd + package_relative_path: dcd + type: c_include + - source: middleware/usb/dcd/usb_charger_detect.h + project_relative_path: dcd + repo_relative_path: dcd + package_relative_path: dcd + type: c_include + - source: middleware/usb/middleware_usb_phydcd.cmake + type: workspace + toolchains: armgcc + hidden: true + package_base_path: middleware/usb + section_info: + version: 2.8.4 + type: middleware + full_name: USB PHYDCD + description: Middleware usb PHYDCD (Select manually if needed) + taxonomy: + csub: phydcd_driver + cclass: USB + cgroup: USB DCD + display_name: USB PHYDCD + vendor: NXP + belong_to: set.middleware.usb + dependency: + allOf: + - middleware.usb.phydcd_config_header + - device_id: + - MIMXRT1011xxxxx + - MIMXRT1015xxxxx + - MIMXRT1021xxxxx + - MIMXRT1024xxxxx + - MIMXRT1041xxxxB + - MIMXRT1042xxxxB + - MIMXRT1051xxxxB + - MIMXRT1052xxxxB + - MIMXRT1061xxxxA + - MIMXRT1061xxxxB + - MIMXRT1062xxxxA + - MIMXRT1062xxxxB + - MIMXRT1064xxxxA + - MIMXRT1064xxxxB + meta-name: middleware.usb.phydcd + cmake_module_name: middleware_usb_phydcd +middleware.usb.hsdcd: + section-type: component + contents: + repo_base_path: middleware/usb + project_base_path: usb + cc-include: + - repo_relative_path: dcd + project_relative_path: dcd + package_relative_path: dcd + files: + - source: middleware/usb/dcd/usb_hsdcd.c + project_relative_path: dcd + repo_relative_path: dcd + package_relative_path: dcd + type: src + - source: middleware/usb/dcd/usb_hsdcd.h + project_relative_path: dcd + repo_relative_path: dcd + package_relative_path: dcd + type: c_include + - source: middleware/usb/dcd/usb_charger_detect.h + project_relative_path: dcd + repo_relative_path: dcd + package_relative_path: dcd + type: c_include + - source: middleware/usb/middleware_usb_hsdcd.cmake + type: workspace + toolchains: armgcc + hidden: true + package_base_path: middleware/usb + section_info: + version: 2.8.4 + type: middleware + full_name: USB HSDCD + description: Middleware usb HSDCD (Select manually if needed) + taxonomy: + csub: hsdcd_driver + cclass: USB + cgroup: USB DCD + display_name: USB HSDCD + vendor: NXP + belong_to: set.middleware.usb + dependency: + allOf: + - middleware.usb.hsdcd_config_header + - device_id: + - MIMXRT1165xxxxx + - MIMXRT1166xxxxx + - MIMXRT1171xxxxx + - MIMXRT1172xxxxx + - MIMXRT1173xxxxx + - MIMXRT1175xxxxx + - MIMXRT1176xxxxx + - MIMXRT533S + - MIMXRT555S + - MIMXRT595S + - MIMXRT633S + - MIMXRT685S + meta-name: middleware.usb.hsdcd + cmake_module_name: middleware_usb_hsdcd middleware.usb.device.controller.driver: section-type: component contents: @@ -1605,7 +1838,7 @@ middleware.usb.device.controller.driver: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Device Common Controller description: Middleware usb device controller driver @@ -1656,7 +1889,7 @@ middleware.usb.host.khci: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host KHCI Controller Driver(FS) description: Middleware usb host khci @@ -1710,7 +1943,7 @@ middleware.usb.host.ohci: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host OHCI Controller Driver(FS) description: Middleware usb host ohci @@ -1749,10 +1982,13 @@ middleware.usb.host.ohci: - LPC5516 - LPC5526 - LPC5528 + - LPC5534 + - LPC5536 - LPC55S14 - LPC55S16 - LPC55S26 - LPC55S28 + - LPC55S36 - LPC55S66 - LPC55S69 - middleware.usb.host.ohci_config_header @@ -1789,7 +2025,7 @@ middleware.usb.host.ip3516hs: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host IP3516HS Controller Driver(HS) description: Middleware usb host ip3516hs @@ -1846,6 +2082,11 @@ middleware.usb.host.ip3516hs: - device_id: - MCIMX7U3xxxxx - MCIMX7U5xxxxx + - MIMX8UD3xxx08 + - MIMX8UD5xxx08 + - MIMX8UD7xxx08 + - MIMX8US3xxx08 + - MIMX8US5xxx08 - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -1859,6 +2100,7 @@ middleware.usb.host.ip3516hs: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1165xxxxx - MIMXRT1166xxxxx - MIMXRT1171xxxxx @@ -1885,6 +2127,11 @@ middleware.usb.host.ip3516hs: device_id: - MCIMX7U3xxxxx - MCIMX7U5xxxxx + - MIMX8UD3xxx08 + - MIMX8UD5xxx08 + - MIMX8UD7xxx08 + - MIMX8US3xxx08 + - MIMX8US5xxx08 - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -1898,6 +2145,7 @@ middleware.usb.host.ip3516hs: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1165xxxxx - MIMXRT1166xxxxx - MIMXRT1171xxxxx @@ -1952,7 +2200,7 @@ middleware.usb.host.ehci: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host EHCI Controller Driver(HS) description: Middleware usb host ehci @@ -1974,6 +2222,7 @@ middleware.usb.host.ehci: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -1993,6 +2242,11 @@ middleware.usb.host.ehci: - device_id: - MCIMX7U3xxxxx - MCIMX7U5xxxxx + - MIMX8UD3xxx08 + - MIMX8UD5xxx08 + - MIMX8UD7xxx08 + - MIMX8US3xxx08 + - MIMX8US5xxx08 - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -2006,6 +2260,7 @@ middleware.usb.host.ehci: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1165xxxxx - MIMXRT1166xxxxx - MIMXRT1171xxxxx @@ -2032,6 +2287,11 @@ middleware.usb.host.ehci: device_id: - MCIMX7U3xxxxx - MCIMX7U5xxxxx + - MIMX8UD3xxx08 + - MIMX8UD5xxx08 + - MIMX8UD7xxx08 + - MIMX8US3xxx08 + - MIMX8US5xxx08 - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -2045,6 +2305,7 @@ middleware.usb.host.ehci: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1165xxxxx - MIMXRT1166xxxxx - MIMXRT1171xxxxx @@ -2096,7 +2357,7 @@ middleware.usb.host.audio: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host Audio description: Middleware usb host audio @@ -2138,7 +2399,7 @@ middleware.usb.host.cdc: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host CDC description: Middleware usb host cdc @@ -2180,7 +2441,7 @@ middleware.usb.host.cdc_rndis: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host CDC RNDIS description: Middleware usb host cdc_rndis @@ -2223,7 +2484,7 @@ middleware.usb.host.hid: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host HID description: Middleware usb host hid @@ -2270,7 +2531,7 @@ middleware.usb.host.msd: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host MSD description: Middleware usb host msd @@ -2312,7 +2573,7 @@ middleware.usb.host.video: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host Video description: Middleware usb host video @@ -2354,7 +2615,7 @@ middleware.usb.host.phdc: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host PHDC description: Middleware usb host phdc @@ -2396,7 +2657,7 @@ middleware.usb.host.printer: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host Printer description: Middleware usb host printer @@ -2447,7 +2708,7 @@ middleware.usb.host.common_header: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host Common Header description: Middleware usb host common_header @@ -2489,7 +2750,7 @@ middleware.usb.host.khci_config_header: belong_to: set.middleware.usb section_info: description: USB host khci config header - version: 2.9.0 + version: 2.9.1 type: project_template full_name: USB host khci config header display_name: USB host khci config header @@ -2536,7 +2797,7 @@ middleware.usb.host.ohci_config_header: belong_to: set.middleware.usb section_info: description: USB host ohci config header - version: 2.9.0 + version: 2.9.1 type: project_template full_name: USB host ohci config header display_name: USB host ohci config header @@ -2574,10 +2835,13 @@ middleware.usb.host.ohci_config_header: - LPC5516 - LPC5526 - LPC5528 + - LPC5534 + - LPC5536 - LPC55S14 - LPC55S16 - LPC55S26 - LPC55S28 + - LPC55S36 - LPC55S66 - LPC55S69 meta-name: middleware.usb.host.ohci_config_header @@ -2608,7 +2872,7 @@ middleware.usb.host.ip3516hs_config_header: belong_to: set.middleware.usb section_info: description: USB host ip3516hs config header - version: 2.9.0 + version: 2.9.1 type: project_template full_name: USB host ip3516hs config header display_name: USB host ip3516hs config header @@ -2684,7 +2948,7 @@ middleware.usb.host.ehci_config_header: belong_to: set.middleware.usb section_info: description: USB host ehci config header - version: 2.9.0 + version: 2.9.1 type: project_template full_name: USB host ehci config header display_name: USB host ehci config header @@ -2705,6 +2969,7 @@ middleware.usb.host.ehci_config_header: - MIMXRT1062xxxxA - MIMXRT1062xxxxB - MIMXRT1064xxxxA + - MIMXRT1064xxxxB - MIMXRT1011xxxxx - MIMXRT1015xxxxx - MIMXRT1021xxxxx @@ -2796,7 +3061,7 @@ middleware.usb.host.stack: package_base_path: middleware/usb belong_to: set.middleware.usb section_info: - version: 2.9.0 + version: 2.9.1 type: middleware full_name: USB Host Stack description: Middleware usb host stack diff --git a/mcux/middleware/mcux-sdk-middleware-usb/set_middleware_usb.cmake b/mcux/middleware/mcux-sdk-middleware-usb/set_middleware_usb.cmake index 266117d26..3701f45ac 100644 --- a/mcux/middleware/mcux-sdk-middleware-usb/set_middleware_usb.cmake +++ b/mcux/middleware/mcux-sdk-middleware-usb/set_middleware_usb.cmake @@ -1,12 +1,34 @@ include_guard(GLOBAL) +if (CONFIG_USE_middleware_usb_phydcd_config_header) +# Add set(CONFIG_USE_middleware_usb_phydcd_config_header true) in config.cmake to use this component + +message("middleware_usb_phydcd_config_header component is included from ${CMAKE_CURRENT_LIST_FILE}.") + +add_config_file(${CMAKE_CURRENT_LIST_DIR}/./output/npw/dcd_config/phydcd/usb_phydcd_config.h ${CMAKE_CURRENT_LIST_DIR}/./output/npw/dcd_config/phydcd middleware_usb_phydcd_config_header) + + +endif() + + +if (CONFIG_USE_middleware_usb_hsdcd_config_header) +# Add set(CONFIG_USE_middleware_usb_hsdcd_config_header true) in config.cmake to use this component + +message("middleware_usb_hsdcd_config_header component is included from ${CMAKE_CURRENT_LIST_FILE}.") + +add_config_file(${CMAKE_CURRENT_LIST_DIR}/./output/npw/dcd_config/hsdcd/usb_hsdcd_config.h ${CMAKE_CURRENT_LIST_DIR}/./output/npw/dcd_config/hsdcd middleware_usb_hsdcd_config_header) + + +endif() + + if (CONFIG_USE_middleware_usb_device_khci_config_header) # Add set(CONFIG_USE_middleware_usb_device_khci_config_header true) in config.cmake to use this component message("middleware_usb_device_khci_config_header component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL K32L2B11xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2B21xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2B31xxxxA OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx10 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN256xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12 OR CONFIG_DEVICE_ID STREQUAL K32L2A31xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2A41xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L3A60xxx)) +if((CONFIG_DEVICE_ID STREQUAL K32L2B11xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2B21xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2B31xxxxA OR CONFIG_DEVICE_ID STREQUAL MCXC143 OR CONFIG_DEVICE_ID STREQUAL MCXC144 OR CONFIG_DEVICE_ID STREQUAL MCXC243 OR CONFIG_DEVICE_ID STREQUAL MCXC244 OR CONFIG_DEVICE_ID STREQUAL MCXC443 OR CONFIG_DEVICE_ID STREQUAL MCXC444 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx10 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN256xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12 OR CONFIG_DEVICE_ID STREQUAL MCXC141 OR CONFIG_DEVICE_ID STREQUAL MCXC142 OR CONFIG_DEVICE_ID STREQUAL MCXC242 OR CONFIG_DEVICE_ID STREQUAL K32L2A31xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2A41xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L3A60xxx OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MCXA142 OR CONFIG_DEVICE_ID STREQUAL MCXA143 OR CONFIG_DEVICE_ID STREQUAL MCXA144 OR CONFIG_DEVICE_ID STREQUAL MCXA145 OR CONFIG_DEVICE_ID STREQUAL MCXA146 OR CONFIG_DEVICE_ID STREQUAL MCXA152 OR CONFIG_DEVICE_ID STREQUAL MCXA153 OR CONFIG_DEVICE_ID STREQUAL MCXA154 OR CONFIG_DEVICE_ID STREQUAL MCXA155 OR CONFIG_DEVICE_ID STREQUAL MCXA156)) add_config_file(${CMAKE_CURRENT_LIST_DIR}/./output/npw/device_config/khci/usb_device_config.h ${CMAKE_CURRENT_LIST_DIR}/./output/npw/device_config/khci middleware_usb_device_khci_config_header) @@ -24,7 +46,7 @@ if (CONFIG_USE_middleware_usb_device_ip3511fs_config_header) message("middleware_usb_device_ip3511fs_config_header component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL LPC51U68 OR CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5512 OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) +if((CONFIG_DEVICE_ID STREQUAL LPC51U68 OR CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5512 OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC5534 OR CONFIG_DEVICE_ID STREQUAL LPC5536 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S36 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) add_config_file(${CMAKE_CURRENT_LIST_DIR}/./output/npw/device_config/ip3511fs/usb_device_config.h ${CMAKE_CURRENT_LIST_DIR}/./output/npw/device_config/ip3511fs middleware_usb_device_ip3511fs_config_header) @@ -60,7 +82,7 @@ if (CONFIG_USE_middleware_usb_device_ehci_config_header) message("middleware_usb_device_ehci_config_header component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx)) +if((CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL RW610 OR CONFIG_DEVICE_ID STREQUAL RW612 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1181xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1182xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08)) add_config_file(${CMAKE_CURRENT_LIST_DIR}/./output/npw/device_config/ehci/usb_device_config.h ${CMAKE_CURRENT_LIST_DIR}/./output/npw/device_config/ehci middleware_usb_device_ehci_config_header) @@ -118,7 +140,7 @@ if (CONFIG_USE_middleware_usb_device_ip3511fs) message("middleware_usb_device_ip3511fs component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL LPC51U68 OR CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5512 OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69) AND CONFIG_USE_middleware_usb_device_ip3511fs_config_header AND CONFIG_USE_middleware_usb_device_common_header) +if((CONFIG_DEVICE_ID STREQUAL LPC51U68 OR CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5512 OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC5534 OR CONFIG_DEVICE_ID STREQUAL LPC5536 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S36 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69) AND CONFIG_USE_middleware_usb_device_ip3511fs_config_header AND CONFIG_USE_middleware_usb_device_common_header) target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/./device/usb_device_lpcip3511.c @@ -143,7 +165,7 @@ if (CONFIG_USE_middleware_usb_device_ip3511hs) message("middleware_usb_device_ip3511hs component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69 OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S) AND CONFIG_USE_middleware_usb_device_ip3511hs_config_header AND CONFIG_USE_middleware_usb_device_common_header AND ((CONFIG_USE_middleware_usb_phy AND (CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) OR (NOT (CONFIG_NOT STREQUAL MCIMX7U3xxxxx OR CONFIG_NOT STREQUAL MCIMX7U5xxxxx OR CONFIG_NOT STREQUAL MIMXRT1011xxxxx OR CONFIG_NOT STREQUAL MIMXRT1015xxxxx OR CONFIG_NOT STREQUAL MIMXRT1021xxxxx OR CONFIG_NOT STREQUAL MIMXRT1024xxxxx OR CONFIG_NOT STREQUAL MIMXRT1041xxxxB OR CONFIG_NOT STREQUAL MIMXRT1042xxxxB OR CONFIG_NOT STREQUAL MIMXRT1051xxxxB OR CONFIG_NOT STREQUAL MIMXRT1052xxxxB OR CONFIG_NOT STREQUAL MIMXRT1061xxxxA OR CONFIG_NOT STREQUAL MIMXRT1061xxxxB OR CONFIG_NOT STREQUAL MIMXRT1062xxxxA OR CONFIG_NOT STREQUAL MIMXRT1062xxxxB OR CONFIG_NOT STREQUAL MIMXRT1064xxxxA OR CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1171xxxxx OR CONFIG_NOT STREQUAL MIMXRT1172xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx OR CONFIG_NOT STREQUAL MIMXRT533S OR CONFIG_NOT STREQUAL MIMXRT555S OR CONFIG_NOT STREQUAL MIMXRT595S OR CONFIG_NOT STREQUAL MIMXRT633S OR CONFIG_NOT STREQUAL MIMXRT685S OR CONFIG_NOT STREQUAL LPC5514 OR CONFIG_NOT STREQUAL LPC5516 OR CONFIG_NOT STREQUAL LPC5526 OR CONFIG_NOT STREQUAL LPC5528 OR CONFIG_NOT STREQUAL LPC55S14 OR CONFIG_NOT STREQUAL LPC55S16 OR CONFIG_NOT STREQUAL LPC55S26 OR CONFIG_NOT STREQUAL LPC55S28 OR CONFIG_NOT STREQUAL LPC55S66 OR CONFIG_NOT STREQUAL LPC55S69)))) +if((CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69 OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S) AND CONFIG_USE_middleware_usb_device_ip3511hs_config_header AND CONFIG_USE_middleware_usb_device_common_header AND ((CONFIG_USE_middleware_usb_phy AND (CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) OR (NOT (CONFIG_NOT STREQUAL MCIMX7U3xxxxx OR CONFIG_NOT STREQUAL MCIMX7U5xxxxx OR CONFIG_NOT STREQUAL MCXN235 OR CONFIG_NOT STREQUAL MCXN236 OR CONFIG_NOT STREQUAL MCXN546 OR CONFIG_NOT STREQUAL MCXN547 OR CONFIG_NOT STREQUAL MCXN946 OR CONFIG_NOT STREQUAL MCXN947 OR CONFIG_NOT STREQUAL MIMX8UD3xxx08 OR CONFIG_NOT STREQUAL MIMX8UD5xxx08 OR CONFIG_NOT STREQUAL MIMX8UD7xxx08 OR CONFIG_NOT STREQUAL MIMX8US3xxx08 OR CONFIG_NOT STREQUAL MIMX8US5xxx08 OR CONFIG_NOT STREQUAL MIMXRT1011xxxxx OR CONFIG_NOT STREQUAL MIMXRT1015xxxxx OR CONFIG_NOT STREQUAL MIMXRT1021xxxxx OR CONFIG_NOT STREQUAL MIMXRT1024xxxxx OR CONFIG_NOT STREQUAL MIMXRT1041xxxxB OR CONFIG_NOT STREQUAL MIMXRT1042xxxxB OR CONFIG_NOT STREQUAL MIMXRT1051xxxxB OR CONFIG_NOT STREQUAL MIMXRT1052xxxxB OR CONFIG_NOT STREQUAL MIMXRT1061xxxxA OR CONFIG_NOT STREQUAL MIMXRT1061xxxxB OR CONFIG_NOT STREQUAL MIMXRT1062xxxxA OR CONFIG_NOT STREQUAL MIMXRT1062xxxxB OR CONFIG_NOT STREQUAL MIMXRT1064xxxxA OR CONFIG_NOT STREQUAL MIMXRT1064xxxxB OR CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1171xxxxx OR CONFIG_NOT STREQUAL MIMXRT1172xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx OR CONFIG_NOT STREQUAL MIMXRT1187xxxxx OR CONFIG_NOT STREQUAL MIMXRT1189xxxxx OR CONFIG_NOT STREQUAL MIMXRT533S OR CONFIG_NOT STREQUAL MIMXRT555S OR CONFIG_NOT STREQUAL MIMXRT595S OR CONFIG_NOT STREQUAL MIMXRT633S OR CONFIG_NOT STREQUAL MIMXRT685S OR CONFIG_NOT STREQUAL LPC5514 OR CONFIG_NOT STREQUAL LPC5516 OR CONFIG_NOT STREQUAL LPC5526 OR CONFIG_NOT STREQUAL LPC5528 OR CONFIG_NOT STREQUAL LPC55S14 OR CONFIG_NOT STREQUAL LPC55S16 OR CONFIG_NOT STREQUAL LPC55S26 OR CONFIG_NOT STREQUAL LPC55S28 OR CONFIG_NOT STREQUAL LPC55S66 OR CONFIG_NOT STREQUAL LPC55S69)))) target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/./device/usb_device_lpcip3511.c @@ -168,7 +190,7 @@ if (CONFIG_USE_middleware_usb_device_khci) message("middleware_usb_device_khci component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL K32L2B11xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2B21xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2B31xxxxA OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx10 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN256xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12 OR CONFIG_DEVICE_ID STREQUAL K32L2A31xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2A41xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L3A60xxx) AND CONFIG_USE_middleware_usb_device_khci_config_header AND CONFIG_USE_middleware_usb_device_common_header) +if((CONFIG_DEVICE_ID STREQUAL K32L2B11xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2B21xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2B31xxxxA OR CONFIG_DEVICE_ID STREQUAL MCXC143 OR CONFIG_DEVICE_ID STREQUAL MCXC144 OR CONFIG_DEVICE_ID STREQUAL MCXC243 OR CONFIG_DEVICE_ID STREQUAL MCXC244 OR CONFIG_DEVICE_ID STREQUAL MCXC443 OR CONFIG_DEVICE_ID STREQUAL MCXC444 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx10 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN256xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12 OR CONFIG_DEVICE_ID STREQUAL MCXC141 OR CONFIG_DEVICE_ID STREQUAL MCXC142 OR CONFIG_DEVICE_ID STREQUAL MCXC242 OR CONFIG_DEVICE_ID STREQUAL K32L2A31xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2A41xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L3A60xxx OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MCXA142 OR CONFIG_DEVICE_ID STREQUAL MCXA143 OR CONFIG_DEVICE_ID STREQUAL MCXA144 OR CONFIG_DEVICE_ID STREQUAL MCXA145 OR CONFIG_DEVICE_ID STREQUAL MCXA146 OR CONFIG_DEVICE_ID STREQUAL MCXA152 OR CONFIG_DEVICE_ID STREQUAL MCXA153 OR CONFIG_DEVICE_ID STREQUAL MCXA154 OR CONFIG_DEVICE_ID STREQUAL MCXA155 OR CONFIG_DEVICE_ID STREQUAL MCXA156) AND CONFIG_USE_middleware_usb_device_khci_config_header AND CONFIG_USE_middleware_usb_device_common_header) target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/./device/usb_device_khci.c @@ -193,7 +215,7 @@ if (CONFIG_USE_middleware_usb_device_ehci) message("middleware_usb_device_ehci component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx) AND CONFIG_USE_middleware_usb_device_ehci_config_header AND CONFIG_USE_middleware_usb_device_common_header AND ((CONFIG_USE_middleware_usb_phy AND (CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) OR (NOT (CONFIG_NOT STREQUAL MCIMX7U3xxxxx OR CONFIG_NOT STREQUAL MCIMX7U5xxxxx OR CONFIG_NOT STREQUAL MIMXRT1011xxxxx OR CONFIG_NOT STREQUAL MIMXRT1015xxxxx OR CONFIG_NOT STREQUAL MIMXRT1021xxxxx OR CONFIG_NOT STREQUAL MIMXRT1024xxxxx OR CONFIG_NOT STREQUAL MIMXRT1041xxxxB OR CONFIG_NOT STREQUAL MIMXRT1042xxxxB OR CONFIG_NOT STREQUAL MIMXRT1051xxxxB OR CONFIG_NOT STREQUAL MIMXRT1052xxxxB OR CONFIG_NOT STREQUAL MIMXRT1061xxxxA OR CONFIG_NOT STREQUAL MIMXRT1061xxxxB OR CONFIG_NOT STREQUAL MIMXRT1062xxxxA OR CONFIG_NOT STREQUAL MIMXRT1062xxxxB OR CONFIG_NOT STREQUAL MIMXRT1064xxxxA OR CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1171xxxxx OR CONFIG_NOT STREQUAL MIMXRT1172xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx OR CONFIG_NOT STREQUAL MIMXRT533S OR CONFIG_NOT STREQUAL MIMXRT555S OR CONFIG_NOT STREQUAL MIMXRT595S OR CONFIG_NOT STREQUAL MIMXRT633S OR CONFIG_NOT STREQUAL MIMXRT685S OR CONFIG_NOT STREQUAL LPC5514 OR CONFIG_NOT STREQUAL LPC5516 OR CONFIG_NOT STREQUAL LPC5526 OR CONFIG_NOT STREQUAL LPC5528 OR CONFIG_NOT STREQUAL LPC55S14 OR CONFIG_NOT STREQUAL LPC55S16 OR CONFIG_NOT STREQUAL LPC55S26 OR CONFIG_NOT STREQUAL LPC55S28 OR CONFIG_NOT STREQUAL LPC55S66 OR CONFIG_NOT STREQUAL LPC55S69)))) +if(((CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL RW610 OR CONFIG_DEVICE_ID STREQUAL RW612 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1181xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1182xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08) AND CONFIG_USE_middleware_usb_device_ehci_config_header AND CONFIG_USE_middleware_usb_device_common_header AND ((CONFIG_USE_middleware_usb_phy AND (CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) OR (NOT (CONFIG_NOT STREQUAL MCIMX7U3xxxxx OR CONFIG_NOT STREQUAL MCIMX7U5xxxxx OR CONFIG_NOT STREQUAL MCXN235 OR CONFIG_NOT STREQUAL MCXN236 OR CONFIG_NOT STREQUAL MCXN546 OR CONFIG_NOT STREQUAL MCXN547 OR CONFIG_NOT STREQUAL MCXN946 OR CONFIG_NOT STREQUAL MCXN947 OR CONFIG_NOT STREQUAL MIMX8UD3xxx08 OR CONFIG_NOT STREQUAL MIMX8UD5xxx08 OR CONFIG_NOT STREQUAL MIMX8UD7xxx08 OR CONFIG_NOT STREQUAL MIMX8US3xxx08 OR CONFIG_NOT STREQUAL MIMX8US5xxx08 OR CONFIG_NOT STREQUAL MIMXRT1011xxxxx OR CONFIG_NOT STREQUAL MIMXRT1015xxxxx OR CONFIG_NOT STREQUAL MIMXRT1021xxxxx OR CONFIG_NOT STREQUAL MIMXRT1024xxxxx OR CONFIG_NOT STREQUAL MIMXRT1041xxxxB OR CONFIG_NOT STREQUAL MIMXRT1042xxxxB OR CONFIG_NOT STREQUAL MIMXRT1051xxxxB OR CONFIG_NOT STREQUAL MIMXRT1052xxxxB OR CONFIG_NOT STREQUAL MIMXRT1061xxxxA OR CONFIG_NOT STREQUAL MIMXRT1061xxxxB OR CONFIG_NOT STREQUAL MIMXRT1062xxxxA OR CONFIG_NOT STREQUAL MIMXRT1062xxxxB OR CONFIG_NOT STREQUAL MIMXRT1064xxxxA OR CONFIG_NOT STREQUAL MIMXRT1064xxxxB OR CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1171xxxxx OR CONFIG_NOT STREQUAL MIMXRT1172xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx OR CONFIG_NOT STREQUAL MIMXRT1187xxxxx OR CONFIG_NOT STREQUAL MIMXRT1189xxxxx OR CONFIG_NOT STREQUAL MIMXRT533S OR CONFIG_NOT STREQUAL MIMXRT555S OR CONFIG_NOT STREQUAL MIMXRT595S OR CONFIG_NOT STREQUAL MIMXRT633S OR CONFIG_NOT STREQUAL MIMXRT685S OR CONFIG_NOT STREQUAL LPC5514 OR CONFIG_NOT STREQUAL LPC5516 OR CONFIG_NOT STREQUAL LPC5526 OR CONFIG_NOT STREQUAL LPC5528 OR CONFIG_NOT STREQUAL LPC55S14 OR CONFIG_NOT STREQUAL LPC55S16 OR CONFIG_NOT STREQUAL LPC55S26 OR CONFIG_NOT STREQUAL LPC55S28 OR CONFIG_NOT STREQUAL LPC55S66 OR CONFIG_NOT STREQUAL LPC55S69))) AND (NOT (CONFIG_NOT STREQUAL RW612 OR CONFIG_NOT STREQUAL RW610))) OR ((CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL RW610 OR CONFIG_DEVICE_ID STREQUAL RW612 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1181xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1182xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08) AND CONFIG_USE_middleware_usb_device_ehci_config_header AND CONFIG_USE_middleware_usb_device_common_header AND CONFIG_USE_driver_memory AND (CONFIG_DEVICE_ID STREQUAL RW612 OR CONFIG_DEVICE_ID STREQUAL RW610))) target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/./device/usb_device_ehci.c @@ -218,7 +240,7 @@ if (CONFIG_USE_middleware_usb_phy) message("middleware_usb_phy component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69) AND CONFIG_USE_middleware_usb_common_header AND ((CONFIG_USE_driver_memory AND (CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx)) OR (NOT (CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1171xxxxx OR CONFIG_NOT STREQUAL MIMXRT1172xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx)))) +if((CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69) AND CONFIG_USE_middleware_usb_common_header AND ((CONFIG_USE_driver_memory AND (CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx)) OR (NOT (CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx OR CONFIG_NOT STREQUAL MIMXRT1187xxxxx OR CONFIG_NOT STREQUAL MIMXRT1189xxxxx)))) target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/./phy/usb_phy.c @@ -504,6 +526,54 @@ endif() endif() +if (CONFIG_USE_middleware_usb_phydcd) +# Add set(CONFIG_USE_middleware_usb_phydcd true) in config.cmake to use this component + +message("middleware_usb_phydcd component is included from ${CMAKE_CURRENT_LIST_FILE}.") + +if(CONFIG_USE_middleware_usb_phydcd_config_header AND (CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB)) + +target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/./dcd/usb_phydcd.c +) + +target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/./dcd +) + +else() + +message(SEND_ERROR "middleware_usb_phydcd dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") + +endif() + +endif() + + +if (CONFIG_USE_middleware_usb_hsdcd) +# Add set(CONFIG_USE_middleware_usb_hsdcd true) in config.cmake to use this component + +message("middleware_usb_hsdcd component is included from ${CMAKE_CURRENT_LIST_FILE}.") + +if(CONFIG_USE_middleware_usb_hsdcd_config_header AND (CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S)) + +target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/./dcd/usb_hsdcd.c +) + +target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/./dcd +) + +else() + +message(SEND_ERROR "middleware_usb_hsdcd dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") + +endif() + +endif() + + if (CONFIG_USE_middleware_usb_device_controller_driver) # Add set(CONFIG_USE_middleware_usb_device_controller_driver true) in config.cmake to use this component @@ -533,7 +603,7 @@ if (CONFIG_USE_middleware_usb_host_khci) message("middleware_usb_host_khci component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL K32L2A31xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2A41xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L3A60xxx OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx10 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN256xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_middleware_usb_host_khci_config_header AND CONFIG_USE_middleware_usb_host_common_header) +if((CONFIG_DEVICE_ID STREQUAL K32L2A31xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2A41xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L3A60xxx OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx10 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN256xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12) AND CONFIG_USE_middleware_usb_host_khci_config_header AND CONFIG_USE_middleware_usb_host_common_header) target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/./host/usb_host_khci.c @@ -558,7 +628,7 @@ if (CONFIG_USE_middleware_usb_host_ohci) message("middleware_usb_host_ohci component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5512 OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69) AND CONFIG_USE_middleware_usb_host_ohci_config_header AND CONFIG_USE_middleware_usb_host_common_header) +if((CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5512 OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC5534 OR CONFIG_DEVICE_ID STREQUAL LPC5536 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S36 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69) AND CONFIG_USE_middleware_usb_host_ohci_config_header AND CONFIG_USE_middleware_usb_host_common_header) target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/./host/usb_host_ohci.c @@ -583,7 +653,7 @@ if (CONFIG_USE_middleware_usb_host_ip3516hs) message("middleware_usb_host_ip3516hs component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69 OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S) AND CONFIG_USE_middleware_usb_host_ip3516hs_config_header AND CONFIG_USE_middleware_usb_host_common_header AND ((CONFIG_USE_middleware_usb_phy AND (CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) OR (NOT (CONFIG_NOT STREQUAL MCIMX7U3xxxxx OR CONFIG_NOT STREQUAL MCIMX7U5xxxxx OR CONFIG_NOT STREQUAL MIMXRT1011xxxxx OR CONFIG_NOT STREQUAL MIMXRT1015xxxxx OR CONFIG_NOT STREQUAL MIMXRT1021xxxxx OR CONFIG_NOT STREQUAL MIMXRT1024xxxxx OR CONFIG_NOT STREQUAL MIMXRT1041xxxxB OR CONFIG_NOT STREQUAL MIMXRT1042xxxxB OR CONFIG_NOT STREQUAL MIMXRT1051xxxxB OR CONFIG_NOT STREQUAL MIMXRT1052xxxxB OR CONFIG_NOT STREQUAL MIMXRT1061xxxxA OR CONFIG_NOT STREQUAL MIMXRT1061xxxxB OR CONFIG_NOT STREQUAL MIMXRT1062xxxxA OR CONFIG_NOT STREQUAL MIMXRT1062xxxxB OR CONFIG_NOT STREQUAL MIMXRT1064xxxxA OR CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1171xxxxx OR CONFIG_NOT STREQUAL MIMXRT1172xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx OR CONFIG_NOT STREQUAL MIMXRT533S OR CONFIG_NOT STREQUAL MIMXRT555S OR CONFIG_NOT STREQUAL MIMXRT595S OR CONFIG_NOT STREQUAL MIMXRT633S OR CONFIG_NOT STREQUAL MIMXRT685S OR CONFIG_NOT STREQUAL LPC5514 OR CONFIG_NOT STREQUAL LPC5516 OR CONFIG_NOT STREQUAL LPC5526 OR CONFIG_NOT STREQUAL LPC5528 OR CONFIG_NOT STREQUAL LPC55S14 OR CONFIG_NOT STREQUAL LPC55S16 OR CONFIG_NOT STREQUAL LPC55S26 OR CONFIG_NOT STREQUAL LPC55S28 OR CONFIG_NOT STREQUAL LPC55S66 OR CONFIG_NOT STREQUAL LPC55S69)))) +if((CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69 OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S) AND CONFIG_USE_middleware_usb_host_ip3516hs_config_header AND CONFIG_USE_middleware_usb_host_common_header AND ((CONFIG_USE_middleware_usb_phy AND (CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) OR (NOT (CONFIG_NOT STREQUAL MCIMX7U3xxxxx OR CONFIG_NOT STREQUAL MCIMX7U5xxxxx OR CONFIG_NOT STREQUAL MCXN235 OR CONFIG_NOT STREQUAL MCXN236 OR CONFIG_NOT STREQUAL MCXN546 OR CONFIG_NOT STREQUAL MCXN547 OR CONFIG_NOT STREQUAL MCXN946 OR CONFIG_NOT STREQUAL MCXN947 OR CONFIG_NOT STREQUAL MIMX8UD3xxx08 OR CONFIG_NOT STREQUAL MIMX8UD5xxx08 OR CONFIG_NOT STREQUAL MIMX8UD7xxx08 OR CONFIG_NOT STREQUAL MIMX8US3xxx08 OR CONFIG_NOT STREQUAL MIMX8US5xxx08 OR CONFIG_NOT STREQUAL MIMXRT1011xxxxx OR CONFIG_NOT STREQUAL MIMXRT1015xxxxx OR CONFIG_NOT STREQUAL MIMXRT1021xxxxx OR CONFIG_NOT STREQUAL MIMXRT1024xxxxx OR CONFIG_NOT STREQUAL MIMXRT1041xxxxB OR CONFIG_NOT STREQUAL MIMXRT1042xxxxB OR CONFIG_NOT STREQUAL MIMXRT1051xxxxB OR CONFIG_NOT STREQUAL MIMXRT1052xxxxB OR CONFIG_NOT STREQUAL MIMXRT1061xxxxA OR CONFIG_NOT STREQUAL MIMXRT1061xxxxB OR CONFIG_NOT STREQUAL MIMXRT1062xxxxA OR CONFIG_NOT STREQUAL MIMXRT1062xxxxB OR CONFIG_NOT STREQUAL MIMXRT1064xxxxA OR CONFIG_NOT STREQUAL MIMXRT1064xxxxB OR CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1171xxxxx OR CONFIG_NOT STREQUAL MIMXRT1172xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx OR CONFIG_NOT STREQUAL MIMXRT1187xxxxx OR CONFIG_NOT STREQUAL MIMXRT1189xxxxx OR CONFIG_NOT STREQUAL MIMXRT533S OR CONFIG_NOT STREQUAL MIMXRT555S OR CONFIG_NOT STREQUAL MIMXRT595S OR CONFIG_NOT STREQUAL MIMXRT633S OR CONFIG_NOT STREQUAL MIMXRT685S OR CONFIG_NOT STREQUAL LPC5514 OR CONFIG_NOT STREQUAL LPC5516 OR CONFIG_NOT STREQUAL LPC5526 OR CONFIG_NOT STREQUAL LPC5528 OR CONFIG_NOT STREQUAL LPC55S14 OR CONFIG_NOT STREQUAL LPC55S16 OR CONFIG_NOT STREQUAL LPC55S26 OR CONFIG_NOT STREQUAL LPC55S28 OR CONFIG_NOT STREQUAL LPC55S66 OR CONFIG_NOT STREQUAL LPC55S69)))) target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/./host/usb_host_ip3516hs.c @@ -608,7 +678,7 @@ if (CONFIG_USE_middleware_usb_host_ehci) message("middleware_usb_host_ehci component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx) AND CONFIG_USE_middleware_usb_host_ehci_config_header AND CONFIG_USE_middleware_usb_host_common_header AND ((CONFIG_USE_middleware_usb_phy AND (CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) OR (NOT (CONFIG_NOT STREQUAL MCIMX7U3xxxxx OR CONFIG_NOT STREQUAL MCIMX7U5xxxxx OR CONFIG_NOT STREQUAL MIMXRT1011xxxxx OR CONFIG_NOT STREQUAL MIMXRT1015xxxxx OR CONFIG_NOT STREQUAL MIMXRT1021xxxxx OR CONFIG_NOT STREQUAL MIMXRT1024xxxxx OR CONFIG_NOT STREQUAL MIMXRT1041xxxxB OR CONFIG_NOT STREQUAL MIMXRT1042xxxxB OR CONFIG_NOT STREQUAL MIMXRT1051xxxxB OR CONFIG_NOT STREQUAL MIMXRT1052xxxxB OR CONFIG_NOT STREQUAL MIMXRT1061xxxxA OR CONFIG_NOT STREQUAL MIMXRT1061xxxxB OR CONFIG_NOT STREQUAL MIMXRT1062xxxxA OR CONFIG_NOT STREQUAL MIMXRT1062xxxxB OR CONFIG_NOT STREQUAL MIMXRT1064xxxxA OR CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1171xxxxx OR CONFIG_NOT STREQUAL MIMXRT1172xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx OR CONFIG_NOT STREQUAL MIMXRT533S OR CONFIG_NOT STREQUAL MIMXRT555S OR CONFIG_NOT STREQUAL MIMXRT595S OR CONFIG_NOT STREQUAL MIMXRT633S OR CONFIG_NOT STREQUAL MIMXRT685S OR CONFIG_NOT STREQUAL LPC5514 OR CONFIG_NOT STREQUAL LPC5516 OR CONFIG_NOT STREQUAL LPC5526 OR CONFIG_NOT STREQUAL LPC5528 OR CONFIG_NOT STREQUAL LPC55S14 OR CONFIG_NOT STREQUAL LPC55S16 OR CONFIG_NOT STREQUAL LPC55S26 OR CONFIG_NOT STREQUAL LPC55S28 OR CONFIG_NOT STREQUAL LPC55S66 OR CONFIG_NOT STREQUAL LPC55S69)))) +if(((CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL RW610 OR CONFIG_DEVICE_ID STREQUAL RW612 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1181xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1182xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08) AND CONFIG_USE_middleware_usb_host_ehci_config_header AND CONFIG_USE_middleware_usb_host_common_header AND ((CONFIG_USE_middleware_usb_phy AND (CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT533S OR CONFIG_DEVICE_ID STREQUAL MIMXRT555S OR CONFIG_DEVICE_ID STREQUAL MIMXRT595S OR CONFIG_DEVICE_ID STREQUAL MIMXRT633S OR CONFIG_DEVICE_ID STREQUAL MIMXRT685S OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) OR (NOT (CONFIG_NOT STREQUAL MCIMX7U3xxxxx OR CONFIG_NOT STREQUAL MCIMX7U5xxxxx OR CONFIG_NOT STREQUAL MCXN235 OR CONFIG_NOT STREQUAL MCXN236 OR CONFIG_NOT STREQUAL MCXN546 OR CONFIG_NOT STREQUAL MCXN547 OR CONFIG_NOT STREQUAL MCXN946 OR CONFIG_NOT STREQUAL MCXN947 OR CONFIG_NOT STREQUAL MIMX8UD3xxx08 OR CONFIG_NOT STREQUAL MIMX8UD5xxx08 OR CONFIG_NOT STREQUAL MIMX8UD7xxx08 OR CONFIG_NOT STREQUAL MIMX8US3xxx08 OR CONFIG_NOT STREQUAL MIMX8US5xxx08 OR CONFIG_NOT STREQUAL MIMXRT1011xxxxx OR CONFIG_NOT STREQUAL MIMXRT1015xxxxx OR CONFIG_NOT STREQUAL MIMXRT1021xxxxx OR CONFIG_NOT STREQUAL MIMXRT1024xxxxx OR CONFIG_NOT STREQUAL MIMXRT1041xxxxB OR CONFIG_NOT STREQUAL MIMXRT1042xxxxB OR CONFIG_NOT STREQUAL MIMXRT1051xxxxB OR CONFIG_NOT STREQUAL MIMXRT1052xxxxB OR CONFIG_NOT STREQUAL MIMXRT1061xxxxA OR CONFIG_NOT STREQUAL MIMXRT1061xxxxB OR CONFIG_NOT STREQUAL MIMXRT1062xxxxA OR CONFIG_NOT STREQUAL MIMXRT1062xxxxB OR CONFIG_NOT STREQUAL MIMXRT1064xxxxA OR CONFIG_NOT STREQUAL MIMXRT1064xxxxB OR CONFIG_NOT STREQUAL MIMXRT1165xxxxx OR CONFIG_NOT STREQUAL MIMXRT1166xxxxx OR CONFIG_NOT STREQUAL MIMXRT1171xxxxx OR CONFIG_NOT STREQUAL MIMXRT1172xxxxx OR CONFIG_NOT STREQUAL MIMXRT1173xxxxx OR CONFIG_NOT STREQUAL MIMXRT1175xxxxx OR CONFIG_NOT STREQUAL MIMXRT1176xxxxx OR CONFIG_NOT STREQUAL MIMXRT1187xxxxx OR CONFIG_NOT STREQUAL MIMXRT1189xxxxx OR CONFIG_NOT STREQUAL MIMXRT533S OR CONFIG_NOT STREQUAL MIMXRT555S OR CONFIG_NOT STREQUAL MIMXRT595S OR CONFIG_NOT STREQUAL MIMXRT633S OR CONFIG_NOT STREQUAL MIMXRT685S OR CONFIG_NOT STREQUAL LPC5514 OR CONFIG_NOT STREQUAL LPC5516 OR CONFIG_NOT STREQUAL LPC5526 OR CONFIG_NOT STREQUAL LPC5528 OR CONFIG_NOT STREQUAL LPC55S14 OR CONFIG_NOT STREQUAL LPC55S16 OR CONFIG_NOT STREQUAL LPC55S26 OR CONFIG_NOT STREQUAL LPC55S28 OR CONFIG_NOT STREQUAL LPC55S66 OR CONFIG_NOT STREQUAL LPC55S69))) AND (NOT (CONFIG_NOT STREQUAL RW612 OR CONFIG_NOT STREQUAL RW610))) OR ((CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL RW610 OR CONFIG_DEVICE_ID STREQUAL RW612 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1181xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1182xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08) AND CONFIG_USE_middleware_usb_host_ehci_config_header AND CONFIG_USE_middleware_usb_host_common_header AND CONFIG_USE_driver_memory AND (CONFIG_DEVICE_ID STREQUAL RW612 OR CONFIG_DEVICE_ID STREQUAL RW610))) target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/./host/usb_host_ehci.c @@ -676,6 +746,30 @@ endif() endif() +if (CONFIG_USE_middleware_usb_host_cdc_ecm) +# Add set(CONFIG_USE_middleware_usb_host_cdc_ecm true) in config.cmake to use this component + +message("middleware_usb_host_cdc_ecm component is included from ${CMAKE_CURRENT_LIST_FILE}.") + +if(CONFIG_USE_middleware_usb_host_stack AND CONFIG_USE_middleware_usb_host_cdc) + +target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/./host/class/usb_host_cdc_ecm.c +) + +target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/./host/class +) + +else() + +message(SEND_ERROR "middleware_usb_host_cdc_ecm dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") + +endif() + +endif() + + if (CONFIG_USE_middleware_usb_host_cdc_rndis) # Add set(CONFIG_USE_middleware_usb_host_cdc_rndis true) in config.cmake to use this component @@ -846,7 +940,7 @@ if (CONFIG_USE_middleware_usb_host_khci_config_header) message("middleware_usb_host_khci_config_header component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL K32L2A31xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2A41xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L3A60xxx OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx10 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN256xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12)) +if((CONFIG_DEVICE_ID STREQUAL K32L2A31xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L2A41xxxxA OR CONFIG_DEVICE_ID STREQUAL K32L3A60xxx OR CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx10 OR CONFIG_DEVICE_ID STREQUAL MK22FN128xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN256xxx12 OR CONFIG_DEVICE_ID STREQUAL MK22FN512xxx12)) add_config_file(${CMAKE_CURRENT_LIST_DIR}/./output/npw/host_config/khci/usb_host_config.h ${CMAKE_CURRENT_LIST_DIR}/./output/npw/host_config/khci middleware_usb_host_khci_config_header) @@ -864,7 +958,7 @@ if (CONFIG_USE_middleware_usb_host_ohci_config_header) message("middleware_usb_host_ohci_config_header component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5512 OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) +if((CONFIG_DEVICE_ID STREQUAL LPC54005 OR CONFIG_DEVICE_ID STREQUAL LPC54016 OR CONFIG_DEVICE_ID STREQUAL LPC54018 OR CONFIG_DEVICE_ID STREQUAL LPC54018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54018J4M OR CONFIG_DEVICE_ID STREQUAL LPC54605J512 OR CONFIG_DEVICE_ID STREQUAL LPC54605J256 OR CONFIG_DEVICE_ID STREQUAL LPC54606J512 OR CONFIG_DEVICE_ID STREQUAL LPC54606J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J256 OR CONFIG_DEVICE_ID STREQUAL LPC54607J512 OR CONFIG_DEVICE_ID STREQUAL LPC54608J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J512 OR CONFIG_DEVICE_ID STREQUAL LPC54616J256 OR CONFIG_DEVICE_ID STREQUAL LPC54618J512 OR CONFIG_DEVICE_ID STREQUAL LPC54628J512 OR CONFIG_DEVICE_ID STREQUAL LPC54S005 OR CONFIG_DEVICE_ID STREQUAL LPC54S016 OR CONFIG_DEVICE_ID STREQUAL LPC54S018 OR CONFIG_DEVICE_ID STREQUAL LPC54S018J2M OR CONFIG_DEVICE_ID STREQUAL LPC54S018J4M OR CONFIG_DEVICE_ID STREQUAL LPC5512 OR CONFIG_DEVICE_ID STREQUAL LPC5514 OR CONFIG_DEVICE_ID STREQUAL LPC5516 OR CONFIG_DEVICE_ID STREQUAL LPC5526 OR CONFIG_DEVICE_ID STREQUAL LPC5528 OR CONFIG_DEVICE_ID STREQUAL LPC5534 OR CONFIG_DEVICE_ID STREQUAL LPC5536 OR CONFIG_DEVICE_ID STREQUAL LPC55S14 OR CONFIG_DEVICE_ID STREQUAL LPC55S16 OR CONFIG_DEVICE_ID STREQUAL LPC55S26 OR CONFIG_DEVICE_ID STREQUAL LPC55S28 OR CONFIG_DEVICE_ID STREQUAL LPC55S36 OR CONFIG_DEVICE_ID STREQUAL LPC55S66 OR CONFIG_DEVICE_ID STREQUAL LPC55S69)) add_config_file(${CMAKE_CURRENT_LIST_DIR}/./output/npw/host_config/ohci/usb_host_config.h ${CMAKE_CURRENT_LIST_DIR}/./output/npw/host_config/ohci middleware_usb_host_ohci_config_header) @@ -900,7 +994,7 @@ if (CONFIG_USE_middleware_usb_host_ehci_config_header) message("middleware_usb_host_ehci_config_header component is included from ${CMAKE_CURRENT_LIST_FILE}.") -if((CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx)) +if((CONFIG_DEVICE_ID STREQUAL MCXN546 OR CONFIG_DEVICE_ID STREQUAL MCXN547 OR CONFIG_DEVICE_ID STREQUAL MCXN946 OR CONFIG_DEVICE_ID STREQUAL MCXN947 OR CONFIG_DEVICE_ID STREQUAL MCXN235 OR CONFIG_DEVICE_ID STREQUAL MCXN236 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1041xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1042xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1051xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1052xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1061xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1062xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxA OR CONFIG_DEVICE_ID STREQUAL MIMXRT1064xxxxB OR CONFIG_DEVICE_ID STREQUAL MIMXRT1011xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1015xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1021xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1024xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1165xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1166xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1171xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1172xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1173xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1175xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx OR CONFIG_DEVICE_ID STREQUAL RW610 OR CONFIG_DEVICE_ID STREQUAL RW612 OR CONFIG_DEVICE_ID STREQUAL MIMXRT1181xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1182xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1187xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMXRT1189xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U3xxxxx OR CONFIG_DEVICE_ID STREQUAL MCIMX7U5xxxxx OR CONFIG_DEVICE_ID STREQUAL MIMX8UD3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD5xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8UD7xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US3xxx08 OR CONFIG_DEVICE_ID STREQUAL MIMX8US5xxx08)) add_config_file(${CMAKE_CURRENT_LIST_DIR}/./output/npw/host_config/ehci/usb_host_config.h ${CMAKE_CURRENT_LIST_DIR}/./output/npw/host_config/ehci middleware_usb_host_ehci_config_header)