linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT
@ 2014-07-07  7:54 Simon Horman
  2014-07-07  7:54 ` [PATCH v2 01/30] ARM: shmobile: r8a7778: add SCI clock support for DT Simon Horman
                   ` (30 more replies)
  0 siblings, 31 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

The purpose of this series is to enable SCI, CMT and TMU using DT
on boards that use DT-reference. Or in other-words boards other
than the mackerel that are not covered by Laurent Pinchart's work in
the same area.

This series is based on a merge of:

* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
* renesas-devel-v3.16-rc4-20140707

It also depends on
[PATCH v2] serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a


This series does not enable TMU for the sh73a0/kzm9g-reference
as:

* It appears to use sh-intc as an interrupt source and I am unsure
  how to use this from DT at this time and;
* It is not currently enabled in dt-reference.

I will address this as a follow-up if appropriate.


Simon Horman (30):
  ARM: shmobile: r8a7778: add SCI clock support for DT
  ARM: shmobile: r8a7778: Add SCIF nodes
  ARM: shmobile: bockw-reference: Initialise SCIF device using DT
  ARM: shmobile: r8a7778: add TMU clock support for DT
  ARM: shmobile: r8a7778: Add TMU nodes
  ARM: shmobile: bockw-reference: Initialise TMU device using DT
  ARM: shmobile: r8a73a4: add SCI clock support for DT
  ARM: shmobile: r8a73a4: Add SCIF nodes
  ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT
  ARM: shmobile: r8a73a4: add CMT1 clock support for DT
  ARM: shmobile: r8a73a4: Add CMT1 node
  ARM: shmobile: r8a73a4: Rename cmt registration helper
  ARM: shmobile: ape6evm-reference: Initialise CMT1 device using DT
  ARM: shmobile: r8a73a4: Remove empty r8a73a4_add_dt_devices
  ARM: shmobile: r8a7740: correct SCI clock support for DT
  ARM: shmobile: r8a7740: Add SCIF nodes
  ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using
    DT
  ARM: shmobile: r8a7740: add TMU clock support for DT
  ARM: shmobile: r8a7740: Add TMU nodes
  ARM: shmobile: armadillo800eva-reference: Initialise TMU device using
    DT
  ARM: shmobile: r8a7740: add CMT1 clock support for DT
  ARM: shmobile: r8a7740: Add CMT1 node
  ARM: shmobile: armadillo800eva-reference: Initialise CMT1 device using
    DT
  ARM: shmobile: r8a7740: Remove unnecessary
    r8a7740_add_standard_devices_dt()
  ARM: shmobile: sh73a0: add SCI clock support for DT
  ARM: shmobile: sh73a0: Add SCIF nodes
  ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT
  ARM: shmobile: sh73a0: add CMT1 clock support for DT
  ARM: shmobile: sh73a0: Add CMT1 node
  ARM: shmobile: kzm9g-reference: Initialise CMT1 device using DT

 arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts    | 18 +++-
 arch/arm/boot/dts/r8a73a4.dtsi                     | 52 ++++++++++++
 .../boot/dts/r8a7740-armadillo800eva-reference.dts | 22 ++++-
 arch/arm/boot/dts/r8a7740.dtsi                     | 97 ++++++++++++++++++++++
 arch/arm/boot/dts/r8a7778-bockw-reference.dts      | 18 +++-
 arch/arm/boot/dts/r8a7778.dtsi                     | 78 +++++++++++++++++
 arch/arm/boot/dts/sh73a0-kzm9g-reference.dts       | 18 +++-
 arch/arm/boot/dts/sh73a0.dtsi                      | 83 ++++++++++++++++++
 arch/arm/mach-shmobile/board-ape6evm-reference.c   |  1 -
 .../board-armadillo800eva-reference.c              |  3 +-
 arch/arm/mach-shmobile/clock-r8a73a4.c             |  7 ++
 arch/arm/mach-shmobile/clock-r8a7740.c             | 21 +++--
 arch/arm/mach-shmobile/clock-r8a7778.c             |  8 ++
 arch/arm/mach-shmobile/clock-sh73a0.c              | 10 +++
 arch/arm/mach-shmobile/r8a73a4.h                   |  1 -
 arch/arm/mach-shmobile/r8a7740.h                   |  1 -
 arch/arm/mach-shmobile/setup-r8a73a4.c             | 21 ++---
 arch/arm/mach-shmobile/setup-r8a7740.c             | 18 +---
 arch/arm/mach-shmobile/setup-r8a7778.c             | 15 ++--
 arch/arm/mach-shmobile/setup-sh73a0.c              | 11 +--
 20 files changed, 431 insertions(+), 72 deletions(-)

-- 
2.0.0.rc2

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

* [PATCH v2 01/30] ARM: shmobile: r8a7778: add SCI clock support for DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 02/30] ARM: shmobile: r8a7778: Add SCIF nodes Simon Horman
                   ` (29 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This will be used when initialising SCI devices using DT
until common clock framework support is added.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* Added ack from Laurent Pinchart
---
 arch/arm/mach-shmobile/clock-r8a7778.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
index 16bbc94..9557907 100644
--- a/arch/arm/mach-shmobile/clock-r8a7778.c
+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
@@ -202,11 +202,17 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */
 	CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */
 	CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */
+	CLKDEV_DEV_ID("ffe40000.serial", &mstp_clks[MSTP026]), /* SCIF0 */
 	CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */
+	CLKDEV_DEV_ID("ffe41000.serial", &mstp_clks[MSTP025]), /* SCIF1 */
 	CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */
+	CLKDEV_DEV_ID("ffe42000.serial", &mstp_clks[MSTP024]), /* SCIF2 */
 	CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */
+	CLKDEV_DEV_ID("ffe43000.serial", &mstp_clks[MSTP023]), /* SCIF3 */
 	CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
+	CLKDEV_DEV_ID("ffe44000.serial", &mstp_clks[MSTP022]), /* SCIF4 */
 	CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
+	CLKDEV_DEV_ID("ffe45000.serial", &mstp_clks[MSTP021]), /* SCIF5 */
 	CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */
 	CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */
 	CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */
-- 
2.0.0.rc2

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

* [PATCH v2 02/30] ARM: shmobile: r8a7778: Add SCIF nodes
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
  2014-07-07  7:54 ` [PATCH v2 01/30] ARM: shmobile: r8a7778: add SCI clock support for DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 03/30] ARM: shmobile: bockw-reference: Initialise SCIF device using DT Simon Horman
                   ` (28 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This describes all of the SCIF hardware of the r8a7778.
Each node is disabled and may be enabled as necessary
by board DTS files.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* Added ack from Laurent Pinchart
* Removed interrupt-parent property from each new node
  as it is inherited from the top-level.
* Expanded changelog
---
 arch/arm/boot/dts/r8a7778.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index 3af0a21..ecfdf4b 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -156,6 +156,48 @@
 		status = "disabled";
 	};
 
+	scif0: serial at ffe40000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe40000 0x100>;
+		interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif1: serial at ffe41000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe41000 0x100>;
+		interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif2: serial at ffe42000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe42000 0x100>;
+		interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif3: serial at ffe43000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe43000 0x100>;
+		interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif4: serial at ffe44000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe44000 0x100>;
+		interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif5: serial at ffe45000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe45000 0x100>;
+		interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
 	mmcif: mmc at ffe4e000 {
 		compatible = "renesas,sh-mmcif";
 		reg = <0xffe4e000 0x100>;
-- 
2.0.0.rc2

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

* [PATCH v2 03/30] ARM: shmobile: bockw-reference: Initialise SCIF device using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
  2014-07-07  7:54 ` [PATCH v2 01/30] ARM: shmobile: r8a7778: add SCI clock support for DT Simon Horman
  2014-07-07  7:54 ` [PATCH v2 02/30] ARM: shmobile: r8a7778: Add SCIF nodes Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 04/30] ARM: shmobile: r8a7778: add TMU clock support for DT Simon Horman
                   ` (27 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Initialise SCIF device using DT when booting bockw
using DT reference.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* Correct whitespace
* Added Ack from Laurent Pinchart

N.B: This only enables the production serial port (scif0) and not the
debug serial port. It is unclear to me if the debug port is scif1 or scif5.
And if the required PFC support is in place. At the very least the
latter appears to be missing from r8a7778-bockw-reference.dts.
---
 arch/arm/boot/dts/r8a7778-bockw-reference.dts | 14 +++++++++++---
 arch/arm/mach-shmobile/setup-r8a7778.c        | 12 ++++++------
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
index f76f6ec..3342c74 100644
--- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
@@ -23,6 +23,10 @@
 	model = "bockw";
 	compatible = "renesas,bockw-reference", "renesas,r8a7778";
 
+	aliases {
+		serial0 = &scif0;
+	};
+
 	chosen {
 		bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
 	};
@@ -70,9 +74,6 @@
 };
 
 &pfc {
-	pinctrl-0 = <&scif0_pins>;
-	pinctrl-names = "default";
-
 	scif0_pins: serial0 {
 		renesas,groups = "scif0_data_a", "scif0_ctrl";
 		renesas,function = "scif0";
@@ -124,3 +125,10 @@
 		};
 	};
 };
+
+&scif0 {
+	pinctrl-0 = <&scif0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 2ccc012..e218c46 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -294,12 +294,6 @@ void __init r8a7778_add_dt_devices(void)
 	}
 #endif
 
-	r8a7778_register_scif(0);
-	r8a7778_register_scif(1);
-	r8a7778_register_scif(2);
-	r8a7778_register_scif(3);
-	r8a7778_register_scif(4);
-	r8a7778_register_scif(5);
 	r8a7778_register_tmu(0);
 }
 
@@ -508,6 +502,12 @@ static void __init r8a7778_register_hpb_dmae(void)
 void __init r8a7778_add_standard_devices(void)
 {
 	r8a7778_add_dt_devices();
+	r8a7778_register_scif(0);
+	r8a7778_register_scif(1);
+	r8a7778_register_scif(2);
+	r8a7778_register_scif(3);
+	r8a7778_register_scif(4);
+	r8a7778_register_scif(5);
 	r8a7778_register_i2c(0);
 	r8a7778_register_i2c(1);
 	r8a7778_register_i2c(2);
-- 
2.0.0.rc2

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

* [PATCH v2 04/30] ARM: shmobile: r8a7778: add TMU clock support for DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (2 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 03/30] ARM: shmobile: bockw-reference: Initialise SCIF device using DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 05/30] ARM: shmobile: r8a7778: Add TMU nodes Simon Horman
                   ` (26 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This will be used when initialising TMU devices using DT
until common clock framework support is added.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* Added ack from Laurent Pinchart
---
 arch/arm/mach-shmobile/clock-r8a7778.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
index 9557907..67980a0 100644
--- a/arch/arm/mach-shmobile/clock-r8a7778.c
+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
@@ -244,7 +244,9 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_ICK_ID("src.7", "rcar_sound", &mstp_clks[MSTP524]),
 	CLKDEV_ICK_ID("src.8", "rcar_sound", &mstp_clks[MSTP523]),
 	CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP016]),
+	CLKDEV_ICK_ID("fck", "ffd80000.timer", &mstp_clks[MSTP016]),
 	CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP015]),
+	CLKDEV_ICK_ID("fck", "ffd81000.timer", &mstp_clks[MSTP015]),
 };
 
 void __init r8a7778_clock_init(void)
-- 
2.0.0.rc2

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

* [PATCH v2 05/30] ARM: shmobile: r8a7778: Add TMU nodes
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (3 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 04/30] ARM: shmobile: r8a7778: add TMU clock support for DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 06/30] ARM: shmobile: bockw-reference: Initialise TMU device using DT Simon Horman
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This describes all of the TMU hardware of the r8a7778.
Each node is disabled and may be enabled as necessary
by board DTS files.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* Added ack from Laurent Pinchart
* Expanded changelog
---
 arch/arm/boot/dts/r8a7778.dtsi | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index ecfdf4b..b5ea75e 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -156,6 +156,42 @@
 		status = "disabled";
 	};
 
+	tmu0: timer at ffd80000 {
+		compatible = "renesas,tmu";
+		reg = <0xffd80000 0x30>;
+		interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 33 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 34 IRQ_TYPE_LEVEL_HIGH>;
+
+		#renesas,channels = <3>;
+
+		status = "disabled";
+	};
+
+	tmu1: timer at ffd81000 {
+		compatible = "renesas,tmu";
+		reg = <0xffd81000 0x30>;
+		interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 37 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 38 IRQ_TYPE_LEVEL_HIGH>;
+
+		#renesas,channels = <3>;
+
+		status = "disabled";
+	};
+
+	tmu2: timer at ffd82000 {
+		compatible = "renesas,tmu";
+		reg = <0xffd82000 0x30>;
+		interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 41 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 42 IRQ_TYPE_LEVEL_HIGH>;
+
+		#renesas,channels = <3>;
+
+		status = "disabled";
+	};
+
 	scif0: serial at ffe40000 {
 		compatible = "renesas,scif-r8a7778", "renesas,scif";
 		reg = <0xffe40000 0x100>;
-- 
2.0.0.rc2

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

* [PATCH v2 06/30] ARM: shmobile: bockw-reference: Initialise TMU device using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (4 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 05/30] ARM: shmobile: r8a7778: Add TMU nodes Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 07/30] ARM: shmobile: r8a73a4: add SCI clock support for DT Simon Horman
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Initialise TMU device using DT when booting bockw
using DT-reference.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* Added Ack from Laurent Pinchart
---
 arch/arm/boot/dts/r8a7778-bockw-reference.dts | 4 ++++
 arch/arm/mach-shmobile/setup-r8a7778.c        | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
index 3342c74..970237c 100644
--- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
@@ -73,6 +73,10 @@
 	status = "okay";
 };
 
+&tmu0 {
+	status = "okay";
+};
+
 &pfc {
 	scif0_pins: serial0 {
 		renesas,groups = "scif0_data_a", "scif0_ctrl";
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index e218c46..575148d 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -293,8 +293,6 @@ void __init r8a7778_add_dt_devices(void)
 		l2x0_init(base, 0x00400000, 0xc20f0fff);
 	}
 #endif
-
-	r8a7778_register_tmu(0);
 }
 
 /* HPB-DMA */
@@ -502,6 +500,7 @@ static void __init r8a7778_register_hpb_dmae(void)
 void __init r8a7778_add_standard_devices(void)
 {
 	r8a7778_add_dt_devices();
+	r8a7778_register_tmu(0);
 	r8a7778_register_scif(0);
 	r8a7778_register_scif(1);
 	r8a7778_register_scif(2);
-- 
2.0.0.rc2

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

* [PATCH v2 07/30] ARM: shmobile: r8a73a4: add SCI clock support for DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (5 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 06/30] ARM: shmobile: bockw-reference: Initialise TMU device using DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 08/30] ARM: shmobile: r8a73a4: Add SCIF nodes Simon Horman
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This will be used when initialising SCI devices using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/clock-r8a73a4.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
index 0f43149..49d1397 100644
--- a/arch/arm/mach-shmobile/clock-r8a73a4.c
+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
@@ -574,11 +574,17 @@ static struct clk_lookup lookups[] = {
 
 	/* MSTP */
 	CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]),
+	CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]),
 	CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]),
+	CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]),
 	CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]),
+	CLKDEV_DEV_ID("e6c20000.serial", &mstp_clks[MSTP206]),
 	CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]),
+	CLKDEV_DEV_ID("e6c30000.serial", &mstp_clks[MSTP207]),
 	CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]),
+	CLKDEV_DEV_ID("e6ce0000.serial", &mstp_clks[MSTP216]),
 	CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]),
+	CLKDEV_DEV_ID("e6cf0000.serial", &mstp_clks[MSTP217]),
 	CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]),
 	CLKDEV_DEV_ID("e6700020.dma-controller", &mstp_clks[MSTP218]),
 	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
-- 
2.0.0.rc2

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

* [PATCH v2 08/30] ARM: shmobile: r8a73a4: Add SCIF nodes
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (6 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 07/30] ARM: shmobile: r8a73a4: add SCI clock support for DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 09/30] ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT Simon Horman
                   ` (22 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This describes all of the SCIF hardware of the r8a73a4.
Each node is disabled and may be enabled as necessary
by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/r8a73a4.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index 82c5ac8..d8ec505 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -252,6 +252,48 @@
 		status = "disabled";
 	};
 
+	scifa0: serial at e6c40000 {
+		compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
+		reg = <0 0xe6c40000 0 0x100>;
+		interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa1: serial at e6c50000 {
+		compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
+		reg = <0 0xe6c50000 0 0x100>;
+		interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifb2: serial at e6c20000 {
+		compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
+		reg = <0 0xe6c20000 0 0x100>;
+		interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifb3: serial at e6c30000 {
+		compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
+		reg = <0 0xe6c30000 0 0x100>;
+		interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifb4: serial at e6ce0000 {
+		compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
+		reg = <0 0xe6ce0000 0 0x100>;
+		interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifb5: serial at e6cf0000 {
+		compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
+		reg = <0 0xe6cf0000 0 0x100>;
+		interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
 	mmcif0: mmc at ee200000 {
 		compatible = "renesas,sh-mmcif";
 		reg = <0 0xee200000 0 0x80>;
-- 
2.0.0.rc2

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

* [PATCH v2 09/30] ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (7 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 08/30] ARM: shmobile: r8a73a4: Add SCIF nodes Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 10/30] ARM: shmobile: r8a73a4: add CMT1 clock support for DT Simon Horman
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Initialise SCIF device using DT when booting ape6evm
using DT reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | 14 +++++++++++---
 arch/arm/mach-shmobile/setup-r8a73a4.c          | 12 ++++++------
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
index 70b1fff..a860f32 100644
--- a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
+++ b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
@@ -16,6 +16,10 @@
 	model = "APE6EVM";
 	compatible = "renesas,ape6evm-reference", "renesas,r8a73a4";
 
+	aliases {
+		serial0 = &scifa0;
+	};
+
 	chosen {
 		bootargs = "console=ttySC0,115200 ignore_loglevel rw";
 	};
@@ -90,9 +94,6 @@
 };
 
 &pfc {
-	pinctrl-0 = <&scifa0_pins>;
-	pinctrl-names = "default";
-
 	scifa0_pins: serial0 {
 		renesas,groups = "scifa0_data";
 		renesas,function = "scifa0";
@@ -123,6 +124,13 @@
 	status = "okay";
 };
 
+&scifa0 {
+	pinctrl-0 = <&scifa0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
 &sdhi0 {
 	vmmc-supply = <&vcc_sdhi0>;
 	bus-width = <4>;
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index f470b3c..2e1ec5e 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -189,12 +189,6 @@ static struct resource cmt1_resources[] = {
 
 void __init r8a73a4_add_dt_devices(void)
 {
-	r8a73a4_register_scif(0);
-	r8a73a4_register_scif(1);
-	r8a73a4_register_scif(2);
-	r8a73a4_register_scif(3);
-	r8a73a4_register_scif(4);
-	r8a73a4_register_scif(5);
 	r8a7790_register_cmt(1);
 }
 
@@ -289,6 +283,12 @@ static struct resource dma_resources[] = {
 void __init r8a73a4_add_standard_devices(void)
 {
 	r8a73a4_add_dt_devices();
+	r8a73a4_register_scif(0);
+	r8a73a4_register_scif(1);
+	r8a73a4_register_scif(2);
+	r8a73a4_register_scif(3);
+	r8a73a4_register_scif(4);
+	r8a73a4_register_scif(5);
 	r8a73a4_register_irqc(0);
 	r8a73a4_register_irqc(1);
 	r8a73a4_register_thermal();
-- 
2.0.0.rc2

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

* [PATCH v2 10/30] ARM: shmobile: r8a73a4: add CMT1 clock support for DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (8 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 09/30] ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 11/30] ARM: shmobile: r8a73a4: Add CMT1 node Simon Horman
                   ` (20 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This will be used when initialising CMT1 device using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/clock-r8a73a4.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
index 49d1397..c2330ea 100644
--- a/arch/arm/mach-shmobile/clock-r8a73a4.c
+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
@@ -604,6 +604,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]),
 	CLKDEV_DEV_ID("e6510000.i2c", &mstp_clks[MSTP323]),
 	CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.1", &mstp_clks[MSTP329]),
+	CLKDEV_ICK_ID("fck", "e6130000.timer", &mstp_clks[MSTP329]),
 	CLKDEV_DEV_ID("e60b0000.i2c", &mstp_clks[MSTP409]),
 	CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP410]),
 	CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP411]),
-- 
2.0.0.rc2

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

* [PATCH v2 11/30] ARM: shmobile: r8a73a4: Add CMT1 node
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (9 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 10/30] ARM: shmobile: r8a73a4: add CMT1 clock support for DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 12/30] ARM: shmobile: r8a73a4: Rename cmt registration helper Simon Horman
                   ` (19 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This describes all of the CMT1 hardware of the r8a73a4.
The node is disabled and may be enabled as necessary by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
N.B: This only adds cmt1, as per the legacy C code

v2
* First post
---
 arch/arm/boot/dts/r8a73a4.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index d8ec505..9bf3386 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -50,6 +50,16 @@
 			     <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
 	};
 
+	cmt1: timer at e6130000 {
+		compatible = "renesas,cmt-48-gen2";
+		reg = <0 0xe6130000 0 0x1004>;
+		interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>;
+
+		renesas,channels-mask = <0xff>;
+
+		status = "disabled";
+	};
+
 	irqc0: interrupt-controller at e61c0000 {
 		compatible = "renesas,irqc";
 		#interrupt-cells = <2>;
-- 
2.0.0.rc2

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

* [PATCH v2 12/30] ARM: shmobile: r8a73a4: Rename cmt registration helper
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (10 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 11/30] ARM: shmobile: r8a73a4: Add CMT1 node Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 13/30] ARM: shmobile: ape6evm-reference: Initialise CMT1 device using DT Simon Horman
                   ` (18 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Rename r8a7790_register_cmt() as r8a73a4_register_cmt() to
reflect name of the SoC in use. The use of r8a7790 appears
to be due to historical sharing of code from that SoC.
Shared code is no longer used.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/setup-r8a73a4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index 2e1ec5e..496ecf3 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -180,7 +180,7 @@ static struct resource cmt1_resources[] = {
 	DEFINE_RES_IRQ(gic_spi(120)),
 };
 
-#define r8a7790_register_cmt(idx)					\
+#define r8a73a4_register_cmt(idx)					\
 	platform_device_register_resndata(&platform_bus, "sh-cmt-48-gen2", \
 					  idx, cmt##idx##_resources,	\
 					  ARRAY_SIZE(cmt##idx##_resources), \
@@ -189,7 +189,7 @@ static struct resource cmt1_resources[] = {
 
 void __init r8a73a4_add_dt_devices(void)
 {
-	r8a7790_register_cmt(1);
+	r8a73a4_register_cmt(1);
 }
 
 /* DMA */
-- 
2.0.0.rc2

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

* [PATCH v2 13/30] ARM: shmobile: ape6evm-reference: Initialise CMT1 device using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (11 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 12/30] ARM: shmobile: r8a73a4: Rename cmt registration helper Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 14/30] ARM: shmobile: r8a73a4: Remove empty r8a73a4_add_dt_devices Simon Horman
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Initialise CMT1 device using DT when booting ape6evm
using DT-reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | 4 ++++
 arch/arm/mach-shmobile/setup-r8a73a4.c          | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
index a860f32..a42ba09 100644
--- a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
+++ b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
@@ -93,6 +93,10 @@
 	voltage-tolerance = <1>; /* 1% */
 };
 
+&cmt1 {
+	status = "okay";
+};
+
 &pfc {
 	scifa0_pins: serial0 {
 		renesas,groups = "scifa0_data";
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index 496ecf3..10e3f14 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -189,7 +189,6 @@ static struct resource cmt1_resources[] = {
 
 void __init r8a73a4_add_dt_devices(void)
 {
-	r8a73a4_register_cmt(1);
 }
 
 /* DMA */
@@ -282,7 +281,7 @@ static struct resource dma_resources[] = {
 
 void __init r8a73a4_add_standard_devices(void)
 {
-	r8a73a4_add_dt_devices();
+	r8a73a4_register_cmt(1);
 	r8a73a4_register_scif(0);
 	r8a73a4_register_scif(1);
 	r8a73a4_register_scif(2);
-- 
2.0.0.rc2

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

* [PATCH v2 14/30] ARM: shmobile: r8a73a4: Remove empty r8a73a4_add_dt_devices
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (12 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 13/30] ARM: shmobile: ape6evm-reference: Initialise CMT1 device using DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 15/30] ARM: shmobile: r8a7740: correct SCI clock support for DT Simon Horman
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

r8a73a4_add_dt_devices() no longer enables any devices
so remove it.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/board-ape6evm-reference.c | 1 -
 arch/arm/mach-shmobile/r8a73a4.h                 | 1 -
 arch/arm/mach-shmobile/setup-r8a73a4.c           | 4 ----
 3 files changed, 6 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c
index 2f7723e..f0aef6dc 100644
--- a/arch/arm/mach-shmobile/board-ape6evm-reference.c
+++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c
@@ -48,7 +48,6 @@ static void __init ape6evm_add_standard_devices(void)
 	clk_put(parent);
 	clk_put(mp);
 
-	r8a73a4_add_dt_devices();
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 	platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
 }
diff --git a/arch/arm/mach-shmobile/r8a73a4.h b/arch/arm/mach-shmobile/r8a73a4.h
index ce8bdd1..7ced9ab 100644
--- a/arch/arm/mach-shmobile/r8a73a4.h
+++ b/arch/arm/mach-shmobile/r8a73a4.h
@@ -11,7 +11,6 @@ enum {
 };
 
 void r8a73a4_add_standard_devices(void);
-void r8a73a4_add_dt_devices(void);
 void r8a73a4_clock_init(void);
 void r8a73a4_pinmux_init(void);
 void r8a73a4_init_early(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index 10e3f14..372cce4 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -187,10 +187,6 @@ static struct resource cmt1_resources[] = {
 					  &cmt##idx##_platform_data,	\
 					  sizeof(struct sh_timer_config))
 
-void __init r8a73a4_add_dt_devices(void)
-{
-}
-
 /* DMA */
 static const struct sh_dmae_slave_config dma_slaves[] = {
 	{
-- 
2.0.0.rc2

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

* [PATCH v2 15/30] ARM: shmobile: r8a7740: correct SCI clock support for DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (13 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 14/30] ARM: shmobile: r8a73a4: Remove empty r8a73a4_add_dt_devices Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 16/30] ARM: shmobile: r8a7740: Add SCIF nodes Simon Horman
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

When initialising SCI devices their names will be .serial
not .sci.

This will be used when initialising SCI devices using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/clock-r8a7740.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index 789091c..a60c324 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -556,27 +556,27 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh_mobile_ceu.1",	&mstp_clks[MSTP128]),
 
 	CLKDEV_DEV_ID("sh-sci.4",		&mstp_clks[MSTP200]),
-	CLKDEV_DEV_ID("e6c80000.sci",		&mstp_clks[MSTP200]),
+	CLKDEV_DEV_ID("e6c80000.serial",	&mstp_clks[MSTP200]),
 	CLKDEV_DEV_ID("sh-sci.3",		&mstp_clks[MSTP201]),
-	CLKDEV_DEV_ID("e6c70000.sci",		&mstp_clks[MSTP201]),
+	CLKDEV_DEV_ID("e6c70000.serial",	&mstp_clks[MSTP201]),
 	CLKDEV_DEV_ID("sh-sci.2",		&mstp_clks[MSTP202]),
-	CLKDEV_DEV_ID("e6c60000.sci",		&mstp_clks[MSTP202]),
+	CLKDEV_DEV_ID("e6c60000.serial",	&mstp_clks[MSTP202]),
 	CLKDEV_DEV_ID("sh-sci.1",		&mstp_clks[MSTP203]),
-	CLKDEV_DEV_ID("e6c50000.sci",		&mstp_clks[MSTP203]),
+	CLKDEV_DEV_ID("e6c50000.serial",	&mstp_clks[MSTP203]),
 	CLKDEV_DEV_ID("sh-sci.0",		&mstp_clks[MSTP204]),
-	CLKDEV_DEV_ID("e6c40000.sci",		&mstp_clks[MSTP204]),
+	CLKDEV_DEV_ID("e6c40000.serial",	&mstp_clks[MSTP204]),
 	CLKDEV_DEV_ID("sh-sci.8",		&mstp_clks[MSTP206]),
-	CLKDEV_DEV_ID("e6c30000.sci",		&mstp_clks[MSTP206]),
+	CLKDEV_DEV_ID("e6c30000.serial",	&mstp_clks[MSTP206]),
 	CLKDEV_DEV_ID("sh-sci.5",		&mstp_clks[MSTP207]),
-	CLKDEV_DEV_ID("e6cb0000.sci",		&mstp_clks[MSTP207]),
+	CLKDEV_DEV_ID("e6cb0000.serial",	&mstp_clks[MSTP207]),
 	CLKDEV_DEV_ID("sh-dma-engine.3",	&mstp_clks[MSTP214]),
 	CLKDEV_DEV_ID("sh-dma-engine.2",	&mstp_clks[MSTP216]),
 	CLKDEV_DEV_ID("sh-dma-engine.1",	&mstp_clks[MSTP217]),
 	CLKDEV_DEV_ID("sh-dma-engine.0",	&mstp_clks[MSTP218]),
 	CLKDEV_DEV_ID("sh-sci.7",		&mstp_clks[MSTP222]),
-	CLKDEV_DEV_ID("e6cd0000.sci",		&mstp_clks[MSTP222]),
+	CLKDEV_DEV_ID("e6cd0000.serial",	&mstp_clks[MSTP222]),
 	CLKDEV_DEV_ID("sh-sci.6",		&mstp_clks[MSTP230]),
-	CLKDEV_DEV_ID("e6cc0000.sci",		&mstp_clks[MSTP230]),
+	CLKDEV_DEV_ID("e6cc0000.serial",	&mstp_clks[MSTP230]),
 
 	CLKDEV_DEV_ID("sh_fsi2",		&mstp_clks[MSTP328]),
 	CLKDEV_DEV_ID("fe1f0000.sound",		&mstp_clks[MSTP328]),
-- 
2.0.0.rc2

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

* [PATCH v2 16/30] ARM: shmobile: r8a7740: Add SCIF nodes
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (14 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 15/30] ARM: shmobile: r8a7740: correct SCI clock support for DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 17/30] ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using DT Simon Horman
                   ` (14 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This describes all of the SCIF hardware of the r8a7740.
Each node is disabled and may be enabled as necessary
by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/r8a7740.dtsi | 63 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index 55d29f4..bda18fb 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -156,6 +156,69 @@
 		status = "disabled";
 	};
 
+	scifa0: serial at e6c40000 {
+		compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+		reg = <0xe6c40000 0x100>;
+		interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa1: serial at e6c50000 {
+		compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+		reg = <0xe6c50000 0x100>;
+		interrupts = <0 101 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa2: serial at e6c60000 {
+		compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+		reg = <0xe6c60000 0x100>;
+		interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa3: serial at e6c70000 {
+		compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+		reg = <0xe6c70000 0x100>;
+		interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa4: serial at e6c80000 {
+		compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+		reg = <0xe6c80000 0x100>;
+		interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa5: serial at e6cb0000 {
+		compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+		reg = <0xe6cb0000 0x100>;
+		interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa6: serial at e6cc0000 {
+		compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+		reg = <0xe6cc0000 0x100>;
+		interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa7: serial at e6cd0000 {
+		compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+		reg = <0xe6cd0000 0x100>;
+		interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifb8: serial at e6c30000 {
+		compatible = "renesas,scifb-r8a7740", "renesas,scifb";
+		reg = <0xe6c30000 0x100>;
+		interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
 	pfc: pfc at e6050000 {
 		compatible = "renesas,pfc-r8a7740";
 		reg = <0xe6050000 0x8000>,
-- 
2.0.0.rc2

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

* [PATCH v2 17/30] ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (15 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 16/30] ARM: shmobile: r8a7740: Add SCIF nodes Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 18/30] ARM: shmobile: r8a7740: add TMU clock support for DT Simon Horman
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Initialise SCIF device using DT when booting armadillo800eva
using DT reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 14 +++++++++++---
 arch/arm/mach-shmobile/setup-r8a7740.c                  |  8 ++++----
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
index f6ef73f..f47ab76 100644
--- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
@@ -19,6 +19,10 @@
 	model = "armadillo 800 eva reference";
 	compatible = "renesas,armadillo800eva-reference", "renesas,r8a7740";
 
+	aliases {
+		serial1 = &scifa1;
+	};
+
 	chosen {
 		bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
 	};
@@ -202,9 +206,6 @@
 };
 
 &pfc {
-	pinctrl-0 = <&scifa1_pins>;
-	pinctrl-names = "default";
-
 	ether_pins: ether {
 		renesas,groups = "gether_mii", "gether_int";
 		renesas,function = "gether";
@@ -256,6 +257,13 @@
 	status = "okay";
 };
 
+&scifa1 {
+	pinctrl-0 = <&scifa1_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>;
 	pinctrl-names = "default";
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 348af35..3d5eaca 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -312,6 +312,10 @@ static struct platform_device ipmmu_device = {
 };
 
 static struct platform_device *r8a7740_devices_dt[] __initdata = {
+	&cmt1_device,
+};
+
+static struct platform_device *r8a7740_early_devices[] __initdata = {
 	&scif0_device,
 	&scif1_device,
 	&scif2_device,
@@ -321,10 +325,6 @@ static struct platform_device *r8a7740_devices_dt[] __initdata = {
 	&scif6_device,
 	&scif7_device,
 	&scif8_device,
-	&cmt1_device,
-};
-
-static struct platform_device *r8a7740_early_devices[] __initdata = {
 	&irqpin0_device,
 	&irqpin1_device,
 	&irqpin2_device,
-- 
2.0.0.rc2

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

* [PATCH v2 18/30] ARM: shmobile: r8a7740: add TMU clock support for DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (16 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 17/30] ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 19/30] ARM: shmobile: r8a7740: Add TMU nodes Simon Horman
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This will be used when initialising TMU devices using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/clock-r8a7740.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index a60c324..b4ecbd6 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -599,7 +599,9 @@ static struct clk_lookup lookups[] = {
 
 	/* ICK */
 	CLKDEV_ICK_ID("fck",	"sh-tmu.1",		&mstp_clks[MSTP111]),
+	CLKDEV_ICK_ID("fck",	"fff90000.timer",	&mstp_clks[MSTP111]),
 	CLKDEV_ICK_ID("fck",	"sh-tmu.0",		&mstp_clks[MSTP125]),
+	CLKDEV_ICK_ID("fck",	"fff80000.timer",	&mstp_clks[MSTP125]),
 	CLKDEV_ICK_ID("fck",	"sh-cmt-48.1",		&mstp_clks[MSTP329]),
 	CLKDEV_ICK_ID("host",	"renesas_usbhs",	&mstp_clks[MSTP416]),
 	CLKDEV_ICK_ID("func",	"renesas_usbhs",	&mstp_clks[MSTP407]),
-- 
2.0.0.rc2

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

* [PATCH v2 19/30] ARM: shmobile: r8a7740: Add TMU nodes
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (17 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 18/30] ARM: shmobile: r8a7740: add TMU clock support for DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 20/30] ARM: shmobile: armadillo800eva-reference: Initialise TMU device using DT Simon Horman
                   ` (11 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This describes all of the TMU hardware of the r8a7740.
Each node is disabled and may be enabled as necessary
by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/r8a7740.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index bda18fb..3156afd 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -236,6 +236,30 @@
 			<&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>;
 	};
 
+	tmu0: timer at fff80000 {
+		compatible = "renesas,tmu";
+		reg = <0xfff80000 0x2c>;
+		interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 199 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 200 IRQ_TYPE_LEVEL_HIGH>;
+
+		#renesas,channels = <3>;
+
+		status = "disabled";
+	};
+
+	tmu1: timer at fff90000 {
+		compatible = "renesas,tmu";
+		reg = <0xfff90000 0x2c>;
+		interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 171 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 172 IRQ_TYPE_LEVEL_HIGH>;
+
+		#renesas,channels = <3>;
+
+		status = "disabled";
+	};
+
 	tpu: pwm at e6600000 {
 		compatible = "renesas,tpu-r8a7740", "renesas,tpu";
 		reg = <0xe6600000 0x100>;
-- 
2.0.0.rc2

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

* [PATCH v2 20/30] ARM: shmobile: armadillo800eva-reference: Initialise TMU device using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (18 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 19/30] ARM: shmobile: r8a7740: Add TMU nodes Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 21/30] ARM: shmobile: r8a7740: add CMT1 clock support for DT Simon Horman
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Initialise TMU device using DT when booting armadillo800eva
using DT-reference. This device was previously enabled when
booting with legacy-C but not with DT-reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
index f47ab76..c430197 100644
--- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
@@ -205,6 +205,10 @@
 	};
 };
 
+&tmu0 {
+	status = "okay";
+};
+
 &pfc {
 	ether_pins: ether {
 		renesas,groups = "gether_mii", "gether_int";
-- 
2.0.0.rc2

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

* [PATCH v2 21/30] ARM: shmobile: r8a7740: add CMT1 clock support for DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (19 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 20/30] ARM: shmobile: armadillo800eva-reference: Initialise TMU device using DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 22/30] ARM: shmobile: r8a7740: Add CMT1 node Simon Horman
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This will be used when initialising CMT1 device using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/clock-r8a7740.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index b4ecbd6..0794f04 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -603,6 +603,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_ICK_ID("fck",	"sh-tmu.0",		&mstp_clks[MSTP125]),
 	CLKDEV_ICK_ID("fck",	"fff80000.timer",	&mstp_clks[MSTP125]),
 	CLKDEV_ICK_ID("fck",	"sh-cmt-48.1",		&mstp_clks[MSTP329]),
+	CLKDEV_ICK_ID("fck",	"e6138000.timer",	&mstp_clks[MSTP329]),
 	CLKDEV_ICK_ID("host",	"renesas_usbhs",	&mstp_clks[MSTP416]),
 	CLKDEV_ICK_ID("func",	"renesas_usbhs",	&mstp_clks[MSTP407]),
 	CLKDEV_ICK_ID("phy",	"renesas_usbhs",	&mstp_clks[MSTP406]),
-- 
2.0.0.rc2

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

* [PATCH v2 22/30] ARM: shmobile: r8a7740: Add CMT1 node
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (20 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 21/30] ARM: shmobile: r8a7740: add CMT1 clock support for DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 23/30] ARM: shmobile: armadillo800eva-reference: Initialise CMT1 device using DT Simon Horman
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This describes all of the CMT1 hardware of the r8a7740.
The node is disabled and may be enabled as necessary by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
N.B: This only adds cmt1, as per the legacy C code

v2
* First post
---
 arch/arm/boot/dts/r8a7740.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index 3156afd..ea728e1 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -260,6 +260,16 @@
 		status = "disabled";
 	};
 
+	cmt1: timer at e6138000 {
+		compatible = "renesas,cmt-48";
+		reg = <0xe6138000 0x170>;
+		interrupts = <0 58 IRQ_TYPE_LEVEL_HIGH>;
+
+		renesas,channels-mask = <0x3f>;
+
+		status = "disabled";
+	};
+
 	tpu: pwm at e6600000 {
 		compatible = "renesas,tpu-r8a7740", "renesas,tpu";
 		reg = <0xe6600000 0x100>;
-- 
2.0.0.rc2

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

* [PATCH v2 23/30] ARM: shmobile: armadillo800eva-reference: Initialise CMT1 device using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (21 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 22/30] ARM: shmobile: r8a7740: Add CMT1 node Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 24/30] ARM: shmobile: r8a7740: Remove unnecessary r8a7740_add_standard_devices_dt() Simon Horman
                   ` (7 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Initialise CMT1 device using DT when booting armadillo800eva
using DT-reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts |  4 ++++
 arch/arm/mach-shmobile/setup-r8a7740.c                  | 11 +----------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
index c430197..346f6ef 100644
--- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
@@ -205,6 +205,10 @@
 	};
 };
 
+&cmt1 {
+	status = "okay";
+};
+
 &tmu0 {
 	status = "okay";
 };
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 3d5eaca..3dcdc8d 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -311,10 +311,6 @@ static struct platform_device ipmmu_device = {
 	.num_resources  = ARRAY_SIZE(ipmmu_resources),
 };
 
-static struct platform_device *r8a7740_devices_dt[] __initdata = {
-	&cmt1_device,
-};
-
 static struct platform_device *r8a7740_early_devices[] __initdata = {
 	&scif0_device,
 	&scif1_device,
@@ -325,6 +321,7 @@ static struct platform_device *r8a7740_early_devices[] __initdata = {
 	&scif6_device,
 	&scif7_device,
 	&scif8_device,
+	&cmt1_device,
 	&irqpin0_device,
 	&irqpin1_device,
 	&irqpin2_device,
@@ -756,8 +753,6 @@ void __init r8a7740_add_standard_devices(void)
 	/* add devices */
 	platform_add_devices(r8a7740_early_devices,
 			    ARRAY_SIZE(r8a7740_early_devices));
-	platform_add_devices(r8a7740_devices_dt,
-			    ARRAY_SIZE(r8a7740_devices_dt));
 	platform_add_devices(r8a7740_late_devices,
 			     ARRAY_SIZE(r8a7740_late_devices));
 
@@ -779,8 +774,6 @@ void __init r8a7740_add_early_devices(void)
 {
 	early_platform_add_devices(r8a7740_early_devices,
 				   ARRAY_SIZE(r8a7740_early_devices));
-	early_platform_add_devices(r8a7740_devices_dt,
-				   ARRAY_SIZE(r8a7740_devices_dt));
 
 	/* setup early console here as well */
 	shmobile_setup_console();
@@ -790,8 +783,6 @@ void __init r8a7740_add_early_devices(void)
 
 void __init r8a7740_add_standard_devices_dt(void)
 {
-	platform_add_devices(r8a7740_devices_dt,
-			    ARRAY_SIZE(r8a7740_devices_dt));
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
-- 
2.0.0.rc2

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

* [PATCH v2 24/30] ARM: shmobile: r8a7740: Remove unnecessary r8a7740_add_standard_devices_dt()
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (22 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 23/30] ARM: shmobile: armadillo800eva-reference: Initialise CMT1 device using DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 25/30] ARM: shmobile: sh73a0: add SCI clock support for DT Simon Horman
                   ` (6 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

r8a7740_add_standard_devices_dt() now only calls
of_platform_populate() so call it directly and remove
r8a7740_add_standard_devices_dt().

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 3 ++-
 arch/arm/mach-shmobile/r8a7740.h                         | 1 -
 arch/arm/mach-shmobile/setup-r8a7740.c                   | 7 +------
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
index 84bc6cb..f06e1f3 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/gpio.h>
 #include <linux/io.h>
+#include <linux/of_platform.h>
 
 #include <asm/mach/arch.h>
 #include <asm/hardware/cache-l2x0.h>
@@ -170,7 +171,7 @@ static void __init eva_init(void)
 	l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
 #endif
 
-	r8a7740_add_standard_devices_dt();
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
 	r8a7740_pm_init();
 }
diff --git a/arch/arm/mach-shmobile/r8a7740.h b/arch/arm/mach-shmobile/r8a7740.h
index 1d1a5fd..3352fb8 100644
--- a/arch/arm/mach-shmobile/r8a7740.h
+++ b/arch/arm/mach-shmobile/r8a7740.h
@@ -49,7 +49,6 @@ extern void r8a7740_init_irq_of(void);
 extern void r8a7740_map_io(void);
 extern void r8a7740_add_early_devices(void);
 extern void r8a7740_add_standard_devices(void);
-extern void r8a7740_add_standard_devices_dt(void);
 extern void r8a7740_clock_init(u8 md_ck);
 extern void r8a7740_pinmux_init(void);
 extern void r8a7740_pm_init(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 3dcdc8d..fbfc49a 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -781,11 +781,6 @@ void __init r8a7740_add_early_devices(void)
 
 #ifdef CONFIG_USE_OF
 
-void __init r8a7740_add_standard_devices_dt(void)
-{
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
 void __init r8a7740_init_irq_of(void)
 {
 	void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
@@ -819,7 +814,7 @@ void __init r8a7740_init_irq_of(void)
 static void __init r8a7740_generic_init(void)
 {
 	r8a7740_clock_init(0);
-	r8a7740_add_standard_devices_dt();
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *r8a7740_boards_compat_dt[] __initdata = {
-- 
2.0.0.rc2

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

* [PATCH v2 25/30] ARM: shmobile: sh73a0: add SCI clock support for DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (23 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 24/30] ARM: shmobile: r8a7740: Remove unnecessary r8a7740_add_standard_devices_dt() Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 26/30] ARM: shmobile: sh73a0: Add SCIF nodes Simon Horman
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This will be used when initialising SCI devices using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/clock-sh73a0.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index 37f4838..9433a4e 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -638,16 +638,25 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */
 	CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */
 	CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */
+	CLKDEV_DEV_ID("e6cd0000.serial", &mstp_clks[MSTP219]), /* SCIFA7 */
 	CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* SY-DMAC */
 	CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* MP-DMAC */
 	CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
+	CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]), /* SCIFA5 */
 	CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */
+	CLKDEV_DEV_ID("0xe6c3000.serial", &mstp_clks[MSTP206]), /* SCIFB */
 	CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
+	CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), /* SCIFA0 */
 	CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */
+	CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]), /* SCIFA1 */
 	CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */
+	CLKDEV_DEV_ID("e6c60000.serial", &mstp_clks[MSTP202]), /* SCIFA2 */
 	CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */
+	CLKDEV_DEV_ID("e6c70000.serial", &mstp_clks[MSTP201]), /* SCIFA3 */
 	CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
+	CLKDEV_DEV_ID("e6c80000.serial", &mstp_clks[MSTP200]), /* SCIFA4 */
 	CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */
+	CLKDEV_DEV_ID("e6cc0000.serial", &mstp_clks[MSTP331]), /* SCIFA6 */
 	CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI */
 	CLKDEV_DEV_ID("ec230000.sound", &mstp_clks[MSTP328]), /* FSI */
 	CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */
-- 
2.0.0.rc2

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

* [PATCH v2 26/30] ARM: shmobile: sh73a0: Add SCIF nodes
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (24 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 25/30] ARM: shmobile: sh73a0: add SCI clock support for DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 27/30] ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT Simon Horman
                   ` (4 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This describes all of the SCIF hardware of the sh73a0.
Each node is disabled and may be enabled as necessary
by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/sh73a0.dtsi | 72 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index 5ecf552..910b790 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -235,6 +235,78 @@
 		status = "disabled";
 	};
 
+	scifa0: serial at e6c40000 {
+		compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+		reg = <0xe6c40000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa1: serial at e6c50000 {
+		compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+		reg = <0xe6c50000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa2: serial at e6c60000 {
+		compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+		reg = <0xe6c60000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa3: serial at e6c70000 {
+		compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+		reg = <0xe6c70000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa4: serial at e6c80000 {
+		compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+		reg = <0xe6c80000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa5: serial at e6cb0000 {
+		compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+		reg = <0xe6cb0000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa6: serial at e6cc0000 {
+		compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+		reg = <0xe6cc0000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifa7: serial at e6cd0000 {
+		compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+		reg = <0xe6cd0000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scifb8: serial at e6c30000 {
+		compatible = "renesas,scifb-sh73a0", "renesas,scifb";
+		reg = <0xe6c30000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
 	pfc: pfc at e6050000 {
 		compatible = "renesas,pfc-sh73a0";
 		reg = <0xe6050000 0x8000>,
-- 
2.0.0.rc2

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

* [PATCH v2 27/30] ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (25 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 26/30] ARM: shmobile: sh73a0: Add SCIF nodes Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 28/30] ARM: shmobile: sh73a0: add CMT1 clock support for DT Simon Horman
                   ` (3 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Initialise SCIF device using DT when booting armadillo800eva
using DT reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 14 +++++++++++---
 arch/arm/mach-shmobile/setup-sh73a0.c        |  8 ++++----
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
index a99171c..df2ae46 100644
--- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
+++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
@@ -21,6 +21,10 @@
 	model = "KZM-A9-GT";
 	compatible = "renesas,kzm9g-reference", "renesas,sh73a0";
 
+	aliases {
+		serial4 = &scifa4;
+	};
+
 	cpus {
 		cpu at 0 {
 			cpu0-supply = <&vdd_dvfs>;
@@ -276,9 +280,6 @@
 };
 
 &pfc {
-	pinctrl-0 = <&scifa4_pins>;
-	pinctrl-names = "default";
-
 	i2c3_pins: i2c3 {
 		renesas,groups = "i2c3_1";
 		renesas,function = "i2c3";
@@ -318,6 +319,13 @@
 	};
 };
 
+&scifa4 {
+	pinctrl-0 = <&scifa4_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>;
 	pinctrl-names = "default";
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 2248821..2c802ae 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -697,6 +697,10 @@ static struct platform_device irqpin3_device = {
 };
 
 static struct platform_device *sh73a0_devices_dt[] __initdata = {
+	&cmt1_device,
+};
+
+static struct platform_device *sh73a0_early_devices[] __initdata = {
 	&scif0_device,
 	&scif1_device,
 	&scif2_device,
@@ -706,10 +710,6 @@ static struct platform_device *sh73a0_devices_dt[] __initdata = {
 	&scif6_device,
 	&scif7_device,
 	&scif8_device,
-	&cmt1_device,
-};
-
-static struct platform_device *sh73a0_early_devices[] __initdata = {
 	&tmu0_device,
 	&ipmmu_device,
 };
-- 
2.0.0.rc2

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

* [PATCH v2 28/30] ARM: shmobile: sh73a0: add CMT1 clock support for DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (26 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 27/30] ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 29/30] ARM: shmobile: sh73a0: Add CMT1 node Simon Horman
                   ` (2 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This will be used when initialising CMT1 device using DT
until common clock framework support is added.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/mach-shmobile/clock-sh73a0.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index 9433a4e..d8c4048 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -690,6 +690,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk),
 	CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk),
 	CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]), /* CMT1 */
+	CLKDEV_ICK_ID("fck", "e6138000.timer", &mstp_clks[MSTP329]), /* CMT1 */
 	CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */
 };
 
-- 
2.0.0.rc2

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

* [PATCH v2 29/30] ARM: shmobile: sh73a0: Add CMT1 node
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (27 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 28/30] ARM: shmobile: sh73a0: add CMT1 clock support for DT Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-07  7:54 ` [PATCH v2 30/30] ARM: shmobile: kzm9g-reference: Initialise CMT1 device using DT Simon Horman
  2014-07-12 13:23 ` [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU " Simon Horman
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

This describes all of the CMT1 hardware of the sh73a0.
The node is disabled and may be enabled as necessary by board DTS files.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
N.B: This only adds cmt1, as per the legacy C code

v2
* First post
---
 arch/arm/boot/dts/sh73a0.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index 910b790..57e1ed2 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -324,6 +324,17 @@
 			<&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>;
 	};
 
+	cmt1: timer at e6138000 {
+		compatible = "renesas,cmt-48";
+		reg = <0xe6138000 0x200>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 65 IRQ_TYPE_LEVEL_HIGH>;
+
+		renesas,channels-mask = <0x3f>;
+
+		status = "disabled";
+	};
+
 	sh_fsi2: sound at ec230000 {
 		#sound-dai-cells = <1>;
 		compatible = "renesas,sh_fsi2";
-- 
2.0.0.rc2

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

* [PATCH v2 30/30] ARM: shmobile: kzm9g-reference: Initialise CMT1 device using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (28 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 29/30] ARM: shmobile: sh73a0: Add CMT1 node Simon Horman
@ 2014-07-07  7:54 ` Simon Horman
  2014-07-12 13:23 ` [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU " Simon Horman
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-07  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Initialise CMT1 device using DT when booting kzm9g
using DT-reference.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---
v2
* First post
---
 arch/arm/boot/dts/sh73a0-kzm9g-reference.dts |  4 ++++
 arch/arm/mach-shmobile/setup-sh73a0.c        | 11 +----------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
index df2ae46..4cd9949 100644
--- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
+++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
@@ -279,6 +279,10 @@
 	status = "okay";
 };
 
+&cmt1 {
+	status = "okay";
+};
+
 &pfc {
 	i2c3_pins: i2c3 {
 		renesas,groups = "i2c3_1";
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 2c802ae..5d3f1d8 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -696,10 +696,6 @@ static struct platform_device irqpin3_device = {
 	},
 };
 
-static struct platform_device *sh73a0_devices_dt[] __initdata = {
-	&cmt1_device,
-};
-
 static struct platform_device *sh73a0_early_devices[] __initdata = {
 	&scif0_device,
 	&scif1_device,
@@ -710,6 +706,7 @@ static struct platform_device *sh73a0_early_devices[] __initdata = {
 	&scif6_device,
 	&scif7_device,
 	&scif8_device,
+	&cmt1_device,
 	&tmu0_device,
 	&ipmmu_device,
 };
@@ -736,8 +733,6 @@ void __init sh73a0_add_standard_devices(void)
 	/* Clear software reset bit on SY-DMAC module */
 	__raw_writel(__raw_readl(SRCR2) & ~(1 << 18), SRCR2);
 
-	platform_add_devices(sh73a0_devices_dt,
-			    ARRAY_SIZE(sh73a0_devices_dt));
 	platform_add_devices(sh73a0_early_devices,
 			    ARRAY_SIZE(sh73a0_early_devices));
 	platform_add_devices(sh73a0_late_devices,
@@ -762,8 +757,6 @@ void __init sh73a0_earlytimer_init(void)
 
 void __init sh73a0_add_early_devices(void)
 {
-	early_platform_add_devices(sh73a0_devices_dt,
-				   ARRAY_SIZE(sh73a0_devices_dt));
 	early_platform_add_devices(sh73a0_early_devices,
 				   ARRAY_SIZE(sh73a0_early_devices));
 
@@ -780,8 +773,6 @@ void __init sh73a0_add_standard_devices_dt(void)
 	/* clocks are setup late during boot in the case of DT */
 	sh73a0_clock_init();
 
-	platform_add_devices(sh73a0_devices_dt,
-			     ARRAY_SIZE(sh73a0_devices_dt));
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
 	/* Instantiate cpufreq-cpu0 */
-- 
2.0.0.rc2

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

* [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT
  2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
                   ` (29 preceding siblings ...)
  2014-07-07  7:54 ` [PATCH v2 30/30] ARM: shmobile: kzm9g-reference: Initialise CMT1 device using DT Simon Horman
@ 2014-07-12 13:23 ` Simon Horman
  30 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2014-07-12 13:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 07, 2014 at 09:54:25AM +0200, Simon Horman wrote:
> The purpose of this series is to enable SCI, CMT and TMU using DT
> on boards that use DT-reference. Or in other-words boards other
> than the mackerel that are not covered by Laurent Pinchart's work in
> the same area.
> 
> This series is based on a merge of:
> 
> * [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
> * renesas-devel-v3.16-rc4-20140707
> 
> It also depends on
> [PATCH v2] serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a

As Greg KH has merged the above patch I have queued up
the SCI patches listed below.

> This series does not enable TMU for the sh73a0/kzm9g-reference
> as:
> 
> * It appears to use sh-intc as an interrupt source and I am unsure
>   how to use this from DT at this time and;
> * It is not currently enabled in dt-reference.
> 
> I will address this as a follow-up if appropriate.
> 
> 
> Simon Horman (30):
>   ARM: shmobile: r8a7778: add SCI clock support for DT
>   ARM: shmobile: r8a7778: Add SCIF nodes
>   ARM: shmobile: bockw-reference: Initialise SCIF device using DT
>   ARM: shmobile: r8a7778: add TMU clock support for DT
>   ARM: shmobile: r8a7778: Add TMU nodes
>   ARM: shmobile: bockw-reference: Initialise TMU device using DT
>   ARM: shmobile: r8a73a4: add SCI clock support for DT
>   ARM: shmobile: r8a73a4: Add SCIF nodes
>   ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT
>   ARM: shmobile: r8a73a4: add CMT1 clock support for DT
>   ARM: shmobile: r8a73a4: Add CMT1 node
>   ARM: shmobile: r8a73a4: Rename cmt registration helper
>   ARM: shmobile: ape6evm-reference: Initialise CMT1 device using DT
>   ARM: shmobile: r8a73a4: Remove empty r8a73a4_add_dt_devices
>   ARM: shmobile: r8a7740: correct SCI clock support for DT
>   ARM: shmobile: r8a7740: Add SCIF nodes
>   ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using
>     DT
>   ARM: shmobile: r8a7740: add TMU clock support for DT
>   ARM: shmobile: r8a7740: Add TMU nodes
>   ARM: shmobile: armadillo800eva-reference: Initialise TMU device using
>     DT
>   ARM: shmobile: r8a7740: add CMT1 clock support for DT
>   ARM: shmobile: r8a7740: Add CMT1 node
>   ARM: shmobile: armadillo800eva-reference: Initialise CMT1 device using
>     DT
>   ARM: shmobile: r8a7740: Remove unnecessary
>     r8a7740_add_standard_devices_dt()
>   ARM: shmobile: sh73a0: add SCI clock support for DT
>   ARM: shmobile: sh73a0: Add SCIF nodes
>   ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT
>   ARM: shmobile: sh73a0: add CMT1 clock support for DT
>   ARM: shmobile: sh73a0: Add CMT1 node
>   ARM: shmobile: kzm9g-reference: Initialise CMT1 device using DT
> 
>  arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts    | 18 +++-
>  arch/arm/boot/dts/r8a73a4.dtsi                     | 52 ++++++++++++
>  .../boot/dts/r8a7740-armadillo800eva-reference.dts | 22 ++++-
>  arch/arm/boot/dts/r8a7740.dtsi                     | 97 ++++++++++++++++++++++
>  arch/arm/boot/dts/r8a7778-bockw-reference.dts      | 18 +++-
>  arch/arm/boot/dts/r8a7778.dtsi                     | 78 +++++++++++++++++
>  arch/arm/boot/dts/sh73a0-kzm9g-reference.dts       | 18 +++-
>  arch/arm/boot/dts/sh73a0.dtsi                      | 83 ++++++++++++++++++
>  arch/arm/mach-shmobile/board-ape6evm-reference.c   |  1 -
>  .../board-armadillo800eva-reference.c              |  3 +-
>  arch/arm/mach-shmobile/clock-r8a73a4.c             |  7 ++
>  arch/arm/mach-shmobile/clock-r8a7740.c             | 21 +++--
>  arch/arm/mach-shmobile/clock-r8a7778.c             |  8 ++
>  arch/arm/mach-shmobile/clock-sh73a0.c              | 10 +++
>  arch/arm/mach-shmobile/r8a73a4.h                   |  1 -
>  arch/arm/mach-shmobile/r8a7740.h                   |  1 -
>  arch/arm/mach-shmobile/setup-r8a73a4.c             | 21 ++---
>  arch/arm/mach-shmobile/setup-r8a7740.c             | 18 +---
>  arch/arm/mach-shmobile/setup-r8a7778.c             | 15 ++--
>  arch/arm/mach-shmobile/setup-sh73a0.c              | 11 +--
>  20 files changed, 431 insertions(+), 72 deletions(-)
> 
> -- 
> 2.0.0.rc2
> 

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

end of thread, other threads:[~2014-07-12 13:23 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07  7:54 [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU using DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 01/30] ARM: shmobile: r8a7778: add SCI clock support for DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 02/30] ARM: shmobile: r8a7778: Add SCIF nodes Simon Horman
2014-07-07  7:54 ` [PATCH v2 03/30] ARM: shmobile: bockw-reference: Initialise SCIF device using DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 04/30] ARM: shmobile: r8a7778: add TMU clock support for DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 05/30] ARM: shmobile: r8a7778: Add TMU nodes Simon Horman
2014-07-07  7:54 ` [PATCH v2 06/30] ARM: shmobile: bockw-reference: Initialise TMU device using DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 07/30] ARM: shmobile: r8a73a4: add SCI clock support for DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 08/30] ARM: shmobile: r8a73a4: Add SCIF nodes Simon Horman
2014-07-07  7:54 ` [PATCH v2 09/30] ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 10/30] ARM: shmobile: r8a73a4: add CMT1 clock support for DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 11/30] ARM: shmobile: r8a73a4: Add CMT1 node Simon Horman
2014-07-07  7:54 ` [PATCH v2 12/30] ARM: shmobile: r8a73a4: Rename cmt registration helper Simon Horman
2014-07-07  7:54 ` [PATCH v2 13/30] ARM: shmobile: ape6evm-reference: Initialise CMT1 device using DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 14/30] ARM: shmobile: r8a73a4: Remove empty r8a73a4_add_dt_devices Simon Horman
2014-07-07  7:54 ` [PATCH v2 15/30] ARM: shmobile: r8a7740: correct SCI clock support for DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 16/30] ARM: shmobile: r8a7740: Add SCIF nodes Simon Horman
2014-07-07  7:54 ` [PATCH v2 17/30] ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 18/30] ARM: shmobile: r8a7740: add TMU clock support for DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 19/30] ARM: shmobile: r8a7740: Add TMU nodes Simon Horman
2014-07-07  7:54 ` [PATCH v2 20/30] ARM: shmobile: armadillo800eva-reference: Initialise TMU device using DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 21/30] ARM: shmobile: r8a7740: add CMT1 clock support for DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 22/30] ARM: shmobile: r8a7740: Add CMT1 node Simon Horman
2014-07-07  7:54 ` [PATCH v2 23/30] ARM: shmobile: armadillo800eva-reference: Initialise CMT1 device using DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 24/30] ARM: shmobile: r8a7740: Remove unnecessary r8a7740_add_standard_devices_dt() Simon Horman
2014-07-07  7:54 ` [PATCH v2 25/30] ARM: shmobile: sh73a0: add SCI clock support for DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 26/30] ARM: shmobile: sh73a0: Add SCIF nodes Simon Horman
2014-07-07  7:54 ` [PATCH v2 27/30] ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 28/30] ARM: shmobile: sh73a0: add CMT1 clock support for DT Simon Horman
2014-07-07  7:54 ` [PATCH v2 29/30] ARM: shmobile: sh73a0: Add CMT1 node Simon Horman
2014-07-07  7:54 ` [PATCH v2 30/30] ARM: shmobile: kzm9g-reference: Initialise CMT1 device using DT Simon Horman
2014-07-12 13:23 ` [PATCH v2 00/30] ARM: shmobile: Enable SCI and TMU " 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).