Skip to contentSkip to conversation

ARM: shmobile: Lager reference serial port support

PATCH Superseded Laurent Pinchart 7 participants 20 messages Oct 29, 2013 – Jan 27, 2015

Subsystems (6)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover ARM: shmobile: Lager reference serial port support

Hello,

This patch set implements serial port support for the Lager reference board, and adds early debugging support for the r8a7790 SoC.

The code is available in my git tree at

git://linuxtv.org/pinchartl/fbdev.git clocks/ccf/serial-lager

The branch is based on a merge of renesas-devel-20131016, v3.12-rc7 and multiarch drivers, clk-prepare, r8a7790 CCF and sh-sci OF patches I've posted earlier today.

Laurent Pinchart (3):
ARM: shmobile: r8a7790: Add early debugging support
ARM: shmobile: r8a7790: Add serial ports to the device tree
ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT

 arch/arm/Kconfig.debug                         |   8 ++
 arch/arm/boot/dts/r8a7790-lager.dts            |  24 +++++-
 arch/arm/boot/dts/r8a7790.dtsi                 | 100 +++++++++++++++++++++++++
 arch/arm/include/debug/r8a7790.S               |  43 +++++++++++
 arch/arm/mach-shmobile/board-lager-reference.c |  18 +----
 arch/arm/mach-shmobile/setup-r8a7790.c         |  12 +--
 6 files changed, 179 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/include/debug/r8a7790.S
Signature · 3 lines
Regards,

Laurent Pinchart
#1 lore raw

PATCH 1/3 ARM: shmobile: r8a7790: Add early debugging support

Add serial port debug macros for the SCIF0 serial port on R8A7790. Support for other serial ports can easily be added if needed.

---
 arch/arm/Kconfig.debug           |  8 ++++++++
 arch/arm/include/debug/r8a7790.S | 43 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 arch/arm/include/debug/r8a7790.S
arch/arm/Kconfig.debug +8 -0
index 9762c84..f1b765a 100644
@@ -493,6 +493,13 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on PXA UART1.
 
+	config DEBUG_R8A7790
+		bool "Kernel low-level debugging messages via SCIF0 on R8A7790 SoCs"
+		depends on ARCH_R8A7790
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on Renesas R8A7790 based platforms.
+
 	config DEBUG_REALVIEW_STD_PORT
 		bool "RealView Default UART"
 		depends on ARCH_REALVIEW
@@ -901,6 +908,7 @@ config DEBUG_LL_INCLUDE
 				 DEBUG_MSM8660_UART || \
 				 DEBUG_MSM8960_UART
 	default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
+	default "debug/r8a7790.S" if DEBUG_R8A7790
 	default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
 	default "debug/sti.S" if DEBUG_STI_UART
 	default "debug/tegra.S" if DEBUG_TEGRA_UART
arch/arm/include/debug/r8a7790.S new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
1.8.1.5
#2 lore raw

PATCH 1/3 ARM: shmobile: r8a7790: Add VIN clock support

This adds VIN[0-3] clock support to R8A7790 SoC.

Changes in V2:
* none.

Changes in V3:
* capitalized ARM in the subject.

---
 arch/arm/mach-shmobile/clock-r8a7790.c | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/mach-shmobile/clock-r8a7790.c +9 -0
index a028f96..31c5ffa 100644
@@ -197,6 +197,7 @@ enum {
 	MSTP931, MSTP930, MSTP929, MSTP928,
 	MSTP917,
 	MSTP813,
+	MSTP811, MSTP810, MSTP809, MSTP808,
 	MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
 	MSTP717, MSTP716,
 	MSTP704,
@@ -225,6 +226,10 @@ static struct clk mstp_clks[MSTP_NR] = {
 	[MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
 	[MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
 	[MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
+	[MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */
+	[MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */
+	[MSTP809] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8,  9, MSTPSR8, 0), /* VIN2 */
+	[MSTP808] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8,  8, MSTPSR8, 0), /* VIN3 */
 	[MSTP726] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 26, MSTPSR7, 0), /* LVDS0 */
 	[MSTP725] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 25, MSTPSR7, 0), /* LVDS1 */
 	[MSTP724] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 24, MSTPSR7, 0), /* DU0 */
@@ -309,6 +314,10 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]),
 	CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]),
 	CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
+	CLKDEV_DEV_ID("r8a7790-vin.0", &mstp_clks[MSTP811]),
+	CLKDEV_DEV_ID("r8a7790-vin.1", &mstp_clks[MSTP810]),
+	CLKDEV_DEV_ID("r8a7790-vin.2", &mstp_clks[MSTP809]),
+	CLKDEV_DEV_ID("r8a7790-vin.3", &mstp_clks[MSTP808]),
 	CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]),
Signature · 1 line
1.8.3.1
#3 lore raw

Re: [PATCH 1/3] ARM: shmobile: r8a7790: Add VIN clock support

In reply to Laurent Pinchart
Quoted 1 line · Valentine Barshak

This adds VIN[0-3] clock support to R8A7790 SoC.

Please place Changes and similar annotations below a "---" line to allow git to automatically strip them out for me when I apply your patches.

---

Quoted 11 lines

Changes in V2:
* none.

Changes in V3:
* capitalized ARM in the subject.

---
 arch/arm/mach-shmobile/clock-r8a7790.c | 9 +++++++++
 1 file changed, 9 insertions(+)

There was some fuzz when applying this patch.
I have queued up the following. Please check that it is correct.

From: Valentine Barshak <[email protected]>

ARM: shmobile: r8a7790: Add VIN clock support

This adds VIN[0-3] clock support to R8A7790 SoC.

arch/arm/mach-shmobile/clock-r8a7790.c +9 -0
index 58f3dcf..b2b2323 100644
@@ -197,6 +197,7 @@ enum {
 	MSTP931, MSTP930, MSTP929, MSTP928,
 	MSTP917,
 	MSTP813,
+	MSTP811, MSTP810, MSTP809, MSTP808,
 	MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
 	MSTP717, MSTP716,
 	MSTP704,
@@ -226,6 +227,10 @@ static struct clk mstp_clks[MSTP_NR] = {
 	[MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
 	[MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
 	[MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
+	[MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */
+	[MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */
+	[MSTP809] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8,  9, MSTPSR8, 0), /* VIN2 */
+	[MSTP808] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8,  8, MSTPSR8, 0), /* VIN3 */
 	[MSTP726] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 26, MSTPSR7, 0), /* LVDS0 */
 	[MSTP725] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 25, MSTPSR7, 0), /* LVDS1 */
 	[MSTP724] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 24, MSTPSR7, 0), /* DU0 */
@@ -312,6 +317,10 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]),
 	CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]),
 	CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
+	CLKDEV_DEV_ID("r8a7790-vin.0", &mstp_clks[MSTP811]),
+	CLKDEV_DEV_ID("r8a7790-vin.1", &mstp_clks[MSTP810]),
+	CLKDEV_DEV_ID("r8a7790-vin.2", &mstp_clks[MSTP809]),
+	CLKDEV_DEV_ID("r8a7790-vin.3", &mstp_clks[MSTP808]),
 	CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP502]),
#4 lore raw

Re: [PATCH 1/3] ARM: shmobile: r8a7790: Add VIN clock support

In reply to Laurent Pinchart
Quoted 6 lines · Simon Horman
Quoted 1 line · Valentine Barshak

This adds VIN[0-3] clock support to R8A7790 SoC.

Please place Changes and similar annotations below a "---" line to allow git to automatically strip them out for me when I apply your patches.

OK, thanks.

Quoted 10 lines

---

Quoted 7 lines

Changes in V2:
* none.

Changes in V3:
* capitalized ARM in the subject.

Quoted 7 lines
Quoted 4 lines
---
  arch/arm/mach-shmobile/clock-r8a7790.c | 9 +++++++++
  1 file changed, 9 insertions(+)

There was some fuzz when applying this patch.
I have queued up the following. Please check that it is correct.

It is correct, thanks.

Quoted 36 lines

From: Valentine Barshak <[email protected]>

ARM: shmobile: r8a7790: Add VIN clock support

This adds VIN[0-3] clock support to R8A7790 SoC.

arch/arm/mach-shmobile/clock-r8a7790.c +5 -0
index 58f3dcf..b2b2323 100644
@@ -197,6 +197,7 @@ enum {
  	MSTP931, MSTP930, MSTP929, MSTP928,
  	MSTP917,
  	MSTP813,
+	MSTP811, MSTP810, MSTP809, MSTP808,
  	MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
  	MSTP717, MSTP716,
  	MSTP704,
@@ -226,6 +227,10 @@ static struct clk mstp_clks[MSTP_NR] = {
  	[MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
  	[MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
  	[MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
+	[MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */
+	[MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */
+	[MSTP809] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8,  9, MSTPSR8, 0), /* VIN2 */
+	[MSTP808] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8,  8, MSTPSR8, 0), /* VIN3 */
  	[MSTP726] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 26, MSTPSR7, 0), /* LVDS0 */
  	[MSTP725] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 25, MSTPSR7, 0), /* LVDS1 */
  	[MSTP724] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 24, MSTPSR7, 0), /* DU0 */

arch/arm/mach-shmobile/clock-r8a7790.c static struct clk_lookup lookups[] = { · line 326

Quoted 10 lines
arch/arm/mach-shmobile/clock-r8a7790.c +4 -0
@@ -312,6 +317,10 @@ static struct clk_lookup lookups[] = {
  	CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]),
  	CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]),
  	CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
+	CLKDEV_DEV_ID("r8a7790-vin.0", &mstp_clks[MSTP811]),
+	CLKDEV_DEV_ID("r8a7790-vin.1", &mstp_clks[MSTP810]),
+	CLKDEV_DEV_ID("r8a7790-vin.2", &mstp_clks[MSTP809]),
+	CLKDEV_DEV_ID("r8a7790-vin.3", &mstp_clks[MSTP808]),
  	CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
  	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
  	CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP502]),

Thanks,
Val.

#5 lore raw

PATCH 1/3 ARM: shmobile: r8a7790: add MSTP10 support on DTSI

In reply to Laurent Pinchart

From: Kuninori Morimoto <[email protected]>

---
 arch/arm/boot/dts/r8a7790.dtsi            |   32 +++++++++++++++++++++++++++++
 include/dt-bindings/clock/r8a7790-clock.h |   26 +++++++++++++++++++++++
 2 files changed, 58 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +31 -0
index e990d3c..cb8a68d 100644
@@ -835,6 +835,38 @@
 				"rcan1", "rcan0", "qspi_mod", "iic3",
 				"i2c3", "i2c2", "i2c1", "i2c0";
 		};
+		mstp10_clks: mstp10_clks@e6150998 {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+			clocks = <&p_clk>, /* parent of SCU */
+				<&p_clk>,
+				<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				<&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+				<&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+				<&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+				<&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+				<&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+				<&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>;
+
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7790_CLK_SCU
+				R8A7790_CLK_SSI
+				R8A7790_CLK_SSI9 R8A7790_CLK_SSI8 R8A7790_CLK_SSI7 R8A7790_CLK_SSI6 R8A7790_CLK_SSI5
+				R8A7790_CLK_SSI4 R8A7790_CLK_SSI3 R8A7790_CLK_SSI2 R8A7790_CLK_SSI1 R8A7790_CLK_SSI0
+				R8A7790_CLK_DVC1 R8A7790_CLK_DVC0
+				R8A7790_CLK_SRC9 R8A7790_CLK_SRC8 R8A7790_CLK_SRC7 R8A7790_CLK_SRC6 R8A7790_CLK_SRC5
+				R8A7790_CLK_SRC4 R8A7790_CLK_SRC3 R8A7790_CLK_SRC2 R8A7790_CLK_SRC1 R8A7790_CLK_SRC0
+			>;
+			clock-output-names +				"scu", "ssi",
+				"ssi9", "ssi8", "ssi7", "ssi6", "ssi5",
+				"ssi4", "ssi3", "ssi2", "ssi1", "ssi0",
+				"dvc1", "dvc0",
+				"src9", "src8", "src7", "src6", "src5",
+				"src4", "src3", "src2", "src1", "src0";
+		};
 	};
 
 	qspi: spi@e6b10000 {
include/dt-bindings/clock/r8a7790-clock.h +26 -0
index 1118f7a..b4430b0 100644
@@ -107,4 +107,30 @@
 #define R8A7790_CLK_I2C1		30
 #define R8A7790_CLK_I2C0		31
 
+/* MSTP10 */
+#define R8A7790_CLK_SSI			5
+#define R8A7790_CLK_SSI9		6
+#define R8A7790_CLK_SSI8		7
+#define R8A7790_CLK_SSI7		8
+#define R8A7790_CLK_SSI6		9
+#define R8A7790_CLK_SSI5		10
+#define R8A7790_CLK_SSI4		11
+#define R8A7790_CLK_SSI3		12
+#define R8A7790_CLK_SSI2		13
+#define R8A7790_CLK_SSI1		14
+#define R8A7790_CLK_SSI0		15
+#define R8A7790_CLK_SCU			17
+#define R8A7790_CLK_DVC1		18
+#define R8A7790_CLK_DVC0		19
+#define R8A7790_CLK_SRC9		22
+#define R8A7790_CLK_SRC8		23
+#define R8A7790_CLK_SRC7		24
+#define R8A7790_CLK_SRC6		25
+#define R8A7790_CLK_SRC5		26
+#define R8A7790_CLK_SRC4		27
+#define R8A7790_CLK_SRC3		28
+#define R8A7790_CLK_SRC2		29
+#define R8A7790_CLK_SRC1		30
+#define R8A7790_CLK_SRC0		31
+
 #endif /* __DT_BINDINGS_CLOCK_R8A7790_H__ */
Signature · 1 line
1.7.9.5
#6 lore raw

Re: [PATCH 1/3] ARM: shmobile: r8a7790: add MSTP10 support on DTSI

In reply to Laurent Pinchart

Hi Morimoto-san,

Quoted 19 lines · Kuninori Morimoto
arch/arm/boot/dts/r8a7790.dtsi +13 -0
@@ -835,6 +835,38 @@
                                "rcan1", "rcan0", "qspi_mod", "iic3",
                                "i2c3", "i2c2", "i2c1", "i2c0";
                };
+               mstp10_clks: mstp10_clks@e6150998 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+                       clocks = <&p_clk>, /* parent of SCU */
+                               <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>;

arch/arm/boot/dts/r8a7790.dtsi line 860

Quoted 10 lines
arch/arm/boot/dts/r8a7790.dtsi +10 -0
+
+                       #clock-cells = <1>;
+                       clock-indices = <
+                               R8A7790_CLK_SCU
+                               R8A7790_CLK_SSI
+                               R8A7790_CLK_SSI9 R8A7790_CLK_SSI8 R8A7790_CLK_SSI7 R8A7790_CLK_SSI6 R8A7790_CLK_SSI5
+                               R8A7790_CLK_SSI4 R8A7790_CLK_SSI3 R8A7790_CLK_SSI2 R8A7790_CLK_SSI1 R8A7790_CLK_SSI0
+                               R8A7790_CLK_DVC1 R8A7790_CLK_DVC0
+                               R8A7790_CLK_SRC9 R8A7790_CLK_SRC8 R8A7790_CLK_SRC7 R8A7790_CLK_SRC6 R8A7790_CLK_SRC5
+                               R8A7790_CLK_SRC4 R8A7790_CLK_SRC3 R8A7790_CLK_SRC2 R8A7790_CLK_SRC1 R8A7790_CLK_SRC0

I think we usually put these in numerical order here.

Quoted 16 lines
arch/arm/boot/dts/r8a7790.dtsi +8 -0
+                       >;
+                       clock-output-names > +                               "scu", "ssi",
+                               "ssi9", "ssi8", "ssi7", "ssi6", "ssi5",
+                               "ssi4", "ssi3", "ssi2", "ssi1", "ssi0",
+                               "dvc1", "dvc0",
+                               "src9", "src8", "src7", "src6", "src5",
+                               "src4", "src3", "src2", "src1", "src0";
+               };
        };
 
        qspi: spi@e6b10000 {
include/dt-bindings/clock/r8a7790-clock.h +0 -0
index 1118f7a..b4430b0 100644

include/dt-bindings/clock/r8a7790-clock.h line 111

Quoted 5 lines
include/dt-bindings/clock/r8a7790-clock.h +2 -0
@@ -107,4 +107,30 @@
 #define R8A7790_CLK_I2C1               30
 #define R8A7790_CLK_I2C0               31
 
+/* MSTP10 */
+#define R8A7790_CLK_SSI                        5

Should this be called R8A7790_CLK_SSI_ALL?

include/dt-bindings/clock/r8a7790-clock.h line 122

Quoted 11 lines
include/dt-bindings/clock/r8a7790-clock.h +11 -0
+#define R8A7790_CLK_SSI9               6
+#define R8A7790_CLK_SSI8               7
+#define R8A7790_CLK_SSI7               8
+#define R8A7790_CLK_SSI6               9
+#define R8A7790_CLK_SSI5               10
+#define R8A7790_CLK_SSI4               11
+#define R8A7790_CLK_SSI3               12
+#define R8A7790_CLK_SSI2               13
+#define R8A7790_CLK_SSI1               14
+#define R8A7790_CLK_SSI0               15
+#define R8A7790_CLK_SCU                        17

Should this be called R8A7790_CLK_SCU_ALL?

include/dt-bindings/clock/r8a7790-clock.h line 124

Quoted 2 lines
include/dt-bindings/clock/r8a7790-clock.h +2 -0
+#define R8A7790_CLK_DVC1               18
+#define R8A7790_CLK_DVC0               19

"#define R8A7790_CLK_SCU_CTU1x_MIX1 20" and "#define R8A7790_CLK_SCU_CTU0x_MIX0 21" are missing?

include/dt-bindings/clock/r8a7790-clock.h line 134

Quoted 10 lines
include/dt-bindings/clock/r8a7790-clock.h +10 -0
+#define R8A7790_CLK_SRC9               22
+#define R8A7790_CLK_SRC8               23
+#define R8A7790_CLK_SRC7               24
+#define R8A7790_CLK_SRC6               25
+#define R8A7790_CLK_SRC5               26
+#define R8A7790_CLK_SRC4               27
+#define R8A7790_CLK_SRC3               28
+#define R8A7790_CLK_SRC2               29
+#define R8A7790_CLK_SRC1               30
+#define R8A7790_CLK_SRC0               31

Should these be called R8A7790_CLK_SCU_SRC[0-9]?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#7 lore raw

Re: [PATCH 1/3] ARM: shmobile: r8a7790: add MSTP10 support on DTSI

In reply to Laurent Pinchart
Quoted 8 lines · Geert Uytterhoeven
Quoted 1 line

+#define R8A7790_CLK_SSI 5

Should this be called R8A7790_CLK_SSI_ALL?

Quoted 1 line

+#define R8A7790_CLK_SCU 17

Should this be called R8A7790_CLK_SCU_ALL?

Quoted 12 lines

Review

Quoted 10 lines
(quoted diff) +10 -0
+#define R8A7790_CLK_SRC9               22
+#define R8A7790_CLK_SRC8               23
+#define R8A7790_CLK_SRC7               24
+#define R8A7790_CLK_SRC6               25
+#define R8A7790_CLK_SRC5               26
+#define R8A7790_CLK_SRC4               27
+#define R8A7790_CLK_SRC3               28
+#define R8A7790_CLK_SRC2               29
+#define R8A7790_CLK_SRC1               30
+#define R8A7790_CLK_SRC0               31

Should these be called R8A7790_CLK_SCU_SRC[0-9]?

If forgot: in case the above are changed, the values in "clock-output-names" should be renamed, too.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#8 lore raw

Re: [PATCH 1/3] ARM: shmobile: r8a7790: add MSTP10 support on DTSI

In reply to Laurent Pinchart

Hi Geert

Quoted 24 lines
Quoted 13 lines
(quoted diff) +13 -0
+               mstp10_clks: mstp10_clks@e6150998 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+                       clocks = <&p_clk>, /* parent of SCU */
+                               <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>;

Review

Quoted 10 lines
(quoted diff) +10 -0
+
+                       #clock-cells = <1>;
+                       clock-indices = <
+                               R8A7790_CLK_SCU
+                               R8A7790_CLK_SSI
+                               R8A7790_CLK_SSI9 R8A7790_CLK_SSI8 R8A7790_CLK_SSI7 R8A7790_CLK_SSI6 R8A7790_CLK_SSI5
+                               R8A7790_CLK_SSI4 R8A7790_CLK_SSI3 R8A7790_CLK_SSI2 R8A7790_CLK_SSI1 R8A7790_CLK_SSI0
+                               R8A7790_CLK_DVC1 R8A7790_CLK_DVC0
+                               R8A7790_CLK_SRC9 R8A7790_CLK_SRC8 R8A7790_CLK_SRC7 R8A7790_CLK_SRC6 R8A7790_CLK_SRC5
+                               R8A7790_CLK_SRC4 R8A7790_CLK_SRC3 R8A7790_CLK_SRC2 R8A7790_CLK_SRC1 R8A7790_CLK_SRC0
Quoted 1 line

I think we usually put these in numerical order here.

Do you mean R8A7790_CLK_SCU is out-of-order ?
If so, Unfortunately, we need put "R8A7790_CLK_SCU" before "R8A7790_CLK_SRCx", because SCU(ALL) is parent clock of SRCn.

Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+#define R8A7790_CLK_DVC1               18
+#define R8A7790_CLK_DVC0               19

"#define R8A7790_CLK_SCU_CTU1x_MIX1 20" and "#define R8A7790_CLK_SCU_CTU0x_MIX0 21" are missing?

Yes, CTU/MIX is not supported at this point in sound driver. I don't know I should add it or not

Quoted 4 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+/* MSTP10 */
+#define R8A7790_CLK_SSI                        5

Should this be called R8A7790_CLK_SSI_ALL?

(snip)

Quoted 3 lines
Quoted 1 line

+#define R8A7790_CLK_SCU 17

Should this be called R8A7790_CLK_SCU_ALL?

(snip)

Quoted 4 lines
Quoted 4 lines
(quoted diff) +4 -0
+#define R8A7790_CLK_SRC9               22
+#define R8A7790_CLK_SRC8               23
+#define R8A7790_CLK_SRC7               24
+#define R8A7790_CLK_SRC6               25
Quoted 8 lines

Review

Quoted 6 lines
(quoted diff) +6 -0
+#define R8A7790_CLK_SRC5               26
+#define R8A7790_CLK_SRC4               27
+#define R8A7790_CLK_SRC3               28
+#define R8A7790_CLK_SRC2               29
+#define R8A7790_CLK_SRC1               30
+#define R8A7790_CLK_SRC0               31

Should these be called R8A7790_CLK_SCU_SRC[0-9]?

Using datasheet name will not create new confusion. Thank you, will fix.

#9 lore raw

Re: [PATCH 1/3] ARM: shmobile: r8a7790: add MSTP10 support on DTSI

In reply to Laurent Pinchart

Hi Morimoto-san,

Quoted 24 lines · Kuninori Morimoto
Quoted 24 lines
Quoted 23 lines
(quoted diff) +23 -0
+               mstp10_clks: mstp10_clks@e6150998 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+                       clocks = <&p_clk>, /* parent of SCU */
+                               <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>,
+                               <&mstp10_clks R8A7790_CLK_SCU>, <&mstp10_clks R8A7790_CLK_SCU>;
+
+                       #clock-cells = <1>;
+                       clock-indices = <
+                               R8A7790_CLK_SCU
+                               R8A7790_CLK_SSI
+                               R8A7790_CLK_SSI9 R8A7790_CLK_SSI8 R8A7790_CLK_SSI7 R8A7790_CLK_SSI6 R8A7790_CLK_SSI5
+                               R8A7790_CLK_SSI4 R8A7790_CLK_SSI3 R8A7790_CLK_SSI2 R8A7790_CLK_SSI1 R8A7790_CLK_SSI0
+                               R8A7790_CLK_DVC1 R8A7790_CLK_DVC0
+                               R8A7790_CLK_SRC9 R8A7790_CLK_SRC8 R8A7790_CLK_SRC7 R8A7790_CLK_SRC6 R8A7790_CLK_SRC5
+                               R8A7790_CLK_SRC4 R8A7790_CLK_SRC3 R8A7790_CLK_SRC2 R8A7790_CLK_SRC1 R8A7790_CLK_SRC0
Quoted 3 lines
Quoted 1 line

I think we usually put these in numerical order here.

Do you mean R8A7790_CLK_SCU is out-of-order ?

I mean they should be in the same order as listed in include/dt-bindings/clock/r8a7790-clock.h

Quoted 2 lines

If so, Unfortunately, we need put "R8A7790_CLK_SCU" before "R8A7790_CLK_SRCx", because SCU(ALL) is parent clock of SRCn.

IC. I didn't look up the parent clock relations.
However, SCU_ALL = 17, while its children are 18-31, so numerical order should be fine.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#10 lore raw

Re: [PATCH 1/3] ARM: shmobile: r8a7790: add MSTP10 support on DTSI

In reply to Laurent Pinchart

Hi Geert, Simon

Quoted 6 lines
Quoted 2 lines

If so, Unfortunately, we need put "R8A7790_CLK_SCU" before "R8A7790_CLK_SRCx", because SCU(ALL) is parent clock of SRCn.

IC. I didn't look up the parent clock relations.
However, SCU_ALL = 17, while its children are 18-31, so numerical order should be fine.

Hmm.. indeed
I had been confused about it.

I sent v2 patches before getting your feedback...
Before sending v3 patches, I want to get Simon's opinion.
I will send v3 patches if Simon can accept [1/3][2/3] (and [3/3] too?) now. If not, I will say "Thank you for your feedback" to Geert,
but, not send v3. because this is [RFC] patches.

#11 lore raw

PATCH 1/3 ARM: shmobile: r8a7790: Add IPMMU DT nodes

In reply to Laurent Pinchart

Add the six IPMMU instances found in the r8a7790 to DT with a disabled status.

---
 arch/arm/boot/dts/r8a7790.dtsi | 51 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +51 -0
index 56847bf09c3b..a9e601053bbb 100644
@@ -1473,4 +1473,55 @@
 			ssi9: ssi@9 { interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; };
 		};
 	};
+
+	ipmmu_sy0: mmu@e6280000 {
+		compatible = "renesas,ipmmu-vmsa";
+		reg = <0 0xe6280000 0 0x1000>;
+		interrupts = <0 223 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 224 IRQ_TYPE_LEVEL_HIGH>;
+		#iommu-cells = <1>;
+		status = "disabled";
+	};
+
+	ipmmu_sy1: mmu@e6290000 {
+		compatible = "renesas,ipmmu-vmsa";
+		reg = <0 0xe6290000 0 0x1000>;
+		interrupts = <0 225 IRQ_TYPE_LEVEL_HIGH>;
+		#iommu-cells = <1>;
+		status = "disabled";
+	};
+
+	ipmmu_ds: mmu@e6740000 {
+		compatible = "renesas,ipmmu-vmsa";
+		reg = <0 0xe6740000 0 0x1000>;
+		interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 199 IRQ_TYPE_LEVEL_HIGH>;
+		#iommu-cells = <1>;
+		status = "disabled";
+	};
+
+	ipmmu_mp: mmu@ec680000 {
+		compatible = "renesas,ipmmu-vmsa";
+		reg = <0 0xec680000 0 0x1000>;
+		interrupts = <0 226 IRQ_TYPE_LEVEL_HIGH>;
+		#iommu-cells = <1>;
+		status = "disabled";
+	};
+
+	ipmmu_mx: mmu@fe951000 {
+		compatible = "renesas,ipmmu-vmsa";
+		reg = <0 0xfe951000 0 0x1000>;
+		interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>,
+			     <0 221 IRQ_TYPE_LEVEL_HIGH>;
+		#iommu-cells = <1>;
+		status = "disabled";
+	};
+
+	ipmmu_rt: mmu@ffc80000 {
+		compatible = "renesas,ipmmu-vmsa";
+		reg = <0 0xffc80000 0 0x1000>;
+		interrupts = <0 307 IRQ_TYPE_LEVEL_HIGH>;
+		#iommu-cells = <1>;
+		status = "disabled";
+	};
 };
Signature · 1 line
2.0.5
#12 lore raw

PATCH 2/3 ARM: shmobile: r8a7790: Add serial ports to the device tree

In reply to Laurent Pinchart

The platform code serial port instantiation mechanism is kept for the non-DT platforms only.

---
 arch/arm/boot/dts/r8a7790.dtsi         | 100 +++++++++++++++++++++++++++++++++
 arch/arm/mach-shmobile/setup-r8a7790.c |  12 ++--
 2 files changed, 106 insertions(+), 6 deletions(-)
arch/arm/boot/dts/r8a7790.dtsi +100 -0
index 94c8373..04a4992 100644
@@ -287,6 +287,106 @@
 		status = "disabled";
 	};
 
+	scifa0: serial at e6c40000 {
+		compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
+		reg = <0 0xe6c40000 0 64>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 144 4>;
+		clocks = <&mstp2_clks R8A7790_CLK_SCIFA0>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scifa1: serial at e6c50000 {
+		compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
+		interrupt-parent = <&gic>;
+		reg = <0 0xe6c50000 0 64>;
+		interrupts = <0 145 4>;
+		clocks = <&mstp2_clks R8A7790_CLK_SCIFA1>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scifa2: serial at e6c60000 {
+		compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
+		interrupt-parent = <&gic>;
+		reg = <0 0xe6c60000 0 64>;
+		interrupts = <0 151 4>;
+		clocks = <&mstp2_clks R8A7790_CLK_SCIFA2>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scifb0: serial at e6c20000 {
+		compatible = "renesas,scifb-r8a7790", "renesas,scifb-generic";
+		interrupt-parent = <&gic>;
+		reg = <0 0xe6c20000 0 64>;
+		interrupts = <0 148 4>;
+		clocks = <&mstp2_clks R8A7790_CLK_SCIFB0>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scifb1: serial at e6c30000 {
+		compatible = "renesas,scifb-r8a7790", "renesas,scifb-generic";
+		interrupt-parent = <&gic>;
+		reg = <0 0xe6c30000 0 64>;
+		interrupts = <0 149 4>;
+		clocks = <&mstp2_clks R8A7790_CLK_SCIFB1>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scifb2: serial at e6ce0000 {
+		compatible = "renesas,scifb-r8a7790", "renesas,scifb-generic";
+		interrupt-parent = <&gic>;
+		reg = <0 0xe6ce0000 0 64>;
+		interrupts = <0 150 4>;
+		clocks = <&mstp2_clks R8A7790_CLK_SCIFB2>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif0: serial at e6e60000 {
+		compatible = "renesas,scif-r8a7790", "renesas,scif-generic";
+		interrupt-parent = <&gic>;
+		reg = <0 0xe6e60000 0 64>;
+		interrupts = <0 152 4>;
+		clocks = <&mstp7_clks R8A7790_CLK_SCIF0>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif1: serial at e6e68000 {
+		compatible = "renesas,scif-r8a7790", "renesas,scif-generic";
+		interrupt-parent = <&gic>;
+		reg = <0 0xe6e68000 0 64>;
+		interrupts = <0 153 4>;
+		clocks = <&mstp7_clks R8A7790_CLK_SCIF1>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	hscif0: serial at e62c0000 {
+		compatible = "renesas,hscif-r8a7790", "renesas,hscif-generic";
+		interrupt-parent = <&gic>;
+		reg = <0 0xe62c0000 0 96>;
+		interrupts = <0 154 4>;
+		clocks = <&mstp7_clks R8A7790_CLK_HSCIF0>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	hscif1: serial at e62c8000 {
+		compatible = "renesas,hscif-r8a7790", "renesas,hscif-generic";
+		interrupt-parent = <&gic>;
+		reg = <0 0xe62c8000 0 96>;
+		interrupts = <0 155 4>;
+		clocks = <&mstp7_clks R8A7790_CLK_HSCIF1>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
 	clocks {
 		#address-cells = <2>;
 		#size-cells = <2>;
arch/arm/mach-shmobile/setup-r8a7790.c +6 -6
index c47bceb..8172a82 100644
@@ -182,6 +182,12 @@ static const struct resource cmt00_resources[] __initconst = {
 
 void __init r8a7790_add_dt_devices(void)
 {
+	r8a7790_register_cmt(00);
+}
+
+void __init r8a7790_add_standard_devices(void)
+{
+	r8a7790_add_dt_devices();
 	r8a7790_register_scif(SCIFA0);
 	r8a7790_register_scif(SCIFA1);
 	r8a7790_register_scif(SCIFB0);
@@ -192,12 +198,6 @@ void __init r8a7790_add_dt_devices(void)
 	r8a7790_register_scif(SCIF1);
 	r8a7790_register_scif(HSCIF0);
 	r8a7790_register_scif(HSCIF1);
-	r8a7790_register_cmt(00);
-}
-
-void __init r8a7790_add_standard_devices(void)
-{
-	r8a7790_add_dt_devices();
 	r8a7790_register_irqc(0);
 	r8a7790_register_thermal();
 }
Signature · 1 line
1.8.1.5
#13 lore raw

PATCH 3/3 ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT

In reply to Laurent Pinchart

SCIF0 and SCIF1 are used as debug serial ports. Enable them and configure pinmuxing appropriately. We can now remove the clkdev registration hack for SCIF devices from the Lager reference board file.

---
 arch/arm/boot/dts/r8a7790-lager.dts            | 24 ++++++++++++++++++++----
 arch/arm/mach-shmobile/board-lager-reference.c | 18 ++----------------
 2 files changed, 22 insertions(+), 20 deletions(-)
arch/arm/boot/dts/r8a7790-lager.dts +20 -4
index a923ab6..9830c87 100644
@@ -16,8 +16,13 @@
 	model = "Lager";
 	compatible = "renesas,lager", "renesas,r8a7790";
 
+	aliases {
+		serial0 = &scif0;
+		serial1 = &scif1;
+	};
+
 	chosen {
-		bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
+		bootargs = "console=ttySC0,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
 	};
 
 	memory at 40000000 {
@@ -58,9 +63,6 @@
 };
 
 &pfc {
-	pinctrl-0 = <&scif0_pins &scif1_pins>;
-	pinctrl-names = "default";
-
 	scif0_pins: scif0 {
 		renesas,groups = "scif0_data";
 		renesas,function = "scif0";
@@ -86,3 +88,17 @@
 	non-removable;
 	status = "okay";
 };
+
+&scif0 {
+	pinctrl-0 = <&scif0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
+&scif1 {
+	pinctrl-0 = <&scif1_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
arch/arm/mach-shmobile/board-lager-reference.c +2 -16
index bc3d0d2..1f5d6e2 100644
@@ -36,24 +36,10 @@ static void __init lager_init_time(void)
 static void __init lager_add_standard_devices(void)
 {
 	/*
-	 * This is a really crude hack to provide clkdev support to the SCIF
-	 * and CMT devices until they get moved to DT.
+	 * This is a really crude hack to provide clkdev support to the CMT
+	 * CMT device until it gets moved to DT.
 	 */
-	static const char * const scif_names[] = {
-		"scifa0", "scifa1", "scifb0", "scifb1",
-		"scifb2", "scifa2", "scif0", "scif1",
-		"hscif0", "hscif1",
-	};
 	struct clk *clk;
-	unsigned int i;
-
-	for (i = 0; i < ARRAY_SIZE(scif_names); ++i) {
-		clk = clk_get(NULL, scif_names[i]);
-		if (clk) {
-			clk_register_clkdev(clk, NULL, "sh-sci.%u", i);
-			clk_put(clk);
-		}
-	}
 
 	clk = clk_get(NULL, "cmt0");
 	if (clk) {
Signature · 1 line
1.8.1.5
#14 lore raw

PATCH 3/3 ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT

Quoted 16 lines · Laurent Pinchart

SCIF0 and SCIF1 are used as debug serial ports. Enable them and configure pinmuxing appropriately. We can now remove the clkdev registration hack for SCIF devices from the Lager reference board file.

---
  arch/arm/boot/dts/r8a7790-lager.dts            | 24 ++++++++++++++++++++----
  arch/arm/mach-shmobile/board-lager-reference.c | 18 ++----------------
  2 files changed, 22 insertions(+), 20 deletions(-)
arch/arm/boot/dts/r8a7790-lager.dts +0 -0
index a923ab6..9830c87 100644
@@ -16,8 +16,13 @@
  	model = "Lager";

arch/arm/boot/dts/r8a7790-lager.dts line 25

Quoted 10 lines
arch/arm/boot/dts/r8a7790-lager.dts +6 -1
  	compatible = "renesas,lager", "renesas,r8a7790";
 
+	aliases {
+		serial0 = &scif0;
+		serial1 = &scif1;
+	};
+
  	chosen {
-		bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
+		bootargs = "console=ttySC0,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";

Hm... is the rename a by-product of the SCIF device tree enablement?

[...]

arch/arm/mach-shmobile/board-lager-reference.c static void __init lager_init_time(void) · line 40

Quoted 12 lines
arch/arm/mach-shmobile/board-lager-reference.c +2 -2
index bc3d0d2..1f5d6e2 100644
@@ -36,24 +36,10 @@ static void __init lager_init_time(void)
  static void __init lager_add_standard_devices(void)
  {
  	/*
-	 * This is a really crude hack to provide clkdev support to the SCIF
-	 * and CMT devices until they get moved to DT.
+	 * This is a really crude hack to provide clkdev support to the CMT
+	 * CMT device until it gets moved to DT.

Minor nit: "CMT" repeated twice.

WBR, Sergei

#15 lore raw

PATCH 3/3 ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT

Hi Sergei,

Quoted 21 lines · On Tuesday 29 October 2013 22:09:34 Sergei Shtylyov wrote:
Quoted 20 lines · Laurent Pinchart

SCIF0 and SCIF1 are used as debug serial ports. Enable them and configure pinmuxing appropriately. We can now remove the clkdev registration hack for SCIF devices from the Lager reference board file.

Signed-off-by: Laurent Pinchart
<[email protected]>
---

  arch/arm/boot/dts/r8a7790-lager.dts            | 24 ++++++++++++++++----
  arch/arm/mach-shmobile/board-lager-reference.c | 18 ++----------------
  2 files changed, 22 insertions(+), 20 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/r8a7790-lager.dts index a923ab6..9830c87 100644

arch/arm/boot/dts/r8a7790-lager.dts +0 -0
@@ -16,8 +16,13 @@
  	model = "Lager";
  	compatible = "renesas,lager", "renesas,r8a7790";
 
Quoted 12 lines

arch/arm/boot/dts/r8a7790-lager.dts

Quoted 10 lines
arch/arm/boot/dts/r8a7790-lager.dts +6 -1
+	aliases {
+		serial0 = &scif0;
+		serial1 = &scif1;
+	};
+
  	chosen {
-		bootargs = "console=ttySC6,115200 ignore_loglevel rw
 root=/dev/nfs ip=dhcp";
+		bootargs = "console=ttySC0,115200 ignore_loglevel rw
 root=/dev/nfs ip=dhcp";

Hm... is the rename a by-product of the SCIF device tree enablement?

I suppose we could keep the same serial port name using serial6 and serial7 in the aliases. However, moving to DT will get rid of all other serial ports, so we would be left with ttySC6 and ttySC7, without ttySC0 to ttySC5. I'm not sure if I like that.

(CC'ing Simon and Magnus to get their opinion on the subject)

Quoted 9 lines

[...]

Quoted 7 lines
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/board-lager-reference.c index bc3d0d2..1f5d6e2 100644

arch/arm/mach-shmobile/board-lager-reference.c +0 -0
@@ -36,24 +36,10 @@ static void __init lager_init_time(void)
 
Quoted 9 lines

arch/arm/mach-shmobile/board-lager-reference.c static void __init lager_init_time(void) · line 40

Quoted 7 lines
arch/arm/mach-shmobile/board-lager-reference.c +2 -2
  static void __init lager_add_standard_devices(void)
  {
  	/*
-	 * This is a really crude hack to provide clkdev support to the SCIF
-	 * and CMT devices until they get moved to DT.
+	 * This is a really crude hack to provide clkdev support to the CMT
+	 * CMT device until it gets moved to DT.

Minor nit: "CMT" repeated twice.

I'll fix that. If no other change is required I won't repost the patch before sending the pull request.

Signature · 3 lines
Regards,

Laurent Pinchart
#16 lore raw

PATCH 3/3 ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT

Quoted 37 lines · Laurent Pinchart

Hi Sergei,

Quoted 21 lines · On Tuesday 29 October 2013 22:09:34 Sergei Shtylyov wrote:
Quoted 20 lines · Laurent Pinchart

SCIF0 and SCIF1 are used as debug serial ports. Enable them and configure pinmuxing appropriately. We can now remove the clkdev registration hack for SCIF devices from the Lager reference board file.

Signed-off-by: Laurent Pinchart
<[email protected]>
---

  arch/arm/boot/dts/r8a7790-lager.dts            | 24 ++++++++++++++++----
  arch/arm/mach-shmobile/board-lager-reference.c | 18 ++----------------
  2 files changed, 22 insertions(+), 20 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/r8a7790-lager.dts index a923ab6..9830c87 100644

arch/arm/boot/dts/r8a7790-lager.dts +0 -0
@@ -16,8 +16,13 @@
  	model = "Lager";
  	compatible = "renesas,lager", "renesas,r8a7790";
 
Quoted 12 lines

arch/arm/boot/dts/r8a7790-lager.dts

Quoted 10 lines
arch/arm/boot/dts/r8a7790-lager.dts +6 -1
+	aliases {
+		serial0 = &scif0;
+		serial1 = &scif1;
+	};
+
  	chosen {
-		bootargs = "console=ttySC6,115200 ignore_loglevel rw
 root=/dev/nfs ip=dhcp";
+		bootargs = "console=ttySC0,115200 ignore_loglevel rw
 root=/dev/nfs ip=dhcp";

Hm... is the rename a by-product of the SCIF device tree enablement?

Quoted 6 lines

I suppose we could keep the same serial port name using serial6 and serial7 in the aliases. However, moving to DT will get rid of all other serial ports, so we would be left with ttySC6 and ttySC7, without ttySC0 to ttySC5. I'm not sure if I like that.

(CC'ing Simon and Magnus to get their opinion on the subject)

It seems logical to me that if we only have two serial ports initialised that they should be ttySC0 and ttySC1. Even if that leaves us with the pain of switching over to use ttySC0 instead of ttySC6 as the console.

Quoted 28 lines
Quoted 10 lines

[...]

Quoted 7 lines
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/board-lager-reference.c index bc3d0d2..1f5d6e2 100644

arch/arm/mach-shmobile/board-lager-reference.c +0 -0
@@ -36,24 +36,10 @@ static void __init lager_init_time(void)
 
Quoted 9 lines

arch/arm/mach-shmobile/board-lager-reference.c static void __init lager_init_time(void) · line 40

Quoted 7 lines
arch/arm/mach-shmobile/board-lager-reference.c +2 -2
  static void __init lager_add_standard_devices(void)
  {
  	/*
-	 * This is a really crude hack to provide clkdev support to the SCIF
-	 * and CMT devices until they get moved to DT.
+	 * This is a really crude hack to provide clkdev support to the CMT
+	 * CMT device until it gets moved to DT.

Minor nit: "CMT" repeated twice.

I'll fix that. If no other change is required I won't repost the patch before sending the pull request.

Signature · 3 lines
Regards,

Laurent Pinchart
#17 lore raw

cover ARM: shmobile: Lager reference serial port support

In reply to Laurent Pinchart
Quoted 7 lines · Laurent Pinchart

Hello,

This patch set implements serial port support for the Lager reference board, and adds early debugging support for the r8a7790 SoC.

The code is available in my git tree at

Quoted 8 lines

git://linuxtv.org/pinchartl/fbdev.git clocks/ccf/serial-lager

The branch is based on a merge of renesas-devel-20131016, v3.12-rc7 and multiarch drivers, clk-prepare, r8a7790 CCF and sh-sci OF patches I've posted earlier today.

Laurent Pinchart (3):
ARM: shmobile: r8a7790: Add early debugging support

The patch above could be applied now, right?
If so, Magnus, could you review it?

Quoted 2 lines

ARM: shmobile: r8a7790: Add serial ports to the device tree
ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT

I would like to ask you to repost these patches once their pre-requisites have been merged.

#18 lore raw

cover ARM: shmobile: Lager reference serial port support

Hi Simon,

Quoted 10 lines · On Thursday 31 October 2013 14:31:44 Simon Horman wrote:
Quoted 9 lines · Laurent Pinchart

Hello,

This patch set implements serial port support for the Lager reference board, and adds early debugging support for the r8a7790 SoC.

The code is available in my git tree at

git://linuxtv.org/pinchartl/fbdev.git clocks/ccf/serial-lager

Quoted 8 lines
Quoted 6 lines

The branch is based on a merge of renesas-devel-20131016, v3.12-rc7 and multiarch drivers, clk-prepare, r8a7790 CCF and sh-sci OF patches I've posted earlier today.

Laurent Pinchart (3):
ARM: shmobile: r8a7790: Add early debugging support

The patch above could be applied now, right?

That's correct. It will be useless though, as DEBUG_LL can only be used on multiarch.

Given that the SCIF/SCIFA/SCIFB port operate similarly, I wonder whether it wouldn't make more sense to add a generic DEBUG_SHMOBILE_SCIF implementation instead. We could then have sub-options to select the exact SoC type and port number, and compute the base address from that.

Quoted 7 lines

If so, Magnus, could you review it?

Quoted 2 lines

ARM: shmobile: r8a7790: Add serial ports to the device tree
ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT

I would like to ask you to repost these patches once their pre-requisites have been merged.

Sure, no problem.

Signature · 3 lines
Regards,

Laurent Pinchart
#19 lore raw

cover ARM: shmobile: Lager reference serial port support

[ CC Magnus ]

Quoted 17 lines · Laurent Pinchart

Hi Simon,

Quoted 14 lines · On Thursday 31 October 2013 14:31:44 Simon Horman wrote:
Quoted 13 lines · Laurent Pinchart

Hello,

This patch set implements serial port support for the Lager reference board, and adds early debugging support for the r8a7790 SoC.

The code is available in my git tree at

git://linuxtv.org/pinchartl/fbdev.git clocks/ccf/serial-lager

The branch is based on a merge of renesas-devel-20131016, v3.12-rc7 and multiarch drivers, clk-prepare, r8a7790 CCF and sh-sci OF patches I've posted earlier today.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Laurent Pinchart (3):
ARM: shmobile: r8a7790: Add early debugging support

The patch above could be applied now, right?

That's correct. It will be useless though, as DEBUG_LL can only be used on multiarch.

I will wait, especially in the light of the point you raise below.

Quoted 4 lines

Given that the SCIF/SCIFA/SCIFB port operate similarly, I wonder whether it wouldn't make more sense to add a generic DEBUG_SHMOBILE_SCIF implementation instead. We could then have sub-options to select the exact SoC type and port number, and compute the base address from that.

That makes a lot of sense to me.
Perhaps Magnus has an opinion?

Quoted 20 lines
Quoted 7 lines

If so, Magnus, could you review it?

Quoted 2 lines

ARM: shmobile: r8a7790: Add serial ports to the device tree
ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT

I would like to ask you to repost these patches once their pre-requisites have been merged.

Sure, no problem.

Signature · 8 lines
Regards,

Laurent Pinchart

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