From: Biju Das <biju.das.jz@bp.renesas.com>
The CANFD on RZ/{G2L,G3E} and R-Car Gen4 support 3 modes FD-Only mode,
Classical CAN mode and CAN-FD mode. In FD-Only mode, communication in
Classical CAN frame format is disabled. Document renesas,fd-only to handle
this mode. As these SoCs support 3 modes, update the description of
renesas,no-can-fd property and disallow it for R-Car Gen3.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
* Added conditional check to disallow fd-only mode for R-Car Gen3.
---
.../bindings/net/can/renesas,rcar-canfd.yaml | 24 ++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
index f4ac21c68427..a52244f0b5d1 100644
--- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
+++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
@@ -125,9 +125,17 @@ properties:
renesas,no-can-fd:
$ref: /schemas/types.yaml#/definitions/flag
description:
- The controller can operate in either CAN FD only mode (default) or
- Classical CAN only mode. The mode is global to all channels.
- Specify this property to put the controller in Classical CAN only mode.
+ The controller can operate in either CAN-FD mode (default) or FD-Only
+ mode (RZ/{G2L,G3E} and R-Car Gen4) or Classical CAN mode. Specify this
+ property to put the controller in Classical CAN mode.
+
+ renesas,fd-only:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ The CANFD on RZ/{G2L,G3E} and R-Car Gen4 SoCs support 3 modes FD-Only
+ mode, Classical CAN mode and CAN-FD mode (default). In FD-Only mode,
+ communication in Classical CAN frame format is disabled. Specify this
+ property to put the controller in FD-Only mode.
assigned-clocks:
description:
@@ -267,6 +275,16 @@ allOf:
patternProperties:
"^channel[6-7]$": false
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,rcar-gen3-canfd
+ then:
+ properties:
+ renesas,fd-only: false
+
unevaluatedProperties: false
examples:
--
2.43.0
On 23/11/2025 12:23, Biju wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> The CANFD on RZ/{G2L,G3E} and R-Car Gen4 support 3 modes FD-Only mode,
> Classical CAN mode and CAN-FD mode. In FD-Only mode, communication in
> Classical CAN frame format is disabled. Document renesas,fd-only to handle
> this mode. As these SoCs support 3 modes, update the description of
> renesas,no-can-fd property and disallow it for R-Car Gen3.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
> * Added conditional check to disallow fd-only mode for R-Car Gen3.
> ---
> .../bindings/net/can/renesas,rcar-canfd.yaml | 24 ++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> index f4ac21c68427..a52244f0b5d1 100644
> --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> @@ -125,9 +125,17 @@ properties:
> renesas,no-can-fd:
> $ref: /schemas/types.yaml#/definitions/flag
> description:
> - The controller can operate in either CAN FD only mode (default) or
> - Classical CAN only mode. The mode is global to all channels.
> - Specify this property to put the controller in Classical CAN only mode.
> + The controller can operate in either CAN-FD mode (default) or FD-Only
> + mode (RZ/{G2L,G3E} and R-Car Gen4) or Classical CAN mode. Specify this
> + property to put the controller in Classical CAN mode.
> +
> + renesas,fd-only:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description:
> + The CANFD on RZ/{G2L,G3E} and R-Car Gen4 SoCs support 3 modes FD-Only
> + mode, Classical CAN mode and CAN-FD mode (default). In FD-Only mode,
> + communication in Classical CAN frame format is disabled. Specify this
> + property to put the controller in FD-Only mode.
>
> assigned-clocks:
> description:
> @@ -267,6 +275,16 @@ allOf:
> patternProperties:
> "^channel[6-7]$": false
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - renesas,rcar-gen3-canfd
> + then:
> + properties:
> + renesas,fd-only: false
> +
You did not respond to my first paragraph from previous version. As I
said, you now need oneOf to restrict these, since you are not using
simple enum.
Best regards,
Krzysztof
© 2016 - 2025 Red Hat, Inc.