From: "Ze Huang" <huang.ze@linux.dev>
To: "Chukun Pan" <amadeus@jmu.edu.cn>, <huang.ze@linux.dev>
Cc: <dlan@kernel.org>, <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>,
<linux-usb@vger.kernel.org>, <spacemit@lists.linux.dev>,
<thinh.nguyen@synopsys.com>
Subject: Re: [PATCH 1/1] usb: dwc3: dwc3-generic-plat: Add optional VBUS regulator support
Date: Fri, 20 Mar 2026 17:50:50 +0800 [thread overview]
Message-ID: <DH7ILSL8DXBO.ZR74CL1QEUBU@linux.dev> (raw)
In-Reply-To: <20260320081826.1331721-1-amadeus@jmu.edu.cn>
Hi Chukun
On Fri Mar 20, 2026 at 4:18 PM CST, Chukun Pan wrote:
> Hi,
>
>> I don't think it's a good idea to tie this optional VBUS regulator
>> implementation to the SpacemiT K1 platform.
>>
>> While the K1 SoC does have a DRD controller, current boards in the wild
>> (like Jupiter[1], OrangePi RV2[2], and Banana Pi F3[3]) all route this
>> port to an onboard hub[4][5]. IMHO, managing the downstream VBUS regulator
>> via the onboard_usb_dev driver is the correct approach for us.
>
> I'm sorry, but I don't quite understand why it's necessary to use
> onboard_usb_dev driver instead.
>
I think it's better to align the driver with the actual hardware. I'm not
opposed to managing any regulators in usb host/device drivers. But if we
do have an onboard hub, and regulator belongs to the downstream ports of
the hub, then it's hub's job, right?
>
> The DRD controller is connected to the onboard USB hub, so it can
> only operate in host mode. If all downstream ports of the USB hub
> use the same VBUS supply, then what's the problem with using this?
It does work.
Many boards leave gpio controlled regulators always on, that's what we
want to solve. If we have to choose the parent of these regulators, why
not put them in the correct hierarchy?
>
>> K1 platform currently does not need this feature here.
>>
>> Considering the role switch, I think it would be better to hold off on
>> this until there is an actual board/user that relies on it.
>
> There is a board without onboard USB hub,
If such a board really need the regulator, IMO, your patch is the way to go.
>
> such as the OrangePi R2S.
> So this is possible for boards that don't have onboard USB hub?
OrangePi haven't released the schematic yet.
That's what I could find [1], which seems similar to RV2.
&usb3hub {
vbus-gpios = <&gpio 123 0>; /* gpio_123 for usb3 hub pwr and output vbus */
status = "okay";
};
[1] https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.6-ky/arch/riscv/boot/dts/ky/x1_orangepi-r2s.dts#L762
>
> Thanks,
> Chukun
Thanks,
Ze
next prev parent reply other threads:[~2026-03-20 9:51 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
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 [this message]
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=DH7ILSL8DXBO.ZR74CL1QEUBU@linux.dev \
--to=huang.ze@linux.dev \
--cc=amadeus@jmu.edu.cn \
--cc=dlan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=thinh.nguyen@synopsys.com \
/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