Skip to contentSkip to conversation

arm64: dts: r8a7795: Add CAN FD support

PATCH New Ramesh Shanmugasundaram 3 participants 8 messages Mar 1, 2016 – Jun 21, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: r8a7795: Add CAN FD support

Adds CAN FD controller node for r8a7795.

Note: CAN FD controller register base address specified in R-Car Gen3 Hardware User Manual v0.5E is incorrect. The correct address is:

CAN FD - 0xe66c0000

---
Hi All,

This patch is based on linux-next (tag:next-20160225) with the following patches applied on top.

[PATCH v2] arm64: dts: r8a7795: Add CAN external clock support [PATCH] arm64: dts: r8a7795: Add CAN support

The respective CAN subsystem changes are submitted separately here (https://www.mail-archive.com/linux-renesas-soc at vger.kernel.org/msg01388.html)

Thanks,
Ramesh

---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +24 -0
index a88f8d8..5049ba6 100644
@@ -553,6 +553,30 @@
 			status = "disabled";
 		};
 
+		canfd: canfd at e66c0000 {
+			compatible = "renesas,r8a7795-canfd",
+				     "renesas,rcar-gen3-canfd";
+			reg = <0 0xe66c0000 0 0x8000>;
+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
+				   <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 914>,
+			       <&cpg CPG_CORE R8A7795_CLK_CANFD>,
+			       <&can_clk>;
+			clock-names = "fck", "canfd", "can_clk";
+			assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_CANFD>;
+			assigned-clock-rates = <40000000>;
+			power-domains = <&cpg>;
+			status = "disabled";
+
+			channel0 {
+				status = "disabled";
+			};
+
+			channel1 {
+				status = "disabled";
+			};
+		};
+
 		hscif0: serial at e6540000 {
 			compatible = "renesas,hscif-r8a7795",
 				     "renesas,rcar-gen3-hscif",
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 arm64: dts: r8a7795: Add CAN FD support

Hello.

Quoted 30 lines · Ramesh Shanmugasundaram

Adds CAN FD controller node for r8a7795.

Note: CAN FD controller register base address specified in R-Car Gen3 Hardware User Manual v0.5E is incorrect. The correct address is:

CAN FD - 0xe66c0000

---
Hi All,

This patch is based on linux-next (tag:next-20160225) with the following patches applied on top.

[PATCH v2] arm64: dts: r8a7795: Add CAN external clock support [PATCH] arm64: dts: r8a7795: Add CAN support

The respective CAN subsystem changes are submitted separately here (https://www.mail-archive.com/linux-renesas-soc at vger.kernel.org/msg01388.html)

Thanks,
Ramesh

---
  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +0 -0
index a88f8d8..5049ba6 100644

arch/arm64/boot/dts/renesas/r8a7795.dtsi line 556

Quoted 4 lines
arch/arm64/boot/dts/renesas/r8a7795.dtsi +1 -0
@@ -553,6 +553,30 @@
  			status = "disabled";
  		};
 
+		canfd: canfd at e66c0000 {

The node name should still be "can at e66c0000", I think.

MBR, Sergei

#2 lore raw

PATCH 1/1 arm64: dts: r8a7795: Add CAN FD support

Hi Sergei,

Quoted 40 lines · Ramesh Shanmugasundaram
Quoted 6 lines

Adds CAN FD controller node for r8a7795.

Note: CAN FD controller register base address specified in R-Car Gen3 Hardware User Manual v0.5E is incorrect. The correct address is:

Quoted 8 lines

CAN FD - 0xe66c0000

Signed-off-by: Ramesh Shanmugasundaram
<[email protected]>
---
Hi All,

This patch is based on linux-next (tag:next-20160225) with the

following

Quoted 24 lines

patches applied on top.

[PATCH v2] arm64: dts: r8a7795: Add CAN external clock support [PATCH] arm64: dts: r8a7795: Add CAN support

The respective CAN subsystem changes are submitted separately here
(https://www.mail-archive.com/linux-renesas-soc at vger.kernel.org/msg013 88.html)

Thanks,
Ramesh

---
  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +0 -0
index a88f8d8..5049ba6 100644
@@ -553,6 +553,30 @@
  			status = "disabled";
  		};
 
Quoted 3 lines

arch/arm64/boot/dts/renesas/r8a7795.dtsi line 556

Quoted 1 line
arch/arm64/boot/dts/renesas/r8a7795.dtsi +1 -0
+		canfd: canfd at e66c0000 {

The node name should still be "can at e66c0000", I think.

Thanks for the review.

The SoC has CAN controller too and hence I chose this node name to differentiate. A grep of canfd on sysfs would tell if the controller is enabled. The channels on "net" would still be named "canx".

I'll change it if you still feel "can at e66c0000" is more appropriate.

Thanks,
Ramesh

#3 lore raw

PATCH 1/1 arm64: dts: r8a7795: Add CAN FD support

Quoted 46 lines · Ramesh Shanmugasundaram

Hi Sergei,

Quoted 40 lines · Ramesh Shanmugasundaram
Quoted 6 lines

Adds CAN FD controller node for r8a7795.

Note: CAN FD controller register base address specified in R-Car Gen3 Hardware User Manual v0.5E is incorrect. The correct address is:

Quoted 8 lines

CAN FD - 0xe66c0000

Signed-off-by: Ramesh Shanmugasundaram
<[email protected]>
---
Hi All,

This patch is based on linux-next (tag:next-20160225) with the

following

Quoted 24 lines

patches applied on top.

[PATCH v2] arm64: dts: r8a7795: Add CAN external clock support [PATCH] arm64: dts: r8a7795: Add CAN support

The respective CAN subsystem changes are submitted separately here
(https://www.mail-archive.com/linux-renesas-soc at vger.kernel.org/msg013 88.html)

Thanks,
Ramesh

---
  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +0 -0
index a88f8d8..5049ba6 100644
@@ -553,6 +553,30 @@
  			status = "disabled";
  		};
 
Quoted 3 lines

arch/arm64/boot/dts/renesas/r8a7795.dtsi line 556

Quoted 1 line
arch/arm64/boot/dts/renesas/r8a7795.dtsi +1 -0
+		canfd: canfd at e66c0000 {

The node name should still be "can at e66c0000", I think.

Quoted 5 lines

Thanks for the review.

The SoC has CAN controller too and hence I chose this node name to differentiate. A grep of canfd on sysfs would tell if the controller is enabled. The channels on "net" would still be named "canx".

I'll change it if you still feel "can at e66c0000" is more appropriate.

FWIW, "can at e66c0000" seems more appropriate to me.

#4 lore raw

PATCH 1/1 arm64: dts: r8a7795: Add CAN FD support

In reply to Ramesh Shanmugasundaram

Hello.

Quoted 38 lines · Ramesh Shanmugasundaram
Quoted 38 lines
Quoted 5 lines

Adds CAN FD controller node for r8a7795.

Note: CAN FD controller register base address specified in R-Car Gen3 Hardware User Manual v0.5E is incorrect. The correct address is:

Quoted 8 lines

CAN FD - 0xe66c0000

Signed-off-by: Ramesh Shanmugasundaram
<[email protected]>
---
Hi All,

This patch is based on linux-next (tag:next-20160225) with the

following

Quoted 24 lines

patches applied on top.

[PATCH v2] arm64: dts: r8a7795: Add CAN external clock support [PATCH] arm64: dts: r8a7795: Add CAN support

The respective CAN subsystem changes are submitted separately here
(https://www.mail-archive.com/linux-renesas-soc at vger.kernel.org/msg013 88.html)

Thanks,
Ramesh

---
   arch/arm64/boot/dts/renesas/r8a7795.dtsi | 24 ++++++++++++++++++++++++
   1 file changed, 24 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +0 -0
index a88f8d8..5049ba6 100644
@@ -553,6 +553,30 @@
   			status = "disabled";
   		};
 
Quoted 7 lines
Quoted 3 lines

arch/arm64/boot/dts/renesas/r8a7795.dtsi line 556

Quoted 1 line
arch/arm64/boot/dts/renesas/r8a7795.dtsi +1 -0
+		canfd: canfd at e66c0000 {

The node name should still be "can at e66c0000", I think.

Thanks for the review.

The SoC has CAN controller too

Yes, I figured. BTW, is the CAN-FD identical to the older CAN on the
hardware level? I haven't see you posting the CAN-FD driver yet...

Quoted 3 lines

and hence I chose this node name to differentiate. A grep of canfd on sysfs would tell if the controller is enabled. The channels on "net" would still be named "canx".

I'll change it if you still feel "can at e66c0000" is more appropriate.

It is -- the node names should be generic and ePAPR even has the "can"
name listed explicitly in the section 2.2.2.

Quoted 2 lines

Thanks,
Ramesh

MBR, Sergei

#5 lore raw

PATCH v2 1/1 arm64: dts: r8a7795: Add CAN FD support

In reply to Ramesh Shanmugasundaram

Adds CAN FD controller node for r8a7795.

Note: CAN FD controller register base address specified in R-Car Gen3 Hardware User Manual v0.5E is incorrect. The correct address is:

CAN FD - 0xe66c0000

---
Thanks Sergei, Simon for the comments.

Changes since v1:
As suggested by Sergei, Simon
* Changed node name from canfd@ to can@

---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +24 -0
index a88f8d8..9185688 100644
@@ -553,6 +553,30 @@
 			status = "disabled";
 		};
 
+		canfd: can at e66c0000 {
+			compatible = "renesas,r8a7795-canfd",
+				     "renesas,rcar-gen3-canfd";
+			reg = <0 0xe66c0000 0 0x8000>;
+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
+				   <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 914>,
+			       <&cpg CPG_CORE R8A7795_CLK_CANFD>,
+			       <&can_clk>;
+			clock-names = "fck", "canfd", "can_clk";
+			assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_CANFD>;
+			assigned-clock-rates = <40000000>;
+			power-domains = <&cpg>;
+			status = "disabled";
+
+			channel0 {
+				status = "disabled";
+			};
+
+			channel1 {
+				status = "disabled";
+			};
+		};
+
 		hscif0: serial at e6540000 {
 			compatible = "renesas,hscif-r8a7795",
 				     "renesas,rcar-gen3-hscif",
Signature · 1 line
1.9.1
#6 lore raw

PATCH v3 1/1 arm64: dts: r8a7795: Add CAN FD support

Adds CAN FD controller node for r8a7795.

Note: CAN FD controller register base address specified in R-Car Gen3 Hardware User Manual v0.5E is incorrect. The correct address is:

CAN FD - 0xe66c0000

---

Note:
Bindings already Acked-by: Rob H on driver patch set
(https://www.mail-archive.com/netdev at vger.kernel.org/msg102789.html)

Changes since v2:

	Rebased to Simon's latest tag:renesas-devel-20160616-v4.7-rc3

Changes since v1:
As suggested by Sergei, Simon - changed node name from canfd@ to can@

---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +24 -0
index fad6dd8..b902356 100644
@@ -583,6 +583,30 @@
 			status = "disabled";
 		};
 
+		canfd: can at e66c0000 {
+			compatible = "renesas,r8a7795-canfd",
+				     "renesas,rcar-gen3-canfd";
+			reg = <0 0xe66c0000 0 0x8000>;
+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
+				   <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 914>,
+			       <&cpg CPG_CORE R8A7795_CLK_CANFD>,
+			       <&can_clk>;
+			clock-names = "fck", "canfd", "can_clk";
+			assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_CANFD>;
+			assigned-clock-rates = <40000000>;
+			power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+			status = "disabled";
+
+			channel0 {
+				status = "disabled";
+			};
+
+			channel1 {
+				status = "disabled";
+			};
+		};
+
 		hscif0: serial at e6540000 {
 			compatible = "renesas,hscif-r8a7795",
 				     "renesas,rcar-gen3-hscif",
Signature · 1 line
1.9.1
#7 lore raw

PATCH v3 1/1 arm64: dts: r8a7795: Add CAN FD support

Quoted 5 lines · Ramesh Shanmugasundaram

Adds CAN FD controller node for r8a7795.

Note: CAN FD controller register base address specified in R-Car Gen3 Hardware User Manual v0.5E is incorrect. The correct address is:

Quoted 8 lines

CAN FD - 0xe66c0000

---

Note:
Bindings already Acked-by: Rob H on driver patch set
(https://www.mail-archive.com/netdev at vger.kernel.org/msg102789.html)

Thanks, I have queued this up.