2021-07-15 21:03:59

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 0/6] Renesas RZ/G2L CANFD support

Hi All,

This patch series adds CANFD support to Renesas RZ/G2L family.

CANFD block on RZ/G2L SoC is almost identical to one found on
R-Car Gen3 SoC's. On RZ/G2L SoC interrupt sources for each channel
are split into individual sources.

Patches are based on top of [1] (master branch) + patch [2].

Cheers,
Prabhakar

[1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/
[2] https://patchwork.kernel.org/project/linux-renesas-soc/patch/
[email protected]/

Lad Prabhakar (6):
dt-bindings: net: can: renesas,rcar-canfd: Document RZ/G2L SoC
can: rcar_canfd: Add support for RZ/G2L family
dt-bindings: clk: r9a07g044-cpg: Add entry for P0_DIV2 core clock
clk: renesas: r9a07g044-cpg: Add entry for fixed clock P0_DIV2
clk: renesas: r9a07g044-cpg: Add clock and reset entries for CANFD
arm64: dts: renesas: r9a07g044: Add CANFD node

.../bindings/net/can/renesas,rcar-canfd.yaml | 45 ++-
arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 37 +++
drivers/clk/renesas/r9a07g044-cpg.c | 7 +-
drivers/net/can/rcar/rcar_canfd.c | 275 ++++++++++++++++--
include/dt-bindings/clock/r9a07g044-cpg.h | 2 +
5 files changed, 328 insertions(+), 38 deletions(-)


base-commit: b37235d5fdf50e5f1c23f868ab70bbe640081b21
prerequisite-patch-id: 7436c0d801737268ef470fcb50e620428286e085
--
2.17.1


2021-07-15 21:04:41

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 1/6] dt-bindings: net: can: renesas,rcar-canfd: Document RZ/G2L SoC

Add CANFD binding documentation for Renesas RZ/G2L SoC.

Signed-off-by: Lad Prabhakar <[email protected]>
Reviewed-by: Biju Das <[email protected]>
---
.../bindings/net/can/renesas,rcar-canfd.yaml | 45 ++++++++++++++++---
1 file changed, 39 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
index 0b33ba9ccb47..38243c261622 100644
--- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
+++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
@@ -30,13 +30,15 @@ properties:
- renesas,r8a77995-canfd # R-Car D3
- const: renesas,rcar-gen3-canfd # R-Car Gen3 and RZ/G2

+ - items:
+ - enum:
+ - renesas,r9a07g044-canfd # RZ/G2{L,LC}
+ - const: renesas,rzg2l-canfd # RZ/G2L family
+
reg:
maxItems: 1

- interrupts:
- items:
- - description: Channel interrupt
- - description: Global interrupt
+ interrupts: true

clocks:
maxItems: 3
@@ -50,8 +52,7 @@ properties:
power-domains:
maxItems: 1

- resets:
- maxItems: 1
+ resets: true

renesas,no-can-fd:
$ref: /schemas/types.yaml#/definitions/flag
@@ -78,6 +79,38 @@ patternProperties:
node. Each child node supports the "status" property only, which
is used to enable/disable the respective channel.

+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,rzg2l-canfd
+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
+
+ resets:
+ maxItems: 2
+
+else:
+ properties:
+ interrupts:
+ items:
+ - description: Channel interrupt
+ - description: Global interrupt
+
+ resets:
+ maxItems: 1
+
required:
- compatible
- reg
--
2.17.1

2021-07-16 07:41:00

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/6] dt-bindings: net: can: renesas,rcar-canfd: Document RZ/G2L SoC

Hi Prabhakar,

On Thu, Jul 15, 2021 at 8:21 PM Lad Prabhakar
<[email protected]> wrote:
> Add CANFD binding documentation for Renesas RZ/G2L SoC.
>
> Signed-off-by: Lad Prabhakar <[email protected]>
> Reviewed-by: Biju Das <[email protected]>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml

> @@ -78,6 +79,38 @@ patternProperties:
> node. Each child node supports the "status" property only, which
> is used to enable/disable the respective channel.
>
> +if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - renesas,rzg2l-canfd
> +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

Does it make sense to add interrupt-names?

> +
> + resets:
> + maxItems: 2

Same here, for reset-names?
Or a list of descriptions, so we know which reset serves what purpose.

> +
> +else:
> + properties:
> + interrupts:
> + items:
> + - description: Channel interrupt
> + - description: Global interrupt
> +
> + resets:
> + maxItems: 1
> +
> required:
> - compatible
> - reg

The rest looks good to me.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2021-07-16 08:32:05

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 1/6] dt-bindings: net: can: renesas,rcar-canfd: Document RZ/G2L SoC

Hi Geert,

Thank you for the review.

On Fri, Jul 16, 2021 at 8:38 AM Geert Uytterhoeven <[email protected]> wrote:
>
> Hi Prabhakar,
>
> On Thu, Jul 15, 2021 at 8:21 PM Lad Prabhakar
> <[email protected]> wrote:
> > Add CANFD binding documentation for Renesas RZ/G2L SoC.
> >
> > Signed-off-by: Lad Prabhakar <[email protected]>
> > Reviewed-by: Biju Das <[email protected]>
>
> Thanks for your patch!
>
> > --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> > +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
>
> > @@ -78,6 +79,38 @@ patternProperties:
> > node. Each child node supports the "status" property only, which
> > is used to enable/disable the respective channel.
> >
> > +if:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - renesas,rzg2l-canfd
> > +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
>
> Does it make sense to add interrupt-names?
>
Agreed will drop this and add interrupt-names instead. Also I will
update the driver to pick up the interrupts based on names.

> > +
> > + resets:
> > + maxItems: 2
>
> Same here, for reset-names?
> Or a list of descriptions, so we know which reset serves what purpose.
>
OK I'll add the reset-names.

Cheers,
Prabhakar

> > +
> > +else:
> > + properties:
> > + interrupts:
> > + items:
> > + - description: Channel interrupt
> > + - description: Global interrupt
> > +
> > + resets:
> > + maxItems: 1
> > +
> > required:
> > - compatible
> > - reg
>
> The rest looks good to me.
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> 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