All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Add R8A7794 sound DT support
@ 2016-02-09 21:52 ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:52 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 5 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160208-v4.5-rc3' tag. I'm adding the sound device tree support
for the R8A7794 SoC. The sound patch for the SILK board will be posted RSN. :-)

[1/5] ARM: dts: r8a7794: add audio clocks
[2/5] ARM: dts: r8a7794: add MSTP5 clocks
[3/5] ARM: dts: r8a7794: add MSTP10 clocks
[4/5] ARM: dts: r8a7794: add Audio-DMAC support
[5/5] ARM: dts: r8a7794 add sound support

WBR, Sergei

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

* [PATCH v2 0/5] Add R8A7794 sound DT support
@ 2016-02-09 21:52 ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

   Here's the set of 5 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160208-v4.5-rc3' tag. I'm adding the sound device tree support
for the R8A7794 SoC. The sound patch for the SILK board will be posted RSN. :-)

[1/5] ARM: dts: r8a7794: add audio clocks
[2/5] ARM: dts: r8a7794: add MSTP5 clocks
[3/5] ARM: dts: r8a7794: add MSTP10 clocks
[4/5] ARM: dts: r8a7794: add Audio-DMAC support
[5/5] ARM: dts: r8a7794 add sound support

WBR, Sergei

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

* [PATCH v2 1/5] ARM: dts: r8a7794: add audio clocks
  2016-02-09 21:52 ` Sergei Shtylyov
@ 2016-02-09 21:53   ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:53 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 external audio clocks (signals AUDIO_CLK[ABC]) required by
the sound driver. Boards that provide audio clocks need to override the
clock frequencies.

This patch is based on the commit 0d3dbde84a45 ("ARM: shmobile: r8a7791:
add  audio clock on DTSI").

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

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

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -833,6 +833,30 @@
 			status = "disabled";
 		};
 
+		/*
+		 * 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>;
+			clock-output-names = "audio_clka";
+		};
+		audio_clkb: audio_clkb {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+			clock-output-names = "audio_clkb";
+		};
+		audio_clkc: audio_clkc {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+			clock-output-names = "audio_clkc";
+		};
+
 		/* Special CPG clocks */
 		cpg_clocks: cpg_clocks@e6150000 {
 			compatible = "renesas,r8a7794-cpg-clocks",

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

* [PATCH v2 1/5] ARM: dts: r8a7794: add audio clocks
@ 2016-02-09 21:53   ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:53 UTC (permalink / raw)
  To: linux-arm-kernel

Describe the external audio clocks (signals AUDIO_CLK[ABC]) required by
the sound driver. Boards that provide audio clocks need to override the
clock frequencies.

This patch is based on the commit 0d3dbde84a45 ("ARM: shmobile: r8a7791:
add  audio clock on DTSI").

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

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

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -833,6 +833,30 @@
 			status = "disabled";
 		};
 
+		/*
+		 * 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>;
+			clock-output-names = "audio_clka";
+		};
+		audio_clkb: audio_clkb {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+			clock-output-names = "audio_clkb";
+		};
+		audio_clkc: audio_clkc {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+			clock-output-names = "audio_clkc";
+		};
+
 		/* Special CPG clocks */
 		cpg_clocks: cpg_clocks at e6150000 {
 			compatible = "renesas,r8a7794-cpg-clocks",

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

* [PATCH v2 2/5] ARM: dts: r8a7794: add MSTP5 clocks
  2016-02-09 21:52 ` Sergei Shtylyov
@ 2016-02-09 21:54   ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:54 UTC (permalink / raw)
  To: horms
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

Add some MSTP5 clocks to the R8A7794 device tree.

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

---
Changes in version 2:
- added "the" article to the change log.

 arch/arm/boot/dts/r8a7794.dtsi            |    9 +++++++++
 include/dt-bindings/clock/r8a7794-clock.h |    1 +
 2 files changed, 10 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -1105,6 +1105,15 @@
 			clock-indices = <R8A7794_CLK_IRQC>;
 			clock-output-names = "irqc";
 		};
+		mstp5_clks: mstp5_clks@e6150144 {
+			compatible = "renesas,r8a7794-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 = <R8A7794_CLK_AUDIO_DMAC0
+					 R8A7794_CLK_THERMAL R8A7794_CLK_PWM>;
+			clock-output-names = "audmac0", "thermal", "pwm";
+		};
 		mstp7_clks: mstp7_clks@e615014c {
 			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
Index: renesas/include/dt-bindings/clock/r8a7794-clock.h
===================================================================
--- renesas.orig/include/dt-bindings/clock/r8a7794-clock.h
+++ renesas/include/dt-bindings/clock/r8a7794-clock.h
@@ -64,6 +64,7 @@
 #define R8A7794_CLK_IRQC		7
 
 /* MSTP5 */
+#define R8A7794_CLK_AUDIO_DMAC0		2
 #define R8A7794_CLK_THERMAL		22
 #define R8A7794_CLK_PWM			23
 

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

* [PATCH v2 2/5] ARM: dts: r8a7794: add MSTP5 clocks
@ 2016-02-09 21:54   ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:54 UTC (permalink / raw)
  To: linux-arm-kernel

Add some MSTP5 clocks to the R8A7794 device tree.

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

---
Changes in version 2:
- added "the" article to the change log.

 arch/arm/boot/dts/r8a7794.dtsi            |    9 +++++++++
 include/dt-bindings/clock/r8a7794-clock.h |    1 +
 2 files changed, 10 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -1105,6 +1105,15 @@
 			clock-indices = <R8A7794_CLK_IRQC>;
 			clock-output-names = "irqc";
 		};
+		mstp5_clks: mstp5_clks at e6150144 {
+			compatible = "renesas,r8a7794-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 = <R8A7794_CLK_AUDIO_DMAC0
+					 R8A7794_CLK_THERMAL R8A7794_CLK_PWM>;
+			clock-output-names = "audmac0", "thermal", "pwm";
+		};
 		mstp7_clks: mstp7_clks at e615014c {
 			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
Index: renesas/include/dt-bindings/clock/r8a7794-clock.h
===================================================================
--- renesas.orig/include/dt-bindings/clock/r8a7794-clock.h
+++ renesas/include/dt-bindings/clock/r8a7794-clock.h
@@ -64,6 +64,7 @@
 #define R8A7794_CLK_IRQC		7
 
 /* MSTP5 */
+#define R8A7794_CLK_AUDIO_DMAC0		2
 #define R8A7794_CLK_THERMAL		22
 #define R8A7794_CLK_PWM			23
 

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

* [PATCH v2 3/5] ARM: dts: r8a7794: add MSTP10 clocks
  2016-02-09 21:52 ` Sergei Shtylyov
@ 2016-02-09 21:55   ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:55 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 MSTP10 clocks to the R8A7794 device tree.

This patch is based on the commit ee9141522dcf ("ARM: shmobile: r8a7791:
add MSTP10 support on DTSI").

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

---
Changes in version 2:
- fixed the SoC model in the change log;
- added "the" article to the change log.

 arch/arm/boot/dts/r8a7794.dtsi            |   53 ++++++++++++++++++++++++++++++
 include/dt-bindings/clock/r8a7794-clock.h |   28 +++++++++++++++
 2 files changed, 81 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -1165,6 +1165,59 @@
 				"gpio1", "gpio0", "qspi_mod",
 				"i2c5", "i2c4", "i2c3", "i2c2", "i2c1", "i2c0";
 		};
+		mstp10_clks: mstp10_clks@e6150998 {
+			compatible = "renesas,r8a7794-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+			clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				 <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				 <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>;
+			#clock-cells = <1>;
+			clock-indices = <R8A7794_CLK_SSI_ALL
+					 R8A7794_CLK_SSI9 R8A7794_CLK_SSI8
+					 R8A7794_CLK_SSI7 R8A7794_CLK_SSI6
+					 R8A7794_CLK_SSI5 R8A7794_CLK_SSI4
+					 R8A7794_CLK_SSI3 R8A7794_CLK_SSI2
+					 R8A7794_CLK_SSI1 R8A7794_CLK_SSI0
+					 R8A7794_CLK_SCU_ALL
+					 R8A7794_CLK_SCU_DVC1
+					 R8A7794_CLK_SCU_DVC0
+					 R8A7794_CLK_SCU_CTU1_MIX1
+					 R8A7794_CLK_SCU_CTU0_MIX0
+					 R8A7794_CLK_SCU_SRC9
+					 R8A7794_CLK_SCU_SRC8
+					 R8A7794_CLK_SCU_SRC7
+					 R8A7794_CLK_SCU_SRC6
+					 R8A7794_CLK_SCU_SRC5
+					 R8A7794_CLK_SCU_SRC4
+					 R8A7794_CLK_SCU_SRC3
+					 R8A7794_CLK_SCU_SRC2
+					 R8A7794_CLK_SCU_SRC1
+					 R8A7794_CLK_SCU_SRC0>;
+			clock-output-names = "ssi-all", "ssi9", "ssi8", "ssi7",
+					     "ssi6", "ssi5", "ssi4", "ssi3",
+					     "ssi2", "ssi1", "ssi0",
+					     "scu-all", "scu-dvc1", "scu-dvc0",
+					     "scu-ctu1-mix1", "scu-ctu0-mix0",
+					     "scu-src9", "scu-src8", "scu-src7",
+					     "scu-src6", "scu-src5", "scu-src4",
+					     "scu-src3", "scu-src2", "scu-src1",
+					     "scu-src0";
+		};
 		mstp11_clks: mstp11_clks@e615099c {
 			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe615099c 0 4>, <0 0xe61509ac 0 4>;
Index: renesas/include/dt-bindings/clock/r8a7794-clock.h
===================================================================
--- renesas.orig/include/dt-bindings/clock/r8a7794-clock.h
+++ renesas/include/dt-bindings/clock/r8a7794-clock.h
@@ -103,6 +103,34 @@
 #define R8A7794_CLK_I2C1		30
 #define R8A7794_CLK_I2C0		31
 
+/* MSTP10 */
+#define R8A7794_CLK_SSI_ALL		5
+#define R8A7794_CLK_SSI9		6
+#define R8A7794_CLK_SSI8		7
+#define R8A7794_CLK_SSI7		8
+#define R8A7794_CLK_SSI6		9
+#define R8A7794_CLK_SSI5		10
+#define R8A7794_CLK_SSI4		11
+#define R8A7794_CLK_SSI3		12
+#define R8A7794_CLK_SSI2		13
+#define R8A7794_CLK_SSI1		14
+#define R8A7794_CLK_SSI0		15
+#define R8A7794_CLK_SCU_ALL		17
+#define R8A7794_CLK_SCU_DVC1		18
+#define R8A7794_CLK_SCU_DVC0		19
+#define R8A7794_CLK_SCU_CTU1_MIX1	20
+#define R8A7794_CLK_SCU_CTU0_MIX0	21
+#define R8A7794_CLK_SCU_SRC9		22
+#define R8A7794_CLK_SCU_SRC8		23
+#define R8A7794_CLK_SCU_SRC7		24
+#define R8A7794_CLK_SCU_SRC6		25
+#define R8A7794_CLK_SCU_SRC5		26
+#define R8A7794_CLK_SCU_SRC4		27
+#define R8A7794_CLK_SCU_SRC3		28
+#define R8A7794_CLK_SCU_SRC2		29
+#define R8A7794_CLK_SCU_SRC1		30
+#define R8A7794_CLK_SCU_SRC0		31
+
 /* MSTP11 */
 #define R8A7794_CLK_SCIFA3		6
 #define R8A7794_CLK_SCIFA4		7

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

* [PATCH v2 3/5] ARM: dts: r8a7794: add MSTP10 clocks
@ 2016-02-09 21:55   ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

Add MSTP10 clocks to the R8A7794 device tree.

This patch is based on the commit ee9141522dcf ("ARM: shmobile: r8a7791:
add MSTP10 support on DTSI").

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

---
Changes in version 2:
- fixed the SoC model in the change log;
- added "the" article to the change log.

 arch/arm/boot/dts/r8a7794.dtsi            |   53 ++++++++++++++++++++++++++++++
 include/dt-bindings/clock/r8a7794-clock.h |   28 +++++++++++++++
 2 files changed, 81 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -1165,6 +1165,59 @@
 				"gpio1", "gpio0", "qspi_mod",
 				"i2c5", "i2c4", "i2c3", "i2c2", "i2c1", "i2c0";
 		};
+		mstp10_clks: mstp10_clks at e6150998 {
+			compatible = "renesas,r8a7794-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+			clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				 <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				 <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>,
+				 <&mstp10_clks R8A7794_CLK_SCU_ALL>;
+			#clock-cells = <1>;
+			clock-indices = <R8A7794_CLK_SSI_ALL
+					 R8A7794_CLK_SSI9 R8A7794_CLK_SSI8
+					 R8A7794_CLK_SSI7 R8A7794_CLK_SSI6
+					 R8A7794_CLK_SSI5 R8A7794_CLK_SSI4
+					 R8A7794_CLK_SSI3 R8A7794_CLK_SSI2
+					 R8A7794_CLK_SSI1 R8A7794_CLK_SSI0
+					 R8A7794_CLK_SCU_ALL
+					 R8A7794_CLK_SCU_DVC1
+					 R8A7794_CLK_SCU_DVC0
+					 R8A7794_CLK_SCU_CTU1_MIX1
+					 R8A7794_CLK_SCU_CTU0_MIX0
+					 R8A7794_CLK_SCU_SRC9
+					 R8A7794_CLK_SCU_SRC8
+					 R8A7794_CLK_SCU_SRC7
+					 R8A7794_CLK_SCU_SRC6
+					 R8A7794_CLK_SCU_SRC5
+					 R8A7794_CLK_SCU_SRC4
+					 R8A7794_CLK_SCU_SRC3
+					 R8A7794_CLK_SCU_SRC2
+					 R8A7794_CLK_SCU_SRC1
+					 R8A7794_CLK_SCU_SRC0>;
+			clock-output-names = "ssi-all", "ssi9", "ssi8", "ssi7",
+					     "ssi6", "ssi5", "ssi4", "ssi3",
+					     "ssi2", "ssi1", "ssi0",
+					     "scu-all", "scu-dvc1", "scu-dvc0",
+					     "scu-ctu1-mix1", "scu-ctu0-mix0",
+					     "scu-src9", "scu-src8", "scu-src7",
+					     "scu-src6", "scu-src5", "scu-src4",
+					     "scu-src3", "scu-src2", "scu-src1",
+					     "scu-src0";
+		};
 		mstp11_clks: mstp11_clks at e615099c {
 			compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe615099c 0 4>, <0 0xe61509ac 0 4>;
Index: renesas/include/dt-bindings/clock/r8a7794-clock.h
===================================================================
--- renesas.orig/include/dt-bindings/clock/r8a7794-clock.h
+++ renesas/include/dt-bindings/clock/r8a7794-clock.h
@@ -103,6 +103,34 @@
 #define R8A7794_CLK_I2C1		30
 #define R8A7794_CLK_I2C0		31
 
+/* MSTP10 */
+#define R8A7794_CLK_SSI_ALL		5
+#define R8A7794_CLK_SSI9		6
+#define R8A7794_CLK_SSI8		7
+#define R8A7794_CLK_SSI7		8
+#define R8A7794_CLK_SSI6		9
+#define R8A7794_CLK_SSI5		10
+#define R8A7794_CLK_SSI4		11
+#define R8A7794_CLK_SSI3		12
+#define R8A7794_CLK_SSI2		13
+#define R8A7794_CLK_SSI1		14
+#define R8A7794_CLK_SSI0		15
+#define R8A7794_CLK_SCU_ALL		17
+#define R8A7794_CLK_SCU_DVC1		18
+#define R8A7794_CLK_SCU_DVC0		19
+#define R8A7794_CLK_SCU_CTU1_MIX1	20
+#define R8A7794_CLK_SCU_CTU0_MIX0	21
+#define R8A7794_CLK_SCU_SRC9		22
+#define R8A7794_CLK_SCU_SRC8		23
+#define R8A7794_CLK_SCU_SRC7		24
+#define R8A7794_CLK_SCU_SRC6		25
+#define R8A7794_CLK_SCU_SRC5		26
+#define R8A7794_CLK_SCU_SRC4		27
+#define R8A7794_CLK_SCU_SRC3		28
+#define R8A7794_CLK_SCU_SRC2		29
+#define R8A7794_CLK_SCU_SRC1		30
+#define R8A7794_CLK_SCU_SRC0		31
+
 /* MSTP11 */
 #define R8A7794_CLK_SCIFA3		6
 #define R8A7794_CLK_SCIFA4		7

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

* [PATCH v2 4/5] ARM: dts: r8a7794: add Audio-DMAC support
  2016-02-09 21:52 ` Sergei Shtylyov
@ 2016-02-09 21:56   ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:56 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 Audio-DMAC in the R8A7794 device tree.

This patch is loosely based on the commit 8994fff67761 ("ARM: shmobile:
r8a7791: Add Audio DMAC devices to DT").

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

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

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -281,6 +281,34 @@
 		dma-channels = <15>;
 	};
 
+	audma0: dma-controller@ec700000 {
+		compatible = "renesas,dmac-r8a7794", "renesas,rcar-dmac";
+		reg = <0 0xec700000 0 0x10000>;
+		interrupts =	<GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "error",
+				  "ch0", "ch1", "ch2", "ch3", "ch4", "ch5",
+				  "ch6", "ch7", "ch8", "ch9", "ch10", "ch11",
+				  "ch12";
+		clocks = <&mstp5_clks R8A7794_CLK_AUDIO_DMAC0>;
+		clock-names = "fck";
+		power-domains = <&cpg_clocks>;
+		#dma-cells = <1>;
+		dma-channels = <13>;
+	};
+
 	scifa0: serial@e6c40000 {
 		compatible = "renesas,scifa-r8a7794",
 			     "renesas,rcar-gen2-scifa", "renesas,scifa";

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

* [PATCH v2 4/5] ARM: dts: r8a7794: add Audio-DMAC support
@ 2016-02-09 21:56   ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:56 UTC (permalink / raw)
  To: linux-arm-kernel

Describe Audio-DMAC in the R8A7794 device tree.

This patch is loosely based on the commit 8994fff67761 ("ARM: shmobile:
r8a7791: Add Audio DMAC devices to DT").

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

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

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -281,6 +281,34 @@
 		dma-channels = <15>;
 	};
 
+	audma0: dma-controller at ec700000 {
+		compatible = "renesas,dmac-r8a7794", "renesas,rcar-dmac";
+		reg = <0 0xec700000 0 0x10000>;
+		interrupts =	<GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
+				 GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "error",
+				  "ch0", "ch1", "ch2", "ch3", "ch4", "ch5",
+				  "ch6", "ch7", "ch8", "ch9", "ch10", "ch11",
+				  "ch12";
+		clocks = <&mstp5_clks R8A7794_CLK_AUDIO_DMAC0>;
+		clock-names = "fck";
+		power-domains = <&cpg_clocks>;
+		#dma-cells = <1>;
+		dma-channels = <13>;
+	};
+
 	scifa0: serial at e6c40000 {
 		compatible = "renesas,scifa-r8a7794",
 			     "renesas,rcar-gen2-scifa", "renesas,scifa";

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-09 21:52 ` Sergei Shtylyov
@ 2016-02-09 21:58   ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:58 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

Define the generic R8A7794 part of  the sound device node.
This sound device  is a complex one and comprises the Audio Clock Generator
(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
It is up  to the board file to enable the device.

This patch is based on the R8A7791 sound work by Kuninori Morimoto.

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

---
Changes in version 2:
- added "ctu.[01]", "mix.[01]", "dvc.[01]" to the "clock-names" prop;
- added  CTU/DVC/MIX subnodes;
- removed SRC0/7/8/9 subnodes;
- added missing colon to the subject.

 arch/arm/boot/dts/r8a7794.dtsi |  182 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 182 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -1309,4 +1309,186 @@
 		#iommu-cells = <1>;
 		status = "disabled";
 	};
+
+	rcar_sound: sound@ec500000 {
+		/*
+		 * #sound-dai-cells is required
+		 *
+		 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
+		 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
+		 */
+		compatible = "renesas,rcar_sound-r8a7794",
+			     "renesas,rcar_sound-gen2";
+		reg =	<0 0xec500000 0 0x1000>, /* SCU */
+			<0 0xec5a0000 0 0x100>,  /* ADG */
+			<0 0xec540000 0 0x1000>, /* SSIU */
+			<0 0xec541000 0 0x280>,  /* SSI */
+			<0 0xec740000 0 0x200>;  /* Audio DMAC peri peri */
+		reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
+
+		clocks = <&mstp10_clks R8A7794_CLK_SSI_ALL>,
+			 <&mstp10_clks R8A7794_CLK_SSI9>,
+			 <&mstp10_clks R8A7794_CLK_SSI8>,
+			 <&mstp10_clks R8A7794_CLK_SSI7>,
+			 <&mstp10_clks R8A7794_CLK_SSI6>,
+			 <&mstp10_clks R8A7794_CLK_SSI5>,
+			 <&mstp10_clks R8A7794_CLK_SSI4>,
+			 <&mstp10_clks R8A7794_CLK_SSI3>,
+			 <&mstp10_clks R8A7794_CLK_SSI2>,
+			 <&mstp10_clks R8A7794_CLK_SSI1>,
+			 <&mstp10_clks R8A7794_CLK_SSI0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC9>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC8>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC7>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC6>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC5>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC4>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC3>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC2>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC1>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
+			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
+			 <&mstp10_clks R8A7794_CLK_SCU_DVC0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_DVC1>,
+			 <&audio_clka>, <&audio_clkb>, <&audio_clkc>,
+			 <&m2_clk>;
+		clock-names = "ssi-all",
+			      "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
+			      "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
+			      "src.9", "src.8", "src.7", "src.6", "src.5",
+			      "src.4", "src.3", "src.2", "src.1", "src.0",
+			      "ctu.0", "ctu.1",
+			      "mix.0", "mix.1",
+			      "dvc.0", "dvc.1",
+			      "clk_a", "clk_b", "clk_c", "clk_i";
+		power-domains = <&cpg_clocks>;
+
+		status = "disabled";
+
+		rcar_sound,dvc {
+			dvc0: dvc@0 {
+				dmas = <&audma0 0xbc>;
+				dma-names = "tx";
+			};
+			dvc1: dvc@1 {
+				dmas = <&audma0 0xbe>;
+				dma-names = "tx";
+			};
+		};
+
+		rcar_sound,mix {
+			mix0: mix@0 { };
+			mix1: mix@1 { };
+		};
+
+		rcar_sound,ctu {
+			ctu00: ctu@0 { };
+			ctu01: ctu@1 { };
+			ctu02: ctu@2 { };
+			ctu03: ctu@3 { };
+			ctu10: ctu@4 { };
+			ctu11: ctu@5 { };
+			ctu12: ctu@6 { };
+			ctu13: ctu@7 { };
+		};
+
+		rcar_sound,src {
+			src1: src@1 {
+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
+				dma-names = "rx", "tx";
+			};
+			src2: src@2 {
+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
+				dma-names = "rx", "tx";
+			};
+			src3: src@3 {
+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
+				dma-names = "rx", "tx";
+			};
+			src4: src@4 {
+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
+				dma-names = "rx", "tx";
+			};
+			src5: src@5 {
+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
+				dma-names = "rx", "tx";
+			};
+			src6: src@6 {
+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
+				dma-names = "rx", "tx";
+			};
+		};
+
+		rcar_sound,ssi {
+			ssi0: ssi@0 {
+				interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x01>, <&audma0 0x02>,
+				       <&audma0 0x15>, <&audma0 0x16>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi1: ssi@1 {
+				interrupts = <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x03>, <&audma0 0x04>,
+				       <&audma0 0x49>, <&audma0 0x4a>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi2: ssi@2 {
+				interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x05>, <&audma0 0x06>,
+				       <&audma0 0x63>, <&audma0 0x64>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi3: ssi@3 {
+				interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x07>, <&audma0 0x08>,
+				       <&audma0 0x6f>, <&audma0 0x70>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi4: ssi@4 {
+				interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x09>, <&audma0 0x0a>,
+				       <&audma0 0x71>, <&audma0 0x72>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi5: ssi@5 {
+				interrupts = <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x0b>, <&audma0 0x0c>,
+				       <&audma0 0x73>, <&audma0 0x74>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi6: ssi@6 {
+				interrupts = <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x0d>, <&audma0 0x0e>,
+				       <&audma0 0x75>, <&audma0 0x76>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi7: ssi@7 {
+				interrupts = <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x0f>, <&audma0 0x10>,
+				       <&audma0 0x79>, <&audma0 0x7a>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi8: ssi@8 {
+				interrupts = <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x11>, <&audma0 0x12>,
+				       <&audma0 0x7b>, <&audma0 0x7c>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi9: ssi@9 {
+				interrupts = <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x13>, <&audma0 0x14>,
+				       <&audma0 0x7d>, <&audma0 0x7e>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+		};
+	};
 };

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-09 21:58   ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-09 21:58 UTC (permalink / raw)
  To: linux-arm-kernel

Define the generic R8A7794 part of  the sound device node.
This sound device  is a complex one and comprises the Audio Clock Generator
(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
It is up  to the board file to enable the device.

This patch is based on the R8A7791 sound work by Kuninori Morimoto.

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

---
Changes in version 2:
- added "ctu.[01]", "mix.[01]", "dvc.[01]" to the "clock-names" prop;
- added  CTU/DVC/MIX subnodes;
- removed SRC0/7/8/9 subnodes;
- added missing colon to the subject.

 arch/arm/boot/dts/r8a7794.dtsi |  182 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 182 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
+++ renesas/arch/arm/boot/dts/r8a7794.dtsi
@@ -1309,4 +1309,186 @@
 		#iommu-cells = <1>;
 		status = "disabled";
 	};
+
+	rcar_sound: sound at ec500000 {
+		/*
+		 * #sound-dai-cells is required
+		 *
+		 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
+		 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
+		 */
+		compatible = "renesas,rcar_sound-r8a7794",
+			     "renesas,rcar_sound-gen2";
+		reg =	<0 0xec500000 0 0x1000>, /* SCU */
+			<0 0xec5a0000 0 0x100>,  /* ADG */
+			<0 0xec540000 0 0x1000>, /* SSIU */
+			<0 0xec541000 0 0x280>,  /* SSI */
+			<0 0xec740000 0 0x200>;  /* Audio DMAC peri peri */
+		reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
+
+		clocks = <&mstp10_clks R8A7794_CLK_SSI_ALL>,
+			 <&mstp10_clks R8A7794_CLK_SSI9>,
+			 <&mstp10_clks R8A7794_CLK_SSI8>,
+			 <&mstp10_clks R8A7794_CLK_SSI7>,
+			 <&mstp10_clks R8A7794_CLK_SSI6>,
+			 <&mstp10_clks R8A7794_CLK_SSI5>,
+			 <&mstp10_clks R8A7794_CLK_SSI4>,
+			 <&mstp10_clks R8A7794_CLK_SSI3>,
+			 <&mstp10_clks R8A7794_CLK_SSI2>,
+			 <&mstp10_clks R8A7794_CLK_SSI1>,
+			 <&mstp10_clks R8A7794_CLK_SSI0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC9>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC8>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC7>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC6>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC5>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC4>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC3>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC2>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC1>,
+			 <&mstp10_clks R8A7794_CLK_SCU_SRC0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
+			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
+			 <&mstp10_clks R8A7794_CLK_SCU_DVC0>,
+			 <&mstp10_clks R8A7794_CLK_SCU_DVC1>,
+			 <&audio_clka>, <&audio_clkb>, <&audio_clkc>,
+			 <&m2_clk>;
+		clock-names = "ssi-all",
+			      "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
+			      "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
+			      "src.9", "src.8", "src.7", "src.6", "src.5",
+			      "src.4", "src.3", "src.2", "src.1", "src.0",
+			      "ctu.0", "ctu.1",
+			      "mix.0", "mix.1",
+			      "dvc.0", "dvc.1",
+			      "clk_a", "clk_b", "clk_c", "clk_i";
+		power-domains = <&cpg_clocks>;
+
+		status = "disabled";
+
+		rcar_sound,dvc {
+			dvc0: dvc at 0 {
+				dmas = <&audma0 0xbc>;
+				dma-names = "tx";
+			};
+			dvc1: dvc at 1 {
+				dmas = <&audma0 0xbe>;
+				dma-names = "tx";
+			};
+		};
+
+		rcar_sound,mix {
+			mix0: mix at 0 { };
+			mix1: mix at 1 { };
+		};
+
+		rcar_sound,ctu {
+			ctu00: ctu at 0 { };
+			ctu01: ctu at 1 { };
+			ctu02: ctu at 2 { };
+			ctu03: ctu at 3 { };
+			ctu10: ctu at 4 { };
+			ctu11: ctu at 5 { };
+			ctu12: ctu at 6 { };
+			ctu13: ctu at 7 { };
+		};
+
+		rcar_sound,src {
+			src1: src at 1 {
+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
+				dma-names = "rx", "tx";
+			};
+			src2: src at 2 {
+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
+				dma-names = "rx", "tx";
+			};
+			src3: src at 3 {
+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
+				dma-names = "rx", "tx";
+			};
+			src4: src at 4 {
+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
+				dma-names = "rx", "tx";
+			};
+			src5: src at 5 {
+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
+				dma-names = "rx", "tx";
+			};
+			src6: src at 6 {
+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
+				dma-names = "rx", "tx";
+			};
+		};
+
+		rcar_sound,ssi {
+			ssi0: ssi at 0 {
+				interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x01>, <&audma0 0x02>,
+				       <&audma0 0x15>, <&audma0 0x16>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi1: ssi at 1 {
+				interrupts = <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x03>, <&audma0 0x04>,
+				       <&audma0 0x49>, <&audma0 0x4a>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi2: ssi at 2 {
+				interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x05>, <&audma0 0x06>,
+				       <&audma0 0x63>, <&audma0 0x64>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi3: ssi at 3 {
+				interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x07>, <&audma0 0x08>,
+				       <&audma0 0x6f>, <&audma0 0x70>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi4: ssi at 4 {
+				interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x09>, <&audma0 0x0a>,
+				       <&audma0 0x71>, <&audma0 0x72>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi5: ssi at 5 {
+				interrupts = <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x0b>, <&audma0 0x0c>,
+				       <&audma0 0x73>, <&audma0 0x74>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi6: ssi at 6 {
+				interrupts = <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x0d>, <&audma0 0x0e>,
+				       <&audma0 0x75>, <&audma0 0x76>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi7: ssi at 7 {
+				interrupts = <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x0f>, <&audma0 0x10>,
+				       <&audma0 0x79>, <&audma0 0x7a>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi8: ssi at 8 {
+				interrupts = <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x11>, <&audma0 0x12>,
+				       <&audma0 0x7b>, <&audma0 0x7c>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+			ssi9: ssi at 9 {
+				interrupts = <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>;
+				dmas = <&audma0 0x13>, <&audma0 0x14>,
+				       <&audma0 0x7d>, <&audma0 0x7e>;
+				dma-names = "rx", "tx", "rxu", "txu";
+			};
+		};
+	};
 };

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-09 21:58   ` Sergei Shtylyov
  (?)
@ 2016-02-10  0:41     ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2016-02-10  0:41 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel


Hi Sergei

Sorry for my un-ordered response

> Define the generic R8A7794 part of  the sound device node.
> This sound device  is a complex one and comprises the Audio Clock Generator
> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> It is up  to the board file to enable the device.
> 
> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
(snip)
> +		rcar_sound,src {
> +			src1: src@1 {
> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> +				dma-names = "rx", "tx";
> +			};
> +			src2: src@2 {
> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> +				dma-names = "rx", "tx";
> +			};
> +			src3: src@3 {
> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> +				dma-names = "rx", "tx";
> +			};
> +			src4: src@4 {
> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> +				dma-names = "rx", "tx";
> +			};
> +			src5: src@5 {
> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> +				dma-names = "rx", "tx";
> +			};
> +			src6: src@6 {
> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> +				dma-names = "rx", "tx";
> +			};
> +		};

I think this can't work correctly, because driver is assuming
DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
Can you adds dummy src0 with some comments ? or fix src.c driver ?

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-10  0:41     ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2016-02-10  0:41 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel


Hi Sergei

Sorry for my un-ordered response

> Define the generic R8A7794 part of  the sound device node.
> This sound device  is a complex one and comprises the Audio Clock Generator
> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> It is up  to the board file to enable the device.
> 
> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
(snip)
> +		rcar_sound,src {
> +			src1: src@1 {
> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> +				dma-names = "rx", "tx";
> +			};
> +			src2: src@2 {
> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> +				dma-names = "rx", "tx";
> +			};
> +			src3: src@3 {
> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> +				dma-names = "rx", "tx";
> +			};
> +			src4: src@4 {
> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> +				dma-names = "rx", "tx";
> +			};
> +			src5: src@5 {
> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> +				dma-names = "rx", "tx";
> +			};
> +			src6: src@6 {
> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> +				dma-names = "rx", "tx";
> +			};
> +		};

I think this can't work correctly, because driver is assuming
DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
Can you adds dummy src0 with some comments ? or fix src.c driver ?


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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-10  0:41     ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2016-02-10  0:41 UTC (permalink / raw)
  To: linux-arm-kernel


Hi Sergei

Sorry for my un-ordered response

> Define the generic R8A7794 part of  the sound device node.
> This sound device  is a complex one and comprises the Audio Clock Generator
> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> It is up  to the board file to enable the device.
> 
> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
(snip)
> +		rcar_sound,src {
> +			src1: src at 1 {
> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> +				dma-names = "rx", "tx";
> +			};
> +			src2: src at 2 {
> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> +				dma-names = "rx", "tx";
> +			};
> +			src3: src at 3 {
> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> +				dma-names = "rx", "tx";
> +			};
> +			src4: src at 4 {
> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> +				dma-names = "rx", "tx";
> +			};
> +			src5: src at 5 {
> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> +				dma-names = "rx", "tx";
> +			};
> +			src6: src at 6 {
> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> +				dma-names = "rx", "tx";
> +			};
> +		};

I think this can't work correctly, because driver is assuming
DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
Can you adds dummy src0 with some comments ? or fix src.c driver ?

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-09 21:58   ` Sergei Shtylyov
  (?)
@ 2016-02-10  3:12     ` Kuninori Morimoto
  -1 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2016-02-10  3:12 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel


Hi Sergei, again

> Define the generic R8A7794 part of  the sound device node.
> This sound device  is a complex one and comprises the Audio Clock Generator
> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> It is up  to the board file to enable the device.
> 
> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
(snip)
> +		clocks = <&mstp10_clks R8A7794_CLK_SSI_ALL>,
> +			 <&mstp10_clks R8A7794_CLK_SSI9>,
> +			 <&mstp10_clks R8A7794_CLK_SSI8>,
> +			 <&mstp10_clks R8A7794_CLK_SSI7>,
> +			 <&mstp10_clks R8A7794_CLK_SSI6>,
> +			 <&mstp10_clks R8A7794_CLK_SSI5>,
> +			 <&mstp10_clks R8A7794_CLK_SSI4>,
> +			 <&mstp10_clks R8A7794_CLK_SSI3>,
> +			 <&mstp10_clks R8A7794_CLK_SSI2>,
> +			 <&mstp10_clks R8A7794_CLK_SSI1>,
> +			 <&mstp10_clks R8A7794_CLK_SSI0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC9>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC8>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC7>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC6>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC5>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC4>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC3>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC2>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC1>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC1>,
> +			 <&audio_clka>, <&audio_clkb>, <&audio_clkc>,
> +			 <&m2_clk>;
> +		clock-names = "ssi-all",
> +			      "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
> +			      "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
> +			      "src.9", "src.8", "src.7", "src.6", "src.5",
> +			      "src.4", "src.3", "src.2", "src.1", "src.0",
> +			      "ctu.0", "ctu.1",
> +			      "mix.0", "mix.1",
> +			      "dvc.0", "dvc.1",
> +			      "clk_a", "clk_b", "clk_c", "clk_i";

I'm sorry about my previous email. I think I made you confuse.
I meant you can remove CTU/MIX field if your patch doesn't care these.

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-10  3:12     ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2016-02-10  3:12 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel


Hi Sergei, again

> Define the generic R8A7794 part of  the sound device node.
> This sound device  is a complex one and comprises the Audio Clock Generator
> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> It is up  to the board file to enable the device.
> 
> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
(snip)
> +		clocks = <&mstp10_clks R8A7794_CLK_SSI_ALL>,
> +			 <&mstp10_clks R8A7794_CLK_SSI9>,
> +			 <&mstp10_clks R8A7794_CLK_SSI8>,
> +			 <&mstp10_clks R8A7794_CLK_SSI7>,
> +			 <&mstp10_clks R8A7794_CLK_SSI6>,
> +			 <&mstp10_clks R8A7794_CLK_SSI5>,
> +			 <&mstp10_clks R8A7794_CLK_SSI4>,
> +			 <&mstp10_clks R8A7794_CLK_SSI3>,
> +			 <&mstp10_clks R8A7794_CLK_SSI2>,
> +			 <&mstp10_clks R8A7794_CLK_SSI1>,
> +			 <&mstp10_clks R8A7794_CLK_SSI0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC9>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC8>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC7>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC6>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC5>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC4>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC3>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC2>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC1>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC1>,
> +			 <&audio_clka>, <&audio_clkb>, <&audio_clkc>,
> +			 <&m2_clk>;
> +		clock-names = "ssi-all",
> +			      "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
> +			      "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
> +			      "src.9", "src.8", "src.7", "src.6", "src.5",
> +			      "src.4", "src.3", "src.2", "src.1", "src.0",
> +			      "ctu.0", "ctu.1",
> +			      "mix.0", "mix.1",
> +			      "dvc.0", "dvc.1",
> +			      "clk_a", "clk_b", "clk_c", "clk_i";

I'm sorry about my previous email. I think I made you confuse.
I meant you can remove CTU/MIX field if your patch doesn't care these.

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-10  3:12     ` Kuninori Morimoto
  0 siblings, 0 replies; 42+ messages in thread
From: Kuninori Morimoto @ 2016-02-10  3:12 UTC (permalink / raw)
  To: linux-arm-kernel


Hi Sergei, again

> Define the generic R8A7794 part of  the sound device node.
> This sound device  is a complex one and comprises the Audio Clock Generator
> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> It is up  to the board file to enable the device.
> 
> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
(snip)
> +		clocks = <&mstp10_clks R8A7794_CLK_SSI_ALL>,
> +			 <&mstp10_clks R8A7794_CLK_SSI9>,
> +			 <&mstp10_clks R8A7794_CLK_SSI8>,
> +			 <&mstp10_clks R8A7794_CLK_SSI7>,
> +			 <&mstp10_clks R8A7794_CLK_SSI6>,
> +			 <&mstp10_clks R8A7794_CLK_SSI5>,
> +			 <&mstp10_clks R8A7794_CLK_SSI4>,
> +			 <&mstp10_clks R8A7794_CLK_SSI3>,
> +			 <&mstp10_clks R8A7794_CLK_SSI2>,
> +			 <&mstp10_clks R8A7794_CLK_SSI1>,
> +			 <&mstp10_clks R8A7794_CLK_SSI0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC9>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC8>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC7>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC6>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC5>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC4>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC3>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC2>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC1>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC0>,
> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC1>,
> +			 <&audio_clka>, <&audio_clkb>, <&audio_clkc>,
> +			 <&m2_clk>;
> +		clock-names = "ssi-all",
> +			      "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
> +			      "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
> +			      "src.9", "src.8", "src.7", "src.6", "src.5",
> +			      "src.4", "src.3", "src.2", "src.1", "src.0",
> +			      "ctu.0", "ctu.1",
> +			      "mix.0", "mix.1",
> +			      "dvc.0", "dvc.1",
> +			      "clk_a", "clk_b", "clk_c", "clk_i";

I'm sorry about my previous email. I think I made you confuse.
I meant you can remove CTU/MIX field if your patch doesn't care these.

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-10  0:41     ` Kuninori Morimoto
@ 2016-02-10 17:14       ` Simon Horman
  -1 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-10 17:14 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Sergei Shtylyov, linux-renesas-soc, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm,
	linux, linux-arm-kernel

On Wed, Feb 10, 2016 at 12:41:30AM +0000, Kuninori Morimoto wrote:
> 
> Hi Sergei
> 
> Sorry for my un-ordered response
> 
> > Define the generic R8A7794 part of  the sound device node.
> > This sound device  is a complex one and comprises the Audio Clock Generator
> > (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> > (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> > It is up  to the board file to enable the device.
> > 
> > This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> > 
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> (snip)
> > +		rcar_sound,src {
> > +			src1: src@1 {
> > +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src2: src@2 {
> > +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src3: src@3 {
> > +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src4: src@4 {
> > +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src5: src@5 {
> > +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src6: src@6 {
> > +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +		};
> 
> I think this can't work correctly, because driver is assuming
> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> Can you adds dummy src0 with some comments ? or fix src.c driver ?

I would prefer the driver to be fixed (I had a similar patchset locally
and I found it doesn't work). The reason is that DT should describe
the hardware rather than the current state of the software.

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-10 17:14       ` Simon Horman
  0 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-10 17:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 10, 2016 at 12:41:30AM +0000, Kuninori Morimoto wrote:
> 
> Hi Sergei
> 
> Sorry for my un-ordered response
> 
> > Define the generic R8A7794 part of  the sound device node.
> > This sound device  is a complex one and comprises the Audio Clock Generator
> > (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> > (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> > It is up  to the board file to enable the device.
> > 
> > This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> > 
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> (snip)
> > +		rcar_sound,src {
> > +			src1: src at 1 {
> > +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src2: src at 2 {
> > +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src3: src at 3 {
> > +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src4: src at 4 {
> > +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src5: src at 5 {
> > +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +			src6: src at 6 {
> > +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> > +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> > +				dma-names = "rx", "tx";
> > +			};
> > +		};
> 
> I think this can't work correctly, because driver is assuming
> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> Can you adds dummy src0 with some comments ? or fix src.c driver ?

I would prefer the driver to be fixed (I had a similar patchset locally
and I found it doesn't work). The reason is that DT should describe
the hardware rather than the current state of the software.

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-10  0:41     ` Kuninori Morimoto
@ 2016-02-10 18:09       ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-10 18:09 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

Hello.

On 02/10/2016 03:41 AM, Kuninori Morimoto wrote:

> Sorry for my un-ordered response

    Not sure what you mean by that. :-)

>> Define the generic R8A7794 part of  the sound device node.
>> This sound device  is a complex one and comprises the Audio Clock Generator
>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>> It is up  to the board file to enable the device.
>>
>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> (snip)
>> +		rcar_sound,src {
>> +			src1: src@1 {
>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src2: src@2 {
>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src3: src@3 {
>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src4: src@4 {
>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src5: src@5 {
>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src6: src@6 {
>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +		};
>
> I think this can't work correctly, because driver is assuming
> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)

    At least it doesn't crash and burn. :-)
    Playback and recording still work too.

> Can you adds dummy src0 with some comments ?

    Don't think that's an option. We are supposed to describe the hardware, 
not the driver's behavior.

> or fix src.c driver ?

    Will try to look into it...

MBR, Sergei

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-10 18:09       ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-10 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 02/10/2016 03:41 AM, Kuninori Morimoto wrote:

> Sorry for my un-ordered response

    Not sure what you mean by that. :-)

>> Define the generic R8A7794 part of  the sound device node.
>> This sound device  is a complex one and comprises the Audio Clock Generator
>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>> It is up  to the board file to enable the device.
>>
>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> (snip)
>> +		rcar_sound,src {
>> +			src1: src at 1 {
>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src2: src at 2 {
>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src3: src at 3 {
>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src4: src at 4 {
>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src5: src at 5 {
>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +			src6: src at 6 {
>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>> +				dma-names = "rx", "tx";
>> +			};
>> +		};
>
> I think this can't work correctly, because driver is assuming
> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)

    At least it doesn't crash and burn. :-)
    Playback and recording still work too.

> Can you adds dummy src0 with some comments ?

    Don't think that's an option. We are supposed to describe the hardware, 
not the driver's behavior.

> or fix src.c driver ?

    Will try to look into it...

MBR, Sergei

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-10  3:12     ` Kuninori Morimoto
@ 2016-02-10 18:10       ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-10 18:10 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: horms, linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On 02/10/2016 06:12 AM, Kuninori Morimoto wrote:

>> Define the generic R8A7794 part of  the sound device node.
>> This sound device  is a complex one and comprises the Audio Clock Generator
>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>> It is up  to the board file to enable the device.
>>
>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> (snip)
>> +		clocks = <&mstp10_clks R8A7794_CLK_SSI_ALL>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI9>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI8>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI7>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI6>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI5>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI4>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI3>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI2>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI1>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC9>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC8>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC7>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC6>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC5>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC4>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC3>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC2>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC1>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC1>,
>> +			 <&audio_clka>, <&audio_clkb>, <&audio_clkc>,
>> +			 <&m2_clk>;
>> +		clock-names = "ssi-all",
>> +			      "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
>> +			      "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
>> +			      "src.9", "src.8", "src.7", "src.6", "src.5",
>> +			      "src.4", "src.3", "src.2", "src.1", "src.0",
>> +			      "ctu.0", "ctu.1",
>> +			      "mix.0", "mix.1",
>> +			      "dvc.0", "dvc.1",
>> +			      "clk_a", "clk_b", "clk_c", "clk_i";
>
> I'm sorry about my previous email. I think I made you confuse.
> I meant you can remove CTU/MIX field if your patch doesn't care these.

    No, I got your idea right.
    But I decided to go for a more complete hardware representation, on par 
with the other R-Car SoCs.

MBR, Sergei

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-10 18:10       ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-10 18:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/10/2016 06:12 AM, Kuninori Morimoto wrote:

>> Define the generic R8A7794 part of  the sound device node.
>> This sound device  is a complex one and comprises the Audio Clock Generator
>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>> It is up  to the board file to enable the device.
>>
>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> (snip)
>> +		clocks = <&mstp10_clks R8A7794_CLK_SSI_ALL>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI9>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI8>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI7>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI6>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI5>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI4>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI3>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI2>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI1>,
>> +			 <&mstp10_clks R8A7794_CLK_SSI0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC9>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC8>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC7>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC6>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC5>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC4>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC3>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC2>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC1>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_SRC0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU0_MIX0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_CTU1_MIX1>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC0>,
>> +			 <&mstp10_clks R8A7794_CLK_SCU_DVC1>,
>> +			 <&audio_clka>, <&audio_clkb>, <&audio_clkc>,
>> +			 <&m2_clk>;
>> +		clock-names = "ssi-all",
>> +			      "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
>> +			      "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
>> +			      "src.9", "src.8", "src.7", "src.6", "src.5",
>> +			      "src.4", "src.3", "src.2", "src.1", "src.0",
>> +			      "ctu.0", "ctu.1",
>> +			      "mix.0", "mix.1",
>> +			      "dvc.0", "dvc.1",
>> +			      "clk_a", "clk_b", "clk_c", "clk_i";
>
> I'm sorry about my previous email. I think I made you confuse.
> I meant you can remove CTU/MIX field if your patch doesn't care these.

    No, I got your idea right.
    But I decided to go for a more complete hardware representation, on par 
with the other R-Car SoCs.

MBR, Sergei

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-10 17:14       ` Simon Horman
@ 2016-02-12 16:47         ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-12 16:47 UTC (permalink / raw)
  To: Simon Horman, Kuninori Morimoto
  Cc: linux-renesas-soc, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, devicetree, magnus.damm, linux,
	linux-arm-kernel

On 02/10/2016 08:14 PM, Simon Horman wrote:

>> Sorry for my un-ordered response
>>
>>> Define the generic R8A7794 part of  the sound device node.
>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>> It is up  to the board file to enable the device.
>>>
>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>
>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>> (snip)
>>> +		rcar_sound,src {
>>> +			src1: src@1 {
>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src2: src@2 {
>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src3: src@3 {
>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src4: src@4 {
>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src5: src@5 {
>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src6: src@6 {
>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +		};
>>
>> I think this can't work correctly, because driver is assuming
>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>
> I would prefer the driver to be fixed (I had a similar patchset locally
> and I found it doesn't work).

    You mean you had R8A7794 sound patch set too?

> The reason is that DT should describe
> the hardware rather than the current state of the software.

    Yes, of course. Just tell me do I have to fix the driver *before* this 
patch set is accepted?

MBR, Sergei

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-12 16:47         ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-12 16:47 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/10/2016 08:14 PM, Simon Horman wrote:

>> Sorry for my un-ordered response
>>
>>> Define the generic R8A7794 part of  the sound device node.
>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>> It is up  to the board file to enable the device.
>>>
>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>
>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>> (snip)
>>> +		rcar_sound,src {
>>> +			src1: src at 1 {
>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src2: src at 2 {
>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src3: src at 3 {
>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src4: src at 4 {
>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src5: src at 5 {
>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +			src6: src at 6 {
>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>> +				dma-names = "rx", "tx";
>>> +			};
>>> +		};
>>
>> I think this can't work correctly, because driver is assuming
>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>
> I would prefer the driver to be fixed (I had a similar patchset locally
> and I found it doesn't work).

    You mean you had R8A7794 sound patch set too?

> The reason is that DT should describe
> the hardware rather than the current state of the software.

    Yes, of course. Just tell me do I have to fix the driver *before* this 
patch set is accepted?

MBR, Sergei

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-12 16:47         ` Sergei Shtylyov
@ 2016-02-12 18:43           ` Simon Horman
  -1 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-12 18:43 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Kuninori Morimoto, linux-renesas-soc, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm,
	linux, linux-arm-kernel

On Fri, Feb 12, 2016 at 07:47:45PM +0300, Sergei Shtylyov wrote:
> On 02/10/2016 08:14 PM, Simon Horman wrote:
> 
> >>Sorry for my un-ordered response
> >>
> >>>Define the generic R8A7794 part of  the sound device node.
> >>>This sound device  is a complex one and comprises the Audio Clock Generator
> >>>(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> >>>(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> >>>It is up  to the board file to enable the device.
> >>>
> >>>This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> >>>
> >>>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>(snip)
> >>>+		rcar_sound,src {
> >>>+			src1: src@1 {
> >>>+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src2: src@2 {
> >>>+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src3: src@3 {
> >>>+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src4: src@4 {
> >>>+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src5: src@5 {
> >>>+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src6: src@6 {
> >>>+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+		};
> >>
> >>I think this can't work correctly, because driver is assuming
> >>DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> >>Can you adds dummy src0 with some comments ? or fix src.c driver ?
> >
> >I would prefer the driver to be fixed (I had a similar patchset locally
> >and I found it doesn't work).
> 
>    You mean you had R8A7794 sound patch set too?

Yes, I was working on it recently.
I suppose we should coordinate these things in future to avoid
duplicated effort.

> >The reason is that DT should describe
> >the hardware rather than the current state of the software.
> 
>    Yes, of course. Just tell me do I have to fix the driver *before* this
> patch set is accepted?

I did not entirely get to the bottom of the problem, but I think that at
the very least something needs to be done about the for_each_rsnd_src()
loop in rsnd_src_probe.

My, obviously not satisfactory, hack around there being no src0 was as follows.

diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index 68b439ed22d7..58a447b0785b 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
 
 	for_each_rsnd_src(src, priv, i) {
 		snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
-			 SRC_NAME, i);
+			 SRC_NAME, i + 1);
 
 		clk = devm_clk_get(dev, name);
 		if (IS_ERR(clk))

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-12 18:43           ` Simon Horman
  0 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-12 18:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 12, 2016 at 07:47:45PM +0300, Sergei Shtylyov wrote:
> On 02/10/2016 08:14 PM, Simon Horman wrote:
> 
> >>Sorry for my un-ordered response
> >>
> >>>Define the generic R8A7794 part of  the sound device node.
> >>>This sound device  is a complex one and comprises the Audio Clock Generator
> >>>(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> >>>(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> >>>It is up  to the board file to enable the device.
> >>>
> >>>This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> >>>
> >>>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>(snip)
> >>>+		rcar_sound,src {
> >>>+			src1: src at 1 {
> >>>+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src2: src at 2 {
> >>>+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src3: src at 3 {
> >>>+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src4: src at 4 {
> >>>+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src5: src at 5 {
> >>>+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+			src6: src at 6 {
> >>>+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> >>>+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> >>>+				dma-names = "rx", "tx";
> >>>+			};
> >>>+		};
> >>
> >>I think this can't work correctly, because driver is assuming
> >>DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> >>Can you adds dummy src0 with some comments ? or fix src.c driver ?
> >
> >I would prefer the driver to be fixed (I had a similar patchset locally
> >and I found it doesn't work).
> 
>    You mean you had R8A7794 sound patch set too?

Yes, I was working on it recently.
I suppose we should coordinate these things in future to avoid
duplicated effort.

> >The reason is that DT should describe
> >the hardware rather than the current state of the software.
> 
>    Yes, of course. Just tell me do I have to fix the driver *before* this
> patch set is accepted?

I did not entirely get to the bottom of the problem, but I think that at
the very least something needs to be done about the for_each_rsnd_src()
loop in rsnd_src_probe.

My, obviously not satisfactory, hack around there being no src0 was as follows.

diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index 68b439ed22d7..58a447b0785b 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
 
 	for_each_rsnd_src(src, priv, i) {
 		snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
-			 SRC_NAME, i);
+			 SRC_NAME, i + 1);
 
 		clk = devm_clk_get(dev, name);
 		if (IS_ERR(clk))

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-12 18:43           ` Simon Horman
@ 2016-02-12 19:08             ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-12 19:08 UTC (permalink / raw)
  To: Simon Horman
  Cc: Kuninori Morimoto, linux-renesas-soc, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm,
	linux, linux-arm-kernel

On 02/12/2016 09:43 PM, Simon Horman wrote:

>>>> Sorry for my un-ordered response
>>>>
>>>>> Define the generic R8A7794 part of  the sound device node.
>>>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>>>> It is up  to the board file to enable the device.
>>>>>
>>>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>>>
>>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>> (snip)
>>>>> +		rcar_sound,src {
>>>>> +			src1: src@1 {
>>>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src2: src@2 {
>>>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src3: src@3 {
>>>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src4: src@4 {
>>>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src5: src@5 {
>>>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src6: src@6 {
>>>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +		};
>>>>
>>>> I think this can't work correctly, because driver is assuming
>>>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>>>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>>>
>>> I would prefer the driver to be fixed (I had a similar patchset locally
>>> and I found it doesn't work).
>>
>>     You mean you had R8A7794 sound patch set too?
>
> Yes, I was working on it recently.
> I suppose we should coordinate these things in future to avoid
> duplicated effort.

    Yes, seems a good idea now. :-)

>>> The reason is that DT should describe
>>> the hardware rather than the current state of the software.
>>
>>     Yes, of course. Just tell me do I have to fix the driver *before* this
>> patch set is accepted?

> I did not entirely get to the bottom of the problem, but I think that at
> the very least something needs to be done about the for_each_rsnd_src()
> loop in rsnd_src_probe.

    It's not that it replies to my question. :-)
    So you're looking at this issue yourself?

> My, obviously not satisfactory, hack around there being no src0 was as follows.
>
> diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
> index 68b439ed22d7..58a447b0785b 100644
> --- a/sound/soc/sh/rcar/src.c
> +++ b/sound/soc/sh/rcar/src.c
> @@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
>
>   	for_each_rsnd_src(src, priv, i) {

    Which tree is this? The recent devel branch of renesas.git has 
for_each_child_of_node() here...

>   		snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
> -			 SRC_NAME, i);
> +			 SRC_NAME, i + 1);
>
>   		clk = devm_clk_get(dev, name);
>   		if (IS_ERR(clk))

MBR, Sergei

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-12 19:08             ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-12 19:08 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/12/2016 09:43 PM, Simon Horman wrote:

>>>> Sorry for my un-ordered response
>>>>
>>>>> Define the generic R8A7794 part of  the sound device node.
>>>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>>>> It is up  to the board file to enable the device.
>>>>>
>>>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>>>
>>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>> (snip)
>>>>> +		rcar_sound,src {
>>>>> +			src1: src at 1 {
>>>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src2: src at 2 {
>>>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src3: src at 3 {
>>>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src4: src at 4 {
>>>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src5: src at 5 {
>>>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +			src6: src at 6 {
>>>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>>>> +				dma-names = "rx", "tx";
>>>>> +			};
>>>>> +		};
>>>>
>>>> I think this can't work correctly, because driver is assuming
>>>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>>>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>>>
>>> I would prefer the driver to be fixed (I had a similar patchset locally
>>> and I found it doesn't work).
>>
>>     You mean you had R8A7794 sound patch set too?
>
> Yes, I was working on it recently.
> I suppose we should coordinate these things in future to avoid
> duplicated effort.

    Yes, seems a good idea now. :-)

>>> The reason is that DT should describe
>>> the hardware rather than the current state of the software.
>>
>>     Yes, of course. Just tell me do I have to fix the driver *before* this
>> patch set is accepted?

> I did not entirely get to the bottom of the problem, but I think that at
> the very least something needs to be done about the for_each_rsnd_src()
> loop in rsnd_src_probe.

    It's not that it replies to my question. :-)
    So you're looking at this issue yourself?

> My, obviously not satisfactory, hack around there being no src0 was as follows.
>
> diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
> index 68b439ed22d7..58a447b0785b 100644
> --- a/sound/soc/sh/rcar/src.c
> +++ b/sound/soc/sh/rcar/src.c
> @@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
>
>   	for_each_rsnd_src(src, priv, i) {

    Which tree is this? The recent devel branch of renesas.git has 
for_each_child_of_node() here...

>   		snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
> -			 SRC_NAME, i);
> +			 SRC_NAME, i + 1);
>
>   		clk = devm_clk_get(dev, name);
>   		if (IS_ERR(clk))

MBR, Sergei

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-12 19:08             ` Sergei Shtylyov
@ 2016-02-12 19:33               ` Simon Horman
  -1 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-12 19:33 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Kuninori Morimoto, linux-renesas-soc, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm,
	linux, linux-arm-kernel

On Fri, Feb 12, 2016 at 10:08:54PM +0300, Sergei Shtylyov wrote:
> On 02/12/2016 09:43 PM, Simon Horman wrote:
> 
> >>>>Sorry for my un-ordered response
> >>>>
> >>>>>Define the generic R8A7794 part of  the sound device node.
> >>>>>This sound device  is a complex one and comprises the Audio Clock Generator
> >>>>>(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> >>>>>(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> >>>>>It is up  to the board file to enable the device.
> >>>>>
> >>>>>This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> >>>>>
> >>>>>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>>>(snip)
> >>>>>+		rcar_sound,src {
> >>>>>+			src1: src@1 {
> >>>>>+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src2: src@2 {
> >>>>>+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src3: src@3 {
> >>>>>+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src4: src@4 {
> >>>>>+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src5: src@5 {
> >>>>>+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src6: src@6 {
> >>>>>+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+		};
> >>>>
> >>>>I think this can't work correctly, because driver is assuming
> >>>>DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> >>>>Can you adds dummy src0 with some comments ? or fix src.c driver ?
> >>>
> >>>I would prefer the driver to be fixed (I had a similar patchset locally
> >>>and I found it doesn't work).
> >>
> >>    You mean you had R8A7794 sound patch set too?
> >
> >Yes, I was working on it recently.
> >I suppose we should coordinate these things in future to avoid
> >duplicated effort.
> 
>    Yes, seems a good idea now. :-)
> 
> >>>The reason is that DT should describe
> >>>the hardware rather than the current state of the software.
> >>
> >>    Yes, of course. Just tell me do I have to fix the driver *before* this
> >>patch set is accepted?
> 
> >I did not entirely get to the bottom of the problem, but I think that at
> >the very least something needs to be done about the for_each_rsnd_src()
> >loop in rsnd_src_probe.
> 
>    It's not that it replies to my question. :-)
>    So you're looking at this issue yourself?

I have not got very far, as you can see, but I was planning to look into it.
I don't mind if you want to do so.

> >My, obviously not satisfactory, hack around there being no src0 was as follows.
> >
> >diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
> >index 68b439ed22d7..58a447b0785b 100644
> >--- a/sound/soc/sh/rcar/src.c
> >+++ b/sound/soc/sh/rcar/src.c
> >@@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
> >
> >  	for_each_rsnd_src(src, priv, i) {
> 
>    Which tree is this? The recent devel branch of renesas.git has
> for_each_child_of_node() here...

renesas-devel-20160118-v4.4

I guess the code in question updated in v4.5-rcX.

> >  		snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
> >-			 SRC_NAME, i);
> >+			 SRC_NAME, i + 1);
> >
> >  		clk = devm_clk_get(dev, name);
> >  		if (IS_ERR(clk))
> 
> MBR, Sergei

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-12 19:33               ` Simon Horman
  0 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-12 19:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 12, 2016 at 10:08:54PM +0300, Sergei Shtylyov wrote:
> On 02/12/2016 09:43 PM, Simon Horman wrote:
> 
> >>>>Sorry for my un-ordered response
> >>>>
> >>>>>Define the generic R8A7794 part of  the sound device node.
> >>>>>This sound device  is a complex one and comprises the Audio Clock Generator
> >>>>>(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> >>>>>(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> >>>>>It is up  to the board file to enable the device.
> >>>>>
> >>>>>This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> >>>>>
> >>>>>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>>>(snip)
> >>>>>+		rcar_sound,src {
> >>>>>+			src1: src at 1 {
> >>>>>+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src2: src at 2 {
> >>>>>+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src3: src at 3 {
> >>>>>+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src4: src at 4 {
> >>>>>+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src5: src at 5 {
> >>>>>+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+			src6: src at 6 {
> >>>>>+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> >>>>>+				dma-names = "rx", "tx";
> >>>>>+			};
> >>>>>+		};
> >>>>
> >>>>I think this can't work correctly, because driver is assuming
> >>>>DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> >>>>Can you adds dummy src0 with some comments ? or fix src.c driver ?
> >>>
> >>>I would prefer the driver to be fixed (I had a similar patchset locally
> >>>and I found it doesn't work).
> >>
> >>    You mean you had R8A7794 sound patch set too?
> >
> >Yes, I was working on it recently.
> >I suppose we should coordinate these things in future to avoid
> >duplicated effort.
> 
>    Yes, seems a good idea now. :-)
> 
> >>>The reason is that DT should describe
> >>>the hardware rather than the current state of the software.
> >>
> >>    Yes, of course. Just tell me do I have to fix the driver *before* this
> >>patch set is accepted?
> 
> >I did not entirely get to the bottom of the problem, but I think that at
> >the very least something needs to be done about the for_each_rsnd_src()
> >loop in rsnd_src_probe.
> 
>    It's not that it replies to my question. :-)
>    So you're looking at this issue yourself?

I have not got very far, as you can see, but I was planning to look into it.
I don't mind if you want to do so.

> >My, obviously not satisfactory, hack around there being no src0 was as follows.
> >
> >diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
> >index 68b439ed22d7..58a447b0785b 100644
> >--- a/sound/soc/sh/rcar/src.c
> >+++ b/sound/soc/sh/rcar/src.c
> >@@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
> >
> >  	for_each_rsnd_src(src, priv, i) {
> 
>    Which tree is this? The recent devel branch of renesas.git has
> for_each_child_of_node() here...

renesas-devel-20160118-v4.4

I guess the code in question updated in v4.5-rcX.

> >  		snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
> >-			 SRC_NAME, i);
> >+			 SRC_NAME, i + 1);
> >
> >  		clk = devm_clk_get(dev, name);
> >  		if (IS_ERR(clk))
> 
> MBR, Sergei

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-12 19:33               ` Simon Horman
@ 2016-02-12 19:57                 ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-12 19:57 UTC (permalink / raw)
  To: Simon Horman
  Cc: Kuninori Morimoto, linux-renesas-soc, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm,
	linux, linux-arm-kernel

On 02/12/2016 10:33 PM, Simon Horman wrote:

>>>>>> Sorry for my un-ordered response
>>>>>>
>>>>>>> Define the generic R8A7794 part of  the sound device node.
>>>>>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>>>>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>>>>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>>>>>> It is up  to the board file to enable the device.
>>>>>>>
>>>>>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>>>>>
>>>>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>>>> (snip)
>>>>>>> +		rcar_sound,src {
>>>>>>> +			src1: src@1 {
>>>>>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src2: src@2 {
>>>>>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src3: src@3 {
>>>>>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src4: src@4 {
>>>>>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src5: src@5 {
>>>>>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src6: src@6 {
>>>>>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +		};
>>>>>>
>>>>>> I think this can't work correctly, because driver is assuming
>>>>>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>>>>>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>>>>>
>>>>> I would prefer the driver to be fixed (I had a similar patchset locally
>>>>> and I found it doesn't work).
>>>>
>>>>     You mean you had R8A7794 sound patch set too?
>>>
>>> Yes, I was working on it recently.
>>> I suppose we should coordinate these things in future to avoid
>>> duplicated effort.
>>
>>     Yes, seems a good idea now. :-)
>>
>>>>> The reason is that DT should describe
>>>>> the hardware rather than the current state of the software.
>>>>
>>>>     Yes, of course. Just tell me do I have to fix the driver *before* this
>>>> patch set is accepted?
>>
>>> I did not entirely get to the bottom of the problem, but I think that at
>>> the very least something needs to be done about the for_each_rsnd_src()
>>> loop in rsnd_src_probe.
>>
>>     It's not that it replies to my question. :-)
>>     So you're looking at this issue yourself?
>
> I have not got very far, as you can see, but I was planning to look into it.
> I don't mind if you want to do so.

    After consultation with the management, I'm going to look into this issue 
myself. :-)

>>> My, obviously not satisfactory, hack around there being no src0 was as follows.
>>>
>>> diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
>>> index 68b439ed22d7..58a447b0785b 100644
>>> --- a/sound/soc/sh/rcar/src.c
>>> +++ b/sound/soc/sh/rcar/src.c
>>> @@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
>>>
>>>   	for_each_rsnd_src(src, priv, i) {
>>
>>     Which tree is this? The recent devel branch of renesas.git has
>> for_each_child_of_node() here...
>
> renesas-devel-20160118-v4.4

    Ah! :-)

> I guess the code in question updated in v4.5-rcX.

    Probably...

[...]

MBR, Sergei

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-12 19:57                 ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-12 19:57 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/12/2016 10:33 PM, Simon Horman wrote:

>>>>>> Sorry for my un-ordered response
>>>>>>
>>>>>>> Define the generic R8A7794 part of  the sound device node.
>>>>>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>>>>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>>>>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>>>>>> It is up  to the board file to enable the device.
>>>>>>>
>>>>>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>>>>>
>>>>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>>>> (snip)
>>>>>>> +		rcar_sound,src {
>>>>>>> +			src1: src at 1 {
>>>>>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src2: src at 2 {
>>>>>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src3: src at 3 {
>>>>>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src4: src at 4 {
>>>>>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src5: src at 5 {
>>>>>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +			src6: src at 6 {
>>>>>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>>>>>> +				dma-names = "rx", "tx";
>>>>>>> +			};
>>>>>>> +		};
>>>>>>
>>>>>> I think this can't work correctly, because driver is assuming
>>>>>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>>>>>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>>>>>
>>>>> I would prefer the driver to be fixed (I had a similar patchset locally
>>>>> and I found it doesn't work).
>>>>
>>>>     You mean you had R8A7794 sound patch set too?
>>>
>>> Yes, I was working on it recently.
>>> I suppose we should coordinate these things in future to avoid
>>> duplicated effort.
>>
>>     Yes, seems a good idea now. :-)
>>
>>>>> The reason is that DT should describe
>>>>> the hardware rather than the current state of the software.
>>>>
>>>>     Yes, of course. Just tell me do I have to fix the driver *before* this
>>>> patch set is accepted?
>>
>>> I did not entirely get to the bottom of the problem, but I think that at
>>> the very least something needs to be done about the for_each_rsnd_src()
>>> loop in rsnd_src_probe.
>>
>>     It's not that it replies to my question. :-)
>>     So you're looking at this issue yourself?
>
> I have not got very far, as you can see, but I was planning to look into it.
> I don't mind if you want to do so.

    After consultation with the management, I'm going to look into this issue 
myself. :-)

>>> My, obviously not satisfactory, hack around there being no src0 was as follows.
>>>
>>> diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
>>> index 68b439ed22d7..58a447b0785b 100644
>>> --- a/sound/soc/sh/rcar/src.c
>>> +++ b/sound/soc/sh/rcar/src.c
>>> @@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
>>>
>>>   	for_each_rsnd_src(src, priv, i) {
>>
>>     Which tree is this? The recent devel branch of renesas.git has
>> for_each_child_of_node() here...
>
> renesas-devel-20160118-v4.4

    Ah! :-)

> I guess the code in question updated in v4.5-rcX.

    Probably...

[...]

MBR, Sergei

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-12 19:57                 ` Sergei Shtylyov
@ 2016-02-17  5:38                   ` Simon Horman
  -1 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-17  5:38 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Kuninori Morimoto, linux-renesas-soc, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm,
	linux, linux-arm-kernel

On Fri, Feb 12, 2016 at 10:57:06PM +0300, Sergei Shtylyov wrote:
> On 02/12/2016 10:33 PM, Simon Horman wrote:
> 
> >>>>>>Sorry for my un-ordered response
> >>>>>>
> >>>>>>>Define the generic R8A7794 part of  the sound device node.
> >>>>>>>This sound device  is a complex one and comprises the Audio Clock Generator
> >>>>>>>(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> >>>>>>>(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> >>>>>>>It is up  to the board file to enable the device.
> >>>>>>>
> >>>>>>>This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> >>>>>>>
> >>>>>>>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>>>>>(snip)
> >>>>>>>+		rcar_sound,src {
> >>>>>>>+			src1: src@1 {
> >>>>>>>+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src2: src@2 {
> >>>>>>>+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src3: src@3 {
> >>>>>>>+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src4: src@4 {
> >>>>>>>+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src5: src@5 {
> >>>>>>>+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src6: src@6 {
> >>>>>>>+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+		};
> >>>>>>
> >>>>>>I think this can't work correctly, because driver is assuming
> >>>>>>DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> >>>>>>Can you adds dummy src0 with some comments ? or fix src.c driver ?
> >>>>>
> >>>>>I would prefer the driver to be fixed (I had a similar patchset locally
> >>>>>and I found it doesn't work).
> >>>>
> >>>>    You mean you had R8A7794 sound patch set too?
> >>>
> >>>Yes, I was working on it recently.
> >>>I suppose we should coordinate these things in future to avoid
> >>>duplicated effort.
> >>
> >>    Yes, seems a good idea now. :-)
> >>
> >>>>>The reason is that DT should describe
> >>>>>the hardware rather than the current state of the software.
> >>>>
> >>>>    Yes, of course. Just tell me do I have to fix the driver *before* this
> >>>>patch set is accepted?
> >>
> >>>I did not entirely get to the bottom of the problem, but I think that at
> >>>the very least something needs to be done about the for_each_rsnd_src()
> >>>loop in rsnd_src_probe.
> >>
> >>    It's not that it replies to my question. :-)
> >>    So you're looking at this issue yourself?
> >
> >I have not got very far, as you can see, but I was planning to look into it.
> >I don't mind if you want to do so.
> 
>    After consultation with the management, I'm going to look into this issue
> myself. :-)

Excellent.

FWIW, I can test anything you come up with for the r8a7794 an alt board
or post patches for it once you have r8a7794/silk sorted out.

> >>>My, obviously not satisfactory, hack around there being no src0 was as follows.
> >>>
> >>>diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
> >>>index 68b439ed22d7..58a447b0785b 100644
> >>>--- a/sound/soc/sh/rcar/src.c
> >>>+++ b/sound/soc/sh/rcar/src.c
> >>>@@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
> >>>
> >>>  	for_each_rsnd_src(src, priv, i) {
> >>
> >>    Which tree is this? The recent devel branch of renesas.git has
> >>for_each_child_of_node() here...
> >
> >renesas-devel-20160118-v4.4
> 
>    Ah! :-)
> 
> >I guess the code in question updated in v4.5-rcX.
> 
>    Probably...
> 
> [...]
> 
> MBR, Sergei

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-17  5:38                   ` Simon Horman
  0 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-17  5:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 12, 2016 at 10:57:06PM +0300, Sergei Shtylyov wrote:
> On 02/12/2016 10:33 PM, Simon Horman wrote:
> 
> >>>>>>Sorry for my un-ordered response
> >>>>>>
> >>>>>>>Define the generic R8A7794 part of  the sound device node.
> >>>>>>>This sound device  is a complex one and comprises the Audio Clock Generator
> >>>>>>>(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> >>>>>>>(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> >>>>>>>It is up  to the board file to enable the device.
> >>>>>>>
> >>>>>>>This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> >>>>>>>
> >>>>>>>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>>>>>(snip)
> >>>>>>>+		rcar_sound,src {
> >>>>>>>+			src1: src at 1 {
> >>>>>>>+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src2: src at 2 {
> >>>>>>>+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src3: src at 3 {
> >>>>>>>+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src4: src at 4 {
> >>>>>>>+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src5: src at 5 {
> >>>>>>>+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+			src6: src at 6 {
> >>>>>>>+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> >>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>+			};
> >>>>>>>+		};
> >>>>>>
> >>>>>>I think this can't work correctly, because driver is assuming
> >>>>>>DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> >>>>>>Can you adds dummy src0 with some comments ? or fix src.c driver ?
> >>>>>
> >>>>>I would prefer the driver to be fixed (I had a similar patchset locally
> >>>>>and I found it doesn't work).
> >>>>
> >>>>    You mean you had R8A7794 sound patch set too?
> >>>
> >>>Yes, I was working on it recently.
> >>>I suppose we should coordinate these things in future to avoid
> >>>duplicated effort.
> >>
> >>    Yes, seems a good idea now. :-)
> >>
> >>>>>The reason is that DT should describe
> >>>>>the hardware rather than the current state of the software.
> >>>>
> >>>>    Yes, of course. Just tell me do I have to fix the driver *before* this
> >>>>patch set is accepted?
> >>
> >>>I did not entirely get to the bottom of the problem, but I think that at
> >>>the very least something needs to be done about the for_each_rsnd_src()
> >>>loop in rsnd_src_probe.
> >>
> >>    It's not that it replies to my question. :-)
> >>    So you're looking at this issue yourself?
> >
> >I have not got very far, as you can see, but I was planning to look into it.
> >I don't mind if you want to do so.
> 
>    After consultation with the management, I'm going to look into this issue
> myself. :-)

Excellent.

FWIW, I can test anything you come up with for the r8a7794 an alt board
or post patches for it once you have r8a7794/silk sorted out.

> >>>My, obviously not satisfactory, hack around there being no src0 was as follows.
> >>>
> >>>diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
> >>>index 68b439ed22d7..58a447b0785b 100644
> >>>--- a/sound/soc/sh/rcar/src.c
> >>>+++ b/sound/soc/sh/rcar/src.c
> >>>@@ -1072,7 +1072,7 @@ int rsnd_src_probe(struct platform_device *pdev,
> >>>
> >>>  	for_each_rsnd_src(src, priv, i) {
> >>
> >>    Which tree is this? The recent devel branch of renesas.git has
> >>for_each_child_of_node() here...
> >
> >renesas-devel-20160118-v4.4
> 
>    Ah! :-)
> 
> >I guess the code in question updated in v4.5-rcX.
> 
>    Probably...
> 
> [...]
> 
> MBR, Sergei

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-17  5:38                   ` Simon Horman
@ 2016-02-17 19:07                     ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-17 19:07 UTC (permalink / raw)
  To: Simon Horman
  Cc: Kuninori Morimoto, linux-renesas-soc, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm,
	linux, linux-arm-kernel

On 02/17/2016 08:38 AM, Simon Horman wrote:

>>>>>>>>> Define the generic R8A7794 part of  the sound device node.
>>>>>>>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>>>>>>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>>>>>>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>>>>>>>> It is up  to the board file to enable the device.
>>>>>>>>>
>>>>>>>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>>>>>> (snip)
>>>>>>>>> +		rcar_sound,src {
>>>>>>>>> +			src1: src@1 {
>>>>>>>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src2: src@2 {
>>>>>>>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src3: src@3 {
>>>>>>>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src4: src@4 {
>>>>>>>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src5: src@5 {
>>>>>>>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src6: src@6 {
>>>>>>>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +		};
>>>>>>>>
>>>>>>>> I think this can't work correctly, because driver is assuming
>>>>>>>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>>>>>>>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>>>>>>>
>>>>>>> I would prefer the driver to be fixed (I had a similar patchset locally
>>>>>>> and I found it doesn't work).
>>>>>>
>>>>>>     You mean you had R8A7794 sound patch set too?
>>>>>
>>>>> Yes, I was working on it recently.
>>>>> I suppose we should coordinate these things in future to avoid
>>>>> duplicated effort.
>>>>
>>>>     Yes, seems a good idea now. :-)
>>>>
>>>>>>> The reason is that DT should describe
>>>>>>> the hardware rather than the current state of the software.
>>>>>>
>>>>>>     Yes, of course. Just tell me do I have to fix the driver *before* this
>>>>>> patch set is accepted?
>>>>
>>>>> I did not entirely get to the bottom of the problem, but I think that at
>>>>> the very least something needs to be done about the for_each_rsnd_src()
>>>>> loop in rsnd_src_probe.
>>>>
>>>>     It's not that it replies to my question. :-)
>>>>     So you're looking at this issue yourself?
>>>
>>> I have not got very far, as you can see, but I was planning to look into it.
>>> I don't mind if you want to do so.
>>
>>     After consultation with the management, I'm going to look into this issue
>> myself. :-)
>
> Excellent.

    But not immediately. I have some other things to look at before that (DU 
and AVB), they'll going to take some (significant) time... :-(

> FWIW, I can test anything you come up with for the r8a7794 an alt board

    I have remote access to Alt now, in fact using it currently for the AVB work.

> or post patches for it once you have r8a7794/silk sorted out.

    I already have audio on these working. Or you're going to wait until I fix 
the SRC issue?

[...]

MBR, Sergei

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-17 19:07                     ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-17 19:07 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/17/2016 08:38 AM, Simon Horman wrote:

>>>>>>>>> Define the generic R8A7794 part of  the sound device node.
>>>>>>>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>>>>>>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>>>>>>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>>>>>>>> It is up  to the board file to enable the device.
>>>>>>>>>
>>>>>>>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>>>>>> (snip)
>>>>>>>>> +		rcar_sound,src {
>>>>>>>>> +			src1: src at 1 {
>>>>>>>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src2: src at 2 {
>>>>>>>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src3: src at 3 {
>>>>>>>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src4: src at 4 {
>>>>>>>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src5: src at 5 {
>>>>>>>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +			src6: src at 6 {
>>>>>>>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>> +			};
>>>>>>>>> +		};
>>>>>>>>
>>>>>>>> I think this can't work correctly, because driver is assuming
>>>>>>>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>>>>>>>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>>>>>>>
>>>>>>> I would prefer the driver to be fixed (I had a similar patchset locally
>>>>>>> and I found it doesn't work).
>>>>>>
>>>>>>     You mean you had R8A7794 sound patch set too?
>>>>>
>>>>> Yes, I was working on it recently.
>>>>> I suppose we should coordinate these things in future to avoid
>>>>> duplicated effort.
>>>>
>>>>     Yes, seems a good idea now. :-)
>>>>
>>>>>>> The reason is that DT should describe
>>>>>>> the hardware rather than the current state of the software.
>>>>>>
>>>>>>     Yes, of course. Just tell me do I have to fix the driver *before* this
>>>>>> patch set is accepted?
>>>>
>>>>> I did not entirely get to the bottom of the problem, but I think that at
>>>>> the very least something needs to be done about the for_each_rsnd_src()
>>>>> loop in rsnd_src_probe.
>>>>
>>>>     It's not that it replies to my question. :-)
>>>>     So you're looking at this issue yourself?
>>>
>>> I have not got very far, as you can see, but I was planning to look into it.
>>> I don't mind if you want to do so.
>>
>>     After consultation with the management, I'm going to look into this issue
>> myself. :-)
>
> Excellent.

    But not immediately. I have some other things to look at before that (DU 
and AVB), they'll going to take some (significant) time... :-(

> FWIW, I can test anything you come up with for the r8a7794 an alt board

    I have remote access to Alt now, in fact using it currently for the AVB work.

> or post patches for it once you have r8a7794/silk sorted out.

    I already have audio on these working. Or you're going to wait until I fix 
the SRC issue?

[...]

MBR, Sergei

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-17 19:07                     ` Sergei Shtylyov
@ 2016-02-17 23:48                       ` Simon Horman
  -1 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-17 23:48 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Kuninori Morimoto, linux-renesas-soc, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm,
	linux, linux-arm-kernel

On Wed, Feb 17, 2016 at 10:07:50PM +0300, Sergei Shtylyov wrote:
> On 02/17/2016 08:38 AM, Simon Horman wrote:
> 
> >>>>>>>>>Define the generic R8A7794 part of  the sound device node.
> >>>>>>>>>This sound device  is a complex one and comprises the Audio Clock Generator
> >>>>>>>>>(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> >>>>>>>>>(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> >>>>>>>>>It is up  to the board file to enable the device.
> >>>>>>>>>
> >>>>>>>>>This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> >>>>>>>>>
> >>>>>>>>>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>>>>>>>(snip)
> >>>>>>>>>+		rcar_sound,src {
> >>>>>>>>>+			src1: src@1 {
> >>>>>>>>>+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src2: src@2 {
> >>>>>>>>>+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src3: src@3 {
> >>>>>>>>>+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src4: src@4 {
> >>>>>>>>>+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src5: src@5 {
> >>>>>>>>>+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src6: src@6 {
> >>>>>>>>>+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+		};
> >>>>>>>>
> >>>>>>>>I think this can't work correctly, because driver is assuming
> >>>>>>>>DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> >>>>>>>>Can you adds dummy src0 with some comments ? or fix src.c driver ?
> >>>>>>>
> >>>>>>>I would prefer the driver to be fixed (I had a similar patchset locally
> >>>>>>>and I found it doesn't work).
> >>>>>>
> >>>>>>    You mean you had R8A7794 sound patch set too?
> >>>>>
> >>>>>Yes, I was working on it recently.
> >>>>>I suppose we should coordinate these things in future to avoid
> >>>>>duplicated effort.
> >>>>
> >>>>    Yes, seems a good idea now. :-)
> >>>>
> >>>>>>>The reason is that DT should describe
> >>>>>>>the hardware rather than the current state of the software.
> >>>>>>
> >>>>>>    Yes, of course. Just tell me do I have to fix the driver *before* this
> >>>>>>patch set is accepted?
> >>>>
> >>>>>I did not entirely get to the bottom of the problem, but I think that at
> >>>>>the very least something needs to be done about the for_each_rsnd_src()
> >>>>>loop in rsnd_src_probe.
> >>>>
> >>>>    It's not that it replies to my question. :-)
> >>>>    So you're looking at this issue yourself?
> >>>
> >>>I have not got very far, as you can see, but I was planning to look into it.
> >>>I don't mind if you want to do so.
> >>
> >>    After consultation with the management, I'm going to look into this issue
> >>myself. :-)
> >
> >Excellent.
> 
>    But not immediately. I have some other things to look at before that (DU
> and AVB), they'll going to take some (significant) time... :-(
> 
> >FWIW, I can test anything you come up with for the r8a7794 an alt board
> 
>    I have remote access to Alt now, in fact using it currently for the AVB work.
> 
> >or post patches for it once you have r8a7794/silk sorted out.
> 
>    I already have audio on these working. Or you're going to wait until I
> fix the SRC issue?

I'm happy to merge a subset of your r8a7794/silk patches,
that don't touch the SRC issue if you think that is appropriate.
>From there I could get similar functionality running on the Alt - I don't
expect that to be a difficult task. And then when you come back to the SRC
issue we can enhance support for r8a7794/silk,alt.

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-17 23:48                       ` Simon Horman
  0 siblings, 0 replies; 42+ messages in thread
From: Simon Horman @ 2016-02-17 23:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 17, 2016 at 10:07:50PM +0300, Sergei Shtylyov wrote:
> On 02/17/2016 08:38 AM, Simon Horman wrote:
> 
> >>>>>>>>>Define the generic R8A7794 part of  the sound device node.
> >>>>>>>>>This sound device  is a complex one and comprises the Audio Clock Generator
> >>>>>>>>>(ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
> >>>>>>>>>(SSI[U]), and Audio DMAC-Peripheral-Peripheral.
> >>>>>>>>>It is up  to the board file to enable the device.
> >>>>>>>>>
> >>>>>>>>>This patch is based on the R8A7791 sound work by Kuninori Morimoto.
> >>>>>>>>>
> >>>>>>>>>Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>>>>>>>(snip)
> >>>>>>>>>+		rcar_sound,src {
> >>>>>>>>>+			src1: src at 1 {
> >>>>>>>>>+				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x87>, <&audma0 0x9c>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src2: src at 2 {
> >>>>>>>>>+				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x89>, <&audma0 0x9e>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src3: src at 3 {
> >>>>>>>>>+				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src4: src at 4 {
> >>>>>>>>>+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src5: src at 5 {
> >>>>>>>>>+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+			src6: src at 6 {
> >>>>>>>>>+				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> >>>>>>>>>+				dmas = <&audma0 0x91>, <&audma0 0xb4>;
> >>>>>>>>>+				dma-names = "rx", "tx";
> >>>>>>>>>+			};
> >>>>>>>>>+		};
> >>>>>>>>
> >>>>>>>>I think this can't work correctly, because driver is assuming
> >>>>>>>>DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
> >>>>>>>>Can you adds dummy src0 with some comments ? or fix src.c driver ?
> >>>>>>>
> >>>>>>>I would prefer the driver to be fixed (I had a similar patchset locally
> >>>>>>>and I found it doesn't work).
> >>>>>>
> >>>>>>    You mean you had R8A7794 sound patch set too?
> >>>>>
> >>>>>Yes, I was working on it recently.
> >>>>>I suppose we should coordinate these things in future to avoid
> >>>>>duplicated effort.
> >>>>
> >>>>    Yes, seems a good idea now. :-)
> >>>>
> >>>>>>>The reason is that DT should describe
> >>>>>>>the hardware rather than the current state of the software.
> >>>>>>
> >>>>>>    Yes, of course. Just tell me do I have to fix the driver *before* this
> >>>>>>patch set is accepted?
> >>>>
> >>>>>I did not entirely get to the bottom of the problem, but I think that at
> >>>>>the very least something needs to be done about the for_each_rsnd_src()
> >>>>>loop in rsnd_src_probe.
> >>>>
> >>>>    It's not that it replies to my question. :-)
> >>>>    So you're looking at this issue yourself?
> >>>
> >>>I have not got very far, as you can see, but I was planning to look into it.
> >>>I don't mind if you want to do so.
> >>
> >>    After consultation with the management, I'm going to look into this issue
> >>myself. :-)
> >
> >Excellent.
> 
>    But not immediately. I have some other things to look at before that (DU
> and AVB), they'll going to take some (significant) time... :-(
> 
> >FWIW, I can test anything you come up with for the r8a7794 an alt board
> 
>    I have remote access to Alt now, in fact using it currently for the AVB work.
> 
> >or post patches for it once you have r8a7794/silk sorted out.
> 
>    I already have audio on these working. Or you're going to wait until I
> fix the SRC issue?

I'm happy to merge a subset of your r8a7794/silk patches,
that don't touch the SRC issue if you think that is appropriate.
>From there I could get similar functionality running on the Alt - I don't
expect that to be a difficult task. And then when you come back to the SRC
issue we can enhance support for r8a7794/silk,alt.

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

* Re: [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
  2016-02-17 23:48                       ` Simon Horman
@ 2016-02-18 19:31                         ` Sergei Shtylyov
  -1 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-18 19:31 UTC (permalink / raw)
  To: Simon Horman
  Cc: Kuninori Morimoto, linux-renesas-soc, robh+dt, pawel.moll,
	mark.rutland, ijc+devicetree, galak, devicetree, magnus.damm,
	linux, linux-arm-kernel

On 02/18/2016 02:48 AM, Simon Horman wrote:

>>>>>>>>>>> Define the generic R8A7794 part of  the sound device node.
>>>>>>>>>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>>>>>>>>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>>>>>>>>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>>>>>>>>>> It is up  to the board file to enable the device.
>>>>>>>>>>>
>>>>>>>>>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>>>>>>>>>
>>>>>>>>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>>>>>>>> (snip)
>>>>>>>>>>> +		rcar_sound,src {
>>>>>>>>>>> +			src1: src@1 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src2: src@2 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src3: src@3 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src4: src@4 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src5: src@5 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src6: src@6 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +		};
>>>>>>>>>>
>>>>>>>>>> I think this can't work correctly, because driver is assuming
>>>>>>>>>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>>>>>>>>>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>>>>>>>>>
>>>>>>>>> I would prefer the driver to be fixed (I had a similar patchset locally
>>>>>>>>> and I found it doesn't work).
>>>>>>>>
>>>>>>>>     You mean you had R8A7794 sound patch set too?
>>>>>>>
>>>>>>> Yes, I was working on it recently.
>>>>>>> I suppose we should coordinate these things in future to avoid
>>>>>>> duplicated effort.
>>>>>>
>>>>>>     Yes, seems a good idea now. :-)
>>>>>>
>>>>>>>>> The reason is that DT should describe
>>>>>>>>> the hardware rather than the current state of the software.
>>>>>>>>
>>>>>>>>     Yes, of course. Just tell me do I have to fix the driver *before* this
>>>>>>>> patch set is accepted?
>>>>>>
>>>>>>> I did not entirely get to the bottom of the problem, but I think that at
>>>>>>> the very least something needs to be done about the for_each_rsnd_src()
>>>>>>> loop in rsnd_src_probe.
>>>>>>
>>>>>>     It's not that it replies to my question. :-)
>>>>>>     So you're looking at this issue yourself?
>>>>>
>>>>> I have not got very far, as you can see, but I was planning to look into it.
>>>>> I don't mind if you want to do so.
>>>>
>>>>     After consultation with the management, I'm going to look into this issue
>>>> myself. :-)
>>>
>>> Excellent.
>>
>>     But not immediately. I have some other things to look at before that (DU
>> and AVB), they'll going to take some (significant) time... :-(
>>
>>> FWIW, I can test anything you come up with for the r8a7794 an alt board
>>
>>     I have remote access to Alt now, in fact using it currently for the AVB work.
>>
>>> or post patches for it once you have r8a7794/silk sorted out.
>>
>>     I already have audio on these working. Or you're going to wait until I
>> fix the SRC issue?
>
> I'm happy to merge a subset of your r8a7794/silk patches,
> that don't touch the SRC issue if you think that is appropriate.

    I think you can merge everything R8A7794 specific. The SILK patch doesn't 
make use of SRCs yet but depends on the PFC patches, so makes sense to hold it 
up...

>  From there I could get similar functionality running on the Alt - I don't
> expect that to be a difficult task.

    Sure -- if you have direct access to the board.

> And then when you come back to the SRC
> issue we can enhance support for r8a7794/silk,alt.

    Yes.

MBR, Sergei

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

* [PATCH v2 5/5] ARM: dts: r8a7794: add sound support
@ 2016-02-18 19:31                         ` Sergei Shtylyov
  0 siblings, 0 replies; 42+ messages in thread
From: Sergei Shtylyov @ 2016-02-18 19:31 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/18/2016 02:48 AM, Simon Horman wrote:

>>>>>>>>>>> Define the generic R8A7794 part of  the sound device node.
>>>>>>>>>>> This sound device  is a complex one and comprises the Audio Clock Generator
>>>>>>>>>>> (ADG), Sampling Rate Converter Unit (SCU), Serial Sound Interface [Unit]
>>>>>>>>>>> (SSI[U]), and Audio DMAC-Peripheral-Peripheral.
>>>>>>>>>>> It is up  to the board file to enable the device.
>>>>>>>>>>>
>>>>>>>>>>> This patch is based on the R8A7791 sound work by Kuninori Morimoto.
>>>>>>>>>>>
>>>>>>>>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>>>>>>>> (snip)
>>>>>>>>>>> +		rcar_sound,src {
>>>>>>>>>>> +			src1: src at 1 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x87>, <&audma0 0x9c>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src2: src at 2 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x89>, <&audma0 0x9e>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src3: src at 3 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x8b>, <&audma0 0xa0>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src4: src at 4 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x8d>, <&audma0 0xb0>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src5: src at 5 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x8f>, <&audma0 0xb2>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +			src6: src at 6 {
>>>>>>>>>>> +				interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
>>>>>>>>>>> +				dmas = <&audma0 0x91>, <&audma0 0xb4>;
>>>>>>>>>>> +				dma-names = "rx", "tx";
>>>>>>>>>>> +			};
>>>>>>>>>>> +		};
>>>>>>>>>>
>>>>>>>>>> I think this can't work correctly, because driver is assuming
>>>>>>>>>> DT has all channles (from 0). (see linux/sound/soc/sh/rcar/src.c :: rsnd_src_probe)
>>>>>>>>>> Can you adds dummy src0 with some comments ? or fix src.c driver ?
>>>>>>>>>
>>>>>>>>> I would prefer the driver to be fixed (I had a similar patchset locally
>>>>>>>>> and I found it doesn't work).
>>>>>>>>
>>>>>>>>     You mean you had R8A7794 sound patch set too?
>>>>>>>
>>>>>>> Yes, I was working on it recently.
>>>>>>> I suppose we should coordinate these things in future to avoid
>>>>>>> duplicated effort.
>>>>>>
>>>>>>     Yes, seems a good idea now. :-)
>>>>>>
>>>>>>>>> The reason is that DT should describe
>>>>>>>>> the hardware rather than the current state of the software.
>>>>>>>>
>>>>>>>>     Yes, of course. Just tell me do I have to fix the driver *before* this
>>>>>>>> patch set is accepted?
>>>>>>
>>>>>>> I did not entirely get to the bottom of the problem, but I think that at
>>>>>>> the very least something needs to be done about the for_each_rsnd_src()
>>>>>>> loop in rsnd_src_probe.
>>>>>>
>>>>>>     It's not that it replies to my question. :-)
>>>>>>     So you're looking at this issue yourself?
>>>>>
>>>>> I have not got very far, as you can see, but I was planning to look into it.
>>>>> I don't mind if you want to do so.
>>>>
>>>>     After consultation with the management, I'm going to look into this issue
>>>> myself. :-)
>>>
>>> Excellent.
>>
>>     But not immediately. I have some other things to look at before that (DU
>> and AVB), they'll going to take some (significant) time... :-(
>>
>>> FWIW, I can test anything you come up with for the r8a7794 an alt board
>>
>>     I have remote access to Alt now, in fact using it currently for the AVB work.
>>
>>> or post patches for it once you have r8a7794/silk sorted out.
>>
>>     I already have audio on these working. Or you're going to wait until I
>> fix the SRC issue?
>
> I'm happy to merge a subset of your r8a7794/silk patches,
> that don't touch the SRC issue if you think that is appropriate.

    I think you can merge everything R8A7794 specific. The SILK patch doesn't 
make use of SRCs yet but depends on the PFC patches, so makes sense to hold it 
up...

>  From there I could get similar functionality running on the Alt - I don't
> expect that to be a difficult task.

    Sure -- if you have direct access to the board.

> And then when you come back to the SRC
> issue we can enhance support for r8a7794/silk,alt.

    Yes.

MBR, Sergei

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

end of thread, other threads:[~2016-02-18 19:31 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 21:52 [PATCH v2 0/5] Add R8A7794 sound DT support Sergei Shtylyov
2016-02-09 21:52 ` Sergei Shtylyov
2016-02-09 21:53 ` [PATCH v2 1/5] ARM: dts: r8a7794: add audio clocks Sergei Shtylyov
2016-02-09 21:53   ` Sergei Shtylyov
2016-02-09 21:54 ` [PATCH v2 2/5] ARM: dts: r8a7794: add MSTP5 clocks Sergei Shtylyov
2016-02-09 21:54   ` Sergei Shtylyov
2016-02-09 21:55 ` [PATCH v2 3/5] ARM: dts: r8a7794: add MSTP10 clocks Sergei Shtylyov
2016-02-09 21:55   ` Sergei Shtylyov
2016-02-09 21:56 ` [PATCH v2 4/5] ARM: dts: r8a7794: add Audio-DMAC support Sergei Shtylyov
2016-02-09 21:56   ` Sergei Shtylyov
2016-02-09 21:58 ` [PATCH v2 5/5] ARM: dts: r8a7794: add sound support Sergei Shtylyov
2016-02-09 21:58   ` Sergei Shtylyov
2016-02-10  0:41   ` Kuninori Morimoto
2016-02-10  0:41     ` Kuninori Morimoto
2016-02-10  0:41     ` Kuninori Morimoto
2016-02-10 17:14     ` Simon Horman
2016-02-10 17:14       ` Simon Horman
2016-02-12 16:47       ` Sergei Shtylyov
2016-02-12 16:47         ` Sergei Shtylyov
2016-02-12 18:43         ` Simon Horman
2016-02-12 18:43           ` Simon Horman
2016-02-12 19:08           ` Sergei Shtylyov
2016-02-12 19:08             ` Sergei Shtylyov
2016-02-12 19:33             ` Simon Horman
2016-02-12 19:33               ` Simon Horman
2016-02-12 19:57               ` Sergei Shtylyov
2016-02-12 19:57                 ` Sergei Shtylyov
2016-02-17  5:38                 ` Simon Horman
2016-02-17  5:38                   ` Simon Horman
2016-02-17 19:07                   ` Sergei Shtylyov
2016-02-17 19:07                     ` Sergei Shtylyov
2016-02-17 23:48                     ` Simon Horman
2016-02-17 23:48                       ` Simon Horman
2016-02-18 19:31                       ` Sergei Shtylyov
2016-02-18 19:31                         ` Sergei Shtylyov
2016-02-10 18:09     ` Sergei Shtylyov
2016-02-10 18:09       ` Sergei Shtylyov
2016-02-10  3:12   ` Kuninori Morimoto
2016-02-10  3:12     ` Kuninori Morimoto
2016-02-10  3:12     ` Kuninori Morimoto
2016-02-10 18:10     ` Sergei Shtylyov
2016-02-10 18:10       ` Sergei Shtylyov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.