devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Add R8A7791/Henninger board CAN DT support
@ 2015-01-05 22:22 Sergei Shtylyov
  2015-01-05 22:24 ` [PATCH v5 1/3] ARM: shmobile: r8a7791: add CAN clocks Sergei Shtylyov
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2015-01-05 22:22 UTC (permalink / raw)
  To: horms-/R6kz+dDXgpPR4JQBCEnsQ, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: magnus.damm-Re5JQEeQqe8AvxtiuMwx3w, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hello.

   Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20141231-v3.19-rc2' tag. Here we add the CAN device tree support
for the R8A7791-based Henninger board. It depends on the clk driver RCAN clock
patch reposted today in order to work.

[1/3] ARM: shmobile: r8a7791: add CAN clocks
[2/3] ARM: shmobile: r8a7791: add CAN DT support
[3/3] ARM: shmobile: henninger: add CAN0 DT support

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v5 1/3] ARM: shmobile: r8a7791: add CAN clocks
  2015-01-05 22:22 [PATCH v5 0/3] Add R8A7791/Henninger board CAN DT support Sergei Shtylyov
@ 2015-01-05 22:24 ` Sergei Shtylyov
  2015-01-05 22:25 ` [PATCH v5 2/3] ARM: shmobile: r8a7791: add CAN DT support Sergei Shtylyov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2015-01-05 22:24 UTC (permalink / raw)
  To: horms, linux-sh, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

The R-Car CAN controllers can derive the CAN bus clock not only from their
peripheral clock input (clkp1) but also from the other internal clock (clkp2)
and external clock fed on CAN_CLK pin.  Describe those clocks in the device
tree,  along with  the USB_EXTAL clock  from which clkp2 is derived.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

---
Changes in version 5:
- fixed spelling in the comment to the CAN_CLK node;
- added Geert's ACK.

Changes in version 4:
- refreshed the patch.

Changes in version 3:
- new patch.

 arch/arm/boot/dts/r8a7791.dtsi            |   23 +++++++++++++++++++++--
 include/dt-bindings/clock/r8a7791-clock.h |    1 +
 2 files changed, 22 insertions(+), 2 deletions(-)

Index: renesas/arch/arm/boot/dts/r8a7791.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7791.dtsi
+++ renesas/arch/arm/boot/dts/r8a7791.dtsi
@@ -862,15 +862,34 @@
 			status = "disabled";
 		};
 
+		/* External USB clock - can be overridden by the board */
+		usb_extal_clk: usb_extal_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <48000000>;
+			clock-output-names = "usb_extal";
+		};
+
+		/* External CAN clock */
+		can_clk: can_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			/* This value must be overridden by the board. */
+			clock-frequency = <0>;
+			clock-output-names = "can_clk";
+			status = "disabled";
+		};
+
 		/* Special CPG clocks */
 		cpg_clocks: cpg_clocks@e6150000 {
 			compatible = "renesas,r8a7791-cpg-clocks",
 				     "renesas,rcar-gen2-cpg-clocks";
 			reg = <0 0xe6150000 0 0x1000>;
-			clocks = <&extal_clk>;
+			clocks = <&extal_clk &usb_extal_clk>;
 			#clock-cells = <1>;
 			clock-output-names = "main", "pll0", "pll1", "pll3",
-					     "lb", "qspi", "sdh", "sd0", "z";
+					     "lb", "qspi", "sdh", "sd0", "z",
+					     "rcan";
 		};
 
 		/* Variable factor clocks */
Index: renesas/include/dt-bindings/clock/r8a7791-clock.h
===================================================================
--- renesas.orig/include/dt-bindings/clock/r8a7791-clock.h
+++ renesas/include/dt-bindings/clock/r8a7791-clock.h
@@ -20,6 +20,7 @@
 #define R8A7791_CLK_SDH			6
 #define R8A7791_CLK_SD0			7
 #define R8A7791_CLK_Z			8
+#define R8A7791_CLK_RCAN		9
 
 /* MSTP0 */
 #define R8A7791_CLK_MSIOF0		0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v5 2/3] ARM: shmobile: r8a7791: add CAN DT support
  2015-01-05 22:22 [PATCH v5 0/3] Add R8A7791/Henninger board CAN DT support Sergei Shtylyov
  2015-01-05 22:24 ` [PATCH v5 1/3] ARM: shmobile: r8a7791: add CAN clocks Sergei Shtylyov
@ 2015-01-05 22:25 ` Sergei Shtylyov
  2015-01-05 22:26 ` [PATCH v5 3/3] ARM: shmobile: henninger: add CAN0 " Sergei Shtylyov
  2015-02-19 21:44 ` [PATCH v5 0/3] Add R8A7791/Henninger board CAN " Sergei Shtylyov
  3 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2015-01-05 22:25 UTC (permalink / raw)
  To: horms, linux-sh, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

Define the generic R8A7791 parts of the CAN0/1 device nodes.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

---
Changes in version 5:
- fixed whitespace errors/warnings given by checkpatch.pl;
- added Geert's ACK.

Changes in version 4:
- refreshed the patch.

Changes in version 3:
- added 2 more CAN clocks along with "clock-names" property in the CAN0/1 device
  nodes;
- refreshed the patch.

Changes in version 2:
- fixed the "compatible" property in the CAN device nodes.

 arch/arm/boot/dts/r8a7791.dtsi |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7791.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7791.dtsi
+++ renesas/arch/arm/boot/dts/r8a7791.dtsi
@@ -816,6 +816,26 @@
 		};
 	};
 
+	can0: can@e6e80000 {
+		compatible = "renesas,can-r8a7791";
+		reg = <0 0xe6e80000 0 0x1000>;
+		interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
+			 <&cpg_clocks R8A7791_CLK_RCAN>, <&can_clk>;
+		clock-names = "clkp1", "clkp2", "can_clk";
+		status = "disabled";
+	};
+
+	can1: can@e6e88000 {
+		compatible = "renesas,can-r8a7791";
+		reg = <0 0xe6e88000 0 0x1000>;
+		interrupts = <0 187 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7791_CLK_RCAN1>,
+			 <&cpg_clocks R8A7791_CLK_RCAN>, <&can_clk>;
+		clock-names = "clkp1", "clkp2", "can_clk";
+		status = "disabled";
+	};
+
 	clocks {
 		#address-cells = <2>;
 		#size-cells = <2>;


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v5 3/3] ARM: shmobile: henninger: add CAN0 DT support
  2015-01-05 22:22 [PATCH v5 0/3] Add R8A7791/Henninger board CAN DT support Sergei Shtylyov
  2015-01-05 22:24 ` [PATCH v5 1/3] ARM: shmobile: r8a7791: add CAN clocks Sergei Shtylyov
  2015-01-05 22:25 ` [PATCH v5 2/3] ARM: shmobile: r8a7791: add CAN DT support Sergei Shtylyov
@ 2015-01-05 22:26 ` Sergei Shtylyov
  2015-02-19 21:44 ` [PATCH v5 0/3] Add R8A7791/Henninger board CAN " Sergei Shtylyov
  3 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2015-01-05 22:26 UTC (permalink / raw)
  To: horms, linux-sh, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

Define the Henninger board dependent part of the CAN0 device node.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Changes in version 4:
- refreshed the patch.

Changes in version 3:
- changed "can0_data_a" to "can0_data", removed "can_clk_d" in the
  "renesas,groups" property;
- moved CAN0 node to go after all others;
- refreshed the patch.

 arch/arm/boot/dts/r8a7791-henninger.dts |   11 +++++++++++
 1 file changed, 11 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7791-henninger.dts
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7791-henninger.dts
+++ renesas/arch/arm/boot/dts/r8a7791-henninger.dts
@@ -147,6 +147,11 @@
 		renesas,groups = "vin0_data8", "vin0_clk";
 		renesas,function = "vin0";
 	};
+
+	can0_pins: can0 {
+		renesas,groups = "can0_data";
+		renesas,function = "can0";
+	};
 };
 
 &scif0 {
@@ -321,3 +326,9 @@
 		};
 	};
 };
+
+&can0 {
+	pinctrl-0 = <&can0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v5 0/3] Add R8A7791/Henninger board CAN DT support
  2015-01-05 22:22 [PATCH v5 0/3] Add R8A7791/Henninger board CAN DT support Sergei Shtylyov
                   ` (2 preceding siblings ...)
  2015-01-05 22:26 ` [PATCH v5 3/3] ARM: shmobile: henninger: add CAN0 " Sergei Shtylyov
@ 2015-02-19 21:44 ` Sergei Shtylyov
  2015-02-19 22:13   ` Simon Horman
  3 siblings, 1 reply; 7+ messages in thread
From: Sergei Shtylyov @ 2015-02-19 21:44 UTC (permalink / raw)
  To: horms, linux-sh, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

On 01/06/2015 01:22 AM, Sergei Shtylyov wrote:

>     Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
> 'renesas-devel-20141231-v3.19-rc2' tag. Here we add the CAN device tree support
> for the R8A7791-based Henninger board. It depends on the clk driver RCAN clock
> patch reposted today in order to work.

    Simon, now that this patch has been merged, could you merge the patchset too?

> [1/3] ARM: shmobile: r8a7791: add CAN clocks
> [2/3] ARM: shmobile: r8a7791: add CAN DT support
> [3/3] ARM: shmobile: henninger: add CAN0 DT support

WBR, Sergei


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v5 0/3] Add R8A7791/Henninger board CAN DT support
  2015-02-19 21:44 ` [PATCH v5 0/3] Add R8A7791/Henninger board CAN " Sergei Shtylyov
@ 2015-02-19 22:13   ` Simon Horman
       [not found]     ` <20150219221346.GB617-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Horman @ 2015-02-19 22:13 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-sh, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
	galak, devicetree, magnus.damm, linux, linux-arm-kernel

On Fri, Feb 20, 2015 at 12:44:26AM +0300, Sergei Shtylyov wrote:
> On 01/06/2015 01:22 AM, Sergei Shtylyov wrote:
> 
> >    Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
> >'renesas-devel-20141231-v3.19-rc2' tag. Here we add the CAN device tree support
> >for the R8A7791-based Henninger board. It depends on the clk driver RCAN clock
> >patch reposted today in order to work.
> 
>    Simon, now that this patch has been merged, could you merge the patchset too?

Sure, I have queued them up as part of renesas-devel-20150219v2-v3.19

> >[1/3] ARM: shmobile: r8a7791: add CAN clocks
> >[2/3] ARM: shmobile: r8a7791: add CAN DT support
> >[3/3] ARM: shmobile: henninger: add CAN0 DT support
> 
> WBR, Sergei
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v5 0/3] Add R8A7791/Henninger board CAN DT support
       [not found]     ` <20150219221346.GB617-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
@ 2015-02-19 22:39       ` Sergei Shtylyov
  0 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2015-02-19 22:39 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, devicetree-u79uwXL29TY76Z2rM5mHXA,
	magnus.damm-Re5JQEeQqe8AvxtiuMwx3w, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 02/20/2015 01:13 AM, Simon Horman wrote:

>>>     Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
>>> 'renesas-devel-20141231-v3.19-rc2' tag. Here we add the CAN device tree support
>>> for the R8A7791-based Henninger board. It depends on the clk driver RCAN clock
>>> patch reposted today in order to work.

>>     Simon, now that this patch has been merged, could you merge the patchset too?

> Sure, I have queued them up as part of renesas-devel-20150219v2-v3.19

    Thank you. Mike Turquette said he'd send a pull request soonish...

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-19 22:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05 22:22 [PATCH v5 0/3] Add R8A7791/Henninger board CAN DT support Sergei Shtylyov
2015-01-05 22:24 ` [PATCH v5 1/3] ARM: shmobile: r8a7791: add CAN clocks Sergei Shtylyov
2015-01-05 22:25 ` [PATCH v5 2/3] ARM: shmobile: r8a7791: add CAN DT support Sergei Shtylyov
2015-01-05 22:26 ` [PATCH v5 3/3] ARM: shmobile: henninger: add CAN0 " Sergei Shtylyov
2015-02-19 21:44 ` [PATCH v5 0/3] Add R8A7791/Henninger board CAN " Sergei Shtylyov
2015-02-19 22:13   ` Simon Horman
     [not found]     ` <20150219221346.GB617-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2015-02-19 22:39       ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).