[PATCH 1/1] usb: dwc3: dwc3-generic-plat: Add optional VBUS regulator support
Thinh Nguyen
Thinh.Nguyen at synopsys.com
Thu Mar 19 14:46:34 PDT 2026
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.
>
More information about the linux-riscv
mailing list