Re: [PATCH v4 2/2] usb: dwc3: Add Google Tensor SoC DWC3 glue driver

Thinh Nguyen
2025-10-23T22:43:50Z

On Fri, Oct 17, 2025, Roy Luo wrote:
> Add support for the DWC3 USB controller found on Google Tensor G5.
> The controller features dual-role functionality and hibernation.
>
> The primary focus is implementing hibernation support in host mode,
> enabling the controller to enter a low-power state (D3). This is
> particularly relevant during system power state transition and
> runtime power management for power efficiency.
> Highlights:
> - Align suspend callback with dwc3_suspend_common() for deciding
> between a full teardown and hibernation in host mode.
> - Integration with `psw` (power switchable) and `top` power domains,
> managing their states and device links to support hibernation.
> - A notifier callback dwc3_google_usb_psw_pd_notifier() for
> `psw` power domain events to manage controller state
> transitions to/from D3.
> - Coordination of the `non_sticky` reset during power state
> transitions, asserting it on D3 entry and deasserting on D0 entry
> in hibernation scenario.
> - Handling of high-speed and super-speed PME interrupts
> that are generated by remote wakeup during hibernation.
>
> Co-developed-by: Joy Chakraborty <joychakr@google.com>
> Signed-off-by: Joy Chakraborty <joychakr@google.com>
> Co-developed-by: Naveen Kumar <mnkumar@google.com>
> Signed-off-by: Naveen Kumar <mnkumar@google.com>
> Signed-off-by: Roy Luo <royluo@google.com>
> ---
> drivers/usb/dwc3/Kconfig | 10 +
> drivers/usb/dwc3/Makefile | 1 +
> drivers/usb/dwc3/dwc3-google.c | 608 +++++++++++++++++++++++++++++++++
> 3 files changed, 619 insertions(+)
> create mode 100644 drivers/usb/dwc3/dwc3-google.c
>

Sorry, I've been tied up with some internal projects and haven't
reviewed this in detail yet. I think this change deserve more time and
attention, and thus the delay.

One of the things that stood out is that you're assuming the host
suspend is always hibernation. While it's true that xhci suspend would
go through the xhci hibernation flow, however, that needs to communicate
to the glue driver here. For example, if the xhci driver is not bound,
and the device goes into suspend, we may go through this hibernation
flow when we should not. But maybe that's already handle? I need to
check.

In any case, there are multiple players (xhci, xhci-plat, dwc3, glue)
here, and I need more time to review. Appologies if this will take
longer than usual.

Thanks,
Thinh