diff mbox series

[04/16] dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support

Message ID 20221212172804.1277751-5-biju.das.jz@bp.renesas.com
State Superseded
Headers show
Series ADD USB3.1 HOST, Peri and DRD support | expand

Commit Message

Biju Das Dec. 12, 2022, 5:27 p.m. UTC
Document the RZ/V2M SoC bindings.
The RZ/V2M SoC is a little different to the R-Car implementations.
You can access the registers associated with the currently set DRD mode,
therefore as part of init, we have to set the DRD mode to host.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 .../bindings/usb/renesas,usb-xhci.yaml        | 41 +++++++++++++++++--
 1 file changed, 37 insertions(+), 4 deletions(-)

Comments

Rob Herring (Arm) Dec. 16, 2022, 4:10 p.m. UTC | #1
On Mon, Dec 12, 2022 at 05:27:52PM +0000, Biju Das wrote:
> Document the RZ/V2M SoC bindings.
> The RZ/V2M SoC is a little different to the R-Car implementations.
> You can access the registers associated with the currently set DRD mode,
> therefore as part of init, we have to set the DRD mode to host.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  .../bindings/usb/renesas,usb-xhci.yaml        | 41 +++++++++++++++++--
>  1 file changed, 37 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml b/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
> index 4c5efaf02308..ae678d249785 100644
> --- a/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
> +++ b/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
> @@ -10,9 +10,6 @@ maintainers:
>    - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>    - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>  
> -allOf:
> -  - $ref: "usb-xhci.yaml"
> -
>  properties:
>    compatible:
>      oneOf:
> @@ -37,6 +34,11 @@ properties:
>                - renesas,xhci-r8a77965 # R-Car M3-N
>                - renesas,xhci-r8a77990 # R-Car E3
>            - const: renesas,rcar-gen3-xhci # R-Car Gen3 and RZ/G2
> +      - items:
> +          - enum:
> +              - renesas,r9a09g011-xhci # RZ/V2M
> +              - renesas,r9a09g055-xhci # RZ/V2MA
> +          - const: renesas,rzv2m-xhci  # RZ/{V2M, V2MA}
>  
>    reg:
>      maxItems: 1
> @@ -45,7 +47,16 @@ properties:
>      maxItems: 1
>  
>    clocks:
> -    maxItems: 1
> +    minItems: 1
> +    items:
> +      - description: Main clock for host
> +      - description: Register access clock
> +
> +  clock-names:
> +    minItems: 1
> +    items:
> +      - const: host_axi

Drop 'host_'

> +      - const: reg
>  
>    phys:
>      maxItems: 1
> @@ -68,6 +79,28 @@ required:
>    - power-domains
>    - resets
>  
> +allOf:
> +  - $ref: "usb-xhci.yaml"

Drop quotes since you are touching this.

With that,

Reviewed-by: Rob Herring <robh@kernel.org>

> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - renesas,rzv2m-xhci
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 2
> +        clock-names:
> +          minItems: 2
> +      required:
> +        - clock-names
> +    else:
> +      properties:
> +        clocks:
> +          maxItems: 1
> +
>  unevaluatedProperties: false
>  
>  examples:
> -- 
> 2.25.1
> 
>
Biju Das Dec. 16, 2022, 5:10 p.m. UTC | #2
Hi Rob,

> Subject: Re: [PATCH 04/16] dt-bindings: usb: renesas,usb-xhci: Document
> RZ/V2M support
> 
> On Mon, Dec 12, 2022 at 05:27:52PM +0000, Biju Das wrote:
> > Document the RZ/V2M SoC bindings.
> > The RZ/V2M SoC is a little different to the R-Car implementations.
> > You can access the registers associated with the currently set DRD
> > mode, therefore as part of init, we have to set the DRD mode to host.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> >  .../bindings/usb/renesas,usb-xhci.yaml        | 41 +++++++++++++++++--
> >  1 file changed, 37 insertions(+), 4 deletions(-)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
> > b/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
> > index 4c5efaf02308..ae678d249785 100644
> > --- a/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
> > +++ b/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
> > @@ -10,9 +10,6 @@ maintainers:
> >    - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >    - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> >
> > -allOf:
> > -  - $ref: "usb-xhci.yaml"
> > -
> >  properties:
> >    compatible:
> >      oneOf:
> > @@ -37,6 +34,11 @@ properties:
> >                - renesas,xhci-r8a77965 # R-Car M3-N
> >                - renesas,xhci-r8a77990 # R-Car E3
> >            - const: renesas,rcar-gen3-xhci # R-Car Gen3 and RZ/G2
> > +      - items:
> > +          - enum:
> > +              - renesas,r9a09g011-xhci # RZ/V2M
> > +              - renesas,r9a09g055-xhci # RZ/V2MA
> > +          - const: renesas,rzv2m-xhci  # RZ/{V2M, V2MA}
> >
> >    reg:
> >      maxItems: 1
> > @@ -45,7 +47,16 @@ properties:
> >      maxItems: 1
> >
> >    clocks:
> > -    maxItems: 1
> > +    minItems: 1
> > +    items:
> > +      - description: Main clock for host
> > +      - description: Register access clock
> > +
> > +  clock-names:
> > +    minItems: 1
> > +    items:
> > +      - const: host_axi
> 
> Drop 'host_'

OK.

> 
> > +      - const: reg
> >
> >    phys:
> >      maxItems: 1
> > @@ -68,6 +79,28 @@ required:
> >    - power-domains
> >    - resets
> >
> > +allOf:
> > +  - $ref: "usb-xhci.yaml"
> 
> Drop quotes since you are touching this.

OK, Will fix this.

Cheers,
Biju

> 
> With that,
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
> 
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - renesas,rzv2m-xhci
> > +    then:
> > +      properties:
> > +        clocks:
> > +          minItems: 2
> > +        clock-names:
> > +          minItems: 2
> > +      required:
> > +        - clock-names
> > +    else:
> > +      properties:
> > +        clocks:
> > +          maxItems: 1
> > +
> >  unevaluatedProperties: false
> >
> >  examples:
> > --
> > 2.25.1
> >
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml b/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
index 4c5efaf02308..ae678d249785 100644
--- a/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
+++ b/Documentation/devicetree/bindings/usb/renesas,usb-xhci.yaml
@@ -10,9 +10,6 @@  maintainers:
   - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
   - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
 
-allOf:
-  - $ref: "usb-xhci.yaml"
-
 properties:
   compatible:
     oneOf:
@@ -37,6 +34,11 @@  properties:
               - renesas,xhci-r8a77965 # R-Car M3-N
               - renesas,xhci-r8a77990 # R-Car E3
           - const: renesas,rcar-gen3-xhci # R-Car Gen3 and RZ/G2
+      - items:
+          - enum:
+              - renesas,r9a09g011-xhci # RZ/V2M
+              - renesas,r9a09g055-xhci # RZ/V2MA
+          - const: renesas,rzv2m-xhci  # RZ/{V2M, V2MA}
 
   reg:
     maxItems: 1
@@ -45,7 +47,16 @@  properties:
     maxItems: 1
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    items:
+      - description: Main clock for host
+      - description: Register access clock
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: host_axi
+      - const: reg
 
   phys:
     maxItems: 1
@@ -68,6 +79,28 @@  required:
   - power-domains
   - resets
 
+allOf:
+  - $ref: "usb-xhci.yaml"
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - renesas,rzv2m-xhci
+    then:
+      properties:
+        clocks:
+          minItems: 2
+        clock-names:
+          minItems: 2
+      required:
+        - clock-names
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+
 unevaluatedProperties: false
 
 examples: