diff mbox series

[v2,2/5] dt-bindings: usb: renesas,usb3-peri: Document HS and SS data bus

Message ID 20200811080227.3170-3-biju.das.jz@bp.renesas.com (mailing list archive)
State New, archived
Headers show
Series Remodel HD3SS3220 device nodes | expand

Commit Message

Biju Das Aug. 11, 2020, 8:02 a.m. UTC
Document HS and SS data bus for the "usb-role-switch" enabled case.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2: No change
Ref:https://patchwork.kernel.org/patch/11669423/
---
 .../bindings/usb/renesas,usb3-peri.yaml       | 36 +++++++++++++++----
 1 file changed, 30 insertions(+), 6 deletions(-)

Comments

Yoshihiro Shimoda Aug. 24, 2020, 11:29 a.m. UTC | #1
Hi Biju-san,

Thank you for the patch!

> From: Biju Das, Sent: Tuesday, August 11, 2020 5:02 PM
> 
> Document HS and SS data bus for the "usb-role-switch" enabled case.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2: No change
> Ref:https://patchwork.kernel.org/patch/11669423/
> ---
>  .../bindings/usb/renesas,usb3-peri.yaml       | 36 +++++++++++++++----
>  1 file changed, 30 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> index e3cdeab1199f..3eb964af37b8 100644
> --- a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> +++ b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
<snip>
> @@ -79,9 +92,20 @@ examples:
>          companion = <&xhci0>;
>          usb-role-switch;
> 
> -        port {
> -            usb3_role_switch: endpoint {
> -                remote-endpoint = <&hd3ss3220_ep>;
> -            };
> -        };
> +    	ports {

I think we should use spaces instead of tab here and below.

> +    		#address-cells = <1>;
> +    		#size-cells = <0>;
> +    		port@0 {
> +    			reg = <0>;
> +    			usb3_hs_ep: endpoint {
> +    				remote-endpoint = <&hs_ep>;
> +    			};
> +    		};
> +    		port@1 {
> +    			reg = <1>;
> +    			usb3_role_switch: endpoint {
> +    				remote-endpoint = <&hd3ss3220_out_ep>;
> +    			};
> +    		};
> +    	};

Best regards,
Yoshihiro Shimoda

>      };
> --
> 2.17.1
Biju Das Aug. 24, 2020, 11:54 a.m. UTC | #2
Hi Shimoda-San,

Thanks for the feedback.

> Subject: RE: [PATCH v2 2/5] dt-bindings: usb: renesas,usb3-peri: Document
> HS and SS data bus
>
> Hi Biju-san,
>
> Thank you for the patch!
>
> > From: Biju Das, Sent: Tuesday, August 11, 2020 5:02 PM
> >
> > Document HS and SS data bus for the "usb-role-switch" enabled case.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-
> lad.rj@bp.renesas.com>
> > ---
> > v1->v2: No change
> > Ref:https://patchwork.kernel.org/patch/11669423/
> > ---
> >  .../bindings/usb/renesas,usb3-peri.yaml       | 36 +++++++++++++++----
> >  1 file changed, 30 insertions(+), 6 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/renesas,usb3-
> peri.yaml
> > b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> > index e3cdeab1199f..3eb964af37b8 100644
> > --- a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> > +++ b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> <snip>
> > @@ -79,9 +92,20 @@ examples:
> >          companion = <&xhci0>;
> >          usb-role-switch;
> >
> > -        port {
> > -            usb3_role_switch: endpoint {
> > -                remote-endpoint = <&hd3ss3220_ep>;
> > -            };
> > -        };
> > +    ports {
>
> I think we should use spaces instead of tab here and below.

I have ran dt_binding_check on this file and it did n't complain.

First 5 character must be space, after that if you use tab, it won't complain.
I am not sure is it the correct way or not?

Geert/Shimoda-San can you please comment.
Based on your input, if needed I will send v3 with only spaces.

Cheers,
Biju


> > +    #address-cells = <1>;
> > +    #size-cells = <0>;
> > +    port@0 {
> > +    reg = <0>;
> > +    usb3_hs_ep: endpoint {
> > +    remote-endpoint = <&hs_ep>;
> > +    };
> > +    };
> > +    port@1 {
> > +    reg = <1>;
> > +    usb3_role_switch: endpoint {
> > +    remote-endpoint = <&hd3ss3220_out_ep>;
> > +    };
> > +    };
> > +    };
>
> Best regards,
> Yoshihiro Shimoda
>
> >      };
> > --
> > 2.17.1



Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647
Yoshihiro Shimoda Aug. 24, 2020, 12:08 p.m. UTC | #3
Hi Biju-san,

> From: Biju Das, Sent: Monday, August 24, 2020 8:55 PM
> 
> Hi Shimoda-San,
> 
> Thanks for the feedback.
> 
<snip>
> > > --- a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> > > +++ b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> > <snip>
> > > @@ -79,9 +92,20 @@ examples:
> > >          companion = <&xhci0>;
> > >          usb-role-switch;
> > >
> > > -        port {
> > > -            usb3_role_switch: endpoint {
> > > -                remote-endpoint = <&hd3ss3220_ep>;
> > > -            };
> > > -        };
> > > +    	ports {
> >
> > I think we should use spaces instead of tab here and below.
> 
> I have ran dt_binding_check on this file and it did n't complain.
> 
> First 5 character must be space, after that if you use tab, it won't complain.
> I am not sure is it the correct way or not?
> 
> Geert/Shimoda-San can you please comment.
> Based on your input, if needed I will send v3 with only spaces.

I don't know why dt_binding_check didn't complain though,
according to writing_schema.rst:
---
examples
  Optional. A list of one or more DTS hunks implementing the
  binding. Note: YAML doesn't allow leading tabs, so spaces must be used instead.
---
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/writing-schema.rst?h=v5.9-rc2#n71

Best regards,
Yoshihiro Shimoda
Biju Das Aug. 24, 2020, 12:14 p.m. UTC | #4
Hi Shimoda-San,

Thanks for the feedback.

> Subject: RE: [PATCH v2 2/5] dt-bindings: usb: renesas,usb3-peri: Document
> HS and SS data bus
>
> Hi Biju-san,
>
> > From: Biju Das, Sent: Monday, August 24, 2020 8:55 PM
> >
> > Hi Shimoda-San,
> >
> > Thanks for the feedback.
> >
> <snip>
> > > > --- a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> > > > +++ b/Documentation/devicetree/bindings/usb/renesas,usb3-
> peri.yaml
> > > <snip>
> > > > @@ -79,9 +92,20 @@ examples:
> > > >          companion = <&xhci0>;
> > > >          usb-role-switch;
> > > >
> > > > -        port {
> > > > -            usb3_role_switch: endpoint {
> > > > -                remote-endpoint = <&hd3ss3220_ep>;
> > > > -            };
> > > > -        };
> > > > +    ports {
> > >
> > > I think we should use spaces instead of tab here and below.
> >
> > I have ran dt_binding_check on this file and it did n't complain.
> >
> > First 5 character must be space, after that if you use tab, it won't complain.
> > I am not sure is it the correct way or not?
> >
> > Geert/Shimoda-San can you please comment.
> > Based on your input, if needed I will send v3 with only spaces.
>
> I don't know why dt_binding_check didn't complain though, according to
> writing_schema.rst:
> ---
> examples
>   Optional. A list of one or more DTS hunks implementing the
>   binding. Note: YAML doesn't allow leading tabs, so spaces must be used
> instead.
> ---
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docu
> mentation/devicetree/writing-schema.rst?h=v5.9-rc2#n71

Thanks for the pointers. I will send v3 with only spaces.

Cheers,
Biju


Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647
Geert Uytterhoeven Aug. 25, 2020, 7:13 a.m. UTC | #5
On Mon, Aug 24, 2020 at 2:08 PM Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
> > From: Biju Das, Sent: Monday, August 24, 2020 8:55 PM
> > > > --- a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> > > > +++ b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
> > > <snip>
> > > > @@ -79,9 +92,20 @@ examples:
> > > >          companion = <&xhci0>;
> > > >          usb-role-switch;
> > > >
> > > > -        port {
> > > > -            usb3_role_switch: endpoint {
> > > > -                remote-endpoint = <&hd3ss3220_ep>;
> > > > -            };
> > > > -        };
> > > > +         ports {
> > >
> > > I think we should use spaces instead of tab here and below.
> >
> > I have ran dt_binding_check on this file and it did n't complain.
> >
> > First 5 character must be space, after that if you use tab, it won't complain.
> > I am not sure is it the correct way or not?
> >
> > Geert/Shimoda-San can you please comment.
> > Based on your input, if needed I will send v3 with only spaces.
>
> I don't know why dt_binding_check didn't complain though,
> according to writing_schema.rst:
> ---
> examples
>   Optional. A list of one or more DTS hunks implementing the
>   binding. Note: YAML doesn't allow leading tabs, so spaces must be used instead.
> ---
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/writing-schema.rst?h=v5.9-rc2#n71

Indeed. Hence my .vimrc has:

    autocmd FileType yaml setlocal expandtab sw=2

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
index e3cdeab1199f..3eb964af37b8 100644
--- a/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
+++ b/Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml
@@ -52,11 +52,24 @@  properties:
     $ref: /schemas/types.yaml#/definitions/phandle
     description: phandle of a companion.
 
-  port:
+  ports:
     description: |
       any connector to the data bus of this controller should be modelled
       using the OF graph bindings specified, if the "usb-role-switch"
       property is used.
+    type: object
+    properties:
+      port@0:
+        type: object
+        description: High Speed (HS) data bus.
+
+      port@1:
+        type: object
+        description: Super Speed (SS) data bus.
+
+    required:
+      - port@0
+      - port@1
 
 required:
   - compatible
@@ -79,9 +92,20 @@  examples:
         companion = <&xhci0>;
         usb-role-switch;
 
-        port {
-            usb3_role_switch: endpoint {
-                remote-endpoint = <&hd3ss3220_ep>;
-            };
-        };
+    	ports {
+    		#address-cells = <1>;
+    		#size-cells = <0>;
+    		port@0 {
+    			reg = <0>;
+    			usb3_hs_ep: endpoint {
+    				remote-endpoint = <&hs_ep>;
+    			};
+    		};
+    		port@1 {
+    			reg = <1>;
+    			usb3_role_switch: endpoint {
+    				remote-endpoint = <&hd3ss3220_out_ep>;
+    			};
+    		};
+    	};
     };