From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Chukun Pan <amadeus@jmu.edu.cn>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
"dlan@kernel.org" <dlan@kernel.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"huang.ze@linux.dev" <huang.ze@linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"spacemit@lists.linux.dev" <spacemit@lists.linux.dev>
Subject: Re: [PATCH 1/1] usb: dwc3: dwc3-generic-plat: Add optional VBUS regulator support
Date: Thu, 19 Mar 2026 21:46:34 +0000 [thread overview]
Message-ID: <20260319214633.cyzr7silffbzisot@synopsys.com> (raw)
In-Reply-To: <20260319062601.1042965-1-amadeus@jmu.edu.cn>
On Thu, Mar 19, 2026, Chukun Pan wrote:
> Hi,
>
> > I mean this is a generic glue driver and not specific to your spacemit
> > k1. Some platforms use regulators to drive the vbus (e.g. dwc3 meson)
> > while others for internal controller supplies (e.g. dwc3 exynos). Also,
>
> So shouldn't the generic glue driver manage vbus, but rather the Spacemit
> USB PHY driver? I don't have any good ideas about the current name.
In my previous response, I noted to pass the name/id that best match
your platform in the dwc3_generic_config. This structure is passed as
private data corresponding to your k1 platform compatible string. That
should solve the naming issue (i.e. you can keep the name "vbus").
>
> > if the platform is operating in device mode, there should be no vbus.
>
> Do I need to check if it's in host mode?
Is your k1 a DRD controller, and that it can operate in device mode? If
so, does it save power to disable the regulator while operating in
device mode?
This is power saving optimization that should not impact functionality,
and it can be implemented in the future. However, it's better to keep
this in mind should this be the path forward in your future enhancement.
>
> > Also do we want to disable the regulator on system suspend? If so, we
> > may need a regulator handle.
>
> I'll add it if you think it's necessary.
Same comment as above, but this will be more involved. E.g. you may only
want to disable the vbus when remote wakeup is disabled and power saving
is more essential (disabling vbus will disconnect the device).
Thanks,
Thinh
>
> I'm not quite sure how to do it well, thank
> you for taking the time to review.
>
next prev parent reply other threads:[~2026-03-19 21:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 8:00 [PATCH 1/1] usb: dwc3: dwc3-generic-plat: Add optional VBUS regulator support Chukun Pan
2026-03-17 4:15 ` Ze Huang
2026-03-18 0:29 ` Thinh Nguyen
2026-03-18 6:30 ` Chukun Pan
2026-03-18 23:15 ` Thinh Nguyen
2026-03-19 6:26 ` Chukun Pan
2026-03-19 21:46 ` Thinh Nguyen [this message]
2026-03-20 6:36 ` Chukun Pan
2026-03-20 7:45 ` Ze Huang
2026-03-20 8:18 ` Chukun Pan
2026-03-20 9:50 ` Ze Huang
2026-03-20 10:40 ` Chukun Pan
2026-03-20 15:05 ` Ze Huang
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=20260319214633.cyzr7silffbzisot@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=amadeus@jmu.edu.cn \
--cc=dlan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=huang.ze@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=spacemit@lists.linux.dev \
/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