Message ID | 20240624144108.1771189-2-niklas.soderlund+renesas@ragnatech.se (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | rcar-vin: Add support for R-Car V4M | expand |
On Mon, Jun 24, 2024 at 04:41:04PM +0200, Niklas Söderlund wrote: > The two Gen4 SoCs released (V4H and V4M) that have a video capture > pipeline the VIN IP are very similar. > > The datasheet for the two SoCs have small nuances around the Pre-Clip > registers ELPrC and EPPrC in three use-cases, interlaced images, > embedded data and RAW8 input. On V4H the values written to the registers > are based on odd numbers while on V4M they are even numbers, values are > based on the input image size. No board that uses these SoCs which also > have the external peripherals to test these nuances exists. Most likely > this is an issue in the datasheet. > > Before adding bindings for V4M add a family compatible fallback for > Gen4. That way the driver only needs to be updated once for Gen4, and we > still have the option to fix any problems in the driver if any testable > differences between the two SoCs is found. > > There are already DTS files using the renesas,vin-r8a779g0 compatible > which needs to be updated to not produce a warning for DTS checks. And > the driver will need to kept compatible with renesas,vin-r8a779g0, but > for new Gen4 SoCs such as V4M we can avoid this. > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Same caveat here. Using the g model as a fallback is, as we already discussed, an option too and would be less disruptive. Acked-by: Conor Dooley <conor.dooley@microchip.com> > --- > * Changes since v3 > - New in v4. > --- > Documentation/devicetree/bindings/media/renesas,vin.yaml | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Documentation/devicetree/bindings/media/renesas,vin.yaml b/Documentation/devicetree/bindings/media/renesas,vin.yaml > index 5539d0f8e74d..c3ef4fde7baf 100644 > --- a/Documentation/devicetree/bindings/media/renesas,vin.yaml > +++ b/Documentation/devicetree/bindings/media/renesas,vin.yaml > @@ -53,7 +53,10 @@ properties: > - renesas,vin-r8a77990 # R-Car E3 > - renesas,vin-r8a77995 # R-Car D3 > - renesas,vin-r8a779a0 # R-Car V3U > + - items: > + - enum: > - renesas,vin-r8a779g0 # R-Car V4H > + - const: renesas,rcar-gen4-vin # Generic R-Car Gen4 > > reg: > maxItems: 1 > -- > 2.45.2 >
Hi Niklas, On Mon, Jun 24, 2024 at 4:43 PM Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> wrote: > The two Gen4 SoCs released (V4H and V4M) that have a video capture > pipeline the VIN IP are very similar. > > The datasheet for the two SoCs have small nuances around the Pre-Clip > registers ELPrC and EPPrC in three use-cases, interlaced images, > embedded data and RAW8 input. On V4H the values written to the registers > are based on odd numbers while on V4M they are even numbers, values are > based on the input image size. No board that uses these SoCs which also > have the external peripherals to test these nuances exists. Most likely > this is an issue in the datasheet. > > Before adding bindings for V4M add a family compatible fallback for > Gen4. That way the driver only needs to be updated once for Gen4, and we > still have the option to fix any problems in the driver if any testable > differences between the two SoCs is found. > > There are already DTS files using the renesas,vin-r8a779g0 compatible > which needs to be updated to not produce a warning for DTS checks. And > the driver will need to kept compatible with renesas,vin-r8a779g0, but > for new Gen4 SoCs such as V4M we can avoid this. > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > --- > * Changes since v3 > - New in v4. Thanks for your patch! > --- a/Documentation/devicetree/bindings/media/renesas,vin.yaml > +++ b/Documentation/devicetree/bindings/media/renesas,vin.yaml > @@ -53,7 +53,10 @@ properties: > - renesas,vin-r8a77990 # R-Car E3 > - renesas,vin-r8a77995 # R-Car D3 > - renesas,vin-r8a779a0 # R-Car V3U I think R-Car V3U should be moved below, too, as it's the first member of the R-Car Gen4 family, despite the name. > + - items: > + - enum: > - renesas,vin-r8a779g0 # R-Car V4H > + - const: renesas,rcar-gen4-vin # Generic R-Car Gen4 If all differences in the pipeline can be devised from the topology in DT: Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > > reg: > maxItems: 1 Gr{oetje,eeting}s, Geert
Hi Geert, Thanks for your review. On 2024-07-02 09:52:08 +0200, Geert Uytterhoeven wrote: > Hi Niklas, > > On Mon, Jun 24, 2024 at 4:43 PM Niklas Söderlund > <niklas.soderlund+renesas@ragnatech.se> wrote: > > The two Gen4 SoCs released (V4H and V4M) that have a video capture > > pipeline the VIN IP are very similar. > > > > The datasheet for the two SoCs have small nuances around the Pre-Clip > > registers ELPrC and EPPrC in three use-cases, interlaced images, > > embedded data and RAW8 input. On V4H the values written to the registers > > are based on odd numbers while on V4M they are even numbers, values are > > based on the input image size. No board that uses these SoCs which also > > have the external peripherals to test these nuances exists. Most likely > > this is an issue in the datasheet. > > > > Before adding bindings for V4M add a family compatible fallback for > > Gen4. That way the driver only needs to be updated once for Gen4, and we > > still have the option to fix any problems in the driver if any testable > > differences between the two SoCs is found. > > > > There are already DTS files using the renesas,vin-r8a779g0 compatible > > which needs to be updated to not produce a warning for DTS checks. And > > the driver will need to kept compatible with renesas,vin-r8a779g0, but > > for new Gen4 SoCs such as V4M we can avoid this. > > > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > > --- > > * Changes since v3 > > - New in v4. > > Thanks for your patch! > > > --- a/Documentation/devicetree/bindings/media/renesas,vin.yaml > > +++ b/Documentation/devicetree/bindings/media/renesas,vin.yaml > > @@ -53,7 +53,10 @@ properties: > > - renesas,vin-r8a77990 # R-Car E3 > > - renesas,vin-r8a77995 # R-Car D3 > > - renesas,vin-r8a779a0 # R-Car V3U > > I think R-Car V3U should be moved below, too, as it's the first > member of the R-Car Gen4 family, despite the name. I was a bit conflicted about if I should do this and opted to for the least intrusive change. But the change seems to have landed on a good note, I will do a new version that covers V3U as well. > > > + - items: > > + - enum: > > - renesas,vin-r8a779g0 # R-Car V4H > > + - const: renesas,rcar-gen4-vin # Generic R-Car Gen4 > > If all differences in the pipeline can be devised from the topology > in DT: It can. > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Thanks! > > > > > reg: > > maxItems: 1 > > 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 --git a/Documentation/devicetree/bindings/media/renesas,vin.yaml b/Documentation/devicetree/bindings/media/renesas,vin.yaml index 5539d0f8e74d..c3ef4fde7baf 100644 --- a/Documentation/devicetree/bindings/media/renesas,vin.yaml +++ b/Documentation/devicetree/bindings/media/renesas,vin.yaml @@ -53,7 +53,10 @@ properties: - renesas,vin-r8a77990 # R-Car E3 - renesas,vin-r8a77995 # R-Car D3 - renesas,vin-r8a779a0 # R-Car V3U + - items: + - enum: - renesas,vin-r8a779g0 # R-Car V4H + - const: renesas,rcar-gen4-vin # Generic R-Car Gen4 reg: maxItems: 1
The two Gen4 SoCs released (V4H and V4M) that have a video capture pipeline the VIN IP are very similar. The datasheet for the two SoCs have small nuances around the Pre-Clip registers ELPrC and EPPrC in three use-cases, interlaced images, embedded data and RAW8 input. On V4H the values written to the registers are based on odd numbers while on V4M they are even numbers, values are based on the input image size. No board that uses these SoCs which also have the external peripherals to test these nuances exists. Most likely this is an issue in the datasheet. Before adding bindings for V4M add a family compatible fallback for Gen4. That way the driver only needs to be updated once for Gen4, and we still have the option to fix any problems in the driver if any testable differences between the two SoCs is found. There are already DTS files using the renesas,vin-r8a779g0 compatible which needs to be updated to not produce a warning for DTS checks. And the driver will need to kept compatible with renesas,vin-r8a779g0, but for new Gen4 SoCs such as V4M we can avoid this. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> --- * Changes since v3 - New in v4. --- Documentation/devicetree/bindings/media/renesas,vin.yaml | 3 +++ 1 file changed, 3 insertions(+)