linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH v2 06/11] dt-bindings: usb: generic-ohci: Document RZ/G2L SoC bindings
Date: Wed, 23 Jun 2021 14:20:44 +0000	[thread overview]
Message-ID: <OS0PR01MB5922FAA0B3C8896E63BE545586089@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20210622193043.GA4176942@robh.at.kernel.org>

Hi Rob,

Thanks for the feedback.

> Subject: Re: [PATCH v2 06/11] dt-bindings: usb: generic-ohci: Document
> RZ/G2L SoC bindings
> 
> On Mon, Jun 21, 2021 at 10:39:38AM +0100, Biju Das wrote:
> > Renesas RZ/G2L SoC has USBPHY Control and USB2.0 PHY module. We need
> > to turn on both these phy modules before accessing host registers.
> >
> > Apart from this, document the optional property dr_mode present on
> > both
> > RZ/G2 and R-Car Gen3 SoCs.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> >  .../devicetree/bindings/usb/generic-ohci.yaml | 32
> > +++++++++++++++++--
> >  1 file changed, 30 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> > b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> > index 0f5f6ea702d0..c0644fae5db9 100644
> > --- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> > +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> > @@ -8,6 +8,26 @@ title: USB OHCI Controller Device Tree Bindings
> >
> >  allOf:
> >    - $ref: "usb-hcd.yaml"
> > +  - if:
> > +      properties:
> > +        compatible:
> > +            contains:
> > +              const: renesas,r9a07g044-ohci
> > +    then:
> > +      properties:
> > +        phys:
> > +          maxItems: 2
> > +        phy-names:
> > +          items:
> > +            - const: usbphyctrl
> > +            - const: usb
> 
> Why can't your extra thing be last? Then you only need to set
> minItems/maxItems in the if/then schema.

OK. will move this to the last and will take out phy-names.

> 
> Though this seems like an abuse of the phy binding. There's not 2 phys,
> right? Just some extra registers related to the phy? Can't it be hidden in
> your phy driver?

Usbphyctrl is separate IP block which mainly controls reset and power down of the actual USB/PHY.
This block has separate registers. So modelled as separate driver and device handles port reset
Based on port index.

Will remove phy-names "usbphyctrl" and will just use "usb" like example here[1]. Is it ok?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/usb/usb-hcd.yaml?h=v5.13-rc7

Regards,
Biju


> 
> > +    else:
> > +      properties:
> > +        phys:
> > +          maxItems: 1
> > +        phy-names:
> > +          items:
> > +            - const: usb
> >
> >  maintainers:
> >    - Greg Kroah-Hartman <gregkh@linuxfoundation.org> @@ -43,6 +63,7 @@
> > properties:
> >                - brcm,bcm7435-ohci
> >                - ibm,476gtr-ohci
> >                - ingenic,jz4740-ohci
> > +              - renesas,r9a07g044-ohci
> >                - snps,hsdk-v1.0-ohci
> >            - const: generic-ohci
> >        - const: generic-ohci
> > @@ -101,14 +122,21 @@ properties:
> >        Overrides the detected port count
> >
> >    phys:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
> >
> >    phy-names:
> > -    const: usb
> > +    minItems: 1
> > +    maxItems: 2
> >
> >    iommus:
> >      maxItems: 1
> >
> > +  dr_mode:
> > +    enum:
> > +      - host
> > +      - otg
> > +
> >  required:
> >    - compatible
> >    - reg
> > --
> > 2.17.1
> >
> >

  reply	other threads:[~2021-06-23 14:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21  9:39 [PATCH v2 00/11] Add USB2.0 support Biju Das
2021-06-21  9:39 ` [PATCH v2 01/11] dt-bindings: phy: renesas: Document RZ/G2L USB PHY Control bindings Biju Das
2021-06-21 17:40   ` Rob Herring
2021-06-22 16:58   ` Rob Herring
2021-06-23 13:38     ` Biju Das
2021-06-23 14:13       ` Rob Herring
2021-06-23 14:29         ` Geert Uytterhoeven
2021-06-23 15:45         ` Biju Das
2021-06-25 10:11           ` Biju Das
2021-06-21  9:39 ` [PATCH v2 02/11] drivers: clk: renesas: r9a07g044-cpg: Add USB clocks Biju Das
2021-06-21  9:39 ` [PATCH v2 03/11] phy: renesas: Add RZ/G2L usb phy control driver Biju Das
2021-06-21  9:39 ` [PATCH v2 04/11] arm64: configs: defconfig: Enable RZ/G2L USB PHY " Biju Das
2021-06-21  9:39 ` [PATCH v2 05/11] dt-bindings: phy: renesas,usb2-phy: Document RZ/G2L phy bindings Biju Das
2021-06-22 15:33   ` Geert Uytterhoeven
2021-06-21  9:39 ` [PATCH v2 06/11] dt-bindings: usb: generic-ohci: Document RZ/G2L SoC bindings Biju Das
2021-06-21 17:40   ` Rob Herring
2021-06-22 10:03     ` Biju Das
2021-06-22 19:30   ` Rob Herring
2021-06-23 14:20     ` Biju Das [this message]
2021-06-21  9:39 ` [PATCH v2 07/11] dt-bindings: usb: generic-ehci: " Biju Das
2021-06-21 17:40   ` Rob Herring
2021-06-22 10:04     ` Biju Das
2021-06-21  9:39 ` [PATCH v2 08/11] arm64: dts: renesas: r9a07g044: Add USB2.0 phy and host support Biju Das
2021-06-21  9:39 ` [PATCH v2 09/11] dt-bindings: usb: renesas,usbhs: Document RZ/G2L bindings Biju Das
2021-06-21  9:39 ` [PATCH v2 10/11] phy: renesas: phy-rcar-gen3-usb2: Add OTG support for RZ/G2L Biju Das
2021-06-22 15:29   ` Geert Uytterhoeven
2021-06-23  7:04     ` Yoshihiro Shimoda
2021-06-23 11:52     ` Biju Das
2021-06-23  8:02   ` Yoshihiro Shimoda
2021-06-23 11:54     ` Biju Das
2021-06-21  9:39 ` [PATCH v2 11/11] arm64: dts: renesas: r9a07g044: Add USB2.0 device 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=OS0PR01MB5922FAA0B3C8896E63BE545586089@OS0PR01MB5922.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=biju.das@bp.renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --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 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).