* [PATCH v3 0/4] Add CANFD support to R9A09G056/057/077/087 SoCs
@ 2026-01-09 12:51 Prabhakar
2026-01-09 12:51 ` [PATCH v3 1/4] dt-bindings: can: renesas,rcar-canfd: Specify reset-names Prabhakar
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Prabhakar @ 2026-01-09 12:51 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree
Cc: linux-renesas-soc, linux-kernel, Prabhakar, Biju Das,
Fabrizio Castro, Lad Prabhakar
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Hi All,
This patch series adds CANFD support to RZ/V2H(P), RZ/V2N, RZ/T2H and
RZ/N2H SoCs.
The CANFD controller on RZ/V2H(P) and RZ/V2N SoCs is similar to the one
on RZ/G3E SoC, while the CANFD controller on RZ/T2H and RZ/N2H SoCs is
similar to R-Car Gen 4 SoCs but with some differences in terms of
number of channels and AFLPN and CFTML bits.
The patch series includes:
- Specifying reset-names for RZ/G2L and RZ/G3E CANFD controllers.
- Documenting the CANFD controller on RZ/V2H(P) and RZ/V2N SoCs.
- Documenting the CANFD controller on RZ/T2H and RZ/N2H SoCs.
- Adding RZ/T2H SoC support in the rcar_canfd driver.c file.
Note this patch series applies on top of:
https://lore.kernel.org/all/20251126155911.320563-1-biju.das.jz@bp.renesas.com/
v2->v3:
- Updated commit message to clarify that reset-names existed previously
but was dropped for patch 1/4.
- Grouped single compatible entries into an enum in patch 3/4.
- Updated commit message about disallowing reset-names property
for patch 3/4.
- Added Acked-by and Reviewed-by tags.
v1->v2:
- Moved reset-names to top-level properties.
Cheers,
Prabhakar
Lad Prabhakar (4):
dt-bindings: can: renesas,rcar-canfd: Specify reset-names
dt-bindings: can: renesas,rcar-canfd: Document RZ/V2H(P) and RZ/V2N
SoCs
dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs
can: rcar_canfd: Add RZ/T2H support
.../bindings/net/can/renesas,rcar-canfd.yaml | 62 +++++++++++++++----
drivers/net/can/rcar/rcar_canfd.c | 18 ++++++
2 files changed, 67 insertions(+), 13 deletions(-)
--
2.52.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 1/4] dt-bindings: can: renesas,rcar-canfd: Specify reset-names
2026-01-09 12:51 [PATCH v3 0/4] Add CANFD support to R9A09G056/057/077/087 SoCs Prabhakar
@ 2026-01-09 12:51 ` Prabhakar
2026-01-11 10:08 ` Krzysztof Kozlowski
2026-01-09 12:51 ` [PATCH v3 2/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/V2H(P) and RZ/V2N SoCs Prabhakar
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Prabhakar @ 2026-01-09 12:51 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree
Cc: linux-renesas-soc, linux-kernel, Prabhakar, Biju Das,
Fabrizio Castro, Lad Prabhakar
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Specify the expected reset-names for the Renesas CAN-FD controller on
RZ/G2L and RZ/G3E SoCs.
The reset names rstp_n and rstc_n are defined in the SoC hardware manual
and are already used by the driver since commit 76e9353a80e9 ("can:
rcar_canfd: Add support for RZ/G2L family"). The reset-names property
existed previously but was dropped by commit 466c8ef7b66b ("dt-bindings:
can: renesas,rcar-canfd: Simplify the conditional schema").
Restore and constrain reset-names in the binding so DT schema checks
match the actual hardware requirements and driver expectations.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v2->v3:
- Updated commit message to clarify that reset-names existed previously
but was dropped.
v1->v2:
- Moved reset-names to top-level properties.
---
.../bindings/net/can/renesas,rcar-canfd.yaml | 33 +++++++++++--------
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
index e129bdceef84..9bfd4f44e4d4 100644
--- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
+++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
@@ -122,6 +122,11 @@ properties:
resets: true
+ reset-names:
+ items:
+ - const: rstp_n
+ - const: rstc_n
+
renesas,no-can-fd:
$ref: /schemas/types.yaml#/definitions/flag
description:
@@ -195,13 +200,6 @@ allOf:
minItems: 2
maxItems: 2
- reset-names:
- minItems: 2
- maxItems: 2
-
- required:
- - reset-names
-
- if:
properties:
compatible:
@@ -239,13 +237,6 @@ allOf:
minItems: 2
maxItems: 2
- reset-names:
- minItems: 2
- maxItems: 2
-
- required:
- - reset-names
-
- if:
properties:
compatible:
@@ -299,6 +290,20 @@ allOf:
properties:
renesas,no-can-fd: false
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,r9a09g047-canfd
+ - renesas,rzg2l-canfd
+ then:
+ required:
+ - reset-names
+ else:
+ properties:
+ reset-names: false
+
unevaluatedProperties: false
examples:
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/V2H(P) and RZ/V2N SoCs
2026-01-09 12:51 [PATCH v3 0/4] Add CANFD support to R9A09G056/057/077/087 SoCs Prabhakar
2026-01-09 12:51 ` [PATCH v3 1/4] dt-bindings: can: renesas,rcar-canfd: Specify reset-names Prabhakar
@ 2026-01-09 12:51 ` Prabhakar
2026-01-09 12:51 ` [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs Prabhakar
2026-01-09 12:51 ` [PATCH v3 4/4] can: rcar_canfd: Add RZ/T2H support Prabhakar
3 siblings, 0 replies; 12+ messages in thread
From: Prabhakar @ 2026-01-09 12:51 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree
Cc: linux-renesas-soc, linux-kernel, Prabhakar, Biju Das,
Fabrizio Castro, Lad Prabhakar, Krzysztof Kozlowski
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Document CANFD IP found on the Renesas RZ/V2H(P) (R9A09G057) and RZ/V2N
(R9A09G056) SoCs. The CANFD IP on these SoCs are identical to that found
on the RZ/G3E (R9A09G047) SoC.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2->v3:
- Added Acked-by and Reviewed-by tags.
v1->v2:
- No changes made.
---
.../devicetree/bindings/net/can/renesas,rcar-canfd.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
index 9bfd4f44e4d4..fb709cfd26d7 100644
--- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
+++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
@@ -44,6 +44,12 @@ properties:
- const: renesas,r9a09g047-canfd # RZ/G3E
+ - items:
+ - enum:
+ - renesas,r9a09g056-canfd # RZ/V2N
+ - renesas,r9a09g057-canfd # RZ/V2H(P)
+ - const: renesas,r9a09g047-canfd
+
reg:
maxItems: 1
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs
2026-01-09 12:51 [PATCH v3 0/4] Add CANFD support to R9A09G056/057/077/087 SoCs Prabhakar
2026-01-09 12:51 ` [PATCH v3 1/4] dt-bindings: can: renesas,rcar-canfd: Specify reset-names Prabhakar
2026-01-09 12:51 ` [PATCH v3 2/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/V2H(P) and RZ/V2N SoCs Prabhakar
@ 2026-01-09 12:51 ` Prabhakar
2026-01-11 10:14 ` Krzysztof Kozlowski
2026-01-09 12:51 ` [PATCH v3 4/4] can: rcar_canfd: Add RZ/T2H support Prabhakar
3 siblings, 1 reply; 12+ messages in thread
From: Prabhakar @ 2026-01-09 12:51 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree
Cc: linux-renesas-soc, linux-kernel, Prabhakar, Biju Das,
Fabrizio Castro, Lad Prabhakar
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Document the CAN-FD controller used on the RZ/T2H and RZ/N2H SoCs. The
CAN-FD IP is largely compatible with the R-Car Gen4 block, but differs
in that AFLPN and CFTML are different, there is no reset line for the IP,
and it only supports two channels.
The schema already enforces reset-names only for RZ/G2L and RZ/G3E and
disallows it for all other SoCs, so only the resets property is explicitly
marked as unsupported for RZ/T2H and RZ/N2H.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2->v3:
- Grouped single compatible entries into an enum.
- Updated commit message about disallowing reset-names property.
- Added Reviewed-by tag.
v1->v2:
- No changes made.
---
.../bindings/net/can/renesas,rcar-canfd.yaml | 29 +++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
index fb709cfd26d7..ceb072e0a304 100644
--- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
+++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
@@ -42,7 +42,10 @@ properties:
- renesas,r9a07g054-canfd # RZ/V2L
- const: renesas,rzg2l-canfd # RZ/G2L family
- - const: renesas,r9a09g047-canfd # RZ/G3E
+ - items:
+ - enum:
+ - renesas,r9a09g047-canfd # RZ/G3E
+ - renesas,r9a09g077-canfd # RZ/T2H
- items:
- enum:
@@ -50,6 +53,10 @@ properties:
- renesas,r9a09g057-canfd # RZ/V2H(P)
- const: renesas,r9a09g047-canfd
+ - items:
+ - const: renesas,r9a09g087-canfd # RZ/N2H
+ - const: renesas,r9a09g077-canfd
+
reg:
maxItems: 1
@@ -179,7 +186,6 @@ required:
- clocks
- clock-names
- power-domains
- - resets
- assigned-clocks
- assigned-clock-rates
- channel0
@@ -243,11 +249,30 @@ allOf:
minItems: 2
maxItems: 2
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g077-canfd
+ then:
+ properties:
+ interrupts:
+ maxItems: 8
+
+ interrupt-names:
+ maxItems: 8
+
+ resets: false
+ else:
+ required:
+ - resets
+
- if:
properties:
compatible:
contains:
enum:
+ - renesas,r9a09g077-canfd
- renesas,rcar-gen3-canfd
- renesas,rzg2l-canfd
then:
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 4/4] can: rcar_canfd: Add RZ/T2H support
2026-01-09 12:51 [PATCH v3 0/4] Add CANFD support to R9A09G056/057/077/087 SoCs Prabhakar
` (2 preceding siblings ...)
2026-01-09 12:51 ` [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs Prabhakar
@ 2026-01-09 12:51 ` Prabhakar
3 siblings, 0 replies; 12+ messages in thread
From: Prabhakar @ 2026-01-09 12:51 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree
Cc: linux-renesas-soc, linux-kernel, Prabhakar, Biju Das,
Fabrizio Castro, Lad Prabhakar
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
The CAN-FD IP on the RZ/T2H SoC is similar to R-Car Gen4, but differs in
the AFLPN and CFTML bits and supports two channels with eight interrupts.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2->v3:
- Added Reviewed-by tag.
v1->v2:
- No changes made.
---
drivers/net/can/rcar/rcar_canfd.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
index 4a653d8978ba..eaf8cac78038 100644
--- a/drivers/net/can/rcar/rcar_canfd.c
+++ b/drivers/net/can/rcar/rcar_canfd.c
@@ -670,6 +670,23 @@ static const struct rcar_canfd_hw_info r9a09g047_hw_info = {
.external_clk = 0,
};
+static const struct rcar_canfd_hw_info r9a09g077_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 = 2,
+ .postdiv = 1,
+ .multi_channel_irqs = 1,
+ .ch_interface_mode = 1,
+ .shared_can_regs = 1,
+ .external_clk = 1,
+};
+
/* Helper functions */
static inline void rcar_canfd_update(u32 mask, u32 val, u32 __iomem *reg)
{
@@ -2345,6 +2362,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,r9a09g047-canfd", .data = &r9a09g047_hw_info },
+ { .compatible = "renesas,r9a09g077-canfd", .data = &r9a09g077_hw_info },
{ .compatible = "renesas,rcar-gen3-canfd", .data = &rcar_gen3_hw_info },
{ .compatible = "renesas,rcar-gen4-canfd", .data = &rcar_gen4_hw_info },
{ .compatible = "renesas,rzg2l-canfd", .data = &rzg2l_hw_info },
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/4] dt-bindings: can: renesas,rcar-canfd: Specify reset-names
2026-01-09 12:51 ` [PATCH v3 1/4] dt-bindings: can: renesas,rcar-canfd: Specify reset-names Prabhakar
@ 2026-01-11 10:08 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-11 10:08 UTC (permalink / raw)
To: Prabhakar
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree, linux-renesas-soc,
linux-kernel, Biju Das, Fabrizio Castro, Lad Prabhakar
On Fri, Jan 09, 2026 at 12:51:25PM +0000, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Specify the expected reset-names for the Renesas CAN-FD controller on
> RZ/G2L and RZ/G3E SoCs.
>
> The reset names rstp_n and rstc_n are defined in the SoC hardware manual
> and are already used by the driver since commit 76e9353a80e9 ("can:
> rcar_canfd: Add support for RZ/G2L family"). The reset-names property
> existed previously but was dropped by commit 466c8ef7b66b ("dt-bindings:
> can: renesas,rcar-canfd: Simplify the conditional schema").
>
> Restore and constrain reset-names in the binding so DT schema checks
> match the actual hardware requirements and driver expectations.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v2->v3:
> - Updated commit message to clarify that reset-names existed previously
> but was dropped.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs
2026-01-09 12:51 ` [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs Prabhakar
@ 2026-01-11 10:14 ` Krzysztof Kozlowski
2026-01-12 14:04 ` Lad, Prabhakar
0 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-11 10:14 UTC (permalink / raw)
To: Prabhakar
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree, linux-renesas-soc,
linux-kernel, Biju Das, Fabrizio Castro, Lad Prabhakar
On Fri, Jan 09, 2026 at 12:51:27PM +0000, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Document the CAN-FD controller used on the RZ/T2H and RZ/N2H SoCs. The
> CAN-FD IP is largely compatible with the R-Car Gen4 block, but differs
> in that AFLPN and CFTML are different, there is no reset line for the IP,
> and it only supports two channels.
>
> The schema already enforces reset-names only for RZ/G2L and RZ/G3E and
> disallows it for all other SoCs, so only the resets property is explicitly
> marked as unsupported for RZ/T2H and RZ/N2H.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v2->v3:
> - Grouped single compatible entries into an enum.
> - Updated commit message about disallowing reset-names property.
> - Added Reviewed-by tag.
>
> v1->v2:
> - No changes made.
> ---
> .../bindings/net/can/renesas,rcar-canfd.yaml | 29 +++++++++++++++++--
> 1 file changed, 27 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> index fb709cfd26d7..ceb072e0a304 100644
> --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> @@ -42,7 +42,10 @@ properties:
> - renesas,r9a07g054-canfd # RZ/V2L
> - const: renesas,rzg2l-canfd # RZ/G2L family
>
> - - const: renesas,r9a09g047-canfd # RZ/G3E
> + - items:
The convention is enum and that's what I asked. I know it is a nit, but
if I give review now for this code which I disagreed, my disagreement
won't be ever recorded and people in future work will base on this less
preferred syntax.
So again:
- enum:
- foo
- bar
> + - enum:
> + - renesas,r9a09g047-canfd # RZ/G3E
> + - renesas,r9a09g077-canfd # RZ/T2H
>
> - items:
> - enum:
> @@ -50,6 +53,10 @@ properties:
> - renesas,r9a09g057-canfd # RZ/V2H(P)
> - const: renesas,r9a09g047-canfd
>
> + - items:
> + - const: renesas,r9a09g087-canfd # RZ/N2H
> + - const: renesas,r9a09g077-canfd
> +
> reg:
> maxItems: 1
>
> @@ -179,7 +186,6 @@ required:
> - clocks
> - clock-names
> - power-domains
> - - resets
> - assigned-clocks
> - assigned-clock-rates
> - channel0
> @@ -243,11 +249,30 @@ allOf:
> minItems: 2
> maxItems: 2
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r9a09g077-canfd
> + then:
> + properties:
> + interrupts:
> + maxItems: 8
> +
> + interrupt-names:
> + maxItems: 8
> +
> + resets: false
> + else:
> + required:
> + - resets
I do not think you are making this binding easy to maintain. You have
now multiple separate ifs AND two ifs with "else:" condition. Try to
understand which condition/description applies to "rcar-gen3". Does it
require resets? Let's look for the compatible in the file - you find
"if:" block requiring reset-names but no "require" for resets. Odd.
As I said last time, these should be alwaysy synced.
The binding was not in a good shape before but you are not improving it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs
2026-01-11 10:14 ` Krzysztof Kozlowski
@ 2026-01-12 14:04 ` Lad, Prabhakar
2026-01-12 16:30 ` Krzysztof Kozlowski
0 siblings, 1 reply; 12+ messages in thread
From: Lad, Prabhakar @ 2026-01-12 14:04 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree, linux-renesas-soc,
linux-kernel, Biju Das, Fabrizio Castro, Lad Prabhakar
Hi Krzysztof,
Thank you for the review.
On Sun, Jan 11, 2026 at 10:14 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Fri, Jan 09, 2026 at 12:51:27PM +0000, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Document the CAN-FD controller used on the RZ/T2H and RZ/N2H SoCs. The
> > CAN-FD IP is largely compatible with the R-Car Gen4 block, but differs
> > in that AFLPN and CFTML are different, there is no reset line for the IP,
> > and it only supports two channels.
> >
> > The schema already enforces reset-names only for RZ/G2L and RZ/G3E and
> > disallows it for all other SoCs, so only the resets property is explicitly
> > marked as unsupported for RZ/T2H and RZ/N2H.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > v2->v3:
> > - Grouped single compatible entries into an enum.
> > - Updated commit message about disallowing reset-names property.
> > - Added Reviewed-by tag.
> >
> > v1->v2:
> > - No changes made.
> > ---
> > .../bindings/net/can/renesas,rcar-canfd.yaml | 29 +++++++++++++++++--
> > 1 file changed, 27 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > index fb709cfd26d7..ceb072e0a304 100644
> > --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > @@ -42,7 +42,10 @@ properties:
> > - renesas,r9a07g054-canfd # RZ/V2L
> > - const: renesas,rzg2l-canfd # RZ/G2L family
> >
> > - - const: renesas,r9a09g047-canfd # RZ/G3E
> > + - items:
>
> The convention is enum and that's what I asked. I know it is a nit, but
> if I give review now for this code which I disagreed, my disagreement
> won't be ever recorded and people in future work will base on this less
> preferred syntax.
>
> So again:
>
> - enum:
> - foo
> - bar
>
Agreed, I will drop the "-items" and I will also move the single
compatible list entry to the top based on the feedback [0].
[0] https://lore.kernel.org/all/CAMuHMdWz6_NzvjZNMLk+Bqoa0NR2CKNFwDXynfmrTZgOGsqxTA@mail.gmail.com/
> > + - enum:
> > + - renesas,r9a09g047-canfd # RZ/G3E
> > + - renesas,r9a09g077-canfd # RZ/T2H
> >
> > - items:
> > - enum:
> > @@ -50,6 +53,10 @@ properties:
> > - renesas,r9a09g057-canfd # RZ/V2H(P)
> > - const: renesas,r9a09g047-canfd
> >
> > + - items:
> > + - const: renesas,r9a09g087-canfd # RZ/N2H
> > + - const: renesas,r9a09g077-canfd
> > +
> > reg:
> > maxItems: 1
> >
> > @@ -179,7 +186,6 @@ required:
> > - clocks
> > - clock-names
> > - power-domains
> > - - resets
> > - assigned-clocks
> > - assigned-clock-rates
> > - channel0
> > @@ -243,11 +249,30 @@ allOf:
> > minItems: 2
> > maxItems: 2
> >
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: renesas,r9a09g077-canfd
> > + then:
> > + properties:
> > + interrupts:
> > + maxItems: 8
> > +
> > + interrupt-names:
> > + maxItems: 8
> > +
> > + resets: false
> > + else:
> > + required:
> > + - resets
>
> I do not think you are making this binding easy to maintain. You have
> now multiple separate ifs AND two ifs with "else:" condition. Try to
> understand which condition/description applies to "rcar-gen3". Does it
> require resets? Let's look for the compatible in the file - you find
> "if:" block requiring reset-names but no "require" for resets. Odd.
>
> As I said last time, these should be alwaysy synced.
>
Does the below look OK? Ive grouped them based on no rests/single
reset/ two reset.
- if:
properties:
compatible:
contains:
# SoCs WITHOUT resets
const: renesas,r9a09g077-canfd
then:
properties:
resets: false
reset-names: false
- if:
properties:
compatible:
contains:
# SoCs WITH resets and reset-names
enum:
- renesas,r9a09g047-canfd
- renesas,rzg2l-canfd
then:
required:
- resets
- reset-names
- if:
properties:
compatible:
contains:
# SoCs WITH resets but WITHOUT reset-names
enum:
- renesas,rcar-gen3-canfd
- renesas,rcar-gen4-canfd
then:
required:
- resets
properties:
reset-names: false
Cheers,
Prabhakar
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs
2026-01-12 14:04 ` Lad, Prabhakar
@ 2026-01-12 16:30 ` Krzysztof Kozlowski
2026-01-12 17:22 ` Lad, Prabhakar
0 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-12 16:30 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree, linux-renesas-soc,
linux-kernel, Biju Das, Fabrizio Castro, Lad Prabhakar
On 12/01/2026 15:04, Lad, Prabhakar wrote:
> - if:
> properties:
> compatible:
> contains:
> # SoCs WITH resets but WITHOUT reset-names
> enum:
> - renesas,rcar-gen3-canfd
> - renesas,rcar-gen4-canfd
> then:
> required:
> - resets
> properties:
> reset-names: false
>
Yes, although now I wonder why do you have such case... There are no
benefits in disallowing reset-names, even for single entries.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs
2026-01-12 16:30 ` Krzysztof Kozlowski
@ 2026-01-12 17:22 ` Lad, Prabhakar
2026-01-13 19:25 ` Geert Uytterhoeven
0 siblings, 1 reply; 12+ messages in thread
From: Lad, Prabhakar @ 2026-01-12 17:22 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree, linux-renesas-soc,
linux-kernel, Biju Das, Fabrizio Castro, Lad Prabhakar
Hi Krzysztof,
On Mon, Jan 12, 2026 at 4:30 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 12/01/2026 15:04, Lad, Prabhakar wrote:
> > - if:
> > properties:
> > compatible:
> > contains:
> > # SoCs WITH resets but WITHOUT reset-names
> > enum:
> > - renesas,rcar-gen3-canfd
> > - renesas,rcar-gen4-canfd
> > then:
> > required:
> > - resets
> > properties:
> > reset-names: false
> >
>
> Yes, although now I wonder why do you have such case... There are no
> benefits in disallowing reset-names, even for single entries.
>
Ok, I will update the resets property in patch 1/4 as below. Would you
prefer reset-names as a required property for single resets?
reset-names:
minItems: 1
maxItems: 2
items:
enum:
- rstp_n
- rstc_n
Cheers,
Prabhakar
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs
2026-01-12 17:22 ` Lad, Prabhakar
@ 2026-01-13 19:25 ` Geert Uytterhoeven
2026-01-13 21:01 ` Krzysztof Kozlowski
0 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2026-01-13 19:25 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: Krzysztof Kozlowski, Marc Kleine-Budde, Vincent Mailhol,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-can, devicetree,
linux-renesas-soc, linux-kernel, Biju Das, Fabrizio Castro,
Lad Prabhakar
On Mon, 12 Jan 2026 at 18:22, Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> On Mon, Jan 12, 2026 at 4:30 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > On 12/01/2026 15:04, Lad, Prabhakar wrote:
> > > - if:
> > > properties:
> > > compatible:
> > > contains:
> > > # SoCs WITH resets but WITHOUT reset-names
> > > enum:
> > > - renesas,rcar-gen3-canfd
> > > - renesas,rcar-gen4-canfd
> > > then:
> > > required:
> > > - resets
> > > properties:
> > > reset-names: false
> > >
> >
> > Yes, although now I wonder why do you have such case... There are no
> > benefits in disallowing reset-names, even for single entries.
Except that I have no idea which of the two names I should use in
case of renesas,rcar-gen3-canfd and renesas,rcar-gen4-canfd, as
the hardware documentation doesn't explain that? AFAIU it is just
a single, common reset for the whole block...
> Ok, I will update the resets property in patch 1/4 as below. Would you
> prefer reset-names as a required property for single resets?
>
> reset-names:
> minItems: 1
> maxItems: 2
> items:
> enum:
> - rstp_n
> - rstc_n
I.e. which one should I pick?
<grin>Obviously the first, so dtbs_check succeeds?</grin>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs
2026-01-13 19:25 ` Geert Uytterhoeven
@ 2026-01-13 21:01 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-13 21:01 UTC (permalink / raw)
To: Geert Uytterhoeven, Lad, Prabhakar
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-can, devicetree, linux-renesas-soc,
linux-kernel, Biju Das, Fabrizio Castro, Lad Prabhakar
On 13/01/2026 20:25, Geert Uytterhoeven wrote:
> On Mon, 12 Jan 2026 at 18:22, Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote:
>> On Mon, Jan 12, 2026 at 4:30 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>> On 12/01/2026 15:04, Lad, Prabhakar wrote:
>>>> - if:
>>>> properties:
>>>> compatible:
>>>> contains:
>>>> # SoCs WITH resets but WITHOUT reset-names
>>>> enum:
>>>> - renesas,rcar-gen3-canfd
>>>> - renesas,rcar-gen4-canfd
>>>> then:
>>>> required:
>>>> - resets
>>>> properties:
>>>> reset-names: false
>>>>
>>>
>>> Yes, although now I wonder why do you have such case... There are no
>>> benefits in disallowing reset-names, even for single entries.
>
> Except that I have no idea which of the two names I should use in
> case of renesas,rcar-gen3-canfd and renesas,rcar-gen4-canfd, as
> the hardware documentation doesn't explain that? AFAIU it is just
> a single, common reset for the whole block...
So there is a reason why reset-names should be disallowed :). It's fine
then.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-01-13 21:01 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09 12:51 [PATCH v3 0/4] Add CANFD support to R9A09G056/057/077/087 SoCs Prabhakar
2026-01-09 12:51 ` [PATCH v3 1/4] dt-bindings: can: renesas,rcar-canfd: Specify reset-names Prabhakar
2026-01-11 10:08 ` Krzysztof Kozlowski
2026-01-09 12:51 ` [PATCH v3 2/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/V2H(P) and RZ/V2N SoCs Prabhakar
2026-01-09 12:51 ` [PATCH v3 3/4] dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs Prabhakar
2026-01-11 10:14 ` Krzysztof Kozlowski
2026-01-12 14:04 ` Lad, Prabhakar
2026-01-12 16:30 ` Krzysztof Kozlowski
2026-01-12 17:22 ` Lad, Prabhakar
2026-01-13 19:25 ` Geert Uytterhoeven
2026-01-13 21:01 ` Krzysztof Kozlowski
2026-01-09 12:51 ` [PATCH v3 4/4] can: rcar_canfd: Add RZ/T2H support Prabhakar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox