Re: [PATCH 0/1] usb: dwc3: qcom: Keep wakeup option default off

From: Thinh Nguyen

Date: Wed Nov 11 2026 - 20:17:29 EST


Hi,

On Tue, Nov 10, 2026, Peter Chen wrote:
> Current policy
> --------------
> When the controller node has the "wakeup-source" property, dwc3-qcom
> calls device_init_wakeup(dev, true). USB is then a system wakeup
> source by default. Users who do NOT want the system woken up by USB
> have to disable it:
>
> echo disabled > /sys/devices/.../<dwc3 device>/power/wakeup
>
> Proposed policy
> ---------------
> "wakeup-source" only describes that the controller is capable of
> waking up the system (see
> Documentation/devicetree/bindings/power/wakeup-source.txt), so with
> this patch the driver only marks the device as wakeup capable, and
> power/wakeup starts out "disabled". Users who NEED USB as a wakeup
> source have to enable it:
>
> echo enabled > /sys/devices/.../<dwc3 device>/power/wakeup

That won't work in host mode. dwc->sys_wakeup is read only once in
dwc3_core_probe(), so enabling wakeup later from sysfs won't reach the
xhci-plat device, and xhci_suspend() clears the port wake bits. Moving
the wakeup setup before dwc3_core_probe() won't work either, since
wakeup is off at that point. The setting needs to be passed to xhci at
suspend time (perhaps in dwc3_pm_prepare()?).

>
> The motivation is:
>
> - Users do not expect USB activity (connect/disconnect or USB line status
> changes) to wake up the system unless they asked for it.
>
> - Power consumption. With wakeup enabled, host mode system suspend
> keeps PHYs powered (dwc3_core_exit() is skipped) and necessary logic
> for detecting wakeup must be on, so that the wakeup interrupts can
> fire. Today this extra power is spent by default, even on systems
> where USB is never used as a wakeup source and the controller could
> be fully powered off during suspend.

Sounds good, but there are some concerns.

>
> Comparison
> ----------
> Current (default on) Proposed (default off)
> -------------------- ----------------------
> Initial power/wakeup enabled disabled
> User action write "disabled" if USB write "enabled" if USB
> wakeup is NOT wanted wakeup IS wanted
> Unexpected wakeups possible (connect, none unless the user
> disconnect, noise) opted in
> Suspend power higher, even if USB lower, USB fully powered
> wakeup is never used off
> Attached devices on stay suspended, resume reset-resumed or
> resume quickly re-enumerated
>
> Possible regression
> -------------------

This rings my alarm bells for me any time we mention a user behavior
change or possible regression. Perhaps you can add this to the commit
message.

> This is a user-visible change for existing platforms. Many Qualcomm
> arm64 DTs set "wakeup-source" on the USB controller. With this patch:
>
> - USB wakeup stops working until userspace (or a udev rule) writes
> "enabled" to the controller's power/wakeup.
>
> - In host mode, because device_may_wakeup() is now false by default,

This will be the default in host mode for every qcom platform with
"wakeup-source". Which platforms have you tested?

> system suspend takes the full power down path in
> dwc3_suspend_common() (dwc3_core_exit()). Platforms where this
> power down path has not been tested may fail to resume.
>

BR,
Thinh