diff mbox

[v2,1/2] usb: renesas_usbhs: add fallback compatibility strings

Message ID 1449726033-17117-2-git-send-email-horms+renesas@verge.net.au (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show

Commit Message

Simon Horman Dec. 10, 2015, 5:40 a.m. UTC
Add fallback compatibility strings for R-Car Gen2 and Gen3.
This is in keeping with the fallback scheme being adopted wherever
appropriate for drivers for Renesas SoCs.

Also add SoC names.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
v2
* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
  a single compatibility string for all of R-Car.
---
 .../devicetree/bindings/usb/renesas_usbhs.txt          | 18 +++++++++++++-----
 drivers/usb/renesas_usbhs/common.c                     |  9 +++++++++
 2 files changed, 22 insertions(+), 5 deletions(-)

Comments

Kuninori Morimoto Dec. 10, 2015, 7:28 a.m. UTC | #1
Hi Simon

Thank you for your patch

> Add fallback compatibility strings for R-Car Gen2 and Gen3.
> This is in keeping with the fallback scheme being adopted wherever
> appropriate for drivers for Renesas SoCs.
> 
> Also add SoC names.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
(snip)
>  Required properties:
>    - compatible: Must contain one of the following:
> -	- "renesas,usbhs-r8a7790"
> -	- "renesas,usbhs-r8a7791"
> -	- "renesas,usbhs-r8a7794"
> -	- "renesas,usbhs-r8a7795"
> +
> +	- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
> +	- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
> +	- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
> +	- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
> +	- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatibile device
> +	- "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatibile device
> +
> +	When compatible with the generic version, nodes must list the
> +	SoC-specific version corresponding to the platform first followed
> +	by the generic version.

I think these can be separated ?

 1. document update for "renesas,usbhs-r8a77xx"
 2. add new "rcar-genX" (this patch)

>  Example:
>  	usbhs: usb@e6590000 {
> -		compatible = "renesas,usbhs-r8a7790";
> +		compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";

I think you want

 -		compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";
 +		compatible = "renesas,usbhs-r8a7790", "renesas,rcar-gen2-usbhs";
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov Dec. 10, 2015, 11:59 a.m. UTC | #2
Hello.

On 12/10/2015 8:40 AM, Simon Horman wrote:

> Add fallback compatibility strings for R-Car Gen2 and Gen3.
> This is in keeping with the fallback scheme being adopted wherever
> appropriate for drivers for Renesas SoCs.
>
> Also add SoC names.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> v2
> * Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
>    a single compatibility string for all of R-Car.
> ---
>   .../devicetree/bindings/usb/renesas_usbhs.txt          | 18 +++++++++++++-----
>   drivers/usb/renesas_usbhs/common.c                     |  9 +++++++++
>   2 files changed, 22 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> index 7d48f63db44e..b959059826cd 100644
> --- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> +++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
[...]
> @@ -22,7 +30,7 @@ Optional properties:
>
>   Example:
>   	usbhs: usb@e6590000 {
> -		compatible = "renesas,usbhs-r8a7790";
> +		compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";

    You forgot "gen2-" here.

[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman Dec. 11, 2015, 1:09 a.m. UTC | #3
On Thu, Dec 10, 2015 at 07:28:06AM +0000, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> Thank you for your patch
> 
> > Add fallback compatibility strings for R-Car Gen2 and Gen3.
> > This is in keeping with the fallback scheme being adopted wherever
> > appropriate for drivers for Renesas SoCs.
> > 
> > Also add SoC names.
> > 
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > ---
> (snip)
> >  Required properties:
> >    - compatible: Must contain one of the following:
> > -	- "renesas,usbhs-r8a7790"
> > -	- "renesas,usbhs-r8a7791"
> > -	- "renesas,usbhs-r8a7794"
> > -	- "renesas,usbhs-r8a7795"
> > +
> > +	- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
> > +	- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
> > +	- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
> > +	- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
> > +	- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatibile device
> > +	- "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatibile device
> > +
> > +	When compatible with the generic version, nodes must list the
> > +	SoC-specific version corresponding to the platform first followed
> > +	by the generic version.
> 
> I think these can be separated ?
> 
>  1. document update for "renesas,usbhs-r8a77xx"
>  2. add new "rcar-genX" (this patch)

Sure, will do.

> >  Example:
> >  	usbhs: usb@e6590000 {
> > -		compatible = "renesas,usbhs-r8a7790";
> > +		compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";
> 
> I think you want
> 
>  -		compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";
>  +		compatible = "renesas,usbhs-r8a7790", "renesas,rcar-gen2-usbhs";

Thanks, I will fix that.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index 7d48f63db44e..b959059826cd 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -2,10 +2,18 @@  Renesas Electronics USBHS driver
 
 Required properties:
   - compatible: Must contain one of the following:
-	- "renesas,usbhs-r8a7790"
-	- "renesas,usbhs-r8a7791"
-	- "renesas,usbhs-r8a7794"
-	- "renesas,usbhs-r8a7795"
+
+	- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
+	- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
+	- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
+	- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
+	- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatibile device
+	- "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatibile device
+
+	When compatible with the generic version, nodes must list the
+	SoC-specific version corresponding to the platform first followed
+	by the generic version.
+
   - reg: Base address and length of the register for the USBHS
   - interrupts: Interrupt specifier for the USBHS
   - clocks: A list of phandle + clock specifier pairs
@@ -22,7 +30,7 @@  Optional properties:
 
 Example:
 	usbhs: usb@e6590000 {
-		compatible = "renesas,usbhs-r8a7790";
+		compatible = "renesas,usbhs-r8a7790", "renesas,rcar-usbhs";
 		reg = <0 0xe6590000 0 0x100>;
 		interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp7_clks R8A7790_CLK_HSUSB>;
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index d82fa36c3465..db9a17bd8997 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -481,6 +481,15 @@  static const struct of_device_id usbhs_of_match[] = {
 		.compatible = "renesas,usbhs-r8a7795",
 		.data = (void *)USBHS_TYPE_RCAR_GEN2,
 	},
+	{
+		.compatible = "renesas,rcar-gen2-usbhs",
+		.data = (void *)USBHS_TYPE_RCAR_GEN2,
+	},
+	{
+		/* Gen3 is compatible with Gen2 */
+		.compatible = "renesas,rcar-gen3-usbhs",
+		.data = (void *)USBHS_TYPE_RCAR_GEN2,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, usbhs_of_match);