Re: [PATCH DNI v4 13/13] media: rcar-fcp: Check device revision at probe time
From: Geert Uytterhoeven
Date: Mon Nov 09 2026 - 09:21:40 EST
Hi Paul,
On Mon, 9 Nov 2026 at 14:36, Paul Elder
<paul.elder+renesas@xxxxxxxxxxxxxxxx> 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.
> +#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.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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