diff mbox

usb: renesas_usbhs: Add support for R-Car H3

Message ID 1442556232-6564-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
State Superseded, archived
Headers show

Commit Message

Yoshihiro Shimoda Sept. 18, 2015, 6:03 a.m. UTC
This patch adds a compatible string to support for R-Car H3.

Since the HS-USB controller of R-Car H3 is almost the same specification
with R-Car Gen2 (these have 16 pipes and usb-dmac), this patch
sets the "type" of renesas_usbhs_driver_param to USBHS_TYPE_RCAR_GEN2.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 This patch is based on the latest Felipe's usb.git / testing/next
branch (The commit id = b1ede0faf6e4961842f80e5e2fc1bf5373fef235).

 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 1 +
 drivers/usb/renesas_usbhs/common.c                      | 4 ++++
 2 files changed, 5 insertions(+)

Comments

Kuninori Morimoto Sept. 18, 2015, 8:25 a.m. UTC | #1
Hi Shimoda-san

> This patch adds a compatible string to support for R-Car H3.
> 
> Since the HS-USB controller of R-Car H3 is almost the same specification
> with R-Car Gen2 (these have 16 pipes and usb-dmac), this patch
> sets the "type" of renesas_usbhs_driver_param to USBHS_TYPE_RCAR_GEN2.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
(snip)
> diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
> index 7b98e1d..2becd6b 100644
> --- a/drivers/usb/renesas_usbhs/common.c
> +++ b/drivers/usb/renesas_usbhs/common.c
> @@ -476,6 +476,10 @@ static const struct of_device_id usbhs_of_match[] = {
>  		.compatible = "renesas,usbhs-r8a7794",
>  		.data = (void *)USBHS_TYPE_RCAR_GEN2,
>  	},
> +	{
> +		.compatible = "renesas,usbhs-r8a7795",
> +		.data = (void *)USBHS_TYPE_RCAR_GEN2,
> +	},

It is helpful for user if it is indicating Gen2 compatible.
Because r8a7795 is Gen3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yoshihiro Shimoda Sept. 28, 2015, 11:48 a.m. UTC | #2
Hi Morimoto-san,

Thank you for the comment.
And, I'm sorry for the delayed response.

> Sent: Friday, September 18, 2015 5:25 PM
> 
> Hi Shimoda-san
> 
> > This patch adds a compatible string to support for R-Car H3.
> >
> > Since the HS-USB controller of R-Car H3 is almost the same specification
> > with R-Car Gen2 (these have 16 pipes and usb-dmac), this patch
> > sets the "type" of renesas_usbhs_driver_param to USBHS_TYPE_RCAR_GEN2.
> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > ---
> (snip)
> > diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
> > index 7b98e1d..2becd6b 100644
> > --- a/drivers/usb/renesas_usbhs/common.c
> > +++ b/drivers/usb/renesas_usbhs/common.c
> > @@ -476,6 +476,10 @@ static const struct of_device_id usbhs_of_match[] = {
> >  		.compatible = "renesas,usbhs-r8a7794",
> >  		.data = (void *)USBHS_TYPE_RCAR_GEN2,
> >  	},
> > +	{
> > +		.compatible = "renesas,usbhs-r8a7795",
> > +		.data = (void *)USBHS_TYPE_RCAR_GEN2,
> > +	},
> 
> It is helpful for user if it is indicating Gen2 compatible.
> Because r8a7795 is Gen3

So, I will add a comment in the code like the followings:

{
	/* Gen3 is compatible with Gen2 */
	.compatible = "renesas,usbhs-r8a7795",
	.data = (void *)USBHS_TYPE_RCAR_GEN2,
},

Best regards,
Yoshihiro Shimoda

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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 64a4ca6..7d48f63 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -5,6 +5,7 @@  Required properties:
 	- "renesas,usbhs-r8a7790"
 	- "renesas,usbhs-r8a7791"
 	- "renesas,usbhs-r8a7794"
+	- "renesas,usbhs-r8a7795"
   - 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
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 7b98e1d..2becd6b 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -476,6 +476,10 @@  static const struct of_device_id usbhs_of_match[] = {
 		.compatible = "renesas,usbhs-r8a7794",
 		.data = (void *)USBHS_TYPE_RCAR_GEN2,
 	},
+	{
+		.compatible = "renesas,usbhs-r8a7795",
+		.data = (void *)USBHS_TYPE_RCAR_GEN2,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, usbhs_of_match);