From: Biju Das Add support for Renesas RZ/G3L CANFD IP. RZ/G3L has 3 channels and 11 interrupts, compared 2 channels and 8 interrupts on RZ/G3S. RZ/G3L has 288 buffers compared to 192 buffers on RZ/G3S. Like RZ/G3S, the controller supports only CAN-FD mode and update the comments to note that Classical CAN mode is not available on RZ/G3L either. Signed-off-by: Biju Das Link: https://patch.msgid.link/20261021-canfd_rzg3l-v6-4-b4abfdba8e70@bp.renesas.com Signed-off-by: Marc Kleine-Budde --- drivers/net/can/rcar/rcar_canfd.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c index 072987316cc7..7333ee98aa92 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -6,7 +6,7 @@ /* The R-Car CAN FD controller can operate in either one of the below two modes * - CAN FD only mode - * - Classical CAN (CAN 2.0) only mode (Except RZ/G3S) + * - Classical CAN (CAN 2.0) only mode (Except RZ/G3{L,S}) * * This driver puts the controller in CAN FD only mode by default. In this * mode, the controller acts as a CAN FD node that can also interoperate with @@ -247,10 +247,10 @@ #define RCANFD_CFFDCSTS_CFBRS BIT(1) #define RCANFD_CFFDCSTS_CFESI BIT(0) -/* This controller supports either Classical CAN only mode(Except RZ/G3S) or - * CAN FD only mode. These modes are supported in two separate set of register - * maps & names. However, some of the register offsets are common for both - * modes. Those offsets are listed below as Common registers. +/* This controller supports either Classical CAN only mode(Except RZ/G3{L,S}) + * or CAN FD only mode. These modes are supported in two separate set of + * register maps & names. However, some of the register offsets are common for + * both modes. Those offsets are listed below as Common registers. * * The CAN FD only mode specific registers & Classical CAN only mode specific * registers are listed separately. Their register names starts with @@ -681,6 +681,26 @@ static const struct rcar_canfd_hw_info r9a08g045_hw_info = { .fixed_canfd = 1, }; +static const struct rcar_canfd_hw_info r9a08g046_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 = 15, + .max_cftml = 31, + .max_channels = 3, + .postdiv = 2, + .shared_global_irqs = 0, + .multi_channel_irqs = 1, + .ch_interface_mode = 1, + .shared_can_regs = 1, + .external_clk = 1, + .fcan_pclk = 1, + .fixed_canfd = 1, +}; + static const struct rcar_canfd_hw_info r9a09g047_hw_info = { .nom_bittiming = &rcar_canfd_gen4_nom_bittiming_const, .data_bittiming = &rcar_canfd_gen4_data_bittiming_const, @@ -2407,6 +2427,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(rcar_canfd_pm_ops, rcar_canfd_suspend, static const __maybe_unused struct of_device_id rcar_canfd_of_table[] = { { .compatible = "renesas,r8a779a0-canfd", .data = &rcar_gen4_hw_info }, { .compatible = "renesas,r9a08g045-canfd", .data = &r9a08g045_hw_info }, + { .compatible = "renesas,r9a08g046-canfd", .data = &r9a08g046_hw_info }, { .compatible = "renesas,r9a09g047-canfd", .data = &r9a09g047_hw_info }, { .compatible = "renesas,r9a09g077-canfd", .data = &r9a09g077_hw_info }, { .compatible = "renesas,rcar-gen3-canfd", .data = &rcar_gen3_hw_info }, -- 2.53.0