Skip to contentSkip to conversation

ARM: shmobile: bockw: Enable SCI and TMU using DT

PATCH Superseded Simon Horman 3 participants 14 messages Jul 2, 2014

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: shmobile: bockw: Enable SCI and TMU using DT

The purpose of this series is to enable SCI and TMU using DT on the r8a7778 (R-Car M1) based bockw when booting using DT reference.

This is the first batck of work by myself to convert DT reference board support to initialsie SCI and TMU devices using DT.

This series is depends on patches included in
"[PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support" which applies on top of renesas-devel-v3.16-rc2-20140628.

The patch "bockw: Initialise SCIF device using DT" depends on "serial: sh-sci: Add device tree support for r8a7778".

Simon Horman (6):
ARM: shmobile: r8a7778: add SCI clock support for DT
ARM: shmobile: r8a7778: Add SCIF nodes
ARM: shmobile: bockw: Initialise SCIF device using DT
ARM: shmobile: r8a7778: add TMU clock support for DT
ARM: shmobile: r8a7778: Add TMU nodes
ARM: shmobile: bockw: Initialise TMU device using DT

 arch/arm/boot/dts/r8a7778-bockw-reference.dts | 18 +++++-
 arch/arm/boot/dts/r8a7778.dtsi                | 84 +++++++++++++++++++++++++++
 arch/arm/mach-shmobile/clock-r8a7778.c        |  8 +++
 arch/arm/mach-shmobile/setup-r8a7778.c        | 15 +++--
 4 files changed, 114 insertions(+), 11 deletions(-)
Signature · 1 line
2.0.0.rc2
#1 lore raw

PATCH 1/6 ARM: shmobile: r8a7778: add SCI clock support for DT

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

---
 arch/arm/mach-shmobile/clock-r8a7778.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/mach-shmobile/clock-r8a7778.c +6 -0
index 16bbc94..9557907 100644
@@ -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 */
Signature · 1 line
2.0.0.rc2
#2 lore raw

PATCH 1/6 ARM: shmobile: r8a7778: add SCI clock support for DT

Hi Simon,

Thank you for the patch.

Quoted 4 lines · On Wednesday 02 July 2014 06:28:37 Simon Horman wrote:

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

Quoted 26 lines
---
 arch/arm/mach-shmobile/clock-r8a7778.c | 6 ++++++
 1 file changed, 6 insertions(+)
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/clock-r8a7778.c index 16bbc94..9557907 100644

arch/arm/mach-shmobile/clock-r8a7778.c +6 -0
@@ -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 */
Signature · 3 lines
Regards,

Laurent Pinchart
#3 lore raw

PATCH 2/6 ARM: shmobile: r8a7778: Add SCIF nodes

In reply to Simon Horman
---
 arch/arm/boot/dts/r8a7778.dtsi | 48 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
arch/arm/boot/dts/r8a7778.dtsi +48 -0
index 3af0a21..55357dc 100644
@@ -156,6 +156,54 @@
 		status = "disabled";
 	};
 
+	scif0: serial at ffe40000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe40000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif1: serial at ffe41000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe41000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif2: serial at ffe42000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe42000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif3: serial at ffe43000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe43000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif4: serial at ffe44000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe44000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif5: serial at ffe45000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe45000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
 	mmcif: mmc at ffe4e000 {
 		compatible = "renesas,sh-mmcif";
 		reg = <0xffe4e000 0x100>;
Signature · 1 line
2.0.0.rc2
#4 lore raw

PATCH 2/6 ARM: shmobile: r8a7778: Add SCIF nodes

Hi Simon,

Thank you for the patch.

Quoted 1 line · On Wednesday 02 July 2014 06:28:38 Simon Horman wrote:

Just one small comment below. Apart from that,

Quoted 9 lines
---
 arch/arm/boot/dts/r8a7778.dtsi | 48 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
arch/arm/boot/dts/r8a7778.dtsi +0 -0
index 3af0a21..55357dc 100644

arch/arm/boot/dts/r8a7778.dtsi line 162

Quoted 7 lines
arch/arm/boot/dts/r8a7778.dtsi +4 -0
@@ -156,6 +156,54 @@
 		status = "disabled";
 	};
 
+	scif0: serial at ffe40000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe40000 0x100>;
+		interrupt-parent = <&gic>;

The interrupt-parent property is now specified at the top level, so you can remove it from the scif nodes.

Quoted 47 lines
arch/arm/boot/dts/r8a7778.dtsi +44 -0
+		interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif1: serial at ffe41000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe41000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif2: serial at ffe42000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe42000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif3: serial at ffe43000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe43000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif4: serial at ffe44000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe44000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	scif5: serial at ffe45000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe45000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
 	mmcif: mmc at ffe4e000 {
 		compatible = "renesas,sh-mmcif";
 		reg = <0xffe4e000 0x100>;
Signature · 3 lines
Regards,

Laurent Pinchart
#5 lore raw

PATCH 2/6 ARM: shmobile: r8a7778: Add SCIF nodes

In reply to Simon Horman

Hello.

Quoted 10 lines · Simon Horman
---
  arch/arm/boot/dts/r8a7778.dtsi | 48 ++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 48 insertions(+)
arch/arm/boot/dts/r8a7778.dtsi +0 -0
index 3af0a21..55357dc 100644

arch/arm/boot/dts/r8a7778.dtsi line 162

Quoted 7 lines
arch/arm/boot/dts/r8a7778.dtsi +4 -0
@@ -156,6 +156,54 @@
  		status = "disabled";
  	};
 
+	scif0: serial at ffe40000 {
+		compatible = "renesas,scif-r8a7778", "renesas,scif";
+		reg = <0xffe40000 0x100>;
+		interrupt-parent = <&gic>;

Not needed here and below -- it's already specified in the root node.

WBR, Sergei

#6 lore raw

PATCH 3/6 ARM: shmobile: bockw: Initialise SCIF device using DT

In reply to Simon Horman

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

---
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(-)
arch/arm/boot/dts/r8a7778-bockw-reference.dts +11 -3
index f76f6ec..5d14688 100644
@@ -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";
+};
arch/arm/mach-shmobile/setup-r8a7778.c +6 -6
index 2ccc012..e218c46 100644
@@ -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);
Signature · 1 line
2.0.0.rc2
#7 lore raw

PATCH 3/6 ARM: shmobile: bockw: Initialise SCIF device using DT

Hi Simon,

Thank you for the patch.

Quoted 4 lines · On Wednesday 02 July 2014 06:28:39 Simon Horman wrote:

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

Quoted 5 lines

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

It's missing, but could be easily added :-)

Quoted 11 lines
---
 arch/arm/boot/dts/r8a7778-bockw-reference.dts | 14 +++++++++++---
 arch/arm/mach-shmobile/setup-r8a7778.c        | 12 ++++++------
 2 files changed, 17 insertions(+), 9 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/r8a7778-bockw-reference.dts index f76f6ec..5d14688 100644

arch/arm/boot/dts/r8a7778-bockw-reference.dts line 31

Quoted 9 lines
arch/arm/boot/dts/r8a7778-bockw-reference.dts +4 -0
@@ -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

Quoted 52 lines
arch/arm/boot/dts/r8a7778-bockw-reference.dts +7 -3
 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";
+};
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/setup-r8a7778.c index 2ccc012..e218c46 100644

arch/arm/mach-shmobile/setup-r8a7778.c +6 -6
@@ -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);
Signature · 3 lines
Regards,

Laurent Pinchart
#8 lore raw

PATCH 4/6 ARM: shmobile: r8a7778: add TMU clock support for DT

In reply to Simon Horman

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

---
 arch/arm/mach-shmobile/clock-r8a7778.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-shmobile/clock-r8a7778.c +2 -0
index 9557907..67980a0 100644
@@ -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)
Signature · 1 line
2.0.0.rc2
#9 lore raw

PATCH 4/6 ARM: shmobile: r8a7778: add TMU clock support for DT

Hi Simon,

Thank you for the patch.

Quoted 4 lines · On Wednesday 02 July 2014 06:28:40 Simon Horman wrote:

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

Quoted 18 lines
---
 arch/arm/mach-shmobile/clock-r8a7778.c | 2 ++
 1 file changed, 2 insertions(+)
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/clock-r8a7778.c index 9557907..67980a0 100644

arch/arm/mach-shmobile/clock-r8a7778.c +2 -0
@@ -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)
Signature · 3 lines
Regards,

Laurent Pinchart
#10 lore raw

PATCH 5/6 ARM: shmobile: r8a7778: Add TMU nodes

In reply to Simon Horman
---
 arch/arm/boot/dts/r8a7778.dtsi | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm/boot/dts/r8a7778.dtsi +36 -0
index 55357dc..672224f 100644
@@ -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>;
Signature · 1 line
2.0.0.rc2
#11 lore raw

PATCH 5/6 ARM: shmobile: r8a7778: Add TMU nodes

Hi Simon,

Thank you for the patch.

On Wednesday 02 July 2014 06:28:41 Simon Horman wrote:

I've often requested to write a commit message, even for simple patches ;-)

Quoted 1 line
Quoted 51 lines
---
 arch/arm/boot/dts/r8a7778.dtsi | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm/boot/dts/r8a7778.dtsi +36 -0
index 55357dc..672224f 100644
@@ -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>;
Signature · 3 lines
Regards,

Laurent Pinchart
#12 lore raw

PATCH 6/6 ARM: shmobile: bockw: Initialise TMU device using DT

In reply to Simon Horman

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

---
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 | 4 ++++
 arch/arm/mach-shmobile/setup-r8a7778.c        | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7778-bockw-reference.dts +4 -0
index 5d14688..b70ef30 100644
@@ -73,6 +73,10 @@
 	status = "okay";
 };
 
+&tmu0 {
+	status = "okay";
+};
+
 &pfc {
 	scif0_pins: serial0 {
 		renesas,groups = "scif0_data_a", "scif0_ctrl";
arch/arm/mach-shmobile/setup-r8a7778.c +1 -2
index e218c46..575148d 100644
@@ -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);
Signature · 1 line
2.0.0.rc2
#13 lore raw

PATCH 6/6 ARM: shmobile: bockw: Initialise TMU device using DT

Hi Simon,

Thank you for the patch.

Quoted 4 lines · On Wednesday 02 July 2014 06:28:42 Simon Horman wrote:

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

Quoted 6 lines

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

I don't think this comment applies.

Quoted 42 lines
---
 arch/arm/boot/dts/r8a7778-bockw-reference.dts | 4 ++++
 arch/arm/mach-shmobile/setup-r8a7778.c        | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/r8a7778-bockw-reference.dts index 5d14688..b70ef30 100644

arch/arm/boot/dts/r8a7778-bockw-reference.dts +4 -0
@@ -73,6 +73,10 @@
 	status = "okay";
 };
 
+&tmu0 {
+	status = "okay";
+};
+
 &pfc {
 	scif0_pins: serial0 {
 		renesas,groups = "scif0_data_a", "scif0_ctrl";
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/setup-r8a7778.c index e218c46..575148d 100644

arch/arm/mach-shmobile/setup-r8a7778.c +1 -2
@@ -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);
Signature · 3 lines
Regards,

Laurent Pinchart