diff mbox series

media: rcar-csi2: Enable support for r8a77961

Message ID 20210312132459.1754782-1-niklas.soderlund+renesas@ragnatech.se
State Superseded
Headers show
Series media: rcar-csi2: Enable support for r8a77961 | expand

Commit Message

Niklas Söderlund March 12, 2021, 1:24 p.m. UTC
Enable support for M3-W+ (r8a77961).

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/media/platform/rcar-vin/rcar-csi2.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Niklas Söderlund March 17, 2021, 9:16 a.m. UTC | #1
Hello,

On 2021-03-12 14:24:59 +0100, Niklas Söderlund wrote:
> Enable support for M3-W+ (r8a77961).

> 

> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>


I have off-band received a tag for this patch,

Tested-by: LUU HOAI <hoai.luu.ub@renesas.com>


> ---

>  drivers/media/platform/rcar-vin/rcar-csi2.c | 4 ++++

>  1 file changed, 4 insertions(+)

> 

> diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c

> index e06cd512aba207a4..71ff20a165d66547 100644

> --- a/drivers/media/platform/rcar-vin/rcar-csi2.c

> +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c

> @@ -1164,6 +1164,10 @@ static const struct of_device_id rcar_csi2_of_table[] = {

>  		.compatible = "renesas,r8a7796-csi2",

>  		.data = &rcar_csi2_info_r8a7796,

>  	},

> +	{

> +		.compatible = "renesas,r8a77961-csi2",

> +		.data = &rcar_csi2_info_r8a7796,

> +	},

>  	{

>  		.compatible = "renesas,r8a77965-csi2",

>  		.data = &rcar_csi2_info_r8a77965,

> -- 

> 2.30.1

> 


-- 
Regards,
Niklas Söderlund
Geert Uytterhoeven March 23, 2021, 2:53 p.m. UTC | #2
Hi Niklas,

On Fri, Mar 12, 2021 at 2:26 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> Enable support for M3-W+ (r8a77961).

>

> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>


Thanks for your patch!

> --- a/drivers/media/platform/rcar-vin/rcar-csi2.c

> +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c

> @@ -1164,6 +1164,10 @@ static const struct of_device_id rcar_csi2_of_table[] = {

>                 .compatible = "renesas,r8a7796-csi2",

>                 .data = &rcar_csi2_info_r8a7796,

>         },

> +       {

> +               .compatible = "renesas,r8a77961-csi2",

> +               .data = &rcar_csi2_info_r8a7796,


Hence CSI2 on R-Car M3-W+ is handled the same way as R-Car M3-W.
I don't know what this means for the driver, but according to Technical
Update TN-RCT-S0359A/E, R-Car M3-W+ supports lane settings 4/2/1 on
CSI40/41 (like most other R-Car Gen3 SoCs), while R-Car M3-W supports
only lane setting 4 on CSI40/41.

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
Niklas Söderlund March 24, 2021, 1:54 p.m. UTC | #3
Hi Geert,

Thanks for your feedback.

On 2021-03-23 15:53:27 +0100, Geert Uytterhoeven wrote:
> Hi Niklas,

> 

> On Fri, Mar 12, 2021 at 2:26 PM Niklas Söderlund

> <niklas.soderlund+renesas@ragnatech.se> wrote:

> > Enable support for M3-W+ (r8a77961).

> >

> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> 

> Thanks for your patch!

> 

> > --- a/drivers/media/platform/rcar-vin/rcar-csi2.c

> > +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c

> > @@ -1164,6 +1164,10 @@ static const struct of_device_id rcar_csi2_of_table[] = {

> >                 .compatible = "renesas,r8a7796-csi2",

> >                 .data = &rcar_csi2_info_r8a7796,

> >         },

> > +       {

> > +               .compatible = "renesas,r8a77961-csi2",

> > +               .data = &rcar_csi2_info_r8a7796,

> 

> Hence CSI2 on R-Car M3-W+ is handled the same way as R-Car M3-W.

> I don't know what this means for the driver, but according to Technical

> Update TN-RCT-S0359A/E, R-Car M3-W+ supports lane settings 4/2/1 on

> CSI40/41 (like most other R-Car Gen3 SoCs), while R-Car M3-W supports

> only lane setting 4 on CSI40/41.


This is a great find.

The table TN-RCT-S0359A/E correct was not present in datasheets before 
v0.80 so it have completely been missed. The trouble is that the current 
driver does the wrong thing for M3-W (and allows 4/2/1 lanes) and this 
this patch would be correct for M3-W+ while still leaving M3-W 
incorrect.

I will resping this series to first correct the M3-W behavior and then 
add M3-W on-top.

> 

> 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


-- 
Regards,
Niklas Söderlund
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 e06cd512aba207a4..71ff20a165d66547 100644
--- a/drivers/media/platform/rcar-vin/rcar-csi2.c
+++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
@@ -1164,6 +1164,10 @@  static const struct of_device_id rcar_csi2_of_table[] = {
 		.compatible = "renesas,r8a7796-csi2",
 		.data = &rcar_csi2_info_r8a7796,
 	},
+	{
+		.compatible = "renesas,r8a77961-csi2",
+		.data = &rcar_csi2_info_r8a7796,
+	},
 	{
 		.compatible = "renesas,r8a77965-csi2",
 		.data = &rcar_csi2_info_r8a77965,