* [PATCH v2 0/7] Add support for RZ/G3E CANFD
@ 2025-02-20 13:04 Biju Das
2025-02-20 13:04 ` [PATCH v2 1/7] dt-bindings: can: renesas,rcar-canfd: Simplify the conditional schema Biju Das
2025-02-20 13:04 ` [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support Biju Das
0 siblings, 2 replies; 8+ messages in thread
From: Biju Das @ 2025-02-20 13:04 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Michael Turquette, Stephen Boyd
Cc: Biju Das, linux-can, linux-renesas-soc, linux-clk, devicetree,
Wolfram Sang, Uwe Kleine-König, Prabhakar Mahadev Lad,
Biju Das
The CAN-FD module on RZ/G3E is very similar to the one on both R-Car V4H
and RZ/G2L, but differs in some hardware parameters:
* No external clock, but instead has ram clock.
* Support up to 6 channels.
* 20 interrupts.
This patch series depend upon [1]
[1] https://lore.kernel.org/all/20250220094516.126598-1-biju.das.jz@bp.renesas.com/
v1->v2:
* Split the series with fixes patch separately.
* Added patch for Simplify rcar_canfd_probe() using
of_get_available_child_by_name() as dependency patch hit on can-next.
* Added Rb tag from Vincent Mailhol.
* Dropped redundant comment from commit description for patch#3.
Biju Das (7):
dt-bindings: can: renesas,rcar-canfd: Simplify the conditional schema
dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support
can: rcar_canfd: Use of_get_available_child_by_name()
can: rcar_canfd: Add gen4_type variable to struct rcar_canfd_hw_info
can: rcar_canfd: Add only_internal_clks variable to struct
rcar_canfd_hw_info
can: rcar_canfd: Enhance multi_channel_irqs handling
can: rcar_canfd: Add RZ/G3E support
.../bindings/net/can/renesas,rcar-canfd.yaml | 180 +++++++++++++-----
drivers/net/can/rcar/rcar_canfd.c | 35 +++-
2 files changed, 165 insertions(+), 50 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/7] dt-bindings: can: renesas,rcar-canfd: Simplify the conditional schema
2025-02-20 13:04 [PATCH v2 0/7] Add support for RZ/G3E CANFD Biju Das
@ 2025-02-20 13:04 ` Biju Das
2025-02-21 17:51 ` Conor Dooley
2025-02-20 13:04 ` [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support Biju Das
1 sibling, 1 reply; 8+ messages in thread
From: Biju Das @ 2025-02-20 13:04 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm
Cc: Biju Das, Fabrizio Castro, Simon Horman, Duy Nguyen, linux-can,
devicetree, linux-renesas-soc, Prabhakar Mahadev Lad, Biju Das
RZ/G3E SoC has 20 interrupts, 2 resets and 6 channels that need more
branching with conditional schema. Simplify the conditional schema with
if statements rather than the complex if-else statements to prepare for
supporting RZ/G3E SoC.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
This patch depend upon [1]
[1] https://lore.kernel.org/all/20250220094516.126598-2-biju.das.jz@bp.renesas.com/
v1->v2:
* No change
---
.../bindings/net/can/renesas,rcar-canfd.yaml | 123 ++++++++++++------
1 file changed, 80 insertions(+), 43 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
index f6884f6e59e7..f87f90f431e5 100644
--- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
+++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
@@ -45,7 +45,35 @@ properties:
reg:
maxItems: 1
- interrupts: true
+ interrupts:
+ oneOf:
+ - items:
+ - description: Channel interrupt
+ - description: Global interrupt
+ - items:
+ - description: CAN global error interrupt
+ - description: CAN receive FIFO interrupt
+ - description: CAN0 error interrupt
+ - description: CAN0 transmit interrupt
+ - description: CAN0 transmit/receive FIFO receive completion interrupt
+ - description: CAN1 error interrupt
+ - description: CAN1 transmit interrupt
+ - description: CAN1 transmit/receive FIFO receive completion interrupt
+
+ interrupt-names:
+ oneOf:
+ - items:
+ - const: ch_int
+ - const: g_int
+ - items:
+ - const: g_err
+ - const: g_recc
+ - const: ch0_err
+ - const: ch0_rec
+ - const: ch0_trx
+ - const: ch1_err
+ - const: ch1_rec
+ - const: ch1_trx
clocks:
maxItems: 3
@@ -117,52 +145,71 @@ allOf:
then:
properties:
interrupts:
- items:
- - description: CAN global error interrupt
- - description: CAN receive FIFO interrupt
- - description: CAN0 error interrupt
- - description: CAN0 transmit interrupt
- - description: CAN0 transmit/receive FIFO receive completion interrupt
- - description: CAN1 error interrupt
- - description: CAN1 transmit interrupt
- - description: CAN1 transmit/receive FIFO receive completion interrupt
+ minItems: 8
+ maxItems: 8
interrupt-names:
- items:
- - const: g_err
- - const: g_recc
- - const: ch0_err
- - const: ch0_rec
- - const: ch0_trx
- - const: ch1_err
- - const: ch1_rec
- - const: ch1_trx
+ minItems: 8
+ maxItems: 8
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,rcar-gen3-canfd
+ - renesas,rcar-gen4-canfd
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+ maxItems: 2
+
+ interrupt-names:
+ minItems: 2
+ maxItems: 2
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,rzg2l-canfd
+ then:
+ properties:
resets:
+ minItems: 2
maxItems: 2
reset-names:
- items:
- - const: rstp_n
- - const: rstc_n
+ minItems: 2
+ maxItems: 2
required:
- reset-names
- else:
- properties:
- interrupts:
- items:
- - description: Channel interrupt
- - description: Global interrupt
-
- interrupt-names:
- items:
- - const: ch_int
- - const: g_int
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,rcar-gen3-canfd
+ - renesas,rcar-gen4-canfd
+ then:
+ properties:
resets:
maxItems: 1
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,rcar-gen3-canfd
+ - renesas,rzg2l-canfd
+ then:
+ patternProperties:
+ "^channel[2-7]$": false
+
- if:
properties:
compatible:
@@ -171,16 +218,6 @@ allOf:
then:
patternProperties:
"^channel[4-7]$": false
- else:
- if:
- not:
- properties:
- compatible:
- contains:
- const: renesas,rcar-gen4-canfd
- then:
- patternProperties:
- "^channel[2-7]$": false
unevaluatedProperties: false
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support
2025-02-20 13:04 [PATCH v2 0/7] Add support for RZ/G3E CANFD Biju Das
2025-02-20 13:04 ` [PATCH v2 1/7] dt-bindings: can: renesas,rcar-canfd: Simplify the conditional schema Biju Das
@ 2025-02-20 13:04 ` Biju Das
2025-02-21 17:53 ` Conor Dooley
1 sibling, 1 reply; 8+ messages in thread
From: Biju Das @ 2025-02-20 13:04 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm
Cc: Biju Das, Fabrizio Castro, Simon Horman, Duy Nguyen, linux-can,
devicetree, linux-renesas-soc, Prabhakar Mahadev Lad, Biju Das
Document support for the CAN-FD Interface on the RZ/G3E (R9A09G047) SoC,
which supports up to six channels.
The CAN-FD module on RZ/G3E is very similar to the one on both R-Car V4H
and RZ/G2L, but differs in some hardware parameters:
* No external clock, but instead has ram clock.
* Support up to 6 channels.
* 20 interrupts.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
* No change.
---
.../bindings/net/can/renesas,rcar-canfd.yaml | 67 +++++++++++++++++--
1 file changed, 62 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
index f87f90f431e5..189d5303ad75 100644
--- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
+++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
@@ -42,6 +42,8 @@ properties:
- renesas,r9a07g054-canfd # RZ/V2L
- const: renesas,rzg2l-canfd # RZ/G2L family
+ - const: renesas,r9a09g047-canfd # RZ/G3E
+
reg:
maxItems: 1
@@ -59,6 +61,19 @@ properties:
- description: CAN1 error interrupt
- description: CAN1 transmit interrupt
- description: CAN1 transmit/receive FIFO receive completion interrupt
+ - description: CAN2 error interrupt
+ - description: CAN2 transmit interrupt
+ - description: CAN2 transmit/receive FIFO receive completion interrupt
+ - description: CAN3 error interrupt
+ - description: CAN3 transmit interrupt
+ - description: CAN3 transmit/receive FIFO receive completion interrupt
+ - description: CAN4 error interrupt
+ - description: CAN4 transmit interrupt
+ - description: CAN4 transmit/receive FIFO receive completion interrupt
+ - description: CAN5 error interrupt
+ - description: CAN5 transmit interrupt
+ - description: CAN5 transmit/receive FIFO receive completion interrupt
+ minItems: 8
interrupt-names:
oneOf:
@@ -74,15 +89,33 @@ properties:
- const: ch1_err
- const: ch1_rec
- const: ch1_trx
+ - const: ch2_err
+ - const: ch2_rec
+ - const: ch2_trx
+ - const: ch3_err
+ - const: ch3_rec
+ - const: ch3_trx
+ - const: ch4_err
+ - const: ch4_rec
+ - const: ch4_trx
+ - const: ch5_err
+ - const: ch5_rec
+ - const: ch5_trx
+ minItems: 8
clocks:
maxItems: 3
clock-names:
- items:
- - const: fck
- - const: canfd
- - const: can_clk
+ oneOf:
+ - items:
+ - const: fck
+ - const: canfd
+ - const: can_clk
+ - items:
+ - const: fck
+ - const: ram_clk
+ - const: can_clk
power-domains:
maxItems: 1
@@ -173,7 +206,9 @@ allOf:
properties:
compatible:
contains:
- const: renesas,rzg2l-canfd
+ enum:
+ - renesas,r9a09g047-canfd
+ - renesas,rzg2l-canfd
then:
properties:
resets:
@@ -187,6 +222,19 @@ allOf:
required:
- reset-names
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g047-canfd
+ then:
+ properties:
+ interrupts:
+ maxItems: 20
+
+ interrupt-names:
+ maxItems: 20
+
- if:
properties:
compatible:
@@ -219,6 +267,15 @@ allOf:
patternProperties:
"^channel[4-7]$": false
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g047-canfd
+ then:
+ patternProperties:
+ "^channel[6-7]$": false
+
unevaluatedProperties: false
examples:
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/7] dt-bindings: can: renesas,rcar-canfd: Simplify the conditional schema
2025-02-20 13:04 ` [PATCH v2 1/7] dt-bindings: can: renesas,rcar-canfd: Simplify the conditional schema Biju Das
@ 2025-02-21 17:51 ` Conor Dooley
0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2025-02-21 17:51 UTC (permalink / raw)
To: Biju Das
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, Fabrizio Castro, Simon Horman, Duy Nguyen, linux-can,
devicetree, linux-renesas-soc, Prabhakar Mahadev Lad, Biju Das
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
On Thu, Feb 20, 2025 at 01:04:17PM +0000, Biju Das wrote:
> RZ/G3E SoC has 20 interrupts, 2 resets and 6 channels that need more
> branching with conditional schema. Simplify the conditional schema with
> if statements rather than the complex if-else statements to prepare for
> supporting RZ/G3E SoC.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support
2025-02-20 13:04 ` [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support Biju Das
@ 2025-02-21 17:53 ` Conor Dooley
2025-02-21 18:03 ` Biju Das
2025-02-21 23:18 ` Rob Herring
0 siblings, 2 replies; 8+ messages in thread
From: Conor Dooley @ 2025-02-21 17:53 UTC (permalink / raw)
To: Biju Das
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, Fabrizio Castro, Simon Horman, Duy Nguyen, linux-can,
devicetree, linux-renesas-soc, Prabhakar Mahadev Lad, Biju Das
[-- Attachment #1: Type: text/plain, Size: 4495 bytes --]
On Thu, Feb 20, 2025 at 01:04:18PM +0000, Biju Das wrote:
> Document support for the CAN-FD Interface on the RZ/G3E (R9A09G047) SoC,
> which supports up to six channels.
>
> The CAN-FD module on RZ/G3E is very similar to the one on both R-Car V4H
> and RZ/G2L, but differs in some hardware parameters:
> * No external clock, but instead has ram clock.
> * Support up to 6 channels.
> * 20 interrupts.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
> * No change.
> ---
> .../bindings/net/can/renesas,rcar-canfd.yaml | 67 +++++++++++++++++--
> 1 file changed, 62 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> index f87f90f431e5..189d5303ad75 100644
> --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> @@ -42,6 +42,8 @@ properties:
> - renesas,r9a07g054-canfd # RZ/V2L
> - const: renesas,rzg2l-canfd # RZ/G2L family
>
> + - const: renesas,r9a09g047-canfd # RZ/G3E
> +
> reg:
> maxItems: 1
>
> @@ -59,6 +61,19 @@ properties:
> - description: CAN1 error interrupt
> - description: CAN1 transmit interrupt
> - description: CAN1 transmit/receive FIFO receive completion interrupt
> + - description: CAN2 error interrupt
> + - description: CAN2 transmit interrupt
> + - description: CAN2 transmit/receive FIFO receive completion interrupt
> + - description: CAN3 error interrupt
> + - description: CAN3 transmit interrupt
> + - description: CAN3 transmit/receive FIFO receive completion interrupt
> + - description: CAN4 error interrupt
> + - description: CAN4 transmit interrupt
> + - description: CAN4 transmit/receive FIFO receive completion interrupt
> + - description: CAN5 error interrupt
> + - description: CAN5 transmit interrupt
> + - description: CAN5 transmit/receive FIFO receive completion interrupt
> + minItems: 8
>
> interrupt-names:
> oneOf:
> @@ -74,15 +89,33 @@ properties:
> - const: ch1_err
> - const: ch1_rec
> - const: ch1_trx
> + - const: ch2_err
> + - const: ch2_rec
> + - const: ch2_trx
> + - const: ch3_err
> + - const: ch3_rec
> + - const: ch3_trx
> + - const: ch4_err
> + - const: ch4_rec
> + - const: ch4_trx
> + - const: ch5_err
> + - const: ch5_rec
> + - const: ch5_trx
> + minItems: 8
>
> clocks:
> maxItems: 3
>
> clock-names:
> - items:
> - - const: fck
> - - const: canfd
> - - const: can_clk
> + oneOf:
> + - items:
> + - const: fck
> + - const: canfd
> + - const: can_clk
> + - items:
> + - const: fck
> + - const: ram_clk
> + - const: can_clk
>
> power-domains:
> maxItems: 1
> @@ -173,7 +206,9 @@ allOf:
> properties:
> compatible:
> contains:
> - const: renesas,rzg2l-canfd
> + enum:
> + - renesas,r9a09g047-canfd
> + - renesas,rzg2l-canfd
> then:
> properties:
> resets:
> @@ -187,6 +222,19 @@ allOf:
> required:
> - reset-names
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r9a09g047-canfd
> + then:
> + properties:
> + interrupts:
> + maxItems: 20
> +
> + interrupt-names:
> + maxItems: 20
Should these be minItems instead of maxItems? The list has 20 elements
at the moment (right?) so you're not adding any restriction here.
> +
> - if:
> properties:
> compatible:
> @@ -219,6 +267,15 @@ allOf:
> patternProperties:
> "^channel[4-7]$": false
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r9a09g047-canfd
> + then:
> + patternProperties:
> + "^channel[6-7]$": false
> +
> unevaluatedProperties: false
>
> examples:
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support
2025-02-21 17:53 ` Conor Dooley
@ 2025-02-21 18:03 ` Biju Das
2025-02-21 23:18 ` Rob Herring
1 sibling, 0 replies; 8+ messages in thread
From: Biju Das @ 2025-02-21 18:03 UTC (permalink / raw)
To: Conor Dooley
Cc: Marc Kleine-Budde, Vincent Mailhol, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, Fabrizio Castro, Simon Horman, Duy Nguyen,
linux-can@vger.kernel.org, devicetree@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad,
biju.das.au
Hi Conor Dooley,
Thanks for the feedback.
> -----Original Message-----
> From: Conor Dooley <conor@kernel.org>
> Sent: 21 February 2025 17:54
> Subject: Re: [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support
>
> On Thu, Feb 20, 2025 at 01:04:18PM +0000, Biju Das wrote:
> > Document support for the CAN-FD Interface on the RZ/G3E (R9A09G047)
> > SoC, which supports up to six channels.
> >
> > The CAN-FD module on RZ/G3E is very similar to the one on both R-Car
> > V4H and RZ/G2L, but differs in some hardware parameters:
> > * No external clock, but instead has ram clock.
> > * Support up to 6 channels.
> > * 20 interrupts.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v1->v2:
> > * No change.
> > ---
> > .../bindings/net/can/renesas,rcar-canfd.yaml | 67
> > +++++++++++++++++--
> > 1 file changed, 62 insertions(+), 5 deletions(-)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > index f87f90f431e5..189d5303ad75 100644
> > ---
> > a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yam
> > +++ l
> > @@ -42,6 +42,8 @@ properties:
> > - renesas,r9a07g054-canfd # RZ/V2L
> > - const: renesas,rzg2l-canfd # RZ/G2L family
> >
> > + - const: renesas,r9a09g047-canfd # RZ/G3E
> > +
> > reg:
> > maxItems: 1
> >
> > @@ -59,6 +61,19 @@ properties:
> > - description: CAN1 error interrupt
> > - description: CAN1 transmit interrupt
> > - description: CAN1 transmit/receive FIFO receive
> > completion interrupt
> > + - description: CAN2 error interrupt
> > + - description: CAN2 transmit interrupt
> > + - description: CAN2 transmit/receive FIFO receive completion interrupt
> > + - description: CAN3 error interrupt
> > + - description: CAN3 transmit interrupt
> > + - description: CAN3 transmit/receive FIFO receive completion interrupt
> > + - description: CAN4 error interrupt
> > + - description: CAN4 transmit interrupt
> > + - description: CAN4 transmit/receive FIFO receive completion interrupt
> > + - description: CAN5 error interrupt
> > + - description: CAN5 transmit interrupt
> > + - description: CAN5 transmit/receive FIFO receive completion interrupt
> > + minItems: 8
> >
> > interrupt-names:
> > oneOf:
> > @@ -74,15 +89,33 @@ properties:
> > - const: ch1_err
> > - const: ch1_rec
> > - const: ch1_trx
> > + - const: ch2_err
> > + - const: ch2_rec
> > + - const: ch2_trx
> > + - const: ch3_err
> > + - const: ch3_rec
> > + - const: ch3_trx
> > + - const: ch4_err
> > + - const: ch4_rec
> > + - const: ch4_trx
> > + - const: ch5_err
> > + - const: ch5_rec
> > + - const: ch5_trx
> > + minItems: 8
> >
> > clocks:
> > maxItems: 3
> >
> > clock-names:
> > - items:
> > - - const: fck
> > - - const: canfd
> > - - const: can_clk
> > + oneOf:
> > + - items:
> > + - const: fck
> > + - const: canfd
> > + - const: can_clk
> > + - items:
> > + - const: fck
> > + - const: ram_clk
> > + - const: can_clk
> >
> > power-domains:
> > maxItems: 1
> > @@ -173,7 +206,9 @@ allOf:
> > properties:
> > compatible:
> > contains:
> > - const: renesas,rzg2l-canfd
> > + enum:
> > + - renesas,r9a09g047-canfd
> > + - renesas,rzg2l-canfd
> > then:
> > properties:
> > resets:
> > @@ -187,6 +222,19 @@ allOf:
> > required:
> > - reset-names
> >
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: renesas,r9a09g047-canfd
> > + then:
> > + properties:
> > + interrupts:
> > + maxItems: 20
> > +
> > + interrupt-names:
> > + maxItems: 20
>
> Should these be minItems instead of maxItems? The list has 20 elements at the moment (right?) so
> you're not adding any restriction here.
Yes, it should be minItems.
Cheers,
Biju
>
> > +
> > - if:
> > properties:
> > compatible:
> > @@ -219,6 +267,15 @@ allOf:
> > patternProperties:
> > "^channel[4-7]$": false
> >
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: renesas,r9a09g047-canfd
> > + then:
> > + patternProperties:
> > + "^channel[6-7]$": false
> > +
> > unevaluatedProperties: false
> >
> > examples:
> > --
> > 2.43.0
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support
2025-02-21 17:53 ` Conor Dooley
2025-02-21 18:03 ` Biju Das
@ 2025-02-21 23:18 ` Rob Herring
2025-02-22 8:20 ` Biju Das
1 sibling, 1 reply; 8+ messages in thread
From: Rob Herring @ 2025-02-21 23:18 UTC (permalink / raw)
To: Conor Dooley
Cc: Biju Das, Marc Kleine-Budde, Vincent Mailhol, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Fabrizio Castro,
Simon Horman, Duy Nguyen, linux-can, devicetree,
linux-renesas-soc, Prabhakar Mahadev Lad, Biju Das
On Fri, Feb 21, 2025 at 05:53:43PM +0000, Conor Dooley wrote:
> On Thu, Feb 20, 2025 at 01:04:18PM +0000, Biju Das wrote:
> > Document support for the CAN-FD Interface on the RZ/G3E (R9A09G047) SoC,
> > which supports up to six channels.
> >
> > The CAN-FD module on RZ/G3E is very similar to the one on both R-Car V4H
> > and RZ/G2L, but differs in some hardware parameters:
> > * No external clock, but instead has ram clock.
> > * Support up to 6 channels.
> > * 20 interrupts.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v1->v2:
> > * No change.
> > ---
> > .../bindings/net/can/renesas,rcar-canfd.yaml | 67 +++++++++++++++++--
> > 1 file changed, 62 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > index f87f90f431e5..189d5303ad75 100644
> > --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > @@ -42,6 +42,8 @@ properties:
> > - renesas,r9a07g054-canfd # RZ/V2L
> > - const: renesas,rzg2l-canfd # RZ/G2L family
> >
> > + - const: renesas,r9a09g047-canfd # RZ/G3E
> > +
> > reg:
> > maxItems: 1
> >
> > @@ -59,6 +61,19 @@ properties:
> > - description: CAN1 error interrupt
> > - description: CAN1 transmit interrupt
> > - description: CAN1 transmit/receive FIFO receive completion interrupt
> > + - description: CAN2 error interrupt
> > + - description: CAN2 transmit interrupt
> > + - description: CAN2 transmit/receive FIFO receive completion interrupt
> > + - description: CAN3 error interrupt
> > + - description: CAN3 transmit interrupt
> > + - description: CAN3 transmit/receive FIFO receive completion interrupt
> > + - description: CAN4 error interrupt
> > + - description: CAN4 transmit interrupt
> > + - description: CAN4 transmit/receive FIFO receive completion interrupt
> > + - description: CAN5 error interrupt
> > + - description: CAN5 transmit interrupt
> > + - description: CAN5 transmit/receive FIFO receive completion interrupt
> > + minItems: 8
> >
> > interrupt-names:
> > oneOf:
> > @@ -74,15 +89,33 @@ properties:
> > - const: ch1_err
> > - const: ch1_rec
> > - const: ch1_trx
> > + - const: ch2_err
> > + - const: ch2_rec
> > + - const: ch2_trx
> > + - const: ch3_err
> > + - const: ch3_rec
> > + - const: ch3_trx
> > + - const: ch4_err
> > + - const: ch4_rec
> > + - const: ch4_trx
> > + - const: ch5_err
> > + - const: ch5_rec
> > + - const: ch5_trx
> > + minItems: 8
> >
> > clocks:
> > maxItems: 3
> >
> > clock-names:
> > - items:
> > - - const: fck
> > - - const: canfd
> > - - const: can_clk
> > + oneOf:
> > + - items:
> > + - const: fck
> > + - const: canfd
> > + - const: can_clk
> > + - items:
> > + - const: fck
> > + - const: ram_clk
> > + - const: can_clk
> >
> > power-domains:
> > maxItems: 1
> > @@ -173,7 +206,9 @@ allOf:
> > properties:
> > compatible:
> > contains:
> > - const: renesas,rzg2l-canfd
> > + enum:
> > + - renesas,r9a09g047-canfd
> > + - renesas,rzg2l-canfd
> > then:
> > properties:
> > resets:
> > @@ -187,6 +222,19 @@ allOf:
> > required:
> > - reset-names
> >
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: renesas,r9a09g047-canfd
> > + then:
> > + properties:
> > + interrupts:
> > + maxItems: 20
> > +
> > + interrupt-names:
> > + maxItems: 20
>
> Should these be minItems instead of maxItems? The list has 20 elements
> at the moment (right?) so you're not adding any restriction here.
And the existing platforms need to have 'maxItems: 8'.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support
2025-02-21 23:18 ` Rob Herring
@ 2025-02-22 8:20 ` Biju Das
0 siblings, 0 replies; 8+ messages in thread
From: Biju Das @ 2025-02-22 8:20 UTC (permalink / raw)
To: Rob Herring, Conor Dooley
Cc: Marc Kleine-Budde, Vincent Mailhol, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Fabrizio Castro,
Simon Horman, Duy Nguyen, linux-can@vger.kernel.org,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Prabhakar Mahadev Lad, biju.das.au
Hi Rob,
Thanks for the feedback.
> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: 21 February 2025 23:19
> Subject: Re: [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support
>
> On Fri, Feb 21, 2025 at 05:53:43PM +0000, Conor Dooley wrote:
> > On Thu, Feb 20, 2025 at 01:04:18PM +0000, Biju Das wrote:
> > > Document support for the CAN-FD Interface on the RZ/G3E (R9A09G047)
> > > SoC, which supports up to six channels.
> > >
> > > The CAN-FD module on RZ/G3E is very similar to the one on both R-Car
> > > V4H and RZ/G2L, but differs in some hardware parameters:
> > > * No external clock, but instead has ram clock.
> > > * Support up to 6 channels.
> > > * 20 interrupts.
> > >
> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > ---
> > > v1->v2:
> > > * No change.
> > > ---
> > > .../bindings/net/can/renesas,rcar-canfd.yaml | 67
> > > +++++++++++++++++--
> > > 1 file changed, 62 insertions(+), 5 deletions(-)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > > b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > > index f87f90f431e5..189d5303ad75 100644
> > > ---
> > > a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > > +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.y
> > > +++ aml
> > > @@ -42,6 +42,8 @@ properties:
> > > - renesas,r9a07g054-canfd # RZ/V2L
> > > - const: renesas,rzg2l-canfd # RZ/G2L family
> > >
> > > + - const: renesas,r9a09g047-canfd # RZ/G3E
> > > +
> > > reg:
> > > maxItems: 1
> > >
> > > @@ -59,6 +61,19 @@ properties:
> > > - description: CAN1 error interrupt
> > > - description: CAN1 transmit interrupt
> > > - description: CAN1 transmit/receive FIFO receive
> > > completion interrupt
> > > + - description: CAN2 error interrupt
> > > + - description: CAN2 transmit interrupt
> > > + - description: CAN2 transmit/receive FIFO receive completion interrupt
> > > + - description: CAN3 error interrupt
> > > + - description: CAN3 transmit interrupt
> > > + - description: CAN3 transmit/receive FIFO receive completion interrupt
> > > + - description: CAN4 error interrupt
> > > + - description: CAN4 transmit interrupt
> > > + - description: CAN4 transmit/receive FIFO receive completion interrupt
> > > + - description: CAN5 error interrupt
> > > + - description: CAN5 transmit interrupt
> > > + - description: CAN5 transmit/receive FIFO receive completion interrupt
> > > + minItems: 8
> > >
> > > interrupt-names:
> > > oneOf:
> > > @@ -74,15 +89,33 @@ properties:
> > > - const: ch1_err
> > > - const: ch1_rec
> > > - const: ch1_trx
> > > + - const: ch2_err
> > > + - const: ch2_rec
> > > + - const: ch2_trx
> > > + - const: ch3_err
> > > + - const: ch3_rec
> > > + - const: ch3_trx
> > > + - const: ch4_err
> > > + - const: ch4_rec
> > > + - const: ch4_trx
> > > + - const: ch5_err
> > > + - const: ch5_rec
> > > + - const: ch5_trx
> > > + minItems: 8
> > >
> > > clocks:
> > > maxItems: 3
> > >
> > > clock-names:
> > > - items:
> > > - - const: fck
> > > - - const: canfd
> > > - - const: can_clk
> > > + oneOf:
> > > + - items:
> > > + - const: fck
> > > + - const: canfd
> > > + - const: can_clk
> > > + - items:
> > > + - const: fck
> > > + - const: ram_clk
> > > + - const: can_clk
> > >
> > > power-domains:
> > > maxItems: 1
> > > @@ -173,7 +206,9 @@ allOf:
> > > properties:
> > > compatible:
> > > contains:
> > > - const: renesas,rzg2l-canfd
> > > + enum:
> > > + - renesas,r9a09g047-canfd
> > > + - renesas,rzg2l-canfd
> > > then:
> > > properties:
> > > resets:
> > > @@ -187,6 +222,19 @@ allOf:
> > > required:
> > > - reset-names
> > >
> > > + - if:
> > > + properties:
> > > + compatible:
> > > + contains:
> > > + const: renesas,r9a09g047-canfd
> > > + then:
> > > + properties:
> > > + interrupts:
> > > + maxItems: 20
> > > +
> > > + interrupt-names:
> > > + maxItems: 20
> >
> > Should these be minItems instead of maxItems? The list has 20 elements
> > at the moment (right?) so you're not adding any restriction here.
>
> And the existing platforms need to have 'maxItems: 8'.
OK got.
platform 1: Here one of has min/max 2 interrupts. Platform 1 has 2 interrupts
interrupts:
minItems: 2
maxItems: 2
Platform 2: Here one of Has min/max 8/20 interrupts and platform 2 has 8 interrupts
interrupts:
maxItems: 8
Platform 3: Here one of Has min/max 8/20 interrupts and platform 3 has 20 interrupts
interrupts:
minItems: 20
Cheers,
Biju
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-02-22 8:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-20 13:04 [PATCH v2 0/7] Add support for RZ/G3E CANFD Biju Das
2025-02-20 13:04 ` [PATCH v2 1/7] dt-bindings: can: renesas,rcar-canfd: Simplify the conditional schema Biju Das
2025-02-21 17:51 ` Conor Dooley
2025-02-20 13:04 ` [PATCH v2 2/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3E support Biju Das
2025-02-21 17:53 ` Conor Dooley
2025-02-21 18:03 ` Biju Das
2025-02-21 23:18 ` Rob Herring
2025-02-22 8:20 ` Biju Das
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox