devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] Add R8A7794/SILK board eMMC DT support
@ 2016-05-31 22:06 Sergei Shtylyov
  2016-05-31 22:09 ` [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros Sergei Shtylyov
                   ` (11 more replies)
  0 siblings, 12 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:06 UTC (permalink / raw)
  To: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

Hello.

   Here's the set of 13 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160530-v4.7-rc1' tag. We add the device tree support for
the R8A7792-based Blanche board. The R-Car 'clk' driver patch was posted last
week separately...

[01/13] ARM: shmobile: r8a7792: add clock index macros
[02/13] ARM: shmobile: r8a7792: add power domain index macros
[03/13] soc: renesas: rcar-sysc: add R8A7792 support
[04/13] ARM: shmobile: r8a7792: basic SoC support
[05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
[06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support
[07/13] ARM: dts: r8a7792: initial SoC device tree
[08/13] ARM: dts: r8a7792: add SYS-DMAC support
[09/13] ARM: dts: r8a7792: add [H]SCIF support
[10/13] ARM dts: r8a7792: add IRQC support
[11/13] DT: arm: shmobile: document Blanche board
[12/13] ARM: dts: blanche: initial device tree
[13/13] ARM: dts: blanche: add Ethernet support

WBR, Sergei

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

* [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
@ 2016-05-31 22:09 ` Sergei Shtylyov
  2016-06-01  0:52   ` Simon Horman
       [not found]   ` <2280165.siMXMbFrFe-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  2016-05-31 22:11 ` [PATCH 02/13] ARM: shmobile: r8a7792: add power domain " Sergei Shtylyov
                   ` (10 subsequent siblings)
  11 siblings, 2 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:09 UTC (permalink / raw)
  To: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

Add macros usable by the device tree sources to reference the R8A7792
clocks  by index.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 include/dt-bindings/clock/r8a7792-clock.h |  104 ++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)

Index: renesas/include/dt-bindings/clock/r8a7792-clock.h
===================================================================
--- /dev/null
+++ renesas/include/dt-bindings/clock/r8a7792-clock.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2016 Cogent Embedded, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_R8A7792_H__
+#define __DT_BINDINGS_CLOCK_R8A7792_H__
+
+/* CPG */
+#define R8A7792_CLK_MAIN		0
+#define R8A7792_CLK_PLL0		1
+#define R8A7792_CLK_PLL1		2
+#define R8A7792_CLK_PLL3		3
+#define R8A7792_CLK_LB			4
+#define R8A7792_CLK_QSPI		5
+#define R8A7792_CLK_SDH			6
+#define R8A7792_CLK_SD0			7
+#define R8A7792_CLK_SD1			8
+#define R8A7792_CLK_Z			9
+
+/* MSTP0 */
+#define R8A7792_CLK_MSIOF0		0
+
+/* MSTP1 */
+#define R8A7792_CLK_TMU1		11
+#define R8A7792_CLK_TMU3		21
+#define R8A7792_CLK_TMU2		22
+#define R8A7792_CLK_CMT0		24
+#define R8A7792_CLK_TMU0		25
+#define R8A7792_CLK_VSP1DU1		27
+#define R8A7792_CLK_VSP1DU0		28
+#define R8A7792_CLK_VSP1_SY		31
+
+/* MSTP2 */
+#define R8A7792_CLK_MSIOF1		8
+#define R8A7792_CLK_SYS_DMAC0		18
+#define R8A7792_CLK_SYS_DMAC1		19
+
+/* MSTP3 */
+#define R8A7792_CLK_TPU0		4
+#define R8A7792_CLK_SDHI0		14
+#define R8A7792_CLK_CMT1		29
+
+/* MSTP4 */
+#define R8A7792_CLK_IRQC		7
+
+/* MSTP5 */
+#define R8A7792_CLK_AUDIO_DMAC0		2
+#define R8A7792_CLK_THERMAL		22
+#define R8A7792_CLK_PWM			23
+
+/* MSTP7 */
+#define R8A7792_CLK_HSCIF1		16
+#define R8A7792_CLK_HSCIF0		17
+#define R8A7792_CLK_SCIF3		18
+#define R8A7792_CLK_SCIF2		19
+#define R8A7792_CLK_SCIF1		20
+#define R8A7792_CLK_SCIF0		21
+#define R8A7792_CLK_DU1			23
+#define R8A7792_CLK_DU0			24
+
+/* MSTP8 */
+#define R8A7792_CLK_VIN5		4
+#define R8A7792_CLK_VIN4		5
+#define R8A7792_CLK_VIN3		8
+#define R8A7792_CLK_VIN2		9
+#define R8A7792_CLK_VIN1		10
+#define R8A7792_CLK_VIN0		11
+#define R8A7792_CLK_ETHERAVB		12
+
+/* MSTP9 */
+#define R8A7792_CLK_GPIO7		4
+#define R8A7792_CLK_GPIO6		5
+#define R8A7792_CLK_GPIO5		7
+#define R8A7792_CLK_GPIO4		8
+#define R8A7792_CLK_GPIO3		9
+#define R8A7792_CLK_GPIO2		10
+#define R8A7792_CLK_GPIO1		11
+#define R8A7792_CLK_GPIO0		12
+#define R8A7792_CLK_GPIO11		13
+#define R8A7792_CLK_GPIO10		14
+#define R8A7792_CLK_CAN1		15
+#define R8A7792_CLK_CAN0		16
+#define R8A7792_CLK_QSPI_MOD		17
+#define R8A7792_CLK_GPIO9		19
+#define R8A7792_CLK_GPIO8		21
+#define R8A7792_CLK_I2C5		25
+#define R8A7792_CLK_IICDVFS		26
+#define R8A7792_CLK_I2C4		27
+#define R8A7792_CLK_I2C3		28
+#define R8A7792_CLK_I2C2		29
+#define R8A7792_CLK_I2C1		30
+#define R8A7792_CLK_I2C0		31
+
+/* MSTP10 */
+#define R8A7792_CLK_SSI_ALL		5
+#define R8A7792_CLK_SSI4		11
+#define R8A7792_CLK_SSI3		12
+
+#endif /* __DT_BINDINGS_CLOCK_R8A7792_H__ */

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

* [PATCH 02/13] ARM: shmobile: r8a7792: add power domain index macros
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
  2016-05-31 22:09 ` [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros Sergei Shtylyov
@ 2016-05-31 22:11 ` Sergei Shtylyov
  2016-06-01  7:32   ` Geert Uytterhoeven
  2016-05-31 22:20 ` [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support Sergei Shtylyov
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:11 UTC (permalink / raw)
  To: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

Add macros usable by the device tree sources to reference R8A7792 SYSC power
domains by index.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 include/dt-bindings/power/r8a7792-sysc.h |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

Index: renesas/include/dt-bindings/power/r8a7792-sysc.h
===================================================================
--- /dev/null
+++ renesas/include/dt-bindings/power/r8a7792-sysc.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2016 Cogent Embedded Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ */
+#ifndef __DT_BINDINGS_POWER_R8A7792_SYSC_H__
+#define __DT_BINDINGS_POWER_R8A7792_SYSC_H__
+
+/*
+ * These power domain indices match the numbers of the interrupt bits
+ * representing the power areas in the various Interrupt Registers
+ * (e.g. SYSCISR, Interrupt Status Register)
+ */
+
+#define R8A7792_PD_CA15_CPU0		0
+#define R8A7792_PD_CA15_CPU1		1
+#define R8A7792_PD_CA15_SCU		12
+#define R8A7792_PD_SGX			20
+#define R8A7792_PD_IMP			24
+
+/* Always-on power area */
+#define R8A7792_PD_ALWAYS_ON		32
+
+#endif /* __DT_BINDINGS_POWER_R8A7792_SYSC_H__ */

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

* [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
  2016-05-31 22:09 ` [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros Sergei Shtylyov
  2016-05-31 22:11 ` [PATCH 02/13] ARM: shmobile: r8a7792: add power domain " Sergei Shtylyov
@ 2016-05-31 22:20 ` Sergei Shtylyov
  2016-06-01  0:25   ` Simon Horman
                     ` (2 more replies)
  2016-05-31 22:21 ` [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support Sergei Shtylyov
                   ` (8 subsequent siblings)
  11 siblings, 3 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:20 UTC (permalink / raw)
  To: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

Renesas R8A7792 SoC is a member of the R-Car gen2 family and so has CPG...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt |    1 +
 1 file changed, 1 insertion(+)

Index: renesas/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
===================================================================
--- renesas.orig/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
+++ renesas/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
@@ -10,6 +10,7 @@ Required Properties:
   - compatible: Must be one of
     - "renesas,r8a7790-cpg-clocks" for the r8a7790 CPG
     - "renesas,r8a7791-cpg-clocks" for the r8a7791 CPG
+    - "renesas,r8a7792-cpg-clocks" for the r8a7792 CPG
     - "renesas,r8a7793-cpg-clocks" for the r8a7793 CPG
     - "renesas,r8a7794-cpg-clocks" for the r8a7794 CPG
     and "renesas,rcar-gen2-cpg-clocks" as a fallback.

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

* [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
                   ` (2 preceding siblings ...)
  2016-05-31 22:20 ` [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support Sergei Shtylyov
@ 2016-05-31 22:21 ` Sergei Shtylyov
  2016-06-01  0:28   ` Simon Horman
                     ` (2 more replies)
  2016-05-31 22:24 ` [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree Sergei Shtylyov
                   ` (7 subsequent siblings)
  11 siblings, 3 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:21 UTC (permalink / raw)
  To: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

Renesas R8A7792 SoC also has the CPG MSTP clocks...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt |    1 +
 1 file changed, 1 insertion(+)

Index: renesas/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
===================================================================
--- renesas.orig/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
+++ renesas/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
@@ -17,6 +17,7 @@ Required Properties:
     - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks
     - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks
     - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2-W) MSTP gate clocks
+    - "renesas,r8a7792-mstp-clocks" for R8A7792 (R-Car V2H) MSTP gate clocks
     - "renesas,r8a7793-mstp-clocks" for R8A7793 (R-Car M2-N) MSTP gate clocks
     - "renesas,r8a7794-mstp-clocks" for R8A7794 (R-Car E2) MSTP gate clocks
     - "renesas,sh73a0-mstp-clocks" for SH73A0 (SH-MobileAG5) MSTP gate clocks

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

* [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
                   ` (3 preceding siblings ...)
  2016-05-31 22:21 ` [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support Sergei Shtylyov
@ 2016-05-31 22:24 ` Sergei Shtylyov
  2016-06-01  0:57   ` Simon Horman
  2016-06-01  9:23   ` Geert Uytterhoeven
  2016-05-31 22:25 ` [PATCH 08/13] ARM: dts: r8a7792: add SYS-DMAC support Sergei Shtylyov
                   ` (6 subsequent siblings)
  11 siblings, 2 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:24 UTC (permalink / raw)
  To: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

The initial R8A7792 SoC device tree including 2 CPU cores, GIC, timer, SYSC,
and the required  clock descriptions.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/arm/boot/dts/r8a7792.dtsi |  423 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 423 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
--- /dev/null
+++ renesas/arch/arm/boot/dts/r8a7792.dtsi
@@ -0,0 +1,423 @@
+/*
+ * Device Tree Source for the r8a7792 SoC
+ *
+ * Copyright (C) 2016 Cogent Embedded Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <dt-bindings/clock/r8a7792-clock.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/r8a7792-sysc.h>
+
+/ {
+	compatible = "renesas,r8a7792";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a15";
+			reg = <0>;
+			clock-frequency = <1000000000>;
+			clocks = <&cpg_clocks R8A7792_CLK_Z>;
+			power-domains = <&sysc R8A7792_PD_CA15_CPU0>;
+			next-level-cache = <&L2_CA15>;
+		};
+
+		cpu1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a15";
+			reg = <1>;
+			clock-frequency = <1000000000>;
+			power-domains = <&sysc R8A7792_PD_CA15_CPU1>;
+			next-level-cache = <&L2_CA15>;
+		};
+
+		L2_CA15: cache-controller@0 {
+			compatible = "cache";
+			reg = <0>;
+			cache-unified;
+			cache-level = <2>;
+			power-domains = <&sysc R8A7792_PD_CA15_SCU>;
+		};
+	};
+
+	gic: interrupt-controller@f1001000 {
+		compatible = "arm,gic-400";
+		#interrupt-cells = <3>;
+		interrupt-controller;
+		reg = <0 0xf1001000 0 0x1000>,
+		      <0 0xf1002000 0 0x1000>,
+		      <0 0xf1004000 0 0x2000>,
+		      <0 0xf1006000 0 0x2000>;
+		interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) |
+			      IRQ_TYPE_LEVEL_HIGH)>;
+	};
+
+	timer {
+		compatible = "arm,armv7-timer";
+		interrupts = <GIC_PPI 13
+			      (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 14
+			      (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 11
+			      (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 10
+			      (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
+	};
+
+	sysc: system-controller@e6180000 {
+		compatible = "renesas,r8a7792-sysc";
+		reg = <0 0xe6180000 0 0x0200>;
+		#power-domain-cells = <1>;
+	};
+
+	clocks {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		/* External root clock */
+		extal_clk: extal {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			/* This value must be overridden by the board. */
+			clock-frequency = <0>;
+		};
+
+		/* External PCIe clock - can be overridden by the board */
+		pcie_bus_clk: pcie_bus {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+		};
+
+		/* External SCIF clock */
+		scif_clk: scif {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			/* This value must be overridden by the board. */
+			clock-frequency = <0>;
+		};
+
+		/*
+		 * The external audio clocks are configured as 0 Hz fixed
+		 * frequency clocks by default.  Boards that provide audio
+		 * clocks should override them.
+		 */
+		audio_clka: audio_clka {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+		};
+		audio_clkb: audio_clkb {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+		};
+		audio_clkc: audio_clkc {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+		};
+
+		/* Special CPG clocks */
+		cpg_clocks: cpg_clocks@e6150000 {
+			compatible = "renesas,r8a7792-cpg-clocks",
+				     "renesas,rcar-gen2-cpg-clocks";
+			reg = <0 0xe6150000 0 0x1000>;
+			clocks = <&extal_clk>;
+			#clock-cells = <1>;
+			clock-output-names = "main", "pll0", "pll1", "pll3",
+					     "lb", "qspi", "sdh", "sd0", "sd1",
+					     "z";
+			#power-domain-cells = <0>;
+		};
+
+		/* Fixed factor clocks */
+		pll1_div2_clk: pll1_div2 {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+		};
+		z2_clk: z2 {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+		};
+		zg_clk: zg {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <3>;
+			clock-mult = <1>;
+		};
+		zx_clk: zx {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <3>;
+			clock-mult = <1>;
+		};
+		zs_clk: zs {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <6>;
+			clock-mult = <1>;
+		};
+		hp_clk: hp {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <12>;
+			clock-mult = <1>;
+		};
+		i_clk: i {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+		};
+		b_clk: b {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <12>;
+			clock-mult = <1>;
+		};
+		p_clk: p {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <24>;
+			clock-mult = <1>;
+		};
+		cl_clk: cl {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <48>;
+			clock-mult = <1>;
+		};
+		m2_clk: m2 {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+		};
+		rclk_clk: rclk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <(48 * 1024)>;
+			clock-mult = <1>;
+		};
+		oscclk_clk: oscclk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <(12 * 1024)>;
+			clock-mult = <1>;
+		};
+		zb3_clk: zb3 {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL3>;
+			#clock-cells = <0>;
+			clock-div = <4>;
+			clock-mult = <1>;
+		};
+		zb3d2_clk: zb3d2 {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL3>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+		};
+		ddr_clk: ddr {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7792_CLK_PLL3>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+		};
+		mp_clk: mp {
+			compatible = "fixed-factor-clock";
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-div = <15>;
+			clock-mult = <1>;
+		};
+		cp_clk: cp {
+			compatible = "fixed-factor-clock";
+			clocks = <&extal_clk>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+		};
+
+		/* Gate clocks */
+		mstp0_clks: mstp0_clks@e6150130 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150130 0 4>, <0 0xe6150030 0 4>;
+			clocks = <&mp_clk>;
+			#clock-cells = <1>;
+			clock-indices = <R8A7792_CLK_MSIOF0>;
+			clock-output-names = "msiof0";
+		};
+		mstp1_clks: mstp1_clks@e6150134 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>;
+			clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>,
+				 <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_TMU1 R8A7792_CLK_TMU3
+				R8A7792_CLK_TMU2 R8A7792_CLK_CMT0
+				R8A7792_CLK_TMU0 R8A7792_CLK_VSP1DU1
+				R8A7792_CLK_VSP1DU0 R8A7792_CLK_VSP1_SY
+			>;
+			clock-output-names = "tmu1", "tmu3", "tmu2", "cmt0",
+					     "tmu0", "vsp1du1", "vsp1du0",
+					     "vsp1-sy";
+		};
+		mstp2_clks: mstp2_clks@e6150138 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
+			clocks = <&mp_clk>, <&zs_clk>, <&zs_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_MSIOF1
+				R8A7792_CLK_SYS_DMAC0 R8A7792_CLK_SYS_DMAC1
+			>;
+			clock-output-names = "msiof1", "sys-dmac0", "sys-dmac1";
+		};
+		mstp3_clks: mstp3_clks@e615013c {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
+			clocks = <&cp_clk>, <&cpg_clocks R8A7792_CLK_SD0>,
+				 <&rclk_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_TPU0 R8A7792_CLK_SDHI0
+				R8A7792_CLK_CMT1
+			>;
+			clock-output-names = "tpu0", "sdhi0", "cmt1";
+		};
+		mstp4_clks: mstp4_clks@e6150140 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150140 0 4>, <0 0xe615004c 0 4>;
+			clocks = <&cp_clk>;
+			#clock-cells = <1>;
+			clock-indices = <R8A7792_CLK_IRQC>;
+			clock-output-names = "irqc";
+		};
+		mstp5_clks: mstp5_clks@e6150144 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
+			clocks = <&hp_clk>, <&extal_clk>, <&p_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_AUDIO_DMAC0
+				R8A7792_CLK_THERMAL R8A7792_CLK_PWM
+			>;
+			clock-output-names = "thermal", "pwm", "audmac0";
+		};
+		mstp7_clks: mstp7_clks@e615014c {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
+			clocks = <&zs_clk>, <&zs_clk>, <&p_clk>, <&p_clk>,
+				 <&p_clk>, <&p_clk>, <&zx_clk>, <&zx_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_HSCIF1 R8A7792_CLK_HSCIF0
+				R8A7792_CLK_SCIF3 R8A7792_CLK_SCIF2
+				R8A7792_CLK_SCIF1 R8A7792_CLK_SCIF0
+				R8A7792_CLK_DU1 R8A7792_CLK_DU0
+			>;
+			clock-output-names = "hscif1", "hscif0", "scif3",
+					     "scif2", "scif1", "scif0",
+					     "du1", "du0";
+		};
+		mstp8_clks: mstp8_clks@e6150990 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
+			clocks = <&zg_clk>, <&zg_clk>, <&zg_clk>, <&zg_clk>,
+				 <&zg_clk>, <&zg_clk>, <&hp_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_VIN5 R8A7792_CLK_VIN4
+				R8A7792_CLK_VIN3 R8A7792_CLK_VIN2
+				R8A7792_CLK_VIN1 R8A7792_CLK_VIN0
+				R8A7792_CLK_ETHERAVB
+			>;
+			clock-output-names = "vin5", "vin4", "vin3", "vin2",
+					     "vin1", "vin0", "etheravb";
+		};
+		mstp9_clks: mstp9_clks@e6150994 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
+			clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
+				 <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
+				 <&cp_clk>, <&cp_clk>, <&p_clk>, <&p_clk>,
+				 <&cpg_clocks R8A7792_CLK_QSPI>, <&cp_clk>,
+				 <&cp_clk>, <&hp_clk>, <&cp_clk>, <&hp_clk>,
+				 <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_GPIO7 R8A7792_CLK_GPIO6
+				R8A7792_CLK_GPIO5 R8A7792_CLK_GPIO4
+				R8A7792_CLK_GPIO3 R8A7792_CLK_GPIO2
+				R8A7792_CLK_GPIO1 R8A7792_CLK_GPIO0
+				R8A7792_CLK_GPIO11 R8A7792_CLK_GPIO10
+				R8A7792_CLK_CAN1 R8A7792_CLK_CAN0
+				R8A7792_CLK_QSPI_MOD R8A7792_CLK_GPIO9
+				R8A7792_CLK_GPIO8 R8A7792_CLK_I2C5
+				R8A7792_CLK_IICDVFS R8A7792_CLK_I2C4
+				R8A7792_CLK_I2C3 R8A7792_CLK_I2C2
+				R8A7792_CLK_I2C1 R8A7792_CLK_I2C0
+			>;
+			clock-output-names = "gpio7", "gpio6", "gpio5", "gpio4",
+					     "gpio3", "gpio2", "gpio1", "gpio0",
+					     "gpio11", "gpio10", "can1", "can0",
+					     "qspi_mod", "gpio9", "gpio8",
+					     "i2c5", "iic3", "i2c4", "i2c3",
+					     "i2c2", "i2c1", "i2c0";
+		};
+		mstp10_clks: mstp10_clks@e6150998 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+			clocks = <&p_clk>, <&p_clk>, <&p_clk>;
+			#clock-cells = <1>;
+			clock-indices = <
+				R8A7792_CLK_SSI_ALL
+				R8A7792_CLK_SSI4 R8A7792_CLK_SSI3
+			>;
+			clock-output-names = "ssi", "ssi4", "ssi3";
+		};
+	};
+};

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

* [PATCH 08/13] ARM: dts: r8a7792: add SYS-DMAC support
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
                   ` (4 preceding siblings ...)
  2016-05-31 22:24 ` [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree Sergei Shtylyov
@ 2016-05-31 22:25 ` Sergei Shtylyov
  2016-06-01  1:03   ` Simon Horman
       [not found]   ` <5621267.GpvUaW18zI-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  2016-05-31 22:26 ` [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support Sergei Shtylyov
                   ` (5 subsequent siblings)
  11 siblings, 2 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:25 UTC (permalink / raw)
  To: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

Describe SYS-DMAC0/1 in the R8A7792 device tree.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/arm/boot/dts/r8a7792.dtsi |   60 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7792.dtsi
+++ renesas/arch/arm/boot/dts/r8a7792.dtsi
@@ -80,6 +80,66 @@
 		#power-domain-cells = <1>;
 	};
 
+	dmac0: dma-controller@e6700000 {
+		compatible = "renesas,dmac-r8a7792", "renesas,rcar-dmac";
+		reg = <0 0xe6700000 0 0x20000>;
+		interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "error",
+				  "ch0", "ch1", "ch2", "ch3", "ch4", "ch5",
+				  "ch6", "ch7", "ch8", "ch9", "ch10", "ch11",
+				  "ch12", "ch13", "ch14";
+		clocks = <&mstp2_clks R8A7792_CLK_SYS_DMAC0>;
+		clock-names = "fck";
+		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+		#dma-cells = <1>;
+		dma-channels = <15>;
+	};
+
+	dmac1: dma-controller@e6720000 {
+		compatible = "renesas,dmac-r8a7792", "renesas,rcar-dmac";
+		reg = <0 0xe6720000 0 0x20000>;
+		interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
+			      GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "error",
+				  "ch0", "ch1", "ch2", "ch3", "ch4", "ch5",
+				  "ch6", "ch7",	"ch8", "ch9", "ch10", "ch11",
+				  "ch12", "ch13", "ch14";
+		clocks = <&mstp2_clks R8A7792_CLK_SYS_DMAC1>;
+		clock-names = "fck";
+		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+		#dma-cells = <1>;
+		dma-channels = <15>;
+	};
+
 	clocks {
 		#address-cells = <2>;
 		#size-cells = <2>;

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

* [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
                   ` (5 preceding siblings ...)
  2016-05-31 22:25 ` [PATCH 08/13] ARM: dts: r8a7792: add SYS-DMAC support Sergei Shtylyov
@ 2016-05-31 22:26 ` Sergei Shtylyov
  2016-06-01  1:13   ` Simon Horman
  2016-06-01  8:17   ` Geert Uytterhoeven
  2016-05-31 22:29 ` [PATCH 10/13] ARM: dts: r8a7792: add IRQC support Sergei Shtylyov
                   ` (4 subsequent siblings)
  11 siblings, 2 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:26 UTC (permalink / raw)
  To: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

Describe [H]SCIFs in the R8A7792 device tree.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/arm/boot/dts/r8a7792.dtsi |   90 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7792.dtsi
+++ renesas/arch/arm/boot/dts/r8a7792.dtsi
@@ -140,6 +140,96 @@
 		dma-channels = <15>;
 	};
 
+	scif0: serial@e6e60000 {
+		compatible = "renesas,scif-r8a7792", "renesas,rcar-gen2-scif",
+			     "renesas,scif";
+		reg = <0 0xe6e60000 0 64>;
+		interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R8A7792_CLK_SCIF0>, <&zs_clk>,
+			 <&scif_clk>;
+		clock-names = "fck", "brg_int", "scif_clk";
+		dmas = <&dmac0 0x29>, <&dmac0 0x2a>,
+		       <&dmac1 0x29>, <&dmac1 0x2a>;
+		dma-names = "tx", "rx", "tx", "rx";
+		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+		status = "disabled";
+	};
+
+	scif1: serial@e6e68000 {
+		compatible = "renesas,scif-r8a7792", "renesas,rcar-gen2-scif",
+			     "renesas,scif";
+		reg = <0 0xe6e68000 0 64>;
+		interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R8A7792_CLK_SCIF1>, <&zs_clk>,
+			 <&scif_clk>;
+		clock-names = "fck", "brg_int", "scif_clk";
+		dmas = <&dmac0 0x2d>, <&dmac0 0x2e>,
+		       <&dmac1 0x2d>, <&dmac1 0x2e>;
+		dma-names = "tx", "rx", "tx", "rx";
+		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+		status = "disabled";
+	};
+
+	scif2: serial@e6e58000 {
+		compatible = "renesas,scif-r8a7792", "renesas,rcar-gen2-scif",
+			     "renesas,scif";
+		reg = <0 0xe6e58000 0 64>;
+		interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R8A7792_CLK_SCIF2>, <&zs_clk>,
+			 <&scif_clk>;
+		clock-names = "fck", "brg_int", "scif_clk";
+		dmas = <&dmac0 0x2b>, <&dmac0 0x2c>,
+		       <&dmac1 0x2b>, <&dmac1 0x2c>;
+		dma-names = "tx", "rx", "tx", "rx";
+		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+		status = "disabled";
+	};
+
+	scif3: serial@e6ea8000 {
+		compatible = "renesas,scif-r8a7792", "renesas,rcar-gen2-scif",
+			     "renesas,scif";
+		reg = <0 0xe6ea8000 0 64>;
+		interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R8A7792_CLK_SCIF3>, <&zs_clk>,
+			 <&scif_clk>;
+		clock-names = "fck", "brg_int", "scif_clk";
+		dmas = <&dmac0 0x2f>, <&dmac0 0x30>,
+		       <&dmac1 0x2f>, <&dmac1 0x30>;
+		dma-names = "tx", "rx", "tx", "rx";
+		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+		status = "disabled";
+	};
+
+	hscif0: serial@e62c0000 {
+		compatible = "renesas,hscif-r8a7792", "renesas,rcar-gen2-hscif",
+			     "renesas,hscif";
+		reg = <0 0xe62c0000 0 96>;
+		interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R8A7792_CLK_HSCIF0>, <&zs_clk>,
+			 <&scif_clk>;
+		clock-names = "fck", "brg_int", "scif_clk";
+		dmas = <&dmac0 0x39>, <&dmac0 0x3a>,
+		       <&dmac1 0x39>, <&dmac1 0x3a>;
+		dma-names = "tx", "rx", "tx", "rx";
+		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+		status = "disabled";
+	};
+
+	hscif1: serial@e62c8000 {
+		compatible = "renesas,hscif-r8a7792", "renesas,rcar-gen2-hscif",
+			     "renesas,hscif";
+		reg = <0 0xe62c8000 0 96>;
+		interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp7_clks R8A7792_CLK_HSCIF1>, <&zs_clk>,
+			 <&scif_clk>;
+		clock-names = "fck", "brg_int", "scif_clk";
+		dmas = <&dmac0 0x4d>, <&dmac0 0x4e>,
+		       <&dmac1 0x4d>, <&dmac1 0x4e>;
+		dma-names = "tx", "rx", "tx", "rx";
+		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+		status = "disabled";
+	};
+
 	clocks {
 		#address-cells = <2>;
 		#size-cells = <2>;

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

* [PATCH 10/13] ARM: dts: r8a7792: add IRQC support
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
                   ` (6 preceding siblings ...)
  2016-05-31 22:26 ` [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support Sergei Shtylyov
@ 2016-05-31 22:29 ` Sergei Shtylyov
  2016-06-01  1:18   ` Simon Horman
       [not found]   ` <3573091.BUvyGW3hVt-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  2016-05-31 22:30 ` [PATCH 11/13] DT: arm: shmobile: document Blanche board Sergei Shtylyov
                   ` (3 subsequent siblings)
  11 siblings, 2 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:29 UTC (permalink / raw)
  To: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

Describe the IRQC interrupt controller in the R8A7792 device tree.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/arm/boot/dts/r8a7792.dtsi |   13 +++++++++++++
 1 file changed, 13 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7792.dtsi
+++ renesas/arch/arm/boot/dts/r8a7792.dtsi
@@ -62,6 +62,19 @@
 			      IRQ_TYPE_LEVEL_HIGH)>;
 	};
 
+	irqc: interrupt-controller@e61c0000 {
+		compatible = "renesas,irqc-r8a7792", "renesas,irqc";
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		reg = <0 0xe61c0000 0 0x200>;
+		interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp4_clks R8A7792_CLK_IRQC>;
+		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+	};
+
 	timer {
 		compatible = "arm,armv7-timer";
 		interrupts = <GIC_PPI 13

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

* [PATCH 11/13] DT: arm: shmobile: document Blanche board
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
                   ` (7 preceding siblings ...)
  2016-05-31 22:29 ` [PATCH 10/13] ARM: dts: r8a7792: add IRQC support Sergei Shtylyov
@ 2016-05-31 22:30 ` Sergei Shtylyov
  2016-05-31 23:51   ` Simon Horman
                     ` (2 more replies)
  2016-05-31 22:32 ` [PATCH 12/13] ARM: dts: blanche: initial device tree Sergei Shtylyov
                   ` (2 subsequent siblings)
  11 siblings, 3 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:30 UTC (permalink / raw)
  To: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

Document the Blanche device tree bindings, listing it as a supported board.

This allows to use checkpatch.pl to validate .dts files referring to the
Blanche board.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 Documentation/devicetree/bindings/arm/shmobile.txt |    2 ++
 1 file changed, 2 insertions(+)

Index: renesas/Documentation/devicetree/bindings/arm/shmobile.txt
===================================================================
--- renesas.orig/Documentation/devicetree/bindings/arm/shmobile.txt
+++ renesas/Documentation/devicetree/bindings/arm/shmobile.txt
@@ -39,6 +39,8 @@ Boards:
     compatible = "renesas,ape6evm", "renesas,r8a73a4"
   - Atmark Techno Armadillo-800 EVA
     compatible = "renesas,armadillo800eva"
+  - Blanche (RTP0RC7792SEB00010S)
+    compatible = "renesas,blanche", "renesas,r8a7792"
   - BOCK-W
     compatible = "renesas,bockw", "renesas,r8a7778"
   - Genmai (RTK772100BC00000BR)

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

* [PATCH 12/13] ARM: dts: blanche: initial device tree
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
                   ` (8 preceding siblings ...)
  2016-05-31 22:30 ` [PATCH 11/13] DT: arm: shmobile: document Blanche board Sergei Shtylyov
@ 2016-05-31 22:32 ` Sergei Shtylyov
  2016-06-01  1:21   ` Simon Horman
  2016-06-01  8:36   ` Geert Uytterhoeven
  2016-05-31 22:33 ` [PATCH 13/13] ARM: dts: blanche: add Ethernet support Sergei Shtylyov
       [not found] ` <13205049.n7pM8utpHF-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  11 siblings, 2 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:32 UTC (permalink / raw)
  To: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

Add the initial device  tree for the R8A7792 SoC based Blanche board.
The board has 2 debug serial ports: SCIF0 and SCIF3; include support for
them,  so that  the serial console  can  work.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/arm/boot/dts/Makefile            |    1 
 arch/arm/boot/dts/r8a7792-blanche.dts |   44 ++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)

Index: renesas/arch/arm/boot/dts/Makefile
===================================================================
--- renesas.orig/arch/arm/boot/dts/Makefile
+++ renesas/arch/arm/boot/dts/Makefile
@@ -638,6 +638,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
 	r8a7790-lager.dtb \
 	r8a7791-koelsch.dtb \
 	r8a7791-porter.dtb \
+	r8a7792-blanche.dtb \
 	r8a7793-gose.dtb \
 	r8a7794-alt.dtb \
 	r8a7794-silk.dtb \
Index: renesas/arch/arm/boot/dts/r8a7792-blanche.dts
===================================================================
--- /dev/null
+++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts
@@ -0,0 +1,44 @@
+/*
+ * Device Tree Source for the Blanche board
+ *
+ * Copyright (C) 2016 Cogent Embedded, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/dts-v1/;
+#include "r8a7792.dtsi"
+
+/ {
+	model = "Blanche";
+	compatible = "renesas,blanche", "renesas,r8a7792";
+
+	aliases {
+		serial0 = &scif0;
+		serial1 = &scif3;
+	};
+
+	chosen {
+		bootargs = "ignore_loglevel";
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0 0x40000000 0 0x40000000>;
+	};
+};
+
+&extal_clk {
+	clock-frequency = <20000000>;
+};
+
+&scif0 {
+	status = "okay";
+};
+
+&scif3 {
+	status = "okay";
+};

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

* [PATCH 13/13] ARM: dts: blanche: add Ethernet support
  2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
                   ` (9 preceding siblings ...)
  2016-05-31 22:32 ` [PATCH 12/13] ARM: dts: blanche: initial device tree Sergei Shtylyov
@ 2016-05-31 22:33 ` Sergei Shtylyov
  2016-06-01  1:24   ` Simon Horman
       [not found]   ` <1669958.qjJ7i3NBPv-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
       [not found] ` <13205049.n7pM8utpHF-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  11 siblings, 2 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-05-31 22:33 UTC (permalink / raw)
  To: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree
  Cc: magnus.damm, linux, linux-arm-kernel

R8A7792  SoC  doesn't have the EtherMAC core, so SMSC  LAN89218  Ethernet
chip was used instead on the Blanche board; this chip  is compatible with
SMSC LAN9115  for  which there's a (device tree aware) driver. Describe
the  chip in  the  Blanche device tree;  enable DHCP and NFS root in the
kernel command line for the kernel booting.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/arm/boot/dts/r8a7792-blanche.dts |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

Index: renesas/arch/arm/boot/dts/r8a7792-blanche.dts
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
+++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts
@@ -21,7 +21,7 @@
 	};
 
 	chosen {
-		bootargs = "ignore_loglevel";
+		bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
 		stdout-path = "serial0:115200n8";
 	};
 
@@ -29,6 +29,27 @@
 		device_type = "memory";
 		reg = <0 0x40000000 0 0x40000000>;
 	};
+
+	d3_3v: regulator-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "D3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	ethernet@18000000 {
+		compatible = "smsc,lan89218", "smsc,lan9115";
+		reg = <0 0x18000000 0 0x100>;
+		phy-mode = "mii";
+		interrupt-parent = <&irqc>;
+		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+		smsc,irq-push-pull;
+		reg-io-width = <4>;
+		vddvario-supply = <&d3_3v>;
+		vdd33a-supply = <&d3_3v>;
+	};
 };
 
 &extal_clk {

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

* Re: [PATCH 11/13] DT: arm: shmobile: document Blanche board
  2016-05-31 22:30 ` [PATCH 11/13] DT: arm: shmobile: document Blanche board Sergei Shtylyov
@ 2016-05-31 23:51   ` Simon Horman
       [not found]     ` <20160531235119.GA20527-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
  2016-06-01  8:19   ` Geert Uytterhoeven
  2016-06-03  1:50   ` Rob Herring
  2 siblings, 1 reply; 70+ messages in thread
From: Simon Horman @ 2016-05-31 23:51 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

On Wed, Jun 01, 2016 at 01:30:39AM +0300, Sergei Shtylyov wrote:
> Document the Blanche device tree bindings, listing it as a supported board.
> 
> This allows to use checkpatch.pl to validate .dts files referring to the
> Blanche board.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

I think the prefix for patch 11 should be: "ARM: dts: blanche: "
It also looks like it could be squashed into patch 12 but I don't
feel strongly about that.

> ---
>  Documentation/devicetree/bindings/arm/shmobile.txt |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: renesas/Documentation/devicetree/bindings/arm/shmobile.txt
> ===================================================================
> --- renesas.orig/Documentation/devicetree/bindings/arm/shmobile.txt
> +++ renesas/Documentation/devicetree/bindings/arm/shmobile.txt
> @@ -39,6 +39,8 @@ Boards:
>      compatible = "renesas,ape6evm", "renesas,r8a73a4"
>    - Atmark Techno Armadillo-800 EVA
>      compatible = "renesas,armadillo800eva"
> +  - Blanche (RTP0RC7792SEB00010S)
> +    compatible = "renesas,blanche", "renesas,r8a7792"
>    - BOCK-W
>      compatible = "renesas,bockw", "renesas,r8a7778"
>    - Genmai (RTK772100BC00000BR)
> 

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

* Re: [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
  2016-05-31 22:20 ` [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support Sergei Shtylyov
@ 2016-06-01  0:25   ` Simon Horman
  2016-06-01  0:30     ` Simon Horman
  2016-06-01  7:50     ` Geert Uytterhoeven
  2016-06-01  7:48   ` Geert Uytterhoeven
  2016-06-03  1:49   ` Rob Herring
  2 siblings, 2 replies; 70+ messages in thread
From: Simon Horman @ 2016-06-01  0:25 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, Geert Uytterhoeven

[Cc: Geert]

On Wed, Jun 01, 2016 at 01:20:11AM +0300, Sergei Shtylyov wrote:
> Renesas R8A7792 SoC is a member of the R-Car gen2 family and so has CPG...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Hi Sergei,

I think the prefix of this patch should be "clk: shmobile: rcar-gen2: "

Hi Geert,

I apologise if I have missed a discussion of this topic or if my analysis
is wrong for some reason but I am curious to know what the intended way
is for the rcar-gen2 CPG driver to handle differences in the availability
of clocks across different SoCs.

My possibly naïve expectation is that the implementation would use compat
strings. But as it stands it appears that all clocks supported by the
driver are available for all SoCs. This does not seem to reflect the
documentation (v2.00).

FWIW my quick analysis of clocks supported by the driver present in
renesas-drivers-2016-05-31-v4.7-rc1 but not present on one or more SoCs
is as follows:

Not present on V2H: sdh, sd0
Not present on V2H or E2: sd1
Not present on H2, M2-W, M2-N, E2: rcan

> 
> ---
>  Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: renesas/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
> ===================================================================
> --- renesas.orig/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
> +++ renesas/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
> @@ -10,6 +10,7 @@ Required Properties:
>    - compatible: Must be one of
>      - "renesas,r8a7790-cpg-clocks" for the r8a7790 CPG
>      - "renesas,r8a7791-cpg-clocks" for the r8a7791 CPG
> +    - "renesas,r8a7792-cpg-clocks" for the r8a7792 CPG
>      - "renesas,r8a7793-cpg-clocks" for the r8a7793 CPG
>      - "renesas,r8a7794-cpg-clocks" for the r8a7794 CPG
>      and "renesas,rcar-gen2-cpg-clocks" as a fallback.
> 

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

* Re: [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support
  2016-05-31 22:21 ` [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support Sergei Shtylyov
@ 2016-06-01  0:28   ` Simon Horman
  2016-06-01  7:51   ` Geert Uytterhoeven
  2016-06-03  1:50   ` Rob Herring
  2 siblings, 0 replies; 70+ messages in thread
From: Simon Horman @ 2016-06-01  0:28 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

On Wed, Jun 01, 2016 at 01:21:26AM +0300, Sergei Shtylyov wrote:
> Renesas R8A7792 SoC also has the CPG MSTP clocks...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

I think the prefix of this patch should be "clk: shmobile: mstp: "

With that change feel free to add:

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

> ---
>  Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: renesas/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> ===================================================================
> --- renesas.orig/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> +++ renesas/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> @@ -17,6 +17,7 @@ Required Properties:
>      - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks
>      - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks
>      - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2-W) MSTP gate clocks
> +    - "renesas,r8a7792-mstp-clocks" for R8A7792 (R-Car V2H) MSTP gate clocks
>      - "renesas,r8a7793-mstp-clocks" for R8A7793 (R-Car M2-N) MSTP gate clocks
>      - "renesas,r8a7794-mstp-clocks" for R8A7794 (R-Car E2) MSTP gate clocks
>      - "renesas,sh73a0-mstp-clocks" for SH73A0 (SH-MobileAG5) MSTP gate clocks
> 

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

* Re: [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
  2016-06-01  0:25   ` Simon Horman
@ 2016-06-01  0:30     ` Simon Horman
  2016-06-01  7:50     ` Geert Uytterhoeven
  1 sibling, 0 replies; 70+ messages in thread
From: Simon Horman @ 2016-06-01  0:30 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, Geert Uytterhoeven

On Wed, Jun 01, 2016 at 09:25:35AM +0900, Simon Horman wrote:
> [Cc: Geert]
> 
> On Wed, Jun 01, 2016 at 01:20:11AM +0300, Sergei Shtylyov wrote:
> > Renesas R8A7792 SoC is a member of the R-Car gen2 family and so has CPG...
> > 
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> Hi Sergei,
> 
> I think the prefix of this patch should be "clk: shmobile: rcar-gen2: "
> 
> Hi Geert,
> 
> I apologise if I have missed a discussion of this topic or if my analysis
> is wrong for some reason but I am curious to know what the intended way
> is for the rcar-gen2 CPG driver to handle differences in the availability
> of clocks across different SoCs.
> 
> My possibly naïve expectation is that the implementation would use compat
> strings. But as it stands it appears that all clocks supported by the
> driver are available for all SoCs. This does not seem to reflect the
> documentation (v2.00).
> 
> FWIW my quick analysis of clocks supported by the driver present in
> renesas-drivers-2016-05-31-v4.7-rc1 but not present on one or more SoCs
> is as follows:
> 
> Not present on V2H: sdh, sd0
> Not present on V2H or E2: sd1
> Not present on H2, M2-W, M2-N, E2: rcan

Thinking about a little more, which I obviously should have done
before hitting send:

There does not seem to be any conflict in the implementation of individual
clocks between SoCs at least so far as clocks supported by the driver goes.
Its just that some of them aren't present on all SoCs. But in that case
they shouldn't be used in DT: the DT describes the HW. So I think I'm ok
with this patch. Sorry for the noise!

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

> > ---
> >  Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > Index: renesas/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
> > ===================================================================
> > --- renesas.orig/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
> > +++ renesas/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
> > @@ -10,6 +10,7 @@ Required Properties:
> >    - compatible: Must be one of
> >      - "renesas,r8a7790-cpg-clocks" for the r8a7790 CPG
> >      - "renesas,r8a7791-cpg-clocks" for the r8a7791 CPG
> > +    - "renesas,r8a7792-cpg-clocks" for the r8a7792 CPG
> >      - "renesas,r8a7793-cpg-clocks" for the r8a7793 CPG
> >      - "renesas,r8a7794-cpg-clocks" for the r8a7794 CPG
> >      and "renesas,rcar-gen2-cpg-clocks" as a fallback.
> > 
> 

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

* Re: [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros
  2016-05-31 22:09 ` [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros Sergei Shtylyov
@ 2016-06-01  0:52   ` Simon Horman
  2016-06-01 13:57     ` Sergei Shtylyov
  2016-06-22 19:52     ` Sergei Shtylyov
       [not found]   ` <2280165.siMXMbFrFe-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  1 sibling, 2 replies; 70+ messages in thread
From: Simon Horman @ 2016-06-01  0:52 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

On Wed, Jun 01, 2016 at 01:09:58AM +0300, Sergei Shtylyov wrote:
> Add macros usable by the device tree sources to reference the R8A7792
> clocks  by index.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
>  include/dt-bindings/clock/r8a7792-clock.h |  104 ++++++++++++++++++++++++++++++
>  1 file changed, 104 insertions(+)
> 
> Index: renesas/include/dt-bindings/clock/r8a7792-clock.h
> ===================================================================
> --- /dev/null
> +++ renesas/include/dt-bindings/clock/r8a7792-clock.h
> @@ -0,0 +1,104 @@
> +/*
> + * Copyright (C) 2016 Cogent Embedded, Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#ifndef __DT_BINDINGS_CLOCK_R8A7792_H__
> +#define __DT_BINDINGS_CLOCK_R8A7792_H__
> +
> +/* CPG */
> +#define R8A7792_CLK_MAIN		0
> +#define R8A7792_CLK_PLL0		1
> +#define R8A7792_CLK_PLL1		2
> +#define R8A7792_CLK_PLL3		3
> +#define R8A7792_CLK_LB			4
> +#define R8A7792_CLK_QSPI		5
> +#define R8A7792_CLK_SDH			6
> +#define R8A7792_CLK_SD0			7
> +#define R8A7792_CLK_SD1			8
> +#define R8A7792_CLK_Z			9

According to my copy of the documentation (v2.00) SDH, SD0 and SD1 do
not seem to be provided by the r8a7792 CPG.

It does, however, provide RCAN and ADSP which are supported by the CPG
driver. You may wish to add them now for completeness though from my point
of view they could also be added later when they are used.


I reviewed the values below. They appear to be complete and correct.

> +/* MSTP0 */
> +#define R8A7792_CLK_MSIOF0		0
> +
> +/* MSTP1 */
> +#define R8A7792_CLK_TMU1		11
> +#define R8A7792_CLK_TMU3		21
> +#define R8A7792_CLK_TMU2		22
> +#define R8A7792_CLK_CMT0		24
> +#define R8A7792_CLK_TMU0		25
> +#define R8A7792_CLK_VSP1DU1		27
> +#define R8A7792_CLK_VSP1DU0		28
> +#define R8A7792_CLK_VSP1_SY		31
> +/* MSTP2 */
> +#define R8A7792_CLK_MSIOF1		8
> +#define R8A7792_CLK_SYS_DMAC0		18
> +#define R8A7792_CLK_SYS_DMAC1		19

> +/* MSTP3 */
> +#define R8A7792_CLK_TPU0		4
> +#define R8A7792_CLK_SDHI0		14
> +#define R8A7792_CLK_CMT1		29
> +
> +/* MSTP4 */
> +#define R8A7792_CLK_IRQC		7
> +
> +/* MSTP5 */
> +#define R8A7792_CLK_AUDIO_DMAC0		2
> +#define R8A7792_CLK_THERMAL		22
> +#define R8A7792_CLK_PWM			23
> +
> +/* MSTP7 */
> +#define R8A7792_CLK_HSCIF1		16
> +#define R8A7792_CLK_HSCIF0		17
> +#define R8A7792_CLK_SCIF3		18
> +#define R8A7792_CLK_SCIF2		19
> +#define R8A7792_CLK_SCIF1		20
> +#define R8A7792_CLK_SCIF0		21
> +#define R8A7792_CLK_DU1			23
> +#define R8A7792_CLK_DU0			24
> +
> +/* MSTP8 */
> +#define R8A7792_CLK_VIN5		4
> +#define R8A7792_CLK_VIN4		5
> +#define R8A7792_CLK_VIN3		8
> +#define R8A7792_CLK_VIN2		9
> +#define R8A7792_CLK_VIN1		10
> +#define R8A7792_CLK_VIN0		11
> +#define R8A7792_CLK_ETHERAVB		12
> +
> +/* MSTP9 */
> +#define R8A7792_CLK_GPIO7		4
> +#define R8A7792_CLK_GPIO6		5
> +#define R8A7792_CLK_GPIO5		7
> +#define R8A7792_CLK_GPIO4		8
> +#define R8A7792_CLK_GPIO3		9
> +#define R8A7792_CLK_GPIO2		10
> +#define R8A7792_CLK_GPIO1		11
> +#define R8A7792_CLK_GPIO0		12
> +#define R8A7792_CLK_GPIO11		13
> +#define R8A7792_CLK_GPIO10		14
> +#define R8A7792_CLK_CAN1		15
> +#define R8A7792_CLK_CAN0		16
> +#define R8A7792_CLK_QSPI_MOD		17
> +#define R8A7792_CLK_GPIO9		19
> +#define R8A7792_CLK_GPIO8		21
> +#define R8A7792_CLK_I2C5		25
> +#define R8A7792_CLK_IICDVFS		26
> +#define R8A7792_CLK_I2C4		27
> +#define R8A7792_CLK_I2C3		28
> +#define R8A7792_CLK_I2C2		29
> +#define R8A7792_CLK_I2C1		30
> +#define R8A7792_CLK_I2C0		31
> +
> +/* MSTP10 */
> +#define R8A7792_CLK_SSI_ALL		5
> +#define R8A7792_CLK_SSI4		11
> +#define R8A7792_CLK_SSI3		12
> +
> +#endif /* __DT_BINDINGS_CLOCK_R8A7792_H__ */
> 

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-05-31 22:24 ` [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree Sergei Shtylyov
@ 2016-06-01  0:57   ` Simon Horman
  2016-06-01 14:00     ` Sergei Shtylyov
  2016-06-06 22:26     ` Sergei Shtylyov
  2016-06-01  9:23   ` Geert Uytterhoeven
  1 sibling, 2 replies; 70+ messages in thread
From: Simon Horman @ 2016-06-01  0:57 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On Wed, Jun 01, 2016 at 01:24:21AM +0300, Sergei Shtylyov wrote:
> The initial R8A7792 SoC device tree including 2 CPU cores, GIC, timer, SYSC,
> and the required  clock descriptions.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

This is rather large for an initial DTSI. Did you give any consideration
to splitting it up: e.g. only providing what is needed to get to a serial
console?

With regards to SMP. Have you checked to make sure CPU hotplug works
on all CPUs? And that the system behaves sanely on suspend/resume.
If it is not possible to verify this at this stage then I would recommend
only enabling one CPU at this stage.

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

* Re: [PATCH 08/13] ARM: dts: r8a7792: add SYS-DMAC support
  2016-05-31 22:25 ` [PATCH 08/13] ARM: dts: r8a7792: add SYS-DMAC support Sergei Shtylyov
@ 2016-06-01  1:03   ` Simon Horman
       [not found]   ` <5621267.GpvUaW18zI-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  1 sibling, 0 replies; 70+ messages in thread
From: Simon Horman @ 2016-06-01  1:03 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On Wed, Jun 01, 2016 at 01:25:24AM +0300, Sergei Shtylyov wrote:
> Describe SYS-DMAC0/1 in the R8A7792 device tree.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

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

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

* Re: [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support
  2016-05-31 22:26 ` [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support Sergei Shtylyov
@ 2016-06-01  1:13   ` Simon Horman
  2016-06-03 14:33     ` Sergei Shtylyov
  2016-06-01  8:17   ` Geert Uytterhoeven
  1 sibling, 1 reply; 70+ messages in thread
From: Simon Horman @ 2016-06-01  1:13 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On Wed, Jun 01, 2016 at 01:26:56AM +0300, Sergei Shtylyov wrote:
> Describe [H]SCIFs in the R8A7792 device tree.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

This looks correct to me.

I am wondering if you have been able to confirm DMA operation of the
devices enabled later on in the series.

> 
> ---
>  arch/arm/boot/dts/r8a7792.dtsi |   90 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 90 insertions(+)
> 
> Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
> ===================================================================
> --- renesas.orig/arch/arm/boot/dts/r8a7792.dtsi
> +++ renesas/arch/arm/boot/dts/r8a7792.dtsi
> @@ -140,6 +140,96 @@
>  		dma-channels = <15>;
>  	};
>  
> +	scif0: serial@e6e60000 {
> +		compatible = "renesas,scif-r8a7792", "renesas,rcar-gen2-scif",
> +			     "renesas,scif";
> +		reg = <0 0xe6e60000 0 64>;
> +		interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp7_clks R8A7792_CLK_SCIF0>, <&zs_clk>,
> +			 <&scif_clk>;
> +		clock-names = "fck", "brg_int", "scif_clk";
> +		dmas = <&dmac0 0x29>, <&dmac0 0x2a>,
> +		       <&dmac1 0x29>, <&dmac1 0x2a>;
> +		dma-names = "tx", "rx", "tx", "rx";
> +		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
> +		status = "disabled";
> +	};
> +
> +	scif1: serial@e6e68000 {
> +		compatible = "renesas,scif-r8a7792", "renesas,rcar-gen2-scif",
> +			     "renesas,scif";
> +		reg = <0 0xe6e68000 0 64>;
> +		interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp7_clks R8A7792_CLK_SCIF1>, <&zs_clk>,
> +			 <&scif_clk>;
> +		clock-names = "fck", "brg_int", "scif_clk";
> +		dmas = <&dmac0 0x2d>, <&dmac0 0x2e>,
> +		       <&dmac1 0x2d>, <&dmac1 0x2e>;
> +		dma-names = "tx", "rx", "tx", "rx";
> +		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
> +		status = "disabled";
> +	};
> +
> +	scif2: serial@e6e58000 {
> +		compatible = "renesas,scif-r8a7792", "renesas,rcar-gen2-scif",
> +			     "renesas,scif";
> +		reg = <0 0xe6e58000 0 64>;
> +		interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp7_clks R8A7792_CLK_SCIF2>, <&zs_clk>,
> +			 <&scif_clk>;
> +		clock-names = "fck", "brg_int", "scif_clk";
> +		dmas = <&dmac0 0x2b>, <&dmac0 0x2c>,
> +		       <&dmac1 0x2b>, <&dmac1 0x2c>;
> +		dma-names = "tx", "rx", "tx", "rx";
> +		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
> +		status = "disabled";
> +	};
> +
> +	scif3: serial@e6ea8000 {
> +		compatible = "renesas,scif-r8a7792", "renesas,rcar-gen2-scif",
> +			     "renesas,scif";
> +		reg = <0 0xe6ea8000 0 64>;
> +		interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp7_clks R8A7792_CLK_SCIF3>, <&zs_clk>,
> +			 <&scif_clk>;
> +		clock-names = "fck", "brg_int", "scif_clk";
> +		dmas = <&dmac0 0x2f>, <&dmac0 0x30>,
> +		       <&dmac1 0x2f>, <&dmac1 0x30>;
> +		dma-names = "tx", "rx", "tx", "rx";
> +		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
> +		status = "disabled";
> +	};
> +
> +	hscif0: serial@e62c0000 {
> +		compatible = "renesas,hscif-r8a7792", "renesas,rcar-gen2-hscif",
> +			     "renesas,hscif";
> +		reg = <0 0xe62c0000 0 96>;
> +		interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp7_clks R8A7792_CLK_HSCIF0>, <&zs_clk>,
> +			 <&scif_clk>;
> +		clock-names = "fck", "brg_int", "scif_clk";
> +		dmas = <&dmac0 0x39>, <&dmac0 0x3a>,
> +		       <&dmac1 0x39>, <&dmac1 0x3a>;
> +		dma-names = "tx", "rx", "tx", "rx";
> +		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
> +		status = "disabled";
> +	};
> +
> +	hscif1: serial@e62c8000 {
> +		compatible = "renesas,hscif-r8a7792", "renesas,rcar-gen2-hscif",
> +			     "renesas,hscif";
> +		reg = <0 0xe62c8000 0 96>;
> +		interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp7_clks R8A7792_CLK_HSCIF1>, <&zs_clk>,
> +			 <&scif_clk>;
> +		clock-names = "fck", "brg_int", "scif_clk";
> +		dmas = <&dmac0 0x4d>, <&dmac0 0x4e>,
> +		       <&dmac1 0x4d>, <&dmac1 0x4e>;
> +		dma-names = "tx", "rx", "tx", "rx";
> +		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
> +		status = "disabled";
> +	};
> +
>  	clocks {
>  		#address-cells = <2>;
>  		#size-cells = <2>;
> 

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

* Re: [PATCH 10/13] ARM: dts: r8a7792: add IRQC support
  2016-05-31 22:29 ` [PATCH 10/13] ARM: dts: r8a7792: add IRQC support Sergei Shtylyov
@ 2016-06-01  1:18   ` Simon Horman
  2016-06-01 14:02     ` Sergei Shtylyov
       [not found]   ` <3573091.BUvyGW3hVt-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  1 sibling, 1 reply; 70+ messages in thread
From: Simon Horman @ 2016-06-01  1:18 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On Wed, Jun 01, 2016 at 01:29:05AM +0300, Sergei Shtylyov wrote:
> Describe the IRQC interrupt controller in the R8A7792 device tree.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
>  arch/arm/boot/dts/r8a7792.dtsi |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
> ===================================================================
> --- renesas.orig/arch/arm/boot/dts/r8a7792.dtsi
> +++ renesas/arch/arm/boot/dts/r8a7792.dtsi
> @@ -62,6 +62,19 @@
>  			      IRQ_TYPE_LEVEL_HIGH)>;
>  	};
>  
> +	irqc: interrupt-controller@e61c0000 {

Could you consider using irqc0 as the node name for consistency with the
DT of other R-Car Gen2 SoCs?

What follows looks correct to me.

> +		compatible = "renesas,irqc-r8a7792", "renesas,irqc";
> +		#interrupt-cells = <2>;
> +		interrupt-controller;
> +		reg = <0 0xe61c0000 0 0x200>;
> +		interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
> +			     <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
> +			     <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
> +			     <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&mstp4_clks R8A7792_CLK_IRQC>;
> +		power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
> +	};
> +
>  	timer {
>  		compatible = "arm,armv7-timer";
>  		interrupts = <GIC_PPI 13
> 

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

* Re: [PATCH 12/13] ARM: dts: blanche: initial device tree
  2016-05-31 22:32 ` [PATCH 12/13] ARM: dts: blanche: initial device tree Sergei Shtylyov
@ 2016-06-01  1:21   ` Simon Horman
  2016-06-02 21:34     ` Sergei Shtylyov
  2016-06-01  8:36   ` Geert Uytterhoeven
  1 sibling, 1 reply; 70+ messages in thread
From: Simon Horman @ 2016-06-01  1:21 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On Wed, Jun 01, 2016 at 01:32:35AM +0300, Sergei Shtylyov wrote:
> Add the initial device  tree for the R8A7792 SoC based Blanche board.
> The board has 2 debug serial ports: SCIF0 and SCIF3; include support for
> them,  so that  the serial console  can  work.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

At this time I do not have access to documentation or hardware for this
board. So I am relying on you to test this and make sure it complies
with the spec.

What you have looks reasonable to me:

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

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

* Re: [PATCH 13/13] ARM: dts: blanche: add Ethernet support
  2016-05-31 22:33 ` [PATCH 13/13] ARM: dts: blanche: add Ethernet support Sergei Shtylyov
@ 2016-06-01  1:24   ` Simon Horman
       [not found]   ` <1669958.qjJ7i3NBPv-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
  1 sibling, 0 replies; 70+ messages in thread
From: Simon Horman @ 2016-06-01  1:24 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On Wed, Jun 01, 2016 at 01:33:49AM +0300, Sergei Shtylyov wrote:
> R8A7792  SoC  doesn't have the EtherMAC core, so SMSC  LAN89218  Ethernet
> chip was used instead on the Blanche board; this chip  is compatible with
> SMSC LAN9115  for  which there's a (device tree aware) driver. Describe
> the  chip in  the  Blanche device tree;  enable DHCP and NFS root in the
> kernel command line for the kernel booting.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

At this time I do not have access to documentation or hardware for this
board. So I am relying on you to test this and make sure it complies
with the spec.

What you have looks reasonable to me:

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

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

* Re: [PATCH 00/13] Add R8A7794/SILK board eMMC DT support
       [not found] ` <13205049.n7pM8utpHF-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2016-06-01  7:04   ` Geert Uytterhoeven
  2016-06-01 10:30     ` Sergei Shtylyov
  0 siblings, 1 reply; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  7:04 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Simon Horman, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Magnus Damm, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Sergei,

On Wed, Jun 1, 2016 at 12:06 AM, Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> wrote:
>    Here's the set of 13 patches against Simon Horman's 'renesas.git' repo,
> 'renesas-devel-20160530-v4.7-rc1' tag. We add the device tree support for
> the R8A7792-based Blanche board. The R-Car 'clk' driver patch was posted last
> week separately...
>
> [01/13] ARM: shmobile: r8a7792: add clock index macros
> [02/13] ARM: shmobile: r8a7792: add power domain index macros
> [03/13] soc: renesas: rcar-sysc: add R8A7792 support
> [04/13] ARM: shmobile: r8a7792: basic SoC support
> [05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
> [06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support
> [07/13] ARM: dts: r8a7792: initial SoC device tree
> [08/13] ARM: dts: r8a7792: add SYS-DMAC support
> [09/13] ARM: dts: r8a7792: add [H]SCIF support
> [10/13] ARM dts: r8a7792: add IRQC support
> [11/13] DT: arm: shmobile: document Blanche board
> [12/13] ARM: dts: blanche: initial device tree
> [13/13] ARM: dts: blanche: add Ethernet support

Thanks for your series!

The subject doesn't seem to cover the contents, though:
> [PATCH 00/13] Add R8A7794/SILK board eMMC DT support

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros
       [not found]   ` <2280165.siMXMbFrFe-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2016-06-01  7:22     ` Geert Uytterhoeven
  2016-06-01 14:09       ` Sergei Shtylyov
  0 siblings, 1 reply; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  7:22 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Sergei,

On Wed, Jun 1, 2016 at 12:09 AM, Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> wrote:
> Add macros usable by the device tree sources to reference the R8A7792
> clocks  by index.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
>
> ---
>  include/dt-bindings/clock/r8a7792-clock.h |  104 ++++++++++++++++++++++++++++++
>  1 file changed, 104 insertions(+)
>
> Index: renesas/include/dt-bindings/clock/r8a7792-clock.h
> ===================================================================
> --- /dev/null
> +++ renesas/include/dt-bindings/clock/r8a7792-clock.h
> @@ -0,0 +1,104 @@
> +/*
> + * Copyright (C) 2016 Cogent Embedded, Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#ifndef __DT_BINDINGS_CLOCK_R8A7792_H__
> +#define __DT_BINDINGS_CLOCK_R8A7792_H__
> +
> +/* CPG */
> +#define R8A7792_CLK_MAIN               0
> +#define R8A7792_CLK_PLL0               1
> +#define R8A7792_CLK_PLL1               2
> +#define R8A7792_CLK_PLL3               3
> +#define R8A7792_CLK_LB                 4
> +#define R8A7792_CLK_QSPI               5
> +#define R8A7792_CLK_SDH                        6
> +#define R8A7792_CLK_SD0                        7
> +#define R8A7792_CLK_SD1                        8

As Simon already pointed out, there are no ...SD* clocks on V2H.

> +#define R8A7792_CLK_Z                  9

> +/* MSTP1 */
> +#define R8A7792_CLK_TMU1               11
> +#define R8A7792_CLK_TMU3               21
> +#define R8A7792_CLK_TMU2               22
> +#define R8A7792_CLK_CMT0               24
> +#define R8A7792_CLK_TMU0               25
> +#define R8A7792_CLK_VSP1DU1            27
> +#define R8A7792_CLK_VSP1DU0            28
> +#define R8A7792_CLK_VSP1_SY            31

These are called ...VSP1_DU1, ...VSP1_DU0, and ...VSP1_S on all other
R-Car Gen2 SoCs.

> +/* MSTP2 */
> +#define R8A7792_CLK_MSIOF1             8
> +#define R8A7792_CLK_SYS_DMAC0          18

This is ...SYS_DMAC1

> +#define R8A7792_CLK_SYS_DMAC1          19

... and this is ...SYS_DMAC0

> +/* MSTP9 */
> +#define R8A7792_CLK_GPIO7              4
> +#define R8A7792_CLK_GPIO6              5
> +#define R8A7792_CLK_GPIO5              7
> +#define R8A7792_CLK_GPIO4              8
> +#define R8A7792_CLK_GPIO3              9
> +#define R8A7792_CLK_GPIO2              10
> +#define R8A7792_CLK_GPIO1              11
> +#define R8A7792_CLK_GPIO0              12
> +#define R8A7792_CLK_GPIO11             13
> +#define R8A7792_CLK_GPIO10             14
> +#define R8A7792_CLK_CAN1               15
> +#define R8A7792_CLK_CAN0               16

These are called ...RCAN1 and ...RCAR0 on all other R-Car Gen2 SoCs.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 02/13] ARM: shmobile: r8a7792: add power domain index macros
  2016-05-31 22:11 ` [PATCH 02/13] ARM: shmobile: r8a7792: add power domain " Sergei Shtylyov
@ 2016-06-01  7:32   ` Geert Uytterhoeven
  0 siblings, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  7:32 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, devicetree

On Wed, Jun 1, 2016 at 12:11 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Add macros usable by the device tree sources to reference R8A7792 SYSC power
> domains by index.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

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

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
  2016-05-31 22:20 ` [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support Sergei Shtylyov
  2016-06-01  0:25   ` Simon Horman
@ 2016-06-01  7:48   ` Geert Uytterhoeven
  2016-06-03  1:49   ` Rob Herring
  2 siblings, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  7:48 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, devicetree

On Wed, Jun 1, 2016 at 12:20 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Renesas R8A7792 SoC is a member of the R-Car gen2 family and so has CPG...
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

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

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
  2016-06-01  0:25   ` Simon Horman
  2016-06-01  0:30     ` Simon Horman
@ 2016-06-01  7:50     ` Geert Uytterhoeven
  1 sibling, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  7:50 UTC (permalink / raw)
  To: Simon Horman
  Cc: Sergei Shtylyov, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree,
	Geert Uytterhoeven

Hi Simon,

On Wed, Jun 1, 2016 at 2:25 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Jun 01, 2016 at 01:20:11AM +0300, Sergei Shtylyov wrote:
>> Renesas R8A7792 SoC is a member of the R-Car gen2 family and so has CPG...
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> I think the prefix of this patch should be "clk: shmobile: rcar-gen2: "

Almost, "clk: renesas: rcar-gen: " ;-)

> I apologise if I have missed a discussion of this topic or if my analysis
> is wrong for some reason but I am curious to know what the intended way
> is for the rcar-gen2 CPG driver to handle differences in the availability
> of clocks across different SoCs.
>
> My possibly naïve expectation is that the implementation would use compat
> strings. But as it stands it appears that all clocks supported by the
> driver are available for all SoCs. This does not seem to reflect the
> documentation (v2.00).

Differentiaton is not done using compat strings, but using clock-output-names.
The driver only instantiates the clocks that are listed there.

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support
  2016-05-31 22:21 ` [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support Sergei Shtylyov
  2016-06-01  0:28   ` Simon Horman
@ 2016-06-01  7:51   ` Geert Uytterhoeven
  2016-06-03  1:50   ` Rob Herring
  2 siblings, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  7:51 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, devicetree

On Wed, Jun 1, 2016 at 12:21 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Renesas R8A7792 SoC also has the CPG MSTP clocks...
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

If you use "clk: renesas: smtp: ..."

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

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 08/13] ARM: dts: r8a7792: add SYS-DMAC support
       [not found]   ` <5621267.GpvUaW18zI-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2016-06-01  8:15     ` Geert Uytterhoeven
  0 siblings, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  8:15 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Simon Horman, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Magnus Damm, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Wed, Jun 1, 2016 at 12:25 AM, Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> wrote:
> Describe SYS-DMAC0/1 in the R8A7792 device tree.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support
  2016-05-31 22:26 ` [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support Sergei Shtylyov
  2016-06-01  1:13   ` Simon Horman
@ 2016-06-01  8:17   ` Geert Uytterhoeven
  1 sibling, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  8:17 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Simon Horman, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

On Wed, Jun 1, 2016 at 12:26 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Describe [H]SCIFs in the R8A7792 device tree.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

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

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 10/13] ARM: dts: r8a7792: add IRQC support
       [not found]   ` <3573091.BUvyGW3hVt-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2016-06-01  8:17     ` Geert Uytterhoeven
  0 siblings, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  8:17 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Simon Horman, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Magnus Damm, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Wed, Jun 1, 2016 at 12:29 AM, Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> wrote:
> Describe the IRQC interrupt controller in the R8A7792 device tree.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 11/13] DT: arm: shmobile: document Blanche board
  2016-05-31 22:30 ` [PATCH 11/13] DT: arm: shmobile: document Blanche board Sergei Shtylyov
  2016-05-31 23:51   ` Simon Horman
@ 2016-06-01  8:19   ` Geert Uytterhoeven
  2016-06-03  1:50   ` Rob Herring
  2 siblings, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  8:19 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, devicetree

On Wed, Jun 1, 2016 at 12:30 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Document the Blanche device tree bindings, listing it as a supported board.
>
> This allows to use checkpatch.pl to validate .dts files referring to the
> Blanche board.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

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

I can't verify the correctness of the board product ID, though.

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 13/13] ARM: dts: blanche: add Ethernet support
       [not found]   ` <1669958.qjJ7i3NBPv-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
@ 2016-06-01  8:22     ` Geert Uytterhoeven
  2016-06-01 12:16       ` Sergei Shtylyov
  0 siblings, 1 reply; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  8:22 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Simon Horman, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Magnus Damm, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Sergei,

On Wed, Jun 1, 2016 at 12:33 AM, Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> wrote:
> --- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
> +++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts

> +       ethernet@18000000 {
> +               compatible = "smsc,lan89218", "smsc,lan9115";

The "smsc,lan89218" needs to be documented in the device tree bindings.
Google couldn't find any evidence you submitted a patch for that.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 12/13] ARM: dts: blanche: initial device tree
  2016-05-31 22:32 ` [PATCH 12/13] ARM: dts: blanche: initial device tree Sergei Shtylyov
  2016-06-01  1:21   ` Simon Horman
@ 2016-06-01  8:36   ` Geert Uytterhoeven
  1 sibling, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  8:36 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Mark Rutland, devicetree, Russell King, Pawel Moll, Ian Campbell,
	Magnus Damm, Rob Herring, linux-renesas-soc, Simon Horman,
	Kumar Gala, linux-arm-kernel

On Wed, Jun 1, 2016 at 12:32 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Add the initial device  tree for the R8A7792 SoC based Blanche board.
> The board has 2 debug serial ports: SCIF0 and SCIF3; include support for
> them,  so that  the serial console  can  work.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

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

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-05-31 22:24 ` [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree Sergei Shtylyov
  2016-06-01  0:57   ` Simon Horman
@ 2016-06-01  9:23   ` Geert Uytterhoeven
  1 sibling, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01  9:23 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Simon Horman, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

On Wed, Jun 1, 2016 at 12:24 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> The initial R8A7792 SoC device tree including 2 CPU cores, GIC, timer, SYSC,
> and the required  clock descriptions.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
>  arch/arm/boot/dts/r8a7792.dtsi |  423 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 423 insertions(+)
>
> Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
> ===================================================================
> --- /dev/null
> +++ renesas/arch/arm/boot/dts/r8a7792.dtsi
> @@ -0,0 +1,423 @@
> +/*
> + * Device Tree Source for the r8a7792 SoC
> + *
> + * Copyright (C) 2016 Cogent Embedded Inc.
> + *
> + * This file is licensed under the terms of the GNU General Public License
> + * version 2.  This program is licensed "as is" without any warranty of any
> + * kind, whether express or implied.
> + */
> +
> +#include <dt-bindings/clock/r8a7792-clock.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>

#include <dt-bindings/interrupt-controller/irq.h> is included
implicitly by the above.

> +#include <dt-bindings/power/r8a7792-sysc.h>
> +
> +/ {
> +       compatible = "renesas,r8a7792";
> +       interrupt-parent = <&gic>;
> +       #address-cells = <2>;
> +       #size-cells = <2>;
> +
> +       cpus {
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +
> +               cpu0: cpu@0 {
> +                       device_type = "cpu";
> +                       compatible = "arm,cortex-a15";
> +                       reg = <0>;
> +                       clock-frequency = <1000000000>;
> +                       clocks = <&cpg_clocks R8A7792_CLK_Z>;
> +                       power-domains = <&sysc R8A7792_PD_CA15_CPU0>;
> +                       next-level-cache = <&L2_CA15>;
> +               };
> +
> +               cpu1: cpu@1 {
> +                       device_type = "cpu";
> +                       compatible = "arm,cortex-a15";
> +                       reg = <1>;
> +                       clock-frequency = <1000000000>;
> +                       power-domains = <&sysc R8A7792_PD_CA15_CPU1>;
> +                       next-level-cache = <&L2_CA15>;
> +               };
> +
> +               L2_CA15: cache-controller@0 {
> +                       compatible = "cache";
> +                       reg = <0>;
> +                       cache-unified;
> +                       cache-level = <2>;
> +                       power-domains = <&sysc R8A7792_PD_CA15_SCU>;
> +               };
> +       };
> +
> +       gic: interrupt-controller@f1001000 {

It would be good to group all on-SoC devices under an "soc" node, like we
started doing for r8a7795.

> +       clocks {
> +               #address-cells = <2>;
> +               #size-cells = <2>;
> +               ranges;
> +
> +               /* External root clock */
> +               extal_clk: extal {
> +                       compatible = "fixed-clock";
> +                       #clock-cells = <0>;
> +                       /* This value must be overridden by the board. */
> +                       clock-frequency = <0>;
> +               };

The fixed clocks should be at the root level these days.

> +               /* Special CPG clocks */
> +               cpg_clocks: cpg_clocks@e6150000 {
> +                       compatible = "renesas,r8a7792-cpg-clocks",
> +                                    "renesas,rcar-gen2-cpg-clocks";
> +                       reg = <0 0xe6150000 0 0x1000>;
> +                       clocks = <&extal_clk>;
> +                       #clock-cells = <1>;
> +                       clock-output-names = "main", "pll0", "pll1", "pll3",
> +                                            "lb", "qspi", "sdh", "sd0", "sd1",
> +                                            "z";

"sdh", "sd0", and "sd1" do not exist. Please remove them.

> +               z2_clk: z2 {
> +                       compatible = "fixed-factor-clock";
> +                       clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
> +                       #clock-cells = <0>;
> +                       clock-div = <2>;
> +                       clock-mult = <1>;
> +               };

V2H doesn't have Z2.

> +               i_clk: i {
> +                       compatible = "fixed-factor-clock";
> +                       clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
> +                       #clock-cells = <0>;
> +                       clock-div = <2>;
> +                       clock-mult = <1>;
> +               };

clock-div = <3>;

> +               cp_clk: cp {
> +                       compatible = "fixed-factor-clock";
> +                       clocks = <&extal_clk>;
> +                       #clock-cells = <0>;
> +                       clock-div = <2>;
> +                       clock-mult = <1>;
> +               };

On V2H, CP is derived from PLL1, cfr. CL.
The clock derived from EXTAL is called CPEX.

> +               mstp1_clks: mstp1_clks@e6150134 {
> +                       compatible = "renesas,r8a7792-mstp-clocks",
> +                                    "renesas,cpg-mstp-clocks";
> +                       reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>;
> +                       clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>,
> +                                <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>;
> +                       #clock-cells = <1>;
> +                       clock-indices = <
> +                               R8A7792_CLK_TMU1 R8A7792_CLK_TMU3
> +                               R8A7792_CLK_TMU2 R8A7792_CLK_CMT0
> +                               R8A7792_CLK_TMU0 R8A7792_CLK_VSP1DU1
> +                               R8A7792_CLK_VSP1DU0 R8A7792_CLK_VSP1_SY
> +                       >;
> +                       clock-output-names = "tmu1", "tmu3", "tmu2", "cmt0",
> +                                            "tmu0", "vsp1du1", "vsp1du0",

These are called "vsp1-du1", "vsp1-du0" in all other R-Car Gen2 dtsis.

> +                                            "vsp1-sy";
> +               };
> +               mstp2_clks: mstp2_clks@e6150138 {
> +                       compatible = "renesas,r8a7792-mstp-clocks",
> +                                    "renesas,cpg-mstp-clocks";
> +                       reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
> +                       clocks = <&mp_clk>, <&zs_clk>, <&zs_clk>;
> +                       #clock-cells = <1>;
> +                       clock-indices = <
> +                               R8A7792_CLK_MSIOF1
> +                               R8A7792_CLK_SYS_DMAC0 R8A7792_CLK_SYS_DMAC1

Wrong order of the DMACs.

> +                       >;
> +                       clock-output-names = "msiof1", "sys-dmac0", "sys-dmac1";

Wrong order of the DMACs.

> +               };
> +               mstp3_clks: mstp3_clks@e615013c {
> +                       compatible = "renesas,r8a7792-mstp-clocks",
> +                                    "renesas,cpg-mstp-clocks";
> +                       reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
> +                       clocks = <&cp_clk>, <&cpg_clocks R8A7792_CLK_SD0>,

As there's no SD0, this can't be correct.

> +                                <&rclk_clk>;
> +                       #clock-cells = <1>;
> +                       clock-indices = <
> +                               R8A7792_CLK_TPU0 R8A7792_CLK_SDHI0
> +                               R8A7792_CLK_CMT1
> +                       >;
> +                       clock-output-names = "tpu0", "sdhi0", "cmt1";
> +               };

> +               mstp5_clks: mstp5_clks@e6150144 {
> +                       compatible = "renesas,r8a7792-mstp-clocks",
> +                                    "renesas,cpg-mstp-clocks";
> +                       reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
> +                       clocks = <&hp_clk>, <&extal_clk>, <&p_clk>;
> +                       #clock-cells = <1>;
> +                       clock-indices = <
> +                               R8A7792_CLK_AUDIO_DMAC0
> +                               R8A7792_CLK_THERMAL R8A7792_CLK_PWM
> +                       >;
> +                       clock-output-names = "thermal", "pwm", "audmac0";

clock-output-names = "audmac0", "thermal", "pwm";

> +               };


> +               mstp9_clks: mstp9_clks@e6150994 {
> +                       compatible = "renesas,r8a7792-mstp-clocks",
> +                                    "renesas,cpg-mstp-clocks";
> +                       reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
> +                       clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
> +                                <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
> +                                <&cp_clk>, <&cp_clk>, <&p_clk>, <&p_clk>,
> +                                <&cpg_clocks R8A7792_CLK_QSPI>, <&cp_clk>,
> +                                <&cp_clk>, <&hp_clk>, <&cp_clk>, <&hp_clk>,
> +                                <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
> +                       #clock-cells = <1>;
> +                       clock-indices = <
> +                               R8A7792_CLK_GPIO7 R8A7792_CLK_GPIO6
> +                               R8A7792_CLK_GPIO5 R8A7792_CLK_GPIO4
> +                               R8A7792_CLK_GPIO3 R8A7792_CLK_GPIO2
> +                               R8A7792_CLK_GPIO1 R8A7792_CLK_GPIO0
> +                               R8A7792_CLK_GPIO11 R8A7792_CLK_GPIO10
> +                               R8A7792_CLK_CAN1 R8A7792_CLK_CAN0
> +                               R8A7792_CLK_QSPI_MOD R8A7792_CLK_GPIO9
> +                               R8A7792_CLK_GPIO8 R8A7792_CLK_I2C5
> +                               R8A7792_CLK_IICDVFS R8A7792_CLK_I2C4
> +                               R8A7792_CLK_I2C3 R8A7792_CLK_I2C2
> +                               R8A7792_CLK_I2C1 R8A7792_CLK_I2C0
> +                       >;
> +                       clock-output-names = "gpio7", "gpio6", "gpio5", "gpio4",
> +                                            "gpio3", "gpio2", "gpio1", "gpio0",
> +                                            "gpio11", "gpio10", "can1", "can0",

These are called "rcan1", "rcan0" in other dtsis.

> +                                            "qspi_mod", "gpio9", "gpio8",
> +                                            "i2c5", "iic3", "i2c4", "i2c3",
> +                                            "i2c2", "i2c1", "i2c0";
> +               };

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 00/13] Add R8A7794/SILK board eMMC DT support
  2016-06-01  7:04   ` [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Geert Uytterhoeven
@ 2016-06-01 10:30     ` Sergei Shtylyov
  0 siblings, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-01 10:30 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

Hello.

On 6/1/2016 10:04 AM, Geert Uytterhoeven wrote:

>>    Here's the set of 13 patches against Simon Horman's 'renesas.git' repo,
>> 'renesas-devel-20160530-v4.7-rc1' tag. We add the device tree support for
>> the R8A7792-based Blanche board. The R-Car 'clk' driver patch was posted last
>> week separately...
>>
>> [01/13] ARM: shmobile: r8a7792: add clock index macros
>> [02/13] ARM: shmobile: r8a7792: add power domain index macros
>> [03/13] soc: renesas: rcar-sysc: add R8A7792 support
>> [04/13] ARM: shmobile: r8a7792: basic SoC support
>> [05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
>> [06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support
>> [07/13] ARM: dts: r8a7792: initial SoC device tree
>> [08/13] ARM: dts: r8a7792: add SYS-DMAC support
>> [09/13] ARM: dts: r8a7792: add [H]SCIF support
>> [10/13] ARM dts: r8a7792: add IRQC support
>> [11/13] DT: arm: shmobile: document Blanche board
>> [12/13] ARM: dts: blanche: initial device tree
>> [13/13] ARM: dts: blanche: add Ethernet support
>
> Thanks for your series!
>
> The subject doesn't seem to cover the contents, though:
>> [PATCH 00/13] Add R8A7794/SILK board eMMC DT support

    Oops. :-(
    Sorry about that...

> Gr{oetje,eeting}s,
>
>                         Geert

MBR, Sergei

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

* Re: [PATCH 13/13] ARM: dts: blanche: add Ethernet support
  2016-06-01  8:22     ` Geert Uytterhoeven
@ 2016-06-01 12:16       ` Sergei Shtylyov
       [not found]         ` <a60346f2-2abb-342b-dd20-38d401c4ceb3-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-01 12:16 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

Hello.

On 6/1/2016 11:22 AM, Geert Uytterhoeven wrote:

>> --- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
>> +++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts
>
>> +       ethernet@18000000 {
>> +               compatible = "smsc,lan89218", "smsc,lan9115";
>
> The "smsc,lan89218" needs to be documented in the device tree bindings.

    Have you looked at those bindings?

> Google couldn't find any evidence you submitted a patch for that.

    Because the bindings document *any* LAN9115 compatible chip already.

> Gr{oetje,eeting}s,
>
>                         Geert

MBR, Sergei

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

* Re: [PATCH 13/13] ARM: dts: blanche: add Ethernet support
       [not found]         ` <a60346f2-2abb-342b-dd20-38d401c4ceb3-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
@ 2016-06-01 12:27           ` Geert Uytterhoeven
  2016-06-02 21:33             ` Sergei Shtylyov
  0 siblings, 1 reply; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 12:27 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Simon Horman, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Magnus Damm, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Sergei,

On Wed, Jun 1, 2016 at 2:16 PM, Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> wrote:
> On 6/1/2016 11:22 AM, Geert Uytterhoeven wrote:
>>> --- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
>>> +++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts
>>
>>> +       ethernet@18000000 {
>>> +               compatible = "smsc,lan89218", "smsc,lan9115";
>>
>>
>> The "smsc,lan89218" needs to be documented in the device tree bindings.
>
>    Have you looked at those bindings?

Now I did.

>> Google couldn't find any evidence you submitted a patch for that.
>
>    Because the bindings document *any* LAN9115 compatible chip already.

Ah, generic wildcard, not listing valid values. Hence checkpatch complained...

Google predict-while-you-type suggests "lan89218aq"? Should you use that?
BTW, that's why we always want to document all valid values...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 11/13] DT: arm: shmobile: document Blanche board
       [not found]     ` <20160531235119.GA20527-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
@ 2016-06-01 13:34       ` Sergei Shtylyov
  0 siblings, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-01 13:34 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, devicetree-u79uwXL29TY76Z2rM5mHXA

Hello.

On 06/01/2016 02:51 AM, Simon Horman wrote:

>> Document the Blanche device tree bindings, listing it as a supported board.
>>
>> This allows to use checkpatch.pl to validate .dts files referring to the
>> Blanche board.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
>
> I think the prefix for patch 11 should be: "ARM: dts: blanche: "

     Hm... why?

> It also looks like it could be squashed into patch 12 but I don't
> feel strongly about that.

    I'd prefer not to merge them.

[...]

MBR, Sergei

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

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

* Re: [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros
  2016-06-01  0:52   ` Simon Horman
@ 2016-06-01 13:57     ` Sergei Shtylyov
  2016-06-22 19:52     ` Sergei Shtylyov
  1 sibling, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-01 13:57 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

On 06/01/2016 03:52 AM, Simon Horman wrote:

>> Add macros usable by the device tree sources to reference the R8A7792
>> clocks  by index.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>>  include/dt-bindings/clock/r8a7792-clock.h |  104 ++++++++++++++++++++++++++++++
>>  1 file changed, 104 insertions(+)
>>
>> Index: renesas/include/dt-bindings/clock/r8a7792-clock.h
>> ===================================================================
>> --- /dev/null
>> +++ renesas/include/dt-bindings/clock/r8a7792-clock.h
>> @@ -0,0 +1,104 @@
>> +/*
>> + * Copyright (C) 2016 Cogent Embedded, Inc.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + */
>> +
>> +#ifndef __DT_BINDINGS_CLOCK_R8A7792_H__
>> +#define __DT_BINDINGS_CLOCK_R8A7792_H__
>> +
>> +/* CPG */
>> +#define R8A7792_CLK_MAIN		0
>> +#define R8A7792_CLK_PLL0		1
>> +#define R8A7792_CLK_PLL1		2
>> +#define R8A7792_CLK_PLL3		3
>> +#define R8A7792_CLK_LB			4
>> +#define R8A7792_CLK_QSPI		5
>> +#define R8A7792_CLK_SDH			6
>> +#define R8A7792_CLK_SD0			7
>> +#define R8A7792_CLK_SD1			8
>> +#define R8A7792_CLK_Z			9
>
> According to my copy of the documentation (v2.00) SDH, SD0 and SD1 do
> not seem to be provided by the r8a7792 CPG.

    Right, should have checked the original patch against the manual in that 
part as well... :-/

> It does, however, provide RCAN and ADSP which are supported by the CPG
> driver. You may wish to add them now for completeness though from my point
> of view they could also be added later when they are used.

    Hm, the gen2 manual rev1.02 doesn't mention either of these clocks for V2H...
I still don't have 2.00. :-(

> I reviewed the values below. They appear to be complete and correct.

    Geert has found some bug there. :-)

MBR, Sergei

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-01  0:57   ` Simon Horman
@ 2016-06-01 14:00     ` Sergei Shtylyov
  2016-06-06 22:26     ` Sergei Shtylyov
  1 sibling, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-01 14:00 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On 06/01/2016 03:57 AM, Simon Horman wrote:

>> The initial R8A7792 SoC device tree including 2 CPU cores, GIC, timer, SYSC,
>> and the required  clock descriptions.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> This is rather large for an initial DTSI. Did you give any consideration
> to splitting it up: e.g. only providing what is needed to get to a serial
> console?

    You mean dropping the majority of clocks, right?

> With regards to SMP. Have you checked to make sure CPU hotplug works
> on all CPUs? And that the system behaves sanely on suspend/resume.
> If it is not possible to verify this at this stage then I would recommend
> only enabling one CPU at this stage.

    No, the SMP support isn't ready yet.
    And I'll have to enable SMP on R8A7794 as well...

MBR, Sergei

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

* Re: [PATCH 10/13] ARM: dts: r8a7792: add IRQC support
  2016-06-01  1:18   ` Simon Horman
@ 2016-06-01 14:02     ` Sergei Shtylyov
  0 siblings, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-01 14:02 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On 06/01/2016 04:18 AM, Simon Horman wrote:

>> Describe the IRQC interrupt controller in the R8A7792 device tree.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>>  arch/arm/boot/dts/r8a7792.dtsi |   13 +++++++++++++
>>  1 file changed, 13 insertions(+)
>>
>> Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
>> ===================================================================
>> --- renesas.orig/arch/arm/boot/dts/r8a7792.dtsi
>> +++ renesas/arch/arm/boot/dts/r8a7792.dtsi
>> @@ -62,6 +62,19 @@
>>  			      IRQ_TYPE_LEVEL_HIGH)>;
>>  	};
>>
>> +	irqc: interrupt-controller@e61c0000 {
>
> Could you consider using irqc0 as the node name for consistency with the
> DT of other R-Car Gen2 SoCs?

    Frankly speaking I didn't get that name indexing thing at all. Could you 
share the reasoning behind it?

> What follows looks correct to me.

    Thank you. :-)

MBR, Sergei

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

* Re: [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros
  2016-06-01  7:22     ` Geert Uytterhoeven
@ 2016-06-01 14:09       ` Sergei Shtylyov
  0 siblings, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-01 14:09 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-renesas-soc, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, devicetree

On 06/01/2016 10:22 AM, Geert Uytterhoeven wrote:

>> Add macros usable by the device tree sources to reference the R8A7792
>> clocks  by index.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>>  include/dt-bindings/clock/r8a7792-clock.h |  104 ++++++++++++++++++++++++++++++
>>  1 file changed, 104 insertions(+)
>>
>> Index: renesas/include/dt-bindings/clock/r8a7792-clock.h
>> ===================================================================
>> --- /dev/null
>> +++ renesas/include/dt-bindings/clock/r8a7792-clock.h
>> @@ -0,0 +1,104 @@
>> +/*
>> + * Copyright (C) 2016 Cogent Embedded, Inc.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + */
>> +
>> +#ifndef __DT_BINDINGS_CLOCK_R8A7792_H__
>> +#define __DT_BINDINGS_CLOCK_R8A7792_H__
>> +
>> +/* CPG */
>> +#define R8A7792_CLK_MAIN               0
>> +#define R8A7792_CLK_PLL0               1
>> +#define R8A7792_CLK_PLL1               2
>> +#define R8A7792_CLK_PLL3               3
>> +#define R8A7792_CLK_LB                 4
>> +#define R8A7792_CLK_QSPI               5
>> +#define R8A7792_CLK_SDH                        6
>> +#define R8A7792_CLK_SD0                        7
>> +#define R8A7792_CLK_SD1                        8
>
> As Simon already pointed out, there are no ...SD* clocks on V2H.

    Right, looks like I shouldn't have trusted the original patch... :-/

>> +#define R8A7792_CLK_Z                  9
>
>> +/* MSTP1 */
>> +#define R8A7792_CLK_TMU1               11
>> +#define R8A7792_CLK_TMU3               21
>> +#define R8A7792_CLK_TMU2               22
>> +#define R8A7792_CLK_CMT0               24
>> +#define R8A7792_CLK_TMU0               25
>> +#define R8A7792_CLK_VSP1DU1            27
>> +#define R8A7792_CLK_VSP1DU0            28
>> +#define R8A7792_CLK_VSP1_SY            31
>
> These are called ...VSP1_DU1, ...VSP1_DU0, and ...VSP1_S on all other
> R-Car Gen2 SoCs.

    My naming comes from the 1.02 manual.

>> +/* MSTP2 */
>> +#define R8A7792_CLK_MSIOF1             8
>> +#define R8A7792_CLK_SYS_DMAC0          18
>
> This is ...SYS_DMAC1
>
>> +#define R8A7792_CLK_SYS_DMAC1          19
>
> ... and this is ...SYS_DMAC0

    Thanks for catching!

>> +/* MSTP9 */
>> +#define R8A7792_CLK_GPIO7              4
>> +#define R8A7792_CLK_GPIO6              5
>> +#define R8A7792_CLK_GPIO5              7
>> +#define R8A7792_CLK_GPIO4              8
>> +#define R8A7792_CLK_GPIO3              9
>> +#define R8A7792_CLK_GPIO2              10
>> +#define R8A7792_CLK_GPIO1              11
>> +#define R8A7792_CLK_GPIO0              12
>> +#define R8A7792_CLK_GPIO11             13
>> +#define R8A7792_CLK_GPIO10             14
>> +#define R8A7792_CLK_CAN1               15
>> +#define R8A7792_CLK_CAN0               16
>
> These are called ...RCAN1 and ...RCAR0 on all other R-Car Gen2 SoCs.

    Not in the 1.02 manual (they were called RCAN<n> in some of the earlier 
manual revs). Dunno if it makes sense to rename them in the other .dts now...

> Gr{oetje,eeting}s,
>
>                         Geert

WBR, Sergei

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

* Re: [PATCH 13/13] ARM: dts: blanche: add Ethernet support
  2016-06-01 12:27           ` Geert Uytterhoeven
@ 2016-06-02 21:33             ` Sergei Shtylyov
  0 siblings, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-02 21:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

On 06/01/2016 03:27 PM, Geert Uytterhoeven wrote:

>>>> --- renesas.orig/arch/arm/boot/dts/r8a7792-blanche.dts
>>>> +++ renesas/arch/arm/boot/dts/r8a7792-blanche.dts
>>>
>>>> +       ethernet@18000000 {
>>>> +               compatible = "smsc,lan89218", "smsc,lan9115";
>>>
>>>
>>> The "smsc,lan89218" needs to be documented in the device tree bindings.
>>
>>    Have you looked at those bindings?
>
> Now I did.
>
>>> Google couldn't find any evidence you submitted a patch for that.
>>
>>    Because the bindings document *any* LAN9115 compatible chip already.
>
> Ah, generic wildcard, not listing valid values. Hence checkpatch complained...

    Note that it doesn't complain about "smsc,lan9220" though that is only 
mentioned in the example.

> Google predict-while-you-type suggests "lan89218aq"? Should you use that?

    No, my googling shows that the suffix can be different, and the Microchip 
(the new owner?) has it without the suffix on their site.

> BTW, that's why we always want to document all valid values...

> Gr{oetje,eeting}s,
>
>                         Geert

MBR, Sergei

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

* Re: [PATCH 12/13] ARM: dts: blanche: initial device tree
  2016-06-01  1:21   ` Simon Horman
@ 2016-06-02 21:34     ` Sergei Shtylyov
  0 siblings, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-02 21:34 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On 06/01/2016 04:21 AM, Simon Horman wrote:

>> Add the initial device  tree for the R8A7792 SoC based Blanche board.
>> The board has 2 debug serial ports: SCIF0 and SCIF3; include support for
>> them,  so that  the serial console  can  work.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> At this time I do not have access to documentation or hardware for this
> board. So I am relying on you to test this and make sure it complies
> with the spec.

    Don't worry, the patches have been tested on the real hardware.

> What you have looks reasonable to me:
>
> Acked-by: Simon Horman <horms+renesas@verge.net.au>

    Thank you. :-)

MBR, Sergei

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

* Re: [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support
  2016-05-31 22:20 ` [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support Sergei Shtylyov
  2016-06-01  0:25   ` Simon Horman
  2016-06-01  7:48   ` Geert Uytterhoeven
@ 2016-06-03  1:49   ` Rob Herring
  2 siblings, 0 replies; 70+ messages in thread
From: Rob Herring @ 2016-06-03  1:49 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, pawel.moll, mark.rutland, ijc+devicetree,
	galak, devicetree

On Wed, Jun 01, 2016 at 01:20:11AM +0300, Sergei Shtylyov wrote:
> Renesas R8A7792 SoC is a member of the R-Car gen2 family and so has CPG...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
>  Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt |    1 +
>  1 file changed, 1 insertion(+)

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support
  2016-05-31 22:21 ` [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support Sergei Shtylyov
  2016-06-01  0:28   ` Simon Horman
  2016-06-01  7:51   ` Geert Uytterhoeven
@ 2016-06-03  1:50   ` Rob Herring
  2 siblings, 0 replies; 70+ messages in thread
From: Rob Herring @ 2016-06-03  1:50 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, pawel.moll, mark.rutland, ijc+devicetree,
	galak, devicetree

On Wed, Jun 01, 2016 at 01:21:26AM +0300, Sergei Shtylyov wrote:
> Renesas R8A7792 SoC also has the CPG MSTP clocks...
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
>  Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt |    1 +
>  1 file changed, 1 insertion(+)

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 11/13] DT: arm: shmobile: document Blanche board
  2016-05-31 22:30 ` [PATCH 11/13] DT: arm: shmobile: document Blanche board Sergei Shtylyov
  2016-05-31 23:51   ` Simon Horman
  2016-06-01  8:19   ` Geert Uytterhoeven
@ 2016-06-03  1:50   ` Rob Herring
  2 siblings, 0 replies; 70+ messages in thread
From: Rob Herring @ 2016-06-03  1:50 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, pawel.moll, mark.rutland, ijc+devicetree,
	galak, devicetree

On Wed, Jun 01, 2016 at 01:30:39AM +0300, Sergei Shtylyov wrote:
> Document the Blanche device tree bindings, listing it as a supported board.
> 
> This allows to use checkpatch.pl to validate .dts files referring to the
> Blanche board.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support
  2016-06-01  1:13   ` Simon Horman
@ 2016-06-03 14:33     ` Sergei Shtylyov
  0 siblings, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-03 14:33 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On 06/01/2016 04:13 AM, Simon Horman wrote:

>> Describe [H]SCIFs in the R8A7792 device tree.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> This looks correct to me.
>
> I am wondering if you have been able to confirm DMA operation of the
> devices enabled later on in the series.

    The SCIF DMA seems to work now that enabled it in the driver. Not sure 
what you meant by "the devices enabled later in the seties"...

MBR, Sergei

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-01  0:57   ` Simon Horman
  2016-06-01 14:00     ` Sergei Shtylyov
@ 2016-06-06 22:26     ` Sergei Shtylyov
  2016-06-07  7:13       ` Geert Uytterhoeven
  1 sibling, 1 reply; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-06 22:26 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

Hello.

On 06/01/2016 03:57 AM, Simon Horman wrote:

>> The initial R8A7792 SoC device tree including 2 CPU cores, GIC, timer, SYSC,
>> and the required  clock descriptions.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> This is rather large for an initial DTSI. Did you give any consideration
> to splitting it up: e.g. only providing what is needed to get to a serial
> console?

    Was done in the v2 patchset...

> With regards to SMP. Have you checked to make sure CPU hotplug works
> on all CPUs?

    How to test the CPU hotplug? I've now added the SMP support and made sure 
both CPUs are online and serve IRQs...

> And that the system behaves sanely on suspend/resume.

    I'd be thankful if you told me how to test that. :-)

> If it is not possible to verify this at this stage then I would recommend
> only enabling one CPU at this stage.

    Had a hard time debugging SMP until I realized I'd removed CPU1 from the 
device tree. :-)

MBR, Sergei

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-06 22:26     ` Sergei Shtylyov
@ 2016-06-07  7:13       ` Geert Uytterhoeven
  2016-06-07 20:58         ` Sergei Shtylyov
  0 siblings, 1 reply; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-07  7:13 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Simon Horman, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

Hi Sergei,

On Tue, Jun 7, 2016 at 12:26 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
>> With regards to SMP. Have you checked to make sure CPU hotplug works
>> on all CPUs?
>
>    How to test the CPU hotplug? I've now added the SMP support and made sure
> both CPUs are online and serve IRQs...

Off/online all CPUs:

    for i in /sys/*/*/cpu/cpu[0-9]*; do echo 0 > $i/online; echo 1 >
$i/online; done

Offline all CPUs:

    for i in /sys/*/*/cpu/cpu[0-9]*; do echo 0 > $i/online; done; cat
/proc/cpuinfo

Online all CPUs:

   for i in /sys/*/*/cpu/cpu[0-9]*; do echo 1 > $i/online; done; cat
/proc/cpuinfo

>> And that the system behaves sanely on suspend/resume.
>
>    I'd be thankful if you told me how to test that. :-)

System suspend:

    echo mem > /sys/power/state

System resume: You're gonna need a "wakeup-source" in your DTS, e.g. gpio-keys.
Serial should work too, echo "enabled" to the corresponding wakeup
file in /sys first.

In case of issues, try "echo 0 > /sys/module/printk/parameters/console_suspend".

Good luck!

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-07  7:13       ` Geert Uytterhoeven
@ 2016-06-07 20:58         ` Sergei Shtylyov
  2016-06-10  1:02           ` Simon Horman
  0 siblings, 1 reply; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-07 20:58 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

On 06/07/2016 10:13 AM, Geert Uytterhoeven wrote:

[...]

>>> And that the system behaves sanely on suspend/resume.
>>
>>    I'd be thankful if you told me how to test that. :-)
>
> System suspend:
>
>     echo mem > /sys/power/state

    Oh. I know that one! :-)

> System resume: You're gonna need a "wakeup-source" in your DTS, e.g. gpio-keys.
> Serial should work too, echo "enabled" to the corresponding wakeup
> file in /sys first.

    I'm afraid I couldn't find that file. All I saw were RPM controls...

> In case of issues, try "echo 0 > /sys/module/printk/parameters/console_suspend".

    There's no problems suspending, it's the resuming that's a problem for me.

> Good luck!

    As usual, there was no luck. :-)

WBR, Sergei

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-07 20:58         ` Sergei Shtylyov
@ 2016-06-10  1:02           ` Simon Horman
  2016-06-10 19:29             ` Sergei Shtylyov
  0 siblings, 1 reply; 70+ messages in thread
From: Simon Horman @ 2016-06-10  1:02 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Geert Uytterhoeven, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

On Tue, Jun 07, 2016 at 11:58:45PM +0300, Sergei Shtylyov wrote:
> On 06/07/2016 10:13 AM, Geert Uytterhoeven wrote:
> 
> [...]
> 
> >>>And that the system behaves sanely on suspend/resume.
> >>
> >>   I'd be thankful if you told me how to test that. :-)
> >
> >System suspend:
> >
> >    echo mem > /sys/power/state
> 
>    Oh. I know that one! :-)
> 
> >System resume: You're gonna need a "wakeup-source" in your DTS, e.g. gpio-keys.
> >Serial should work too, echo "enabled" to the corresponding wakeup
> >file in /sys first.
> 
>    I'm afraid I couldn't find that file. All I saw were RPM controls...
> 
> >In case of issues, try "echo 0 > /sys/module/printk/parameters/console_suspend".
> 
>    There's no problems suspending, it's the resuming that's a problem for me.
> 
> >Good luck!
> 
>    As usual, there was no luck. :-)
> 
> WBR, Sergei

Does resume work for UP (i.e. without SMP)?

How did testing CPU hotplug go? Did it work for all CPUs?

If things work less well for SMP than UP I am inclined to ask
you to defer adding SMP support.

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-10  1:02           ` Simon Horman
@ 2016-06-10 19:29             ` Sergei Shtylyov
  2016-06-10 20:42               ` Geert Uytterhoeven
       [not found]               ` <8efb1c7e-5463-2556-744c-d327886d92d4-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
  0 siblings, 2 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-10 19:29 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

On 06/10/2016 04:02 AM, Simon Horman wrote:

>> [...]
>>
>>>>> And that the system behaves sanely on suspend/resume.
>>>>
>>>>   I'd be thankful if you told me how to test that. :-)
>>>
>>> System suspend:
>>>
>>>    echo mem > /sys/power/state
>>
>>    Oh. I know that one! :-)
>>
>>> System resume: You're gonna need a "wakeup-source" in your DTS, e.g. gpio-keys.
>>> Serial should work too, echo "enabled" to the corresponding wakeup
>>> file in /sys first.
>>
>>    I'm afraid I couldn't find that file. All I saw were RPM controls...
>>
>>> In case of issues, try "echo 0 > /sys/module/printk/parameters/console_suspend".
>>
>>    There's no problems suspending, it's the resuming that's a problem for me.
>>
>>> Good luck!
>>
>>    As usual, there was no luck. :-)
>>
>> WBR, Sergei
>
> Does resume work for UP (i.e. without SMP)?

    No. My problem with resume is I can't wake up the remote system. I don't 
see the needed 'wakeup' file in /sys/devices/platform/soc/e6e60000.serial/...
     However, if I enable CONFIG_PM_[ADVANCED_]DEBUG and do

$ echo -n core /sys/.power/pm_test

the system happily wakes up after a small delay (5 s), w/either SMP or UP kernel.

> How did testing CPU hotplug go? Did it work for all CPUs?

    Sure!
    The only problem I'm seeing (again) is the RCAN clock failing to register:

rcar_gen2_cpg_clocks_init: failed to register cpg_clocks rcan clock (-12)

    I was going to look at it yesterday but (wrongly) thought it somehow cured 
itself... I'll look at it now.

MBR, Sergei

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-10 19:29             ` Sergei Shtylyov
@ 2016-06-10 20:42               ` Geert Uytterhoeven
  2016-06-10 20:50                 ` Sergei Shtylyov
       [not found]               ` <8efb1c7e-5463-2556-744c-d327886d92d4-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
  1 sibling, 1 reply; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-10 20:42 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Simon Horman, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

Hi Sergei,

On Fri, Jun 10, 2016 at 9:29 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
>    The only problem I'm seeing (again) is the RCAN clock failing to
> register:
>
> rcar_gen2_cpg_clocks_init: failed to register cpg_clocks rcan clock (-12)
>
>    I was going to look at it yesterday but (wrongly) thought it somehow
> cured itself... I'll look at it now.

The RCAN parent is the second clock in the CPG node's "clocks" property,
which you didn't provide.

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-10 20:42               ` Geert Uytterhoeven
@ 2016-06-10 20:50                 ` Sergei Shtylyov
  2016-06-13  7:12                   ` Geert Uytterhoeven
  0 siblings, 1 reply; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-10 20:50 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

On 06/10/2016 11:42 PM, Geert Uytterhoeven wrote:

>>    The only problem I'm seeing (again) is the RCAN clock failing to
>> register:
>>
>> rcar_gen2_cpg_clocks_init: failed to register cpg_clocks rcan clock (-12)
>>
>>    I was going to look at it yesterday but (wrongly) thought it somehow
>> cured itself... I'll look at it now.
>
> The RCAN parent is the second clock in the CPG node's "clocks" property,
> which you didn't provide.

    Actually, the things are more complex. The figure 7.1c suggests that the 
RCAN clock has different parent on R8A7792 than on the other SoCs -- namely 
PLL1/VCO 1/4. That may be, since there's just no USB_EXTAL signal on this SoC 
(it doesn't seem to support any USB IPs). Which means the 'clk-rcar-gen2' 
driver can't work with the RCAN clock in its current form.

> Gr{oetje,eeting}s,
>
>                         Geert

MBR, Sergei

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-10 20:50                 ` Sergei Shtylyov
@ 2016-06-13  7:12                   ` Geert Uytterhoeven
  2016-06-13 11:24                     ` Sergei Shtylyov
  2016-06-14  1:08                     ` Kuninori Morimoto
  0 siblings, 2 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-13  7:12 UTC (permalink / raw)
  To: Sergei Shtylyov, Kuninori Morimoto
  Cc: Simon Horman, open list:MEDIA DRIVERS FOR RENESAS - FCP,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree, Magnus Damm, Russell King, linux-arm-kernel

Hi Sergei,

On Fri, Jun 10, 2016 at 10:50 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 06/10/2016 11:42 PM, Geert Uytterhoeven wrote:
>>>    The only problem I'm seeing (again) is the RCAN clock failing to
>>> register:
>>>
>>> rcar_gen2_cpg_clocks_init: failed to register cpg_clocks rcan clock (-12)
>>>
>>>    I was going to look at it yesterday but (wrongly) thought it somehow
>>> cured itself... I'll look at it now.
>>
>> The RCAN parent is the second clock in the CPG node's "clocks" property,
>> which you didn't provide.
>
>    Actually, the things are more complex. The figure 7.1c suggests that the
> RCAN clock has different parent on R8A7792 than on the other SoCs -- namely
> PLL1/VCO 1/4. That may be, since there's just no USB_EXTAL signal on this
> SoC (it doesn't seem to support any USB IPs). Which means the
> 'clk-rcar-gen2' driver can't work with the RCAN clock in its current form.

Right, I had forgotten about that.
Fortunately the clk-rcar-gen2 driver has a sane failure mode for this case ;-)

it seems the RCAN clock can just be modeled as a fixed clock. However,
its divider value isn't clear to me, as 15.9 MHz cannot be generated from PLL1
using an integer divider. Morimoto-san, can you please ask for clarification?

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-13  7:12                   ` Geert Uytterhoeven
@ 2016-06-13 11:24                     ` Sergei Shtylyov
       [not found]                       ` <7d93d81d-cca9-e434-6488-0ea839f81663-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
  2016-06-14  1:08                     ` Kuninori Morimoto
  1 sibling, 1 reply; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-13 11:24 UTC (permalink / raw)
  To: Geert Uytterhoeven, Kuninori Morimoto
  Cc: Simon Horman, open list:MEDIA DRIVERS FOR RENESAS - FCP,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree, Magnus Damm, Russell King, linux-arm-kernel

On 6/13/2016 10:12 AM, Geert Uytterhoeven wrote:

>>>>    The only problem I'm seeing (again) is the RCAN clock failing to
>>>> register:
>>>>
>>>> rcar_gen2_cpg_clocks_init: failed to register cpg_clocks rcan clock (-12)
>>>>
>>>>    I was going to look at it yesterday but (wrongly) thought it somehow
>>>> cured itself... I'll look at it now.
>>>
>>> The RCAN parent is the second clock in the CPG node's "clocks" property,
>>> which you didn't provide.
>>
>>    Actually, the things are more complex. The figure 7.1c suggests that the
>> RCAN clock has different parent on R8A7792 than on the other SoCs -- namely
>> PLL1/VCO 1/4. That may be, since there's just no USB_EXTAL signal on this
>> SoC (it doesn't seem to support any USB IPs). Which means the
>> 'clk-rcar-gen2' driver can't work with the RCAN clock in its current form.
>
> Right, I had forgotten about that.
> Fortunately the clk-rcar-gen2 driver has a sane failure mode for this case ;-)

    What do you mean?

> it seems the RCAN clock can just be modeled as a fixed clock. However,
> its divider value isn't clear to me,

    IIRC, the fixed RCAN divisor was equal to 6.

[...]

> Gr{oetje,eeting}s,
>
>                         Geert

MBR, Sergei

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
       [not found]                       ` <7d93d81d-cca9-e434-6488-0ea839f81663-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
@ 2016-06-13 11:48                         ` Geert Uytterhoeven
  0 siblings, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-13 11:48 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Kuninori Morimoto, Simon Horman,
	open list:MEDIA DRIVERS FOR RENESAS - FCP, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Magnus Damm, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Sergei,

On Mon, Jun 13, 2016 at 1:24 PM, Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> wrote:
> On 6/13/2016 10:12 AM, Geert Uytterhoeven wrote:
>>>>>    The only problem I'm seeing (again) is the RCAN clock failing to
>>>>> register:
>>>>>
>>>>> rcar_gen2_cpg_clocks_init: failed to register cpg_clocks rcan clock
>>>>> (-12)
>>>>>
>>>>>    I was going to look at it yesterday but (wrongly) thought it somehow
>>>>> cured itself... I'll look at it now.
>>>>
>>>>
>>>> The RCAN parent is the second clock in the CPG node's "clocks" property,
>>>> which you didn't provide.
>>>
>>>
>>>    Actually, the things are more complex. The figure 7.1c suggests that
>>> the
>>> RCAN clock has different parent on R8A7792 than on the other SoCs --
>>> namely
>>> PLL1/VCO 1/4. That may be, since there's just no USB_EXTAL signal on this
>>> SoC (it doesn't seem to support any USB IPs). Which means the
>>> 'clk-rcar-gen2' driver can't work with the RCAN clock in its current
>>> form.
>>
>> Right, I had forgotten about that.
>> Fortunately the clk-rcar-gen2 driver has a sane failure mode for this case
>> ;-)
>
>    What do you mean?

I mean that it failed due to the missing parent clock, instead of continuing
silently with a wrong clock rate.

>> it seems the RCAN clock can just be modeled as a fixed clock. However,
>> its divider value isn't clear to me,
>
>    IIRC, the fixed RCAN divisor was equal to 6.

1560 / 6 != 15.9.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
       [not found]               ` <8efb1c7e-5463-2556-744c-d327886d92d4-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
@ 2016-06-14  0:43                 ` Simon Horman
  2016-06-14 21:08                   ` Sergei Shtylyov
  0 siblings, 1 reply; 70+ messages in thread
From: Simon Horman @ 2016-06-14  0:43 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Geert Uytterhoeven, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Magnus Damm, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, Jun 10, 2016 at 10:29:17PM +0300, Sergei Shtylyov wrote:
> On 06/10/2016 04:02 AM, Simon Horman wrote:
> 
> >>[...]
> >>
> >>>>>And that the system behaves sanely on suspend/resume.
> >>>>
> >>>>  I'd be thankful if you told me how to test that. :-)
> >>>
> >>>System suspend:
> >>>
> >>>   echo mem > /sys/power/state
> >>
> >>   Oh. I know that one! :-)
> >>
> >>>System resume: You're gonna need a "wakeup-source" in your DTS, e.g. gpio-keys.
> >>>Serial should work too, echo "enabled" to the corresponding wakeup
> >>>file in /sys first.
> >>
> >>   I'm afraid I couldn't find that file. All I saw were RPM controls...
> >>
> >>>In case of issues, try "echo 0 > /sys/module/printk/parameters/console_suspend".
> >>
> >>   There's no problems suspending, it's the resuming that's a problem for me.
> >>
> >>>Good luck!
> >>
> >>   As usual, there was no luck. :-)
> >>
> >>WBR, Sergei
> >
> >Does resume work for UP (i.e. without SMP)?
> 
>    No. My problem with resume is I can't wake up the remote system. I don't
> see the needed 'wakeup' file in
> /sys/devices/platform/soc/e6e60000.serial/...
>     However, if I enable CONFIG_PM_[ADVANCED_]DEBUG and do
> 
> $ echo -n core /sys/.power/pm_test
> 
> the system happily wakes up after a small delay (5 s), w/either SMP or UP kernel.

That seems promising but it seems curious that there is no wakeup file.

On Lager the following procedure works for me using
renesas-devel-20160613-v4.7-rc3 and shmobile defconfig.

0. Add wakeup-source property to serial@e6ce0000 node in DT
1. echo enabled > /sys/devices/platform/e6e60000.serial/tty/ttySC0/power/wakeup
2. echo mem > /sys/power/state
3. Provide input on serial console

* Success! *

> >How did testing CPU hotplug go? Did it work for all CPUs?
> 
>    Sure!

Great!

>    The only problem I'm seeing (again) is the RCAN clock failing to register:
> 
> rcar_gen2_cpg_clocks_init: failed to register cpg_clocks rcan clock (-12)
> 
>    I was going to look at it yesterday but (wrongly) thought it somehow
> cured itself... I'll look at it now.

Is this resolved? If not perhaps you could consider removing the node
in question for now.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-13  7:12                   ` Geert Uytterhoeven
  2016-06-13 11:24                     ` Sergei Shtylyov
@ 2016-06-14  1:08                     ` Kuninori Morimoto
  2016-06-17  2:14                       ` Kuninori Morimoto
  1 sibling, 1 reply; 70+ messages in thread
From: Kuninori Morimoto @ 2016-06-14  1:08 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Sergei Shtylyov, Simon Horman,
	open list:MEDIA DRIVERS FOR RENESAS - FCP, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, devicetree,
	Magnus Damm, Russell King, linux-arm-kernel


Hi Geert

> Right, I had forgotten about that.
> Fortunately the clk-rcar-gen2 driver has a sane failure mode for this case ;-)
> 
> it seems the RCAN clock can just be modeled as a fixed clock. However,
> its divider value isn't clear to me, as 15.9 MHz cannot be generated from PLL1
> using an integer divider. Morimoto-san, can you please ask for clarification?

OK.
Now, I asked to HW team about that.
Please wait.

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-14  0:43                 ` Simon Horman
@ 2016-06-14 21:08                   ` Sergei Shtylyov
  2016-06-16  0:06                     ` Simon Horman
  0 siblings, 1 reply; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-14 21:08 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

Hello.

On 06/14/2016 03:43 AM, Simon Horman wrote:

>>>> [...]
>>>>
>>>>>>> And that the system behaves sanely on suspend/resume.
>>>>>>
>>>>>>  I'd be thankful if you told me how to test that. :-)
>>>>>
>>>>> System suspend:
>>>>>
>>>>>   echo mem > /sys/power/state
>>>>
>>>>   Oh. I know that one! :-)
>>>>
>>>>> System resume: You're gonna need a "wakeup-source" in your DTS, e.g. gpio-keys.
>>>>> Serial should work too, echo "enabled" to the corresponding wakeup
>>>>> file in /sys first.
>>>>
>>>>   I'm afraid I couldn't find that file. All I saw were RPM controls...
>>>>
>>>>> In case of issues, try "echo 0 > /sys/module/printk/parameters/console_suspend".
>>>>
>>>>   There's no problems suspending, it's the resuming that's a problem for me.
>>>>
>>>>> Good luck!
>>>>
>>>>   As usual, there was no luck. :-)
>>>>
>>>> WBR, Sergei
>>>
>>> Does resume work for UP (i.e. without SMP)?
>>
>>    No. My problem with resume is I can't wake up the remote system. I don't
>> see the needed 'wakeup' file in
>> /sys/devices/platform/soc/e6e60000.serial/...
>>     However, if I enable CONFIG_PM_[ADVANCED_]DEBUG and do
>>
>> $ echo -n core /sys/.power/pm_test
>>
>> the system happily wakes up after a small delay (5 s), w/either SMP or UP kernel.
>
> That seems promising but it seems curious that there is no wakeup file.
>
> On Lager the following procedure works for me using
> renesas-devel-20160613-v4.7-rc3 and shmobile defconfig.
>
> 0. Add wakeup-source property to serial@e6ce0000 node in DT

    Ah, stupid me, it was the piece that I'd overlooked!

> 1. echo enabled > /sys/devices/platform/e6e60000.serial/tty/ttySC0/power/wakeup
> 2. echo mem > /sys/power/state
> 3. Provide input on serial console
>
> * Success! *

    Yeah, works now!
    Sorry, I had no previous experience with the PM. Was unsupported feature 
back in MontaVista... :-)

>>> How did testing CPU hotplug go? Did it work for all CPUs?
>>
>>    Sure!
>
> Great!
>
>>    The only problem I'm seeing (again) is the RCAN clock failing to register:
>>
>> rcar_gen2_cpg_clocks_init: failed to register cpg_clocks rcan clock (-12)
>>
>>    I was going to look at it yesterday but (wrongly) thought it somehow
>> cured itself... I'll look at it now.
>
> Is this resolved? If not perhaps you could consider removing the node
> in question for now.

    That's what I did in v5, i.e. removed the RCAN CPG clock (not the whole 
node)...

MBR, Sergei

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-14 21:08                   ` Sergei Shtylyov
@ 2016-06-16  0:06                     ` Simon Horman
  0 siblings, 0 replies; 70+ messages in thread
From: Simon Horman @ 2016-06-16  0:06 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Geert Uytterhoeven, linux-renesas-soc, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, Magnus Damm,
	Russell King, linux-arm-kernel

On Wed, Jun 15, 2016 at 12:08:21AM +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 06/14/2016 03:43 AM, Simon Horman wrote:
> 
> >>>>[...]
> >>>>
> >>>>>>>And that the system behaves sanely on suspend/resume.
> >>>>>>
> >>>>>> I'd be thankful if you told me how to test that. :-)
> >>>>>
> >>>>>System suspend:
> >>>>>
> >>>>>  echo mem > /sys/power/state
> >>>>
> >>>>  Oh. I know that one! :-)
> >>>>
> >>>>>System resume: You're gonna need a "wakeup-source" in your DTS, e.g. gpio-keys.
> >>>>>Serial should work too, echo "enabled" to the corresponding wakeup
> >>>>>file in /sys first.
> >>>>
> >>>>  I'm afraid I couldn't find that file. All I saw were RPM controls...
> >>>>
> >>>>>In case of issues, try "echo 0 > /sys/module/printk/parameters/console_suspend".
> >>>>
> >>>>  There's no problems suspending, it's the resuming that's a problem for me.
> >>>>
> >>>>>Good luck!
> >>>>
> >>>>  As usual, there was no luck. :-)
> >>>>
> >>>>WBR, Sergei
> >>>
> >>>Does resume work for UP (i.e. without SMP)?
> >>
> >>   No. My problem with resume is I can't wake up the remote system. I don't
> >>see the needed 'wakeup' file in
> >>/sys/devices/platform/soc/e6e60000.serial/...
> >>    However, if I enable CONFIG_PM_[ADVANCED_]DEBUG and do
> >>
> >>$ echo -n core /sys/.power/pm_test
> >>
> >>the system happily wakes up after a small delay (5 s), w/either SMP or UP kernel.
> >
> >That seems promising but it seems curious that there is no wakeup file.
> >
> >On Lager the following procedure works for me using
> >renesas-devel-20160613-v4.7-rc3 and shmobile defconfig.
> >
> >0. Add wakeup-source property to serial@e6ce0000 node in DT
> 
>    Ah, stupid me, it was the piece that I'd overlooked!
> 
> >1. echo enabled > /sys/devices/platform/e6e60000.serial/tty/ttySC0/power/wakeup
> >2. echo mem > /sys/power/state
> >3. Provide input on serial console
> >
> >* Success! *
> 
>    Yeah, works now!
>    Sorry, I had no previous experience with the PM. Was unsupported feature
> back in MontaVista... :-)

Great, thanks for your persistence.

FWIW, I always have to refer to some notes in order to exercise PM.

> >>>How did testing CPU hotplug go? Did it work for all CPUs?
> >>
> >>   Sure!
> >
> >Great!
> >
> >>   The only problem I'm seeing (again) is the RCAN clock failing to register:
> >>
> >>rcar_gen2_cpg_clocks_init: failed to register cpg_clocks rcan clock (-12)
> >>
> >>   I was going to look at it yesterday but (wrongly) thought it somehow
> >>cured itself... I'll look at it now.
> >
> >Is this resolved? If not perhaps you could consider removing the node
> >in question for now.
> 
>    That's what I did in v5, i.e. removed the RCAN CPG clock (not the whole
> node)...

Great.

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-14  1:08                     ` Kuninori Morimoto
@ 2016-06-17  2:14                       ` Kuninori Morimoto
  2016-06-17  6:27                         ` Geert Uytterhoeven
  0 siblings, 1 reply; 70+ messages in thread
From: Kuninori Morimoto @ 2016-06-17  2:14 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Geert Uytterhoeven, Sergei Shtylyov, Simon Horman,
	open list:MEDIA DRIVERS FOR RENESAS - FCP, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, devicetree,
	Magnus Damm, Russell King, linux-arm-kernel


Hi Geert

> > Right, I had forgotten about that.
> > Fortunately the clk-rcar-gen2 driver has a sane failure mode for this case ;-)
> > 
> > it seems the RCAN clock can just be modeled as a fixed clock. However,
> > its divider value isn't clear to me, as 15.9 MHz cannot be generated from PLL1
> > using an integer divider. Morimoto-san, can you please ask for clarification?
> 
> OK.
> Now, I asked to HW team about that.
> Please wait.

RCAN divider is fixed for 1/49

PLL1 (= 1560MHz) 
  -> 1/2 (= 780MHz)
    -> RCAN divider 1/49 (= 15.9183..MHz)

Is this clear for you ?

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

* Re: [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree
  2016-06-17  2:14                       ` Kuninori Morimoto
@ 2016-06-17  6:27                         ` Geert Uytterhoeven
  0 siblings, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-17  6:27 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Sergei Shtylyov, Simon Horman,
	open list:MEDIA DRIVERS FOR RENESAS - FCP, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, devicetree,
	Magnus Damm, Russell King, linux-arm-kernel

Hi Morimoto-san,

On Fri, Jun 17, 2016 at 4:14 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>> > Right, I had forgotten about that.
>> > Fortunately the clk-rcar-gen2 driver has a sane failure mode for this case ;-)
>> >
>> > it seems the RCAN clock can just be modeled as a fixed clock. However,
>> > its divider value isn't clear to me, as 15.9 MHz cannot be generated from PLL1
>> > using an integer divider. Morimoto-san, can you please ask for clarification?
>>
>> OK.
>> Now, I asked to HW team about that.
>> Please wait.
>
> RCAN divider is fixed for 1/49
>
> PLL1 (= 1560MHz)
>   -> 1/2 (= 780MHz)
>     -> RCAN divider 1/49 (= 15.9183..MHz)
>
> Is this clear for you ?

Thanks, that's exactly what we need to know.

Gr{oetje,eeting}s,

                        Geert

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

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

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

* Re: [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros
  2016-06-01  0:52   ` Simon Horman
  2016-06-01 13:57     ` Sergei Shtylyov
@ 2016-06-22 19:52     ` Sergei Shtylyov
  2016-06-22 22:33       ` Simon Horman
  1 sibling, 1 reply; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-22 19:52 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

On 06/01/2016 03:52 AM, Simon Horman wrote:

>> Add macros usable by the device tree sources to reference the R8A7792
>> clocks  by index.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>>  include/dt-bindings/clock/r8a7792-clock.h |  104 ++++++++++++++++++++++++++++++
>>  1 file changed, 104 insertions(+)
>>
>> Index: renesas/include/dt-bindings/clock/r8a7792-clock.h
>> ===================================================================
>> --- /dev/null
>> +++ renesas/include/dt-bindings/clock/r8a7792-clock.h
>> @@ -0,0 +1,104 @@
>> +/*
>> + * Copyright (C) 2016 Cogent Embedded, Inc.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + */
>> +
>> +#ifndef __DT_BINDINGS_CLOCK_R8A7792_H__
>> +#define __DT_BINDINGS_CLOCK_R8A7792_H__
>> +
>> +/* CPG */
>> +#define R8A7792_CLK_MAIN		0
>> +#define R8A7792_CLK_PLL0		1
>> +#define R8A7792_CLK_PLL1		2
>> +#define R8A7792_CLK_PLL3		3
>> +#define R8A7792_CLK_LB			4
>> +#define R8A7792_CLK_QSPI		5
>> +#define R8A7792_CLK_SDH			6
>> +#define R8A7792_CLK_SD0			7
>> +#define R8A7792_CLK_SD1			8
>> +#define R8A7792_CLK_Z			9
>
> According to my copy of the documentation (v2.00) SDH, SD0 and SD1 do
> not seem to be provided by the r8a7792 CPG.

    I've just downloaded and opened rev2.00 manual, and still, there's no
CPG registers other than FRQCRB on V2H.

> It does, however, provide RCAN and ADSP which are supported by the CPG
> driver. You may wish to add them now for completeness though from my point
> of view they could also be added later when they are used.

    My copy of the manual says there's no ADSP on V2H, and thus no ADSP clock.

MBR, Sergei

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

* Re: [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros
  2016-06-22 19:52     ` Sergei Shtylyov
@ 2016-06-22 22:33       ` Simon Horman
       [not found]         ` <20160622223330.GA15843-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
  0 siblings, 1 reply; 70+ messages in thread
From: Simon Horman @ 2016-06-22 22:33 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree

On Wed, Jun 22, 2016 at 10:52:04PM +0300, Sergei Shtylyov wrote:
> On 06/01/2016 03:52 AM, Simon Horman wrote:
> 
> >>Add macros usable by the device tree sources to reference the R8A7792
> >>clocks  by index.
> >>
> >>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>
> >>---
> >> include/dt-bindings/clock/r8a7792-clock.h |  104 ++++++++++++++++++++++++++++++
> >> 1 file changed, 104 insertions(+)
> >>
> >>Index: renesas/include/dt-bindings/clock/r8a7792-clock.h
> >>===================================================================
> >>--- /dev/null
> >>+++ renesas/include/dt-bindings/clock/r8a7792-clock.h
> >>@@ -0,0 +1,104 @@
> >>+/*
> >>+ * Copyright (C) 2016 Cogent Embedded, Inc.
> >>+ *
> >>+ * This program is free software; you can redistribute it and/or modify
> >>+ * it under the terms of the GNU General Public License as published by
> >>+ * the Free Software Foundation; either version 2 of the License, or
> >>+ * (at your option) any later version.
> >>+ */
> >>+
> >>+#ifndef __DT_BINDINGS_CLOCK_R8A7792_H__
> >>+#define __DT_BINDINGS_CLOCK_R8A7792_H__
> >>+
> >>+/* CPG */
> >>+#define R8A7792_CLK_MAIN		0
> >>+#define R8A7792_CLK_PLL0		1
> >>+#define R8A7792_CLK_PLL1		2
> >>+#define R8A7792_CLK_PLL3		3
> >>+#define R8A7792_CLK_LB			4
> >>+#define R8A7792_CLK_QSPI		5
> >>+#define R8A7792_CLK_SDH			6
> >>+#define R8A7792_CLK_SD0			7
> >>+#define R8A7792_CLK_SD1			8
> >>+#define R8A7792_CLK_Z			9
> >
> >According to my copy of the documentation (v2.00) SDH, SD0 and SD1 do
> >not seem to be provided by the r8a7792 CPG.
> 
>    I've just downloaded and opened rev2.00 manual, and still, there's no
> CPG registers other than FRQCRB on V2H.
> 
> >It does, however, provide RCAN and ADSP which are supported by the CPG
> >driver. You may wish to add them now for completeness though from my point
> >of view they could also be added later when they are used.
> 
>    My copy of the manual says there's no ADSP on V2H, and thus no ADSP clock.

I was looking at Figure 7.1c. Perhaps it is inaccurate.

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

* Re: [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros
       [not found]         ` <20160622223330.GA15843-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
@ 2016-06-23  7:46           ` Geert Uytterhoeven
  2016-06-23 10:49           ` Sergei Shtylyov
  1 sibling, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2016-06-23  7:46 UTC (permalink / raw)
  To: Simon Horman
  Cc: Sergei Shtylyov, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Thu, Jun 23, 2016 at 12:33 AM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
> On Wed, Jun 22, 2016 at 10:52:04PM +0300, Sergei Shtylyov wrote:
>>    I've just downloaded and opened rev2.00 manual, and still, there's no
>> CPG registers other than FRQCRB on V2H.
>>
>> >It does, however, provide RCAN and ADSP which are supported by the CPG
>> >driver. You may wish to add them now for completeness though from my point
>> >of view they could also be added later when they are used.
>>
>>    My copy of the manual says there's no ADSP on V2H, and thus no ADSP clock.
>
> I was looking at Figure 7.1c. Perhaps it is inaccurate.

Probably, the ADSP is missing for V2H in all other sections of the datasheet:
  - There's no ADSP clock in Table 7.2c,
  - ADSPCKCR does not exist according to Table 7.10,
  - There are no ADSP MSSR bits, interrupts, or micro-TLBs,
  - The audio and ADSP modules do not exist.

Of course that's the datasheet, there may still be actual hardware listening
when you try to talk to it ;-)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros
       [not found]         ` <20160622223330.GA15843-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
  2016-06-23  7:46           ` Geert Uytterhoeven
@ 2016-06-23 10:49           ` Sergei Shtylyov
  1 sibling, 0 replies; 70+ messages in thread
From: Sergei Shtylyov @ 2016-06-23 10:49 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, devicetree-u79uwXL29TY76Z2rM5mHXA

On 6/23/2016 1:33 AM, Simon Horman wrote:

>>>> Add macros usable by the device tree sources to reference the R8A7792
>>>> clocks  by index.
>>>>
>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
>>>>
>>>> ---
>>>> include/dt-bindings/clock/r8a7792-clock.h |  104 ++++++++++++++++++++++++++++++
>>>> 1 file changed, 104 insertions(+)
>>>>
>>>> Index: renesas/include/dt-bindings/clock/r8a7792-clock.h
>>>> ===================================================================
>>>> --- /dev/null
>>>> +++ renesas/include/dt-bindings/clock/r8a7792-clock.h
>>>> @@ -0,0 +1,104 @@
>>>> +/*
>>>> + * Copyright (C) 2016 Cogent Embedded, Inc.
>>>> + *
>>>> + * This program is free software; you can redistribute it and/or modify
>>>> + * it under the terms of the GNU General Public License as published by
>>>> + * the Free Software Foundation; either version 2 of the License, or
>>>> + * (at your option) any later version.
>>>> + */
>>>> +
>>>> +#ifndef __DT_BINDINGS_CLOCK_R8A7792_H__
>>>> +#define __DT_BINDINGS_CLOCK_R8A7792_H__
>>>> +
>>>> +/* CPG */
>>>> +#define R8A7792_CLK_MAIN		0
>>>> +#define R8A7792_CLK_PLL0		1
>>>> +#define R8A7792_CLK_PLL1		2
>>>> +#define R8A7792_CLK_PLL3		3
>>>> +#define R8A7792_CLK_LB			4
>>>> +#define R8A7792_CLK_QSPI		5
>>>> +#define R8A7792_CLK_SDH			6
>>>> +#define R8A7792_CLK_SD0			7
>>>> +#define R8A7792_CLK_SD1			8
>>>> +#define R8A7792_CLK_Z			9
>>>
>>> According to my copy of the documentation (v2.00) SDH, SD0 and SD1 do
>>> not seem to be provided by the r8a7792 CPG.
>>
>>    I've just downloaded and opened rev2.00 manual, and still, there's no
>> CPG registers other than FRQCRB on V2H.
>>
>>> It does, however, provide RCAN and ADSP which are supported by the CPG
>>> driver. You may wish to add them now for completeness though from my point
>>> of view they could also be added later when they are used.
>>
>>    My copy of the manual says there's no ADSP on V2H, and thus no ADSP clock.
>
> I was looking at Figure 7.1c. Perhaps it is inaccurate.

    Indeed, it's the only place where the ADSP clock is mentioned for V2H, and 
it looks like this is in error. I guess I'll try to verify if there's writable 
ADSPCKCR and then remove the ADSP clock if not.

MBR, Sergei

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

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

end of thread, other threads:[~2016-06-23 10:49 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31 22:06 [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Sergei Shtylyov
2016-05-31 22:09 ` [PATCH 01/13] ARM: shmobile: r8a7792: add clock index macros Sergei Shtylyov
2016-06-01  0:52   ` Simon Horman
2016-06-01 13:57     ` Sergei Shtylyov
2016-06-22 19:52     ` Sergei Shtylyov
2016-06-22 22:33       ` Simon Horman
     [not found]         ` <20160622223330.GA15843-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2016-06-23  7:46           ` Geert Uytterhoeven
2016-06-23 10:49           ` Sergei Shtylyov
     [not found]   ` <2280165.siMXMbFrFe-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  7:22     ` Geert Uytterhoeven
2016-06-01 14:09       ` Sergei Shtylyov
2016-05-31 22:11 ` [PATCH 02/13] ARM: shmobile: r8a7792: add power domain " Sergei Shtylyov
2016-06-01  7:32   ` Geert Uytterhoeven
2016-05-31 22:20 ` [PATCH 05/13] DT: clock: rcar-gen2-cpg-clocks: document R8A7792 support Sergei Shtylyov
2016-06-01  0:25   ` Simon Horman
2016-06-01  0:30     ` Simon Horman
2016-06-01  7:50     ` Geert Uytterhoeven
2016-06-01  7:48   ` Geert Uytterhoeven
2016-06-03  1:49   ` Rob Herring
2016-05-31 22:21 ` [PATCH 06/13] DT: clock: cpg-mstp-clocks: document-R8A7792-support Sergei Shtylyov
2016-06-01  0:28   ` Simon Horman
2016-06-01  7:51   ` Geert Uytterhoeven
2016-06-03  1:50   ` Rob Herring
2016-05-31 22:24 ` [PATCH 07/13] ARM: dts: r8a7792: initial SoC device tree Sergei Shtylyov
2016-06-01  0:57   ` Simon Horman
2016-06-01 14:00     ` Sergei Shtylyov
2016-06-06 22:26     ` Sergei Shtylyov
2016-06-07  7:13       ` Geert Uytterhoeven
2016-06-07 20:58         ` Sergei Shtylyov
2016-06-10  1:02           ` Simon Horman
2016-06-10 19:29             ` Sergei Shtylyov
2016-06-10 20:42               ` Geert Uytterhoeven
2016-06-10 20:50                 ` Sergei Shtylyov
2016-06-13  7:12                   ` Geert Uytterhoeven
2016-06-13 11:24                     ` Sergei Shtylyov
     [not found]                       ` <7d93d81d-cca9-e434-6488-0ea839f81663-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-06-13 11:48                         ` Geert Uytterhoeven
2016-06-14  1:08                     ` Kuninori Morimoto
2016-06-17  2:14                       ` Kuninori Morimoto
2016-06-17  6:27                         ` Geert Uytterhoeven
     [not found]               ` <8efb1c7e-5463-2556-744c-d327886d92d4-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-06-14  0:43                 ` Simon Horman
2016-06-14 21:08                   ` Sergei Shtylyov
2016-06-16  0:06                     ` Simon Horman
2016-06-01  9:23   ` Geert Uytterhoeven
2016-05-31 22:25 ` [PATCH 08/13] ARM: dts: r8a7792: add SYS-DMAC support Sergei Shtylyov
2016-06-01  1:03   ` Simon Horman
     [not found]   ` <5621267.GpvUaW18zI-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  8:15     ` Geert Uytterhoeven
2016-05-31 22:26 ` [PATCH 09/13] ARM: dts: r8a7792: add [H]SCIF support Sergei Shtylyov
2016-06-01  1:13   ` Simon Horman
2016-06-03 14:33     ` Sergei Shtylyov
2016-06-01  8:17   ` Geert Uytterhoeven
2016-05-31 22:29 ` [PATCH 10/13] ARM: dts: r8a7792: add IRQC support Sergei Shtylyov
2016-06-01  1:18   ` Simon Horman
2016-06-01 14:02     ` Sergei Shtylyov
     [not found]   ` <3573091.BUvyGW3hVt-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  8:17     ` Geert Uytterhoeven
2016-05-31 22:30 ` [PATCH 11/13] DT: arm: shmobile: document Blanche board Sergei Shtylyov
2016-05-31 23:51   ` Simon Horman
     [not found]     ` <20160531235119.GA20527-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2016-06-01 13:34       ` Sergei Shtylyov
2016-06-01  8:19   ` Geert Uytterhoeven
2016-06-03  1:50   ` Rob Herring
2016-05-31 22:32 ` [PATCH 12/13] ARM: dts: blanche: initial device tree Sergei Shtylyov
2016-06-01  1:21   ` Simon Horman
2016-06-02 21:34     ` Sergei Shtylyov
2016-06-01  8:36   ` Geert Uytterhoeven
2016-05-31 22:33 ` [PATCH 13/13] ARM: dts: blanche: add Ethernet support Sergei Shtylyov
2016-06-01  1:24   ` Simon Horman
     [not found]   ` <1669958.qjJ7i3NBPv-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  8:22     ` Geert Uytterhoeven
2016-06-01 12:16       ` Sergei Shtylyov
     [not found]         ` <a60346f2-2abb-342b-dd20-38d401c4ceb3-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-06-01 12:27           ` Geert Uytterhoeven
2016-06-02 21:33             ` Sergei Shtylyov
     [not found] ` <13205049.n7pM8utpHF-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2016-06-01  7:04   ` [PATCH 00/13] Add R8A7794/SILK board eMMC DT support Geert Uytterhoeven
2016-06-01 10:30     ` Sergei Shtylyov

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