diff mbox series

[3/3] dt-bindings: rcar-gen3-phy-usb2: Add r7s9210 support

Message ID 20181107173558.54481-4-chris.brandt@renesas.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series usb: renesas: rcar-gen3-usb2: Add support for RZ/A2 | expand

Commit Message

Chris Brandt Nov. 7, 2018, 5:35 p.m. UTC
Document RZ/A2 (R7S9210) SoC bindings.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
---
 Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Yoshihiro Shimoda Nov. 14, 2018, 10:53 a.m. UTC | #1
Hi Chris-san,

Thank you for the patch!

> From: Chris Brandt, Sent: Thursday, November 8, 2018 2:36 AM
> 
> Document RZ/A2 (R7S9210) SoC bindings.
> 
> Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
> ---
>  Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> index de7b5393c163..b545daf8ccb3 100644
> --- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> @@ -1,10 +1,12 @@
>  * Renesas R-Car generation 3 USB 2.0 PHY
> 
>  This file provides information on what the device node for the R-Car generation
> -3 and RZ/G2 USB 2.0 PHY contain.
> +3, RZ/G2 and RZ/A2 USB 2.0 PHY contain.
> 
>  Required properties:
> -- compatible: "renesas,usb2-phy-r8a774a1" if the device is a part of an R8A774A1
> +- compatible: "renesas,usb2-phy-r7s9210" if the device is a part of an R7S9210
> +	      SoC.
> +	      "renesas,usb2-phy-r8a774a1" if the device is a part of an R8A774A1
>  	      SoC.
>  	      "renesas,usb2-phy-r8a7795" if the device is a part of an R8A7795
>  	      SoC.
> @@ -16,8 +18,8 @@ Required properties:
>  	      R8A77990 SoC.
>  	      "renesas,usb2-phy-r8a77995" if the device is a part of an
>  	      R8A77995 SoC.
> -	      "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3 or RZ/G2
> -	      compatible device.
> +	      "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3, RZ/G2 or
> +	      RZ/A2 compatible device.
> 
>  	      When compatible with the generic version, nodes must list the
>  	      SoC-specific version corresponding to the platform first
> --
> 2.16.1

As I mentioned the PATCH 2/3, we should describe a new property "renesas,uses_usb_x1"
as optional properties here.

Best regards,
Yoshihiro Shimoda
Geert Uytterhoeven Nov. 14, 2018, 11:02 a.m. UTC | #2
Hi Chris,

On Wed, Nov 7, 2018 at 6:36 PM Chris Brandt <chris.brandt@renesas.com> wrote:
> Document RZ/A2 (R7S9210) SoC bindings.
>
> Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
> ---
>  Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> index de7b5393c163..b545daf8ccb3 100644
> --- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> @@ -1,10 +1,12 @@
>  * Renesas R-Car generation 3 USB 2.0 PHY
>
>  This file provides information on what the device node for the R-Car generation
> -3 and RZ/G2 USB 2.0 PHY contain.
> +3, RZ/G2 and RZ/A2 USB 2.0 PHY contain.
>
>  Required properties:
> -- compatible: "renesas,usb2-phy-r8a774a1" if the device is a part of an R8A774A1
> +- compatible: "renesas,usb2-phy-r7s9210" if the device is a part of an R7S9210
> +             SoC.
> +             "renesas,usb2-phy-r8a774a1" if the device is a part of an R8A774A1
>               SoC.
>               "renesas,usb2-phy-r8a7795" if the device is a part of an R8A7795
>               SoC.
> @@ -16,8 +18,8 @@ Required properties:
>               R8A77990 SoC.
>               "renesas,usb2-phy-r8a77995" if the device is a part of an
>               R8A77995 SoC.
> -             "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3 or RZ/G2
> -             compatible device.
> +             "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3, RZ/G2 or
> +             RZ/A2 compatible device.

Is it a good idea to declare RZ/A2 compatible to R-Car Gen3?
Usually we don't do that for Renesas IP cores used in different families[*].
Of course, I know you do have a good relationship with the actual RZ/A2
hardware designers ;-)

In light of Shimoda-san's comment w.r.t. R-Car H3 USB port1 in the driver
code, perhaps "renesas,rcar-gen3-usb2-phy" should not be used?

[*] Sole exceptions I'm aware of are:
      - "renesas,rmobile-iic", in addition to "renesas,rcar-gen2-iic" or
        "renesas,rcar-gen3-iic" on R-Car Gen2/3,
      - "renesas,rcar-gen2-cmt1" and "renesas,rcar-thermal" on R-Mobile APE6.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Chris Brandt Nov. 14, 2018, 11:29 a.m. UTC | #3
Hi Geert,

On Wednesday, November 14, 2018, Geert Uytterhoeven wrote:
> >  Required properties:
> > -- compatible: "renesas,usb2-phy-r8a774a1" if the device is a part of an
> R8A774A1
> > +- compatible: "renesas,usb2-phy-r7s9210" if the device is a part of an
> R7S9210
> > +             SoC.
> > +             "renesas,usb2-phy-r8a774a1" if the device is a part of an
> R8A774A1
> >               SoC.
> >               "renesas,usb2-phy-r8a7795" if the device is a part of an
> R8A7795
> >               SoC.
> > @@ -16,8 +18,8 @@ Required properties:
> >               R8A77990 SoC.
> >               "renesas,usb2-phy-r8a77995" if the device is a part of an
> >               R8A77995 SoC.
> > -             "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3 or
> RZ/G2
> > -             compatible device.
> > +             "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3,
> RZ/G2 or
> > +             RZ/A2 compatible device.
> 
> Is it a good idea to declare RZ/A2 compatible to R-Car Gen3?
> Usually we don't do that for Renesas IP cores used in different
> families[*].
> Of course, I know you do have a good relationship with the actual RZ/A2
> hardware designers ;-)
> 
> In light of Shimoda-san's comment w.r.t. R-Car H3 USB port1 in the driver
> code, perhaps "renesas,rcar-gen3-usb2-phy" should not be used?

Well, I think the IP block seems the same....however...
I did point out that the COMMCTRL register defaults to a different 
value. No idea why that is. Honestly, I did not go and check all the other 
registers bits. So I guess I wonder what "compatible" really means:

"Compatible: Different, but close enough that it will work" ???

Chris
Yoshihiro Shimoda Nov. 14, 2018, 12:05 p.m. UTC | #4
Hi Geert-san,

> From: Geert Uytterhoeven, Sent: Wednesday, November 14, 2018 8:03 PM
> 
> Hi Chris,
> 
> On Wed, Nov 7, 2018 at 6:36 PM Chris Brandt <chris.brandt@renesas.com> wrote:
<snip>
> > @@ -16,8 +18,8 @@ Required properties:
> >               R8A77990 SoC.
> >               "renesas,usb2-phy-r8a77995" if the device is a part of an
> >               R8A77995 SoC.
> > -             "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3 or RZ/G2
> > -             compatible device.
> > +             "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3, RZ/G2 or
> > +             RZ/A2 compatible device.
> 
> Is it a good idea to declare RZ/A2 compatible to R-Car Gen3?
> Usually we don't do that for Renesas IP cores used in different families[*].
> Of course, I know you do have a good relationship with the actual RZ/A2
> hardware designers ;-)
> 
> In light of Shimoda-san's comment w.r.t. R-Car H3 USB port1 in the driver
> code, perhaps "renesas,rcar-gen3-usb2-phy" should not be used?

Sorry for lack explanation. 
 - The default value of COMMCTRL on each port of R-Car Gen3 is the same (0x80000000).
 - However, R-Car H3 USB port1 seems to ignore this value because
   the port always acts as host. If I changed the register to 0 on R-Car H3 ES3.0,
   the port1 can work as host.

So, I meant all "renesas,rcar-gen3-usb2-phy" devices without "is_otg_channel"
can set the COMMCTRL register to 0.

Of course, adding a new RZ/A2 family compatible is OK to me.

Best regards,
Yoshihiro Shimoda

> [*] Sole exceptions I'm aware of are:
>       - "renesas,rmobile-iic", in addition to "renesas,rcar-gen2-iic" or
>         "renesas,rcar-gen3-iic" on R-Car Gen2/3,
>       - "renesas,rcar-gen2-cmt1" and "renesas,rcar-thermal" on R-Mobile APE6.
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
index de7b5393c163..b545daf8ccb3 100644
--- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
+++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
@@ -1,10 +1,12 @@ 
 * Renesas R-Car generation 3 USB 2.0 PHY
 
 This file provides information on what the device node for the R-Car generation
-3 and RZ/G2 USB 2.0 PHY contain.
+3, RZ/G2 and RZ/A2 USB 2.0 PHY contain.
 
 Required properties:
-- compatible: "renesas,usb2-phy-r8a774a1" if the device is a part of an R8A774A1
+- compatible: "renesas,usb2-phy-r7s9210" if the device is a part of an R7S9210
+	      SoC.
+	      "renesas,usb2-phy-r8a774a1" if the device is a part of an R8A774A1
 	      SoC.
 	      "renesas,usb2-phy-r8a7795" if the device is a part of an R8A7795
 	      SoC.
@@ -16,8 +18,8 @@  Required properties:
 	      R8A77990 SoC.
 	      "renesas,usb2-phy-r8a77995" if the device is a part of an
 	      R8A77995 SoC.
-	      "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3 or RZ/G2
-	      compatible device.
+	      "renesas,rcar-gen3-usb2-phy" for a generic R-Car Gen3, RZ/G2 or
+	      RZ/A2 compatible device.
 
 	      When compatible with the generic version, nodes must list the
 	      SoC-specific version corresponding to the platform first