linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree
@ 2016-03-15  0:26 Simon Horman
  2016-03-15  7:09 ` Ramesh Shanmugasundaram
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2016-03-15  0:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

this short series adds CAN clocks and nodes to the r8a7794 device tree.

I am not aware of an r8a7794 board that exposes CAN - neither the alt nor
the silk board appear to - and thus am unsure of a way to test these
changes.  However, they are based on what is present for the r8a7791 SoC
and I am unable to find a difference in the SoC documentation.

This series is similar to a similar series I posted for the r8a7794
in January.

Based on renesas-devel-20160311-v4.5-rc7.

Changes in v2
* Correct clock node names
* Add MSTP9 clocks
* Omit clock-output-names property from new nodes

Simon Horman (2):
  ARM: dts: r8a7794: add CAN clocks to device tree
  ARM: dts: r8a7794: add CAN nodes to device tree

 arch/arm/boot/dts/r8a7794.dtsi            | 55 +++++++++++++++++++++++++++----
 include/dt-bindings/clock/r8a7794-clock.h |  3 ++
 2 files changed, 51 insertions(+), 7 deletions(-)

-- 
2.1.4

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

* [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree
  2016-03-15  0:26 Simon Horman
@ 2016-03-15  7:09 ` Ramesh Shanmugasundaram
  2016-03-15  8:02   ` Simon Horman
  0 siblings, 1 reply; 9+ messages in thread
From: Ramesh Shanmugasundaram @ 2016-03-15  7:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

> Subject: [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree

r8a7794?

> 
> Hi,
> 
> this short series adds CAN clocks and nodes to the r8a7794 device tree.
> 
> I am not aware of an r8a7794 board that exposes CAN - neither the alt nor
> the silk board appear to - and thus am unsure of a way to test these
> changes.  However, they are based on what is present for the r8a7791 SoC
> and I am unable to find a difference in the SoC documentation.
> 
> This series is similar to a similar series I posted for the r8a7794 in
> January.
> 
> Based on renesas-devel-20160311-v4.5-rc7.
> 
> Changes in v2
> * Correct clock node names
> * Add MSTP9 clocks
> * Omit clock-output-names property from new nodes

Acked-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

for this series.

Thanks,
Ramesh

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

* [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree
  2016-03-15  7:09 ` Ramesh Shanmugasundaram
@ 2016-03-15  8:02   ` Simon Horman
  2016-03-16  0:10     ` Simon Horman
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2016-03-15  8:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 15, 2016 at 07:09:23AM +0000, Ramesh Shanmugasundaram wrote:
> Hi Simon,
> 
> > Subject: [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree
> 
> r8a7794?

Yes, my bad.

> > 
> > Hi,
> > 
> > this short series adds CAN clocks and nodes to the r8a7794 device tree.
> > 
> > I am not aware of an r8a7794 board that exposes CAN - neither the alt nor
> > the silk board appear to - and thus am unsure of a way to test these
> > changes.  However, they are based on what is present for the r8a7791 SoC
> > and I am unable to find a difference in the SoC documentation.
> > 
> > This series is similar to a similar series I posted for the r8a7794 in
> > January.
> > 
> > Based on renesas-devel-20160311-v4.5-rc7.
> > 
> > Changes in v2
> > * Correct clock node names
> > * Add MSTP9 clocks
> > * Omit clock-output-names property from new nodes
> 
> Acked-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> 
> for this series.

Thanks

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

* [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree
  2016-03-15  8:02   ` Simon Horman
@ 2016-03-16  0:10     ` Simon Horman
  0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2016-03-16  0:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 15, 2016 at 05:02:32PM +0900, Simon Horman wrote:
> On Tue, Mar 15, 2016 at 07:09:23AM +0000, Ramesh Shanmugasundaram wrote:
> > Hi Simon,
> > 
> > > Subject: [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree
> > 
> > r8a7794?
> 
> Yes, my bad.
> 
> > > 
> > > Hi,
> > > 
> > > this short series adds CAN clocks and nodes to the r8a7794 device tree.
> > > 
> > > I am not aware of an r8a7794 board that exposes CAN - neither the alt nor
> > > the silk board appear to - and thus am unsure of a way to test these
> > > changes.  However, they are based on what is present for the r8a7791 SoC
> > > and I am unable to find a difference in the SoC documentation.
> > > 
> > > This series is similar to a similar series I posted for the r8a7794 in
> > > January.
> > > 
> > > Based on renesas-devel-20160311-v4.5-rc7.
> > > 
> > > Changes in v2
> > > * Correct clock node names
> > > * Add MSTP9 clocks
> > > * Omit clock-output-names property from new nodes
> > 
> > Acked-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> > 
> > for this series.
> 
> Thanks

I have gone ahead and queued up this series.

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

* [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree
@ 2016-03-16  1:52 Simon Horman
  2016-03-16  1:52 ` [PATCH v2 1/2] ARM: dts: r8a7793: add CAN clocks " Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Simon Horman @ 2016-03-16  1:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

this short series adds CAN clocks and nodes to the r8a7793 device tree.

I am not aware of an r8a7793 board that exposes CAN - the gose
board does not appear to - and thus am unsure of a way to test these changes.
However, they are based on what is present for the r8a7791 SoC and
I am unable to find a difference in the SoC documentation.

This series is similar to a series I posted for the r8a7794
earlier this week.

Based on renesas-devel-20160315-v4.5

Changes in v2
* Correct clock node names
* Add MSTP9 clocks
* Omit clock-output-names property from new nodes
* Use "renesas,rcar-gen2-can" compat string

Simon Horman (2):
  ARM: dts: r8a7793: add CAN clocks to device tree
  ARM: dts: r8a7793: add CAN nodes to device tree

 arch/arm/boot/dts/r8a7793.dtsi | 49 ++++++++++++++++++++++++++++++++++++++----
 1 file changed, 45 insertions(+), 4 deletions(-)

-- 
2.1.4

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

* [PATCH v2 1/2] ARM: dts: r8a7793: add CAN clocks to device tree
  2016-03-16  1:52 [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree Simon Horman
@ 2016-03-16  1:52 ` Simon Horman
  2016-03-16  8:45   ` Geert Uytterhoeven
  2016-03-16  1:52 ` [PATCH v2 2/2] ARM: dts: r8a7793: add CAN nodes " Simon Horman
  2016-03-17  2:09 ` [PATCH v2 0/2] ARM: dts: r8a7793: add CAN " Simon Horman
  2 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2016-03-16  1:52 UTC (permalink / raw)
  To: 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.

Based on work by Sergei Shtylyov for the r8a7791 SoC.

Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
v2
* Rebase
* Name clock nodes can and usb_extal
* Do not add clock-output-names property to new nodes
* Add MSTP9 clocks

Notes:
* "rcan" is already present in the clock-output-names property of
  the cpg_clocks node
* R8A7793_CLK_RCAN* are already present in
  include/dt-bindings/clock/r8a7793-clock.h
---
 arch/arm/boot/dts/r8a7793.dtsi | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index b48215945241..3d21a00f5b38 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -843,6 +843,22 @@
 			clock-output-names = "audio_clk_c";
 		};
 
+		/* External USB clock - can be overridden by the board */
+		usb_extal_clk: usb_extal {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <48000000>;
+		};
+
+		/* External CAN clock */
+		can_clk: can {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			/* This value must be overridden by the board. */
+			clock-frequency = <0>;
+			status = "disabled";
+		};
+
 		/* External SCIF clock */
 		scif_clk: scif {
 			compatible = "fixed-clock";
@@ -857,7 +873,7 @@
 			compatible = "renesas,r8a7793-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",
@@ -1098,6 +1114,7 @@
 			reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
 			clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
 				 <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
+				 <&p_clk>, <&p_clk>,
 				 <&cpg_clocks R8A7793_CLK_QSPI>, <&hp_clk>,
 				 <&cp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>,
 				 <&hp_clk>, <&hp_clk>;
@@ -1107,7 +1124,8 @@
 				R8A7793_CLK_GPIO5 R8A7793_CLK_GPIO4
 				R8A7793_CLK_GPIO3 R8A7793_CLK_GPIO2
 				R8A7793_CLK_GPIO1 R8A7793_CLK_GPIO0
-				R8A7793_CLK_QSPI_MOD R8A7793_CLK_I2C5
+				R8A7793_CLK_QSPI_MOD R8A7793_CLK_RCAN1
+				R8A7793_CLK_RCAN0 R8A7793_CLK_I2C5
 				R8A7793_CLK_IICDVFS R8A7793_CLK_I2C4
 				R8A7793_CLK_I2C3 R8A7793_CLK_I2C2
 				R8A7793_CLK_I2C1 R8A7793_CLK_I2C0
@@ -1115,8 +1133,9 @@
 			clock-output-names =
 				"gpio7", "gpio6", "gpio5", "gpio4",
 				"gpio3", "gpio2", "gpio1", "gpio0",
-				"qspi_mod", "i2c5", "i2c6", "i2c4",
-				"i2c3", "i2c2", "i2c1", "i2c0";
+				"rcan1", "rcan0", "qspi_mod", "i2c5",
+				"i2c6", "i2c4", "i2c3", "i2c2", "i2c1",
+				"i2c0";
 		};
 		mstp10_clks: mstp10_clks at e6150998 {
 			compatible = "renesas,r8a7793-mstp-clocks", "renesas,cpg-mstp-clocks";
-- 
2.1.4

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

* [PATCH v2 2/2] ARM: dts: r8a7793: add CAN nodes to device tree
  2016-03-16  1:52 [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree Simon Horman
  2016-03-16  1:52 ` [PATCH v2 1/2] ARM: dts: r8a7793: add CAN clocks " Simon Horman
@ 2016-03-16  1:52 ` Simon Horman
  2016-03-17  2:09 ` [PATCH v2 0/2] ARM: dts: r8a7793: add CAN " Simon Horman
  2 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2016-03-16  1:52 UTC (permalink / raw)
  To: linux-arm-kernel

Add CAN nodes to r8a7793 device tree.

Based on work by Sergei Shtylyov for the r8a7791 SoC.

Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
v2
* Use "renesas,rcar-gen2-can" compat string
---
 arch/arm/boot/dts/r8a7793.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index 3d21a00f5b38..4ed786c22560 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -806,6 +806,28 @@
 		};
 	};
 
+	can0: can at e6e80000 {
+		compatible = "renesas,can-r8a7793", "renesas,rcar-gen2-can";
+		reg = <0 0xe6e80000 0 0x1000>;
+		interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7793_CLK_RCAN0>,
+			 <&cpg_clocks R8A7793_CLK_RCAN>, <&can_clk>;
+		clock-names = "clkp1", "clkp2", "can_clk";
+		power-domains = <&cpg_clocks>;
+		status = "disabled";
+	};
+
+	can1: can at e6e88000 {
+		compatible = "renesas,can-r8a7793", "renesas,rcar-gen2-can";
+		reg = <0 0xe6e88000 0 0x1000>;
+		interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7793_CLK_RCAN1>,
+			 <&cpg_clocks R8A7793_CLK_RCAN>, <&can_clk>;
+		clock-names = "clkp1", "clkp2", "can_clk";
+		power-domains = <&cpg_clocks>;
+		status = "disabled";
+	};
+
 	clocks {
 		#address-cells = <2>;
 		#size-cells = <2>;
-- 
2.1.4

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

* [PATCH v2 1/2] ARM: dts: r8a7793: add CAN clocks to device tree
  2016-03-16  1:52 ` [PATCH v2 1/2] ARM: dts: r8a7793: add CAN clocks " Simon Horman
@ 2016-03-16  8:45   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2016-03-16  8:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 16, 2016 at 2:52 AM, Simon Horman
<horms+renesas@verge.net.au> wrote:
> 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.
>
> Based on work by Sergei Shtylyov for the r8a7791 SoC.
>
> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

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

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

* [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree
  2016-03-16  1:52 [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree Simon Horman
  2016-03-16  1:52 ` [PATCH v2 1/2] ARM: dts: r8a7793: add CAN clocks " Simon Horman
  2016-03-16  1:52 ` [PATCH v2 2/2] ARM: dts: r8a7793: add CAN nodes " Simon Horman
@ 2016-03-17  2:09 ` Simon Horman
  2 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2016-03-17  2:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 16, 2016 at 10:52:54AM +0900, Simon Horman wrote:
> Hi,
> 
> this short series adds CAN clocks and nodes to the r8a7793 device tree.
> 
> I am not aware of an r8a7793 board that exposes CAN - the gose
> board does not appear to - and thus am unsure of a way to test these changes.
> However, they are based on what is present for the r8a7791 SoC and
> I am unable to find a difference in the SoC documentation.
> 
> This series is similar to a series I posted for the r8a7794
> earlier this week.
> 
> Based on renesas-devel-20160315-v4.5

I have queued this up for v4.7.

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

end of thread, other threads:[~2016-03-17  2:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16  1:52 [PATCH v2 0/2] ARM: dts: r8a7793: add CAN to device tree Simon Horman
2016-03-16  1:52 ` [PATCH v2 1/2] ARM: dts: r8a7793: add CAN clocks " Simon Horman
2016-03-16  8:45   ` Geert Uytterhoeven
2016-03-16  1:52 ` [PATCH v2 2/2] ARM: dts: r8a7793: add CAN nodes " Simon Horman
2016-03-17  2:09 ` [PATCH v2 0/2] ARM: dts: r8a7793: add CAN " Simon Horman
  -- strict thread matches above, loose matches on Subject: below --
2016-03-15  0:26 Simon Horman
2016-03-15  7:09 ` Ramesh Shanmugasundaram
2016-03-15  8:02   ` Simon Horman
2016-03-16  0:10     ` Simon Horman

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).