Skip to contentSkip to conversation

ARM: shmobile: marzen: Initialise SCIF devices using DT

PATCH New Simon Horman 2 participants 6 messages May 15, 2014 – May 29, 2014

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

v2 cover ARM: shmobile: marzen: Initialise SCIF devices using DT

The aim of this series is to provide a working prototype for enabling SCIF devices using DT on the marzen board when booting using multiplatform.

This series addresses the review received for v1. Changes are noted in the changelog of each updated patch.

This series depends on:
[PATCH v6 00/17] ARM: shmobile: r8a7779, marzen: CCF and multiplatform

This series was created and tested with the above mentioned series applied on top of a merge of:
* The renesas-devel-v3.15-rc1-20140515 tag of my renesas tree.
* The clk-next branch of Mike Turquettes's tree
This is to provide the following which were previously part of this series:
- clk: shmobile: r8a7779: Add MSTP clock support
- clk: shmobile: r8a7779: Add clocks support

This series works in conjunction with but does not have a run-time or compile time dependency on:
[PATCH v3] serial: sh-sci: Add device tree support for r8a7779

Simon Horman (4):
ARM: shmobile: r8a7779: Add scif nodes to dtsi
ARM: shmobile: marzen: Remove early_printk from command line
ARM: shmobile: marzen: Initialise SCIF devices using DT
ARM: shmobile: marzen: Do not use workaround for scif devices

 arch/arm/boot/dts/r8a7779-marzen.dts            | 24 ++++++++--
 arch/arm/boot/dts/r8a7779.dtsi                  | 60 +++++++++++++++++++++++++
 arch/arm/mach-shmobile/board-marzen-reference.c |  6 ---
 arch/arm/mach-shmobile/setup-r8a7779.c          |  8 ++--
 4 files changed, 84 insertions(+), 14 deletions(-)
Signature · 1 line
1.8.5.2
#1 lore raw

PATCH v2 1/4 ARM: shmobile: r8a7779: Add scif nodes to dtsi

---
v2
* As suggested by Laurent Pinchart
- The correct size of the register is 256 not 265.

    And to make this a bit more readable use 0x100.
  - List compat strings from most to least specific.
---
 arch/arm/boot/dts/r8a7779.dtsi | 60 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
arch/arm/boot/dts/r8a7779.dtsi +60 -0
index bdaaadc..7c3b2d3 100644
@@ -192,6 +192,66 @@
 		status = "disabled";
 	};
 
+	scif0: serial at ffe40000 {
+		compatible = "renesas,scif-r8a7779", "renesas,scif";
+		reg = <0xffe40000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif1: serial at ffe41000 {
+		compatible = "renesas,scif-r8a7779", "renesas,scif";
+		reg = <0xffe41000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif2: serial at ffe42000 {
+		compatible = "renesas,scif-r8a7779", "renesas,scif";
+		reg = <0xffe42000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif3: serial at ffe43000 {
+		compatible = "renesas,scif-r8a7779", "renesas,scif";
+		reg = <0xffe43000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif4: serial at ffe44000 {
+		compatible = "renesas,scif-r8a7779", "renesas,scif";
+		reg = <0xffe44000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif5: serial at ffe45000 {
+		compatible = "renesas,scif-r8a7779", "renesas,scif";
+		reg = <0xffe45000 0x100>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
 	pfc: pfc at fffc0000 {
 		compatible = "renesas,pfc-r8a7779";
 		reg = <0xfffc0000 0x23c>;
Signature · 1 line
1.8.5.2
#2 lore raw

PATCH v2 2/4 ARM: shmobile: marzen: Remove early_printk from command line

In reply to Simon Horman

As early printk support is not enabled in the kernel in the shmobile defconfig it does not make much sense to provide for it in the default command line.

---
v2
* Added Ack from Laruent Pinchart
* Enhanced change log based on feedback from Laurent Pinchart

---
 arch/arm/boot/dts/r8a7779-marzen.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/r8a7779-marzen.dts +1 -1
index 363f693..3212908 100644
@@ -19,7 +19,7 @@
 	compatible = "renesas,marzen", "renesas,r8a7779";
 
 	chosen {
-		bootargs = "console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on";
+		bootargs = "console=ttySC2,115200 ignore_loglevel root=/dev/nfs ip=on";
 	};
 
 	memory {
Signature · 1 line
1.8.5.2
#3 lore raw

PATCH v2 3/4 ARM: shmobile: marzen: Initialise SCIF devices using DT

In reply to Simon Horman

Initialise SCIF devices using DT when booting marzen using multiplatform.

---
v2
* Rebase
* Add Ack from Laurent Pinchart

---
 arch/arm/boot/dts/r8a7779-marzen.dts   | 22 +++++++++++++++++++---
 arch/arm/mach-shmobile/setup-r8a7779.c |  8 ++++----
 2 files changed, 23 insertions(+), 7 deletions(-)
arch/arm/boot/dts/r8a7779-marzen.dts +19 -3
index 3212908..20b1768 100644
@@ -18,6 +18,11 @@
 	model = "marzen";
 	compatible = "renesas,marzen", "renesas,r8a7779";
 
+	aliases {
+		serial2 = &scif2;
+		serial4 = &scif4;
+	};
+
 	chosen {
 		bootargs = "console=ttySC2,115200 ignore_loglevel root=/dev/nfs ip=on";
 	};
@@ -74,9 +79,6 @@
 };
 
 &pfc {
-	pinctrl-0 = <&scif2_pins &scif4_pins>;
-	pinctrl-names = "default";
-
 	lan0_pins: lan0 {
 		intc {
 			renesas,groups = "intc_irq1_b";
@@ -109,6 +111,20 @@
 	};
 };
 
+&scif2 {
+       pinctrl-0 = <&scif2_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&scif4 {
+       pinctrl-0 = <&scif4_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>;
 	pinctrl-names = "default";
arch/arm/mach-shmobile/setup-r8a7779.c +4 -4
index c0e61d5..cd23b27 100644
@@ -640,16 +640,16 @@ static void __init r8a7779_register_hpb_dmae(void)
 }
 
 static struct platform_device *r8a7779_devices_dt[] __initdata = {
+	&tmu0_device,
+};
+
+static struct platform_device *r8a7779_standard_devices[] __initdata = {
 	&scif0_device,
 	&scif1_device,
 	&scif2_device,
 	&scif3_device,
 	&scif4_device,
 	&scif5_device,
-	&tmu0_device,
-};
-
-static struct platform_device *r8a7779_standard_devices[] __initdata = {
 	&i2c0_device,
 	&i2c1_device,
 	&i2c2_device,
Signature · 1 line
1.8.5.2
#4 lore raw

PATCH v2 4/4 ARM: shmobile: marzen: Do not use workaround for scif devices

In reply to Simon Horman

Now that SCIF devices are initialised using DT it should not be necessary to use the work around to provide clocks any more.

---
v2
* First post

---
 arch/arm/mach-shmobile/board-marzen-reference.c | 6 ------
 1 file changed, 6 deletions(-)
arch/arm/mach-shmobile/board-marzen-reference.c +0 -6
index c6c133d..8da72b1 100644
@@ -40,12 +40,6 @@ static void __init marzen_init_timer(void)
  * devices until they get moved to DT.
  */
 static const struct clk_name clk_names[] __initconst = {
-	{ "scif0", NULL, "sh-sci.0" },
-	{ "scif1", NULL, "sh-sci.1" },
-	{ "scif2", NULL, "sh-sci.2" },
-	{ "scif3", NULL, "sh-sci.3" },
-	{ "scif4", NULL, "sh-sci.4" },
-	{ "scif5", NULL, "sh-sci.5" },
 	{ "tmu0", "fck", "sh-tmu.0" },
 };
 
Signature · 1 line
1.8.5.2
#5 lore raw

v2 cover ARM: shmobile: marzen: Initialise SCIF devices using DT

In reply to Simon Horman
Quoted 18 lines · Simon Horman

The aim of this series is to provide a working prototype for enabling SCIF devices using DT on the marzen board when booting using multiplatform.

This series addresses the review received for v1. Changes are noted in the changelog of each updated patch.

This series depends on:
[PATCH v6 00/17] ARM: shmobile: r8a7779, marzen: CCF and multiplatform

This series was created and tested with the above mentioned series applied on top of a merge of:
* The renesas-devel-v3.15-rc1-20140515 tag of my renesas tree.
* The clk-next branch of Mike Turquettes's tree
This is to provide the following which were previously part of this series:
- clk: shmobile: r8a7779: Add MSTP clock support
- clk: shmobile: r8a7779: Add clocks support

Quoted 3 lines

This series works in conjunction with but does not have a run-time or compile time dependency on:
[PATCH v3] serial: sh-sci: Add device tree support for r8a7779

As all the pre-requisites are now in place I have queued up this series.

Quoted 17 lines

Simon Horman (4):
ARM: shmobile: r8a7779: Add scif nodes to dtsi
ARM: shmobile: marzen: Remove early_printk from command line
ARM: shmobile: marzen: Initialise SCIF devices using DT
ARM: shmobile: marzen: Do not use workaround for scif devices

 arch/arm/boot/dts/r8a7779-marzen.dts            | 24 ++++++++--
 arch/arm/boot/dts/r8a7779.dtsi                  | 60 +++++++++++++++++++++++++
 arch/arm/mach-shmobile/board-marzen-reference.c |  6 ---
 arch/arm/mach-shmobile/setup-r8a7779.c          |  8 ++--
 4 files changed, 84 insertions(+), 14 deletions(-)
Signature · 1 line
1.8.5.2