diff mbox series

[3/3] arm64: dts: r8a779a0: Add CANFD device node

Message ID 20210924153113.10046-4-uli+renesas@fpond.eu (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series can: rcar_canfd: Add support for V3U flavor | expand

Commit Message

Ulrich Hecht Sept. 24, 2021, 3:31 p.m. UTC
This patch adds CANFD device node for r8a779a0.

Based on patch by Kazuya Mizuguchi.

Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
---
 arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 55 +++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Comments

Geert Uytterhoeven Oct. 5, 2021, 1:20 p.m. UTC | #1
Hi Uli,

On Fri, Sep 24, 2021 at 5:34 PM Ulrich Hecht <uli+renesas@fpond.eu> wrote:
> This patch adds CANFD device node for r8a779a0.
>
> Based on patch by Kazuya Mizuguchi.
>
> Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi

> @@ -236,6 +243,54 @@
>                         #interrupt-cells = <2>;
>                 };
>
> +               canfd: can@e6660000 {

Please preserve sort order (by unit address).

> +                       compatible = "renesas,r8a779a0-canfd";
> +                       reg = <0 0xe6660000 0 0x8000>;
> +                       interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
> +                                       <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;

Please add interrupt-names, so we can make the property required soon.

> +                       clocks = <&cpg CPG_MOD 328>,
> +                                <&cpg CPG_CORE R8A779A0_CLK_CANFD>,
> +                                <&can_clk>;
> +                       clock-names = "fck", "canfd", "can_clk";
> +                       assigned-clocks = <&cpg CPG_CORE R8A779A0_CLK_CANFD>;
> +                       assigned-clock-rates = <40000000>;
> +                       power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
> +                       resets = <&cpg 328>;
> +                       status = "disabled";
> +
> +                       channel0 {
> +                               status = "disabled";
> +                       };
> +
> +                       channel1 {
> +                               status = "disabled";
> +                       };
> +
> +                       channel2 {
> +                               status = "disabled";
> +                       };
> +
> +                       channel3 {
> +                               status = "disabled";
> +                       };
> +
> +                       channel4 {
> +                               status = "disabled";
> +                       };
> +
> +                       channel5 {
> +                               status = "disabled";
> +                       };
> +
> +                       channel6 {
> +                               status = "disabled";
> +                       };
> +
> +                       channel7 {
> +                               status = "disabled";
> +                       };
> +               };
> +
>                 cmt0: timer@e60f0000 {
>                         compatible = "renesas,r8a779a0-cmt0",
>                                      "renesas,rcar-gen3-cmt0";

With the above fixed:
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert
Ulrich Hecht Jan. 11, 2022, 4:21 p.m. UTC | #2
> On 10/05/2021 3:20 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
>  
> Hi Uli,
> 
> On Fri, Sep 24, 2021 at 5:34 PM Ulrich Hecht <uli+renesas@fpond.eu> wrote:
> > This patch adds CANFD device node for r8a779a0.
> >
> > Based on patch by Kazuya Mizuguchi.
> >
> > Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
> 
> Thanks for your patch!
> 
> > --- a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
> 
> > @@ -236,6 +243,54 @@
> >                         #interrupt-cells = <2>;
> >                 };
> >
> > +               canfd: can@e6660000 {
> 
> Please preserve sort order (by unit address).

Nothing to preserve there, the file isn't sorted by address. :)

CU
Uli
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
index f9a882b34f82..c54c06473248 100644
--- a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
@@ -24,6 +24,13 @@ 
 		i2c6 = &i2c6;
 	};
 
+	/* External CAN clock - to be overridden by boards that provide it */
+	can_clk: can {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <0>;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -236,6 +243,54 @@ 
 			#interrupt-cells = <2>;
 		};
 
+		canfd: can@e6660000 {
+			compatible = "renesas,r8a779a0-canfd";
+			reg = <0 0xe6660000 0 0x8000>;
+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 328>,
+				 <&cpg CPG_CORE R8A779A0_CLK_CANFD>,
+				 <&can_clk>;
+			clock-names = "fck", "canfd", "can_clk";
+			assigned-clocks = <&cpg CPG_CORE R8A779A0_CLK_CANFD>;
+			assigned-clock-rates = <40000000>;
+			power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+			resets = <&cpg 328>;
+			status = "disabled";
+
+			channel0 {
+				status = "disabled";
+			};
+
+			channel1 {
+				status = "disabled";
+			};
+
+			channel2 {
+				status = "disabled";
+			};
+
+			channel3 {
+				status = "disabled";
+			};
+
+			channel4 {
+				status = "disabled";
+			};
+
+			channel5 {
+				status = "disabled";
+			};
+
+			channel6 {
+				status = "disabled";
+			};
+
+			channel7 {
+				status = "disabled";
+			};
+		};
+
 		cmt0: timer@e60f0000 {
 			compatible = "renesas,r8a779a0-cmt0",
 				     "renesas,rcar-gen3-cmt0";