Re: [PATCH] usb: typec: tipd: cd321x: replay the plug on resume
From: Janne Grunau
Date: Tue Nov 17 2026 - 07:47:24 EST
On Tue, Nov 17, 2026 at 01:17:13PM +0100, Jacob Procee wrote:
> On Tue, 17 Nov 2026 13:03:03 +0100
> Sven Peter <sven@xxxxxxxxxx> wrote:
>
> > I suspect we're just missing the proper suspend/resume work in the PHY
> > itself to put it into a low power state. Or maybe we need to keep an
> > additional power domain enabled so that the PHY doesn't lose all state
> > and keeps working in a lower power mode.
>
> Agreed, please drop this (and v2).
>
> That second option is what happens with wakeup enabled: the dwc3 node
> and the ATC PHY share the atc*_usb pmgr domain, and it's only switched
> off in s2idle because xhci and the root hubs default to power/wakeup =
> disabled. With wakeup enabled on xhci-hcd.*.auto and usb* (Asahi 7.3.3,
> j314s), the domain stays on and a device left plugged in stays
> connected through s2idle without re-enumerating (no "xHC error in
> resume ... Reinit"). Asahi's pmgr marks these domains
> GENPD_FLAG_ACTIVE_WAKEUP; mainline's doesn't yet.
yes, the downstream tree has commit to set GENPD_FLAG_ACTIVE_WAKEUP for
all power-domains which are active at probe (boot) time.
> Wake from a USB keyboard still doesn't work: nothing calls
> enable_irq_wake() for the dwc3/xhci IRQ, and irq-apple-aic has neither
> irq_set_wake nor IRQCHIP_SKIP_SET_WAKE.
The interrupt controller (AIC) doesn't have functionality to configure
IRQs as wake up source so it should set IRQCHIP_SKIP_SET_WAKE. Does wake
from USB keyboard work with that changed?
You might also need to add "wakeup-source" to the dwc3 nodes.
Janne