From: Roy Luo <royluo@google.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Peter Griffin" <peter.griffin@linaro.org>,
"André Draszik" <andre.draszik@linaro.org>,
"Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Joy Chakraborty" <joychakr@google.com>,
"Naveen Kumar" <mnkumar@google.com>,
"Badhri Jagan Sridharan" <badhri@google.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] usb: dwc3: Add Google Tensor SoC DWC3 glue driver
Date: Fri, 24 Oct 2025 17:25:03 -0700 [thread overview]
Message-ID: <CA+zupgx9QjT2faWeGtAy_oZffYfEXupPG-GDU9aLisrMGNohdA@mail.gmail.com> (raw)
In-Reply-To: <20251023224302.vdiryshblnkbtsfd@synopsys.com>
On Thu, Oct 23, 2025 at 3:43 PM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
>
> 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.
>
No worry, thanks for paying attention to this patch!
> 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.
Actually the host suspend doesn't always go into hibernation.
In dwc3_google_suspend(), this driver follows the logic in
dwc3_suspend_common() in determining whether to do a full tear
down or enter hibernation.
| static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg)
| ...
| case DWC3_GCTL_PRTCAP_HOST:
| if (!PMSG_IS_AUTO(msg) && !device_may_wakeup(dwc->dev)) {
| dwc3_core_exit(dwc);
| break;
| }
The glue and the dwc3 core have to be aligned here as there's no
way to enter hibernation if the core has been completely torn down.
As for xhci, I don't see any logic that's conditional on hibernation
so I didn't pay much attention to it, please correct me if I'm wrong.
>
> 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
Looking forward to working with you to land this patch.
Thanks,
Roy Luo
next prev parent reply other threads:[~2025-10-25 0:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 23:34 [PATCH v4 0/2] Add Google Tensor SoC USB controller support Roy Luo
2025-10-17 23:34 ` [PATCH v4 1/2] dt-bindings: usb: dwc3: Add Google Tensor G5 DWC3 Roy Luo
2025-10-22 6:30 ` Krzysztof Kozlowski
2025-10-17 23:34 ` [PATCH v4 2/2] usb: dwc3: Add Google Tensor SoC DWC3 glue driver Roy Luo
2025-10-23 22:43 ` Thinh Nguyen
2025-10-25 0:25 ` Roy Luo [this message]
2025-10-30 1:02 ` Thinh Nguyen
2025-10-30 1:35 ` Thinh Nguyen
2025-11-01 0:49 ` Roy Luo
2025-11-01 6:10 ` Greg Kroah-Hartman
2025-11-04 10:28 ` Roy Luo
2025-11-04 2:07 ` Thinh Nguyen
2025-11-04 10:55 ` Roy Luo
2025-11-06 0:38 ` Thinh Nguyen
2025-11-06 2:38 ` Roy Luo
2025-11-06 23:48 ` Thinh Nguyen
2025-11-07 9:11 ` Roy Luo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+zupgx9QjT2faWeGtAy_oZffYfEXupPG-GDU9aLisrMGNohdA@mail.gmail.com \
--to=royluo@google.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=andre.draszik@linaro.org \
--cc=badhri@google.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=joychakr@google.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mnkumar@google.com \
--cc=p.zabel@pengutronix.de \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
--cc=tudor.ambarus@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).