[PATCH 4/9] can: rcar_canfd: Add support for R-Car Gen5
Geert Uytterhoeven
geert at linux-m68k.org
Fri Oct 30 03:19:16 PDT 2026
On Thu, 29 Oct 2026 at 14:11, Geert Uytterhoeven
<geert+renesas at glider.be> wrote:
> The CAN-FD block on R-Car Gen5 is similar to the variant on R-Car Gen4,
> but uses split global and per-channel interrupts, like on RZ/G2L.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
> --- a/drivers/net/can/rcar/rcar_canfd.c
> +++ b/drivers/net/can/rcar/rcar_canfd.c
> @@ -636,6 +636,23 @@ static const struct rcar_canfd_hw_info rcar_gen4_hw_info = {
> .external_clk = 1,
> };
>
> +static const struct rcar_canfd_hw_info rcar_gen5_hw_info = {
> + .nom_bittiming = &rcar_canfd_gen4_nom_bittiming_const,
> + .data_bittiming = &rcar_canfd_gen4_data_bittiming_const,
> + .tdc_const = &rcar_canfd_gen4_tdc_const,
> + .regs = &rcar_gen4_regs,
> + .sh = &rcar_gen4_shift_data,
> + .rnc_field_width = 16,
> + .max_aflpn = 127,
> + .max_cftml = 31,
> + .max_channels = 8,
> + .postdiv = 2,
R-Car X5H does not have the /2 postdivider, so this should be one.
Else the bitrate is twice as fast as intended when the external can_clk
is not available.
> + .multi_channel_irqs = 1,
> + .ch_interface_mode = 1,
> + .shared_can_regs = 1,
> + .external_clk = 1,
> +};
> +
> static const struct rcar_canfd_hw_info rzg2l_hw_info = {
> .nom_bittiming = &rcar_canfd_gen3_nom_bittiming_const,
> .data_bittiming = &rcar_canfd_gen3_data_bittiming_const,
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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
More information about the linux-arm-kernel
mailing list