Skip to content

drivers: usb: enable wake-up and link status change events#455

Open
MaheshAvula-Alifsemi wants to merge 1 commit intoalifsemi:mainfrom
MaheshAvula-Alifsemi:usb_device_suspend_wakeup
Open

drivers: usb: enable wake-up and link status change events#455
MaheshAvula-Alifsemi wants to merge 1 commit intoalifsemi:mainfrom
MaheshAvula-Alifsemi:usb_device_suspend_wakeup

Conversation

@MaheshAvula-Alifsemi
Copy link
Copy Markdown
Contributor

Enable wakeup (WKUPEVTEN) and link status change (ULSTCNGEN) device events.
Add suspend callback on L2 link state and wakeup callback on resume.
Implement udc_dwc3_host_wakeup() to request recovery link state and poll for ON state transition.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enable DWC3 device events for wakeup and link-state changes, and add callbacks to propagate suspend/resume behavior up to the UDC layer.

Changes:

  • Enable WKUPEVTEN and ULSTCNGEN in DEVTEN and dispatch new wakeup/suspend callbacks.
  • Implement host-initiated remote wakeup by requesting Recovery and polling for U0/On.
  • Make SETUP handling message-queue safe by copying setup bytes into the message.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
drivers/usb/udc/udc_dwc3.h Adds wakeup/suspend callback hooks to the driver interface.
drivers/usb/udc/udc_dwc3.c Enables/disables new events, adds suspend/resume callbacks, implements host wakeup, and queues SETUP bytes.
drivers/usb/common/usb_dwc3_hw.h Adds wake/power-opt/link-state related bitfields/macros used by the driver updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Enable wakeup (WKUPEVTEN) and link status change (ULSTCNGEN)
device events.
Add suspend callback on L2 link state and wakeup callback on
resume.
Implement udc_dwc3_host_wakeup() to request recovery link state
and poll for ON state transition.

Signed-off-by: Mahesh Avula <mahesh.avula@alifsemi.com>
@MaheshAvula-Alifsemi MaheshAvula-Alifsemi force-pushed the usb_device_suspend_wakeup branch from cec3073 to 75a11bc Compare April 1, 2026 12:09
MaheshAvula-Alifsemi added a commit to MaheshAvula-Alifsemi/zephyr_alif that referenced this pull request Apr 2, 2026
Added PM(Power Management) support in usb driver.
This PR is depends on alifsemi#455

Signed-off-by: Mahesh Avula <mahesh.avula@alifsemi.com>
MaheshAvula-Alifsemi added a commit to MaheshAvula-Alifsemi/zephyr_alif that referenced this pull request Apr 7, 2026
Added PM(Power Management) support in usb driver.
This PR is depends on alifsemi#455

Signed-off-by: Mahesh Avula <mahesh.avula@alifsemi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants