Re: [PATCH DNI v4 13/13] media: rcar-fcp: Check device revision at probe time

From: Laurent Pinchart

Date: Tue Dec 01 2026 - 21:59:43 EST


CC'ing Niklas.

On Mon, Nov 09, 2026 at 03:10:41PM +0100, Geert Uytterhoeven wrote:
> On Mon, 9 Nov 2026 at 14:36, Paul Elder wrote:
> > From: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
> >
> > Verify that the device revision register reports a valid value,
> > otherwise reject the device.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
> > Signed-off-by: Paul Elder <paul.elder+renesas@xxxxxxxxxxxxxxxx>
>
> Thanks for the update!
>
> > ---
> > Changes since v2:
>
> You missed the changes since v3...
>
> > --- a/drivers/media/platform/renesas/rcar-fcp.c
> > +++ b/drivers/media/platform/renesas/rcar-fcp.c
> > @@ -14,28 +14,80 @@
>
> >
> > -#define RCAR_FCP_REG_RST 0x0010
> > -#define RCAR_FCP_REG_RST_SOFTRST BIT(0)
> > -#define RCAR_FCP_REG_STA 0x0018
> > -#define RCAR_FCP_REG_STA_ACT BIT(0)
> > +#define RCAR_FCP_REG_VCR 0x0000
> > +#define RCAR_FCP_REG_VCR_CATEGORY (1 << 8)
> > +#define RCAR_FCP_REG_VCR_REVISION_H3_ES1 (1 << 0)
> > +#define RCAR_FCP_REG_VCR_REVISION_M3W (2 << 0)
> > +#define RCAR_FCP_REG_VCR_REVISION_V3M (3 << 0)
> > +#define RCAR_FCP_REG_VCR_REVISION_H3 (4 << 0)
> > +#define RCAR_FCP_REG_VCR_REVISION_D3 (5 << 0)
> > +#define RCAR_FCP_REG_VCR_REVISION_M3N (6 << 0)
> > +#define RCAR_FCP_REG_VCR_REVISION_V3H (7 << 0)
> > +#define RCAR_FCP_REG_VCR_REVISION_E3 (8 << 0)
>
> For R-Car V3U, the revision number is 9 (according to the documentation,
> I haven't boot-verified this), which is missing.

Niklas, do you still have a Falkon board ? Would you be able to read the
value of the RCAR_FCP_REG_VCR register ?

> > +#define RCAR_FCP_REG_VCR_REVISION_V4H (10 << 0)
> > +#define RCAR_FCP_REG_VCR_REVISION_V4M (11 << 0)
> > +#define RCAR_FCP_REG_VCR_REVISION_X5H_V1 (12 << 0)
>
> "git grep -l renesas,fcp -- arch/arm64/boot/dts/renesas/*dtsi"
> shows a few more SoCs having FCP blocks.
>
> Interestingly, the documentation for all of the recent RZ parts (G2UL,
> G2L, V2L, G3L, G3E, V2N, V2H, T2H, N2H) claims they use 9, just like
> R-Car V3U.

--
Regards,

Laurent Pinchart