All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Biju Das <biju.das@bp.renesas.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Simon Horman <horms@verge.net.au>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Fabrizio Castro <fabrizio.castro@bp.renesas.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH v2 2/7] dt-bindings: usb: renesas_usb3: add usb-role-switch property
Date: Thu, 28 Mar 2019 10:33:53 -0500	[thread overview]
Message-ID: <20190328153353.GA3070@bogus> (raw)
In-Reply-To: <20190315105146.GI7752@kuha.fi.intel.com>

On Fri, Mar 15, 2019 at 12:51:46PM +0200, Heikki Krogerus wrote:
> Thanks,
> 
> On Fri, Mar 15, 2019 at 09:08:19AM +0000, Biju Das wrote:
> > > Subject: Re: [PATCH v2 2/7] dt-bindings: usb: renesas_usb3: add usb-role-
> > > > > > a/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > > > > > b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > > > > > index 35039e7..eecaf4c 100644
> > > > > > --- a/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > > > > > +++ b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > > > > > @@ -22,6 +22,7 @@ Required properties:
> > > > > >  Optional properties:
> > > > > >    - phys: phandle + phy specifier pair
> > > > > >    - phy-names: must be "usb"
> > > > > > +  - usb-role-switch: use USB role switch to support dual-role
> > > > > > + switch
> > > > >
> > > > > I don't think we can add such a property. At least, we have to add
> > > "renesas,"
> > > > > prefix.
> > > >
> > > > usb_role_switch_get   api uses  "usb-role-switch"  property to get role
> > > switch linked with the device.
> > > >
> > > > HD3SS3220 port controller driver gets role switch handle linked with the
> > > device using usb_role_switch_get  api.
> > > > That is the reason, I have added " usb-role-switch" property here.
> > > >
> > > > Do you have any other suggestion to get usb role switch handle?
> > > 
> > > We can still change the API. Can we use the compatible for this?
> > 
> > Do you mean usb_role_switch_get  API needs  to handle compatible "usb-x-connector"  wherex= a,b ,c ?
> > Then it uses the graphs api to get the device linked with it and return the usb role switch handle.
> > In that case, no need to add  generic "usb-role-switch"  property here.
> > 
> > Can you please confirm my understanding is correct?
> 
> No, I meant the compatible property would have the value
> "usb-role-switch". Your compatible would probable look something
> like this:
> 
>         compatible = "renesas,r8a774c0-usb3-peri",
>                      "usb-role-switch";
> 
> So the idea would be that the device supplying USB role switch
> functionality, in your case the USB controller, would need to have the
> compatible property containing "usb-role-switch".

That's not really something a driver could bind to nor provides any info 
as to what the h/w is (and how to interact with it).

> 
> I'm really not an expert in DT, so I don't know if that is acceptable.
> Rob can you comment on this?

I would go with Biju's proposal.

Rob

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Biju Das <biju.das@bp.renesas.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Simon Horman <horms@verge.net.au>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Fabrizio Castro <fabrizio.castro@bp.renesas.com>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>
Subject: [v2,2/7] dt-bindings: usb: renesas_usb3: add usb-role-switch property
Date: Thu, 28 Mar 2019 10:33:53 -0500	[thread overview]
Message-ID: <20190328153353.GA3070@bogus> (raw)

On Fri, Mar 15, 2019 at 12:51:46PM +0200, Heikki Krogerus wrote:
> Thanks,
> 
> On Fri, Mar 15, 2019 at 09:08:19AM +0000, Biju Das wrote:
> > > Subject: Re: [PATCH v2 2/7] dt-bindings: usb: renesas_usb3: add usb-role-
> > > > > > a/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > > > > > b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > > > > > index 35039e7..eecaf4c 100644
> > > > > > --- a/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > > > > > +++ b/Documentation/devicetree/bindings/usb/renesas_usb3.txt
> > > > > > @@ -22,6 +22,7 @@ Required properties:
> > > > > >  Optional properties:
> > > > > >    - phys: phandle + phy specifier pair
> > > > > >    - phy-names: must be "usb"
> > > > > > +  - usb-role-switch: use USB role switch to support dual-role
> > > > > > + switch
> > > > >
> > > > > I don't think we can add such a property. At least, we have to add
> > > "renesas,"
> > > > > prefix.
> > > >
> > > > usb_role_switch_get   api uses  "usb-role-switch"  property to get role
> > > switch linked with the device.
> > > >
> > > > HD3SS3220 port controller driver gets role switch handle linked with the
> > > device using usb_role_switch_get  api.
> > > > That is the reason, I have added " usb-role-switch" property here.
> > > >
> > > > Do you have any other suggestion to get usb role switch handle?
> > > 
> > > We can still change the API. Can we use the compatible for this?
> > 
> > Do you mean usb_role_switch_get  API needs  to handle compatible "usb-x-connector"  wherex= a,b ,c ?
> > Then it uses the graphs api to get the device linked with it and return the usb role switch handle.
> > In that case, no need to add  generic "usb-role-switch"  property here.
> > 
> > Can you please confirm my understanding is correct?
> 
> No, I meant the compatible property would have the value
> "usb-role-switch". Your compatible would probable look something
> like this:
> 
>         compatible = "renesas,r8a774c0-usb3-peri",
>                      "usb-role-switch";
> 
> So the idea would be that the device supplying USB role switch
> functionality, in your case the USB controller, would need to have the
> compatible property containing "usb-role-switch".

That's not really something a driver could bind to nor provides any info 
as to what the h/w is (and how to interact with it).

> 
> I'm really not an expert in DT, so I don't know if that is acceptable.
> Rob can you comment on this?

I would go with Biju's proposal.

Rob

  reply	other threads:[~2019-03-28 15:33 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14  8:39 [PATCH v2 0/7] Add USB3.0 and TI HD3SS3220 driver support Biju Das
2019-03-14  8:39 ` [PATCH v2 1/7] dt-bindings: usb: hd3ss3220 device tree binding document Biju Das
2019-03-14  8:39   ` [v2,1/7] " Biju Das
2019-03-28 15:35   ` [PATCH v2 1/7] " Rob Herring
2019-03-28 15:35     ` [v2,1/7] " Rob Herring
2019-03-14  8:39 ` [PATCH v2 2/7] dt-bindings: usb: renesas_usb3: add usb-role-switch property Biju Das
2019-03-14  8:39   ` [v2,2/7] " Biju Das
2019-03-14  9:16   ` [PATCH v2 2/7] " Yoshihiro Shimoda
2019-03-14  9:16     ` Yoshihiro Shimoda
2019-03-14  9:16     ` [v2,2/7] " Yoshihiro Shimoda
2019-03-14 10:14     ` [PATCH v2 2/7] " Biju Das
2019-03-14 10:14       ` [v2,2/7] " Biju Das
2019-03-14 10:53       ` [PATCH v2 2/7] " Heikki Krogerus
2019-03-14 10:53         ` [v2,2/7] " Heikki Krogerus
2019-03-15  9:08         ` [PATCH v2 2/7] " Biju Das
2019-03-15  9:08           ` [v2,2/7] " Biju Das
2019-03-15 10:51           ` [PATCH v2 2/7] " Heikki Krogerus
2019-03-15 10:51             ` [v2,2/7] " Heikki Krogerus
2019-03-28 15:33             ` Rob Herring [this message]
2019-03-28 15:33               ` Rob Herring
2019-03-28 17:48               ` [PATCH v2 2/7] " Heikki Krogerus
2019-03-28 17:48                 ` [v2,2/7] " Heikki Krogerus
2019-03-29 13:57                 ` [PATCH v2 2/7] " Rob Herring
2019-03-29 13:57                   ` [v2,2/7] " Rob Herring
2019-04-11  9:04                   ` [PATCH v2 2/7] " Biju Das
2019-04-11  9:04                     ` [v2,2/7] " Biju Das
2019-03-14  8:39 ` [PATCH v2 3/7] usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller Biju Das
2019-03-14  8:39   ` [v2,3/7] " Biju Das
2019-03-14  8:39 ` [PATCH v2 4/7] usb: gadget: udc: renesas_usb3: Use usb_role_switch framework Biju Das
2019-03-14  8:39   ` [v2,4/7] " Biju Das
2019-03-14  9:21   ` [PATCH v2 4/7] " Yoshihiro Shimoda
2019-03-14  9:21     ` [v2,4/7] " Yoshihiro Shimoda
2019-03-14  9:28     ` [PATCH v2 4/7] " Biju Das
2019-03-14  9:28       ` [v2,4/7] " Biju Das
2019-03-14  9:32       ` [PATCH v2 4/7] " Biju Das
2019-03-14  9:32         ` [v2,4/7] " Biju Das
2019-03-14  8:39 ` [PATCH v2 5/7] arm64: defconfig: enable TYPEC_HD3SS3220 config option Biju Das
2019-03-14  8:39   ` [v2,5/7] " Biju Das
2019-03-14  8:39 ` [PATCH v2 6/7] arm64: dts: renesas: r8a774c0-cat874: Enable USB3.0 host/peripheral device node Biju Das
2019-03-14  8:39 ` [PATCH v2 7/7] arm64: dts: renesas: r8a774c0-cat874: Enable usb role switch support Biju Das

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=20190328153353.GA3070@bogus \
    --to=robh@kernel.org \
    --cc=Chris.Paterson2@renesas.com \
    --cc=balbi@kernel.org \
    --cc=biju.das@bp.renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fabrizio.castro@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=horms@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=yoshihiro.shimoda.uh@renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.