diff mbox series

[4.19.y,13/29] media: rcar-csi2: Add support for RZ/G2E

Message ID 1556706143-11898-14-git-send-email-fabrizio.castro@bp.renesas.com (mailing list archive)
State Accepted
Headers show
Series Add further support for the RZ/G2M | expand

Commit Message

Fabrizio Castro May 1, 2019, 10:22 a.m. UTC
commit 8809b8ceb0bd283c0528a0c7233656b12bcda2dc upstream.

According to the RZ/G2 User's manual, RZ/G2E and R-Car E3 CSI-2
blocks are identical, therefore use R-Car E3 definitions to add
RZ/G2E support.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/platform/rcar-vin/rcar-csi2.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Pavel Machek May 2, 2019, 9:29 p.m. UTC | #1
On Wed 2019-05-01 11:22:07, Fabrizio Castro wrote:
> commit 8809b8ceb0bd283c0528a0c7233656b12bcda2dc upstream.
> 
> According to the RZ/G2 User's manual, RZ/G2E and R-Car E3 CSI-2
> blocks are identical, therefore use R-Car E3 definitions to add
> RZ/G2E support.

> diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c
> index d409ba3..007e238 100644
> --- a/drivers/media/platform/rcar-vin/rcar-csi2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
> @@ -975,6 +975,10 @@ static const struct rcar_csi2_info rcar_csi2_info_r8a77990 = {
>  
>  static const struct of_device_id rcar_csi2_of_table[] = {
>  	{
> +		.compatible = "renesas,r8a774c0-csi2",
> +		.data = &rcar_csi2_info_r8a77990,
> +	},
> +	{
>  		.compatible = "renesas,r8a7795-csi2",
>  		.data = &rcar_csi2_info_r8a7795,
>  	},

Would common compatible "renesas,something...-generation2-csi2" make sense?
									Pavel
Fabrizio Castro May 3, 2019, 9:40 a.m. UTC | #2
Hi Pavel,

Thank you for your feedback!

> From: Pavel Machek <pavel@denx.de>
> Sent: 02 May 2019 22:30
> Subject: Re: [cip-dev] [PATCH 4.19.y 13/29] media: rcar-csi2: Add support for RZ/G2E
> 
> On Wed 2019-05-01 11:22:07, Fabrizio Castro wrote:
> > commit 8809b8ceb0bd283c0528a0c7233656b12bcda2dc upstream.
> >
> > According to the RZ/G2 User's manual, RZ/G2E and R-Car E3 CSI-2
> > blocks are identical, therefore use R-Car E3 definitions to add
> > RZ/G2E support.
> 
> > diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c
> > index d409ba3..007e238 100644
> > --- a/drivers/media/platform/rcar-vin/rcar-csi2.c
> > +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
> > @@ -975,6 +975,10 @@ static const struct rcar_csi2_info rcar_csi2_info_r8a77990 = {
> >
> >  static const struct of_device_id rcar_csi2_of_table[] = {
> >  	{
> > +		.compatible = "renesas,r8a774c0-csi2",
> > +		.data = &rcar_csi2_info_r8a77990,
> > +	},
> > +	{
> >  		.compatible = "renesas,r8a7795-csi2",
> >  		.data = &rcar_csi2_info_r8a7795,
> >  	},
> 
> Would common compatible "renesas,something...-generation2-csi2" make sense?

It is usually the case, but unfortunately with this IP every SoC needs some sort of part number specific
configuration. We reuse rcar_csi2_info_r8a77990 here only because the r8a774c0 and the r8a77990
come with the same implementation for CSI2.

Thanks,
Fab

> 									Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
diff mbox series

Patch

diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c
index d409ba3..007e238 100644
--- a/drivers/media/platform/rcar-vin/rcar-csi2.c
+++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
@@ -975,6 +975,10 @@  static const struct rcar_csi2_info rcar_csi2_info_r8a77990 = {
 
 static const struct of_device_id rcar_csi2_of_table[] = {
 	{
+		.compatible = "renesas,r8a774c0-csi2",
+		.data = &rcar_csi2_info_r8a77990,
+	},
+	{
 		.compatible = "renesas,r8a7795-csi2",
 		.data = &rcar_csi2_info_r8a7795,
 	},