Re: [PATCH DNI v4 13/13] media: rcar-fcp: Check device revision at probe time
From: Niklas Söderlund
Date: Wed Dec 02 2026 - 11:56:09 EST
On 2026-12-02 11:59:19 +0900, Laurent Pinchart wrote:
> 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 ?
I added a print,
diff --git a/drivers/media/platform/renesas/rcar-fcp.c b/drivers/media/platform/renesas/rcar-fcp.c
index 93584fdc19cf..132fbc4e0bdf 100644
--- a/drivers/media/platform/renesas/rcar-fcp.c
+++ b/drivers/media/platform/renesas/rcar-fcp.c
@@ -235,6 +235,8 @@ static int rcar_fcp_setup(struct rcar_fcp_device *fcp)
/* Check the device version register. */
version = rcar_fcp_read(fcp, RCAR_FCP_REG_VCR);
+ pr_err("version: 0x%08x\n", version);
+
for (i = 0; i < ARRAY_SIZE(versions); ++i) {
if (versions[i].version == version)
break;
And got this,
[ 3.010125] version: 0x00000109
[ 3.040161] version: 0x00000109
[ 3.057781] version: 0x00000109
[ 3.075450] version: 0x00000109
[ 3.093067] version: 0x00000109
[ 3.110683] version: 0x00000109
So 9 seems to be correct?
>
> > > +#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
--
Kind Regards,
Niklas Söderlund