From: Rob Herring <robh@kernel.org>
To: Inochi Amaoto <inochiama@outlook.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Chen Wang <unicorn_wang@outlook.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Jisheng Zhang <jszhang@kernel.org>,
Liu Gui <kenneth.liu@sophgo.com>,
Jingbao Qiu <qiujingbao.dlmu@gmail.com>,
dlan@gentoo.org, linux-phy@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH v3 1/2] dt-bindings: phy: Add Sophgo CV1800 USB phy
Date: Tue, 7 May 2024 14:08:29 -0500 [thread overview]
Message-ID: <20240507190829.GA880949-robh@kernel.org> (raw)
In-Reply-To: <IA1PR20MB4953FC99B680A3040D4CB611BB1C2@IA1PR20MB4953.namprd20.prod.outlook.com>
On Mon, May 06, 2024 at 08:17:30PM +0800, Inochi Amaoto wrote:
> On Mon, May 06, 2024 at 08:51:59AM GMT, Krzysztof Kozlowski wrote:
> > On 05/05/2024 03:52, Inochi Amaoto wrote:
> > > The USB phy of Sophgo CV18XX series SoC needs to sense a pin called
> > > "VBUS_DET" to get the right operation mode. If this pin is not
> > > connected, it only supports setting the mode manually.
> > >
> > > Add USB phy bindings for Sophgo CV18XX/SG200X series SoC.
> >
> > ...
> >
> > > +
> > > + clock-names:
> > > + items:
> > > + - const: phy
> > > + - const: app
> > > + - const: stb
> > > + - const: lpm
> > > +
> > > + vbus_det-gpios:
> >
> > No underscores.
> >
>
> Thanks.
>
> > > + description: GPIO to the USB OTG VBUS detect pin. This should not be
> > > + defined if vbus_det pin and switch pin are connected, which may
> > > + break the VBUS detection.
> >
> > Why is this property of the PHY? VBUS pin goes to the connector, doesn't
> > it? It looks like you combined two or three (!!!) bindings into one.
> >
>
> Yes, but I am not sure which is the best to write this bindings.
> The topology of USB likes this:
>
> controller -- phy -- switch --> (host) port/hub
> --> (device) port
>
> The vbus-detect connect to the device port, but it will change the mode for
> both phy and switch. And the switch is just a switching circuit.
> I am pretty confused on how to split this binding. I think it may like the
> following:
>
> phy {
> switch {
> /* This is the switch in the follows */
> connector1 {
> /* host port */
> };
> connector2 {
> /* device port*/
> /* the vbus pin is here */
> };
> };
> };
>
> Could you share some suggestion on this?
Something like the above assuming 2 physical connectors, but probably
should be a child of the USB controller or on its own. PHYs usually
aren't put into a parent/child hierarchy, but are out of band.
Is this switch implemented on the board level? If so, you should create
something that would work on any platform with a GPIO controlled USB
switch like this.
Rob
next prev parent reply other threads:[~2024-05-07 19:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-05 1:50 [PATCH v3 0/2] riscv: sophgo: add USB phy support for CV18XX series Inochi Amaoto
2024-05-05 1:52 ` [PATCH v3 1/2] dt-bindings: phy: Add Sophgo CV1800 USB phy Inochi Amaoto
2024-05-06 6:51 ` Krzysztof Kozlowski
2024-05-06 12:17 ` Inochi Amaoto
2024-05-07 19:08 ` Rob Herring [this message]
2024-05-10 11:19 ` Inochi Amaoto
2024-05-05 1:52 ` [PATCH v3 2/2] phy: sophgo: Add USB 2.0 PHY driver for Sophgo CV18XX/SG200X Inochi Amaoto
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=20240507190829.GA880949-robh@kernel.org \
--to=robh@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=inochiama@outlook.com \
--cc=jszhang@kernel.org \
--cc=kenneth.liu@sophgo.com \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=qiujingbao.dlmu@gmail.com \
--cc=unicorn_wang@outlook.com \
--cc=vkoul@kernel.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).