Skip to contentSkip to conversation

clk: Samsung: audss: Register audio subsytem clocks using common clk framework

PATCH Superseded Padmavathi Venna 4 participants 13 messages Jun 3, 2013 – Jun 4, 2013

Subsystems (4)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v4 cover clk: Samsung: audss: Register audio subsytem clocks using common clk framework

Samsung S5PV210 and Exynos SoC has a separate subsystem for audio. This subsystem has a internal clock controller which controls i2s0 and pcm0 clocks. This patch series adds the Samsung audio subsytem clock to the common clock framework and provides the I2S controllers clock information in the dtsi file.

This patch series is made based on Kukjin Kim for-next branch

Changes since V3:
- Replaced samsung with exynos in the macro prefixes and function names as this driver supports mainly exynos and s5p family.
- Added Reviewed-by:Sylwester Nawrocki <[email protected]>

Changes since V2:
- Removed s5pv210 compatible name from driver as it is not yet supported which is different from Exynos series audio subsystem clock conroller.
- Removed clkdev lookup support and added alias names in the i2s0 controller node.
Changes since V1:
- Reworked on all review comments by Sylwester Nawrocki
- Added a header file for all clock indexes as requested by Sylwester
- Added different compatible names for s5pv210, exynos4 and exynos5
- Registered the pcm clocks with common clock framework

Padmavathi Venna (4):
ARM: samsung: use #include for all device trees
clk: samsung: register audio subsystem clocks using common clock
framework
ARM: dts: add Exynos audio subsystem clock controller node
ARM: dts: add clock provider information for i2s controllers in

    Exynos5250
 .../devicetree/bindings/clock/clk-exynos-audss.txt |   64 ++++++++++
 arch/arm/boot/dts/exynos4.dtsi                     |    2 +-
 arch/arm/boot/dts/exynos4210-origen.dts            |    2 +-
 arch/arm/boot/dts/exynos4210-smdkv310.dts          |    2 +-
 arch/arm/boot/dts/exynos4210-trats.dts             |    2 +-
 arch/arm/boot/dts/exynos4210-universal_c210.dts    |    2 +-
 arch/arm/boot/dts/exynos4210.dtsi                  |    4 +-
 arch/arm/boot/dts/exynos4212.dtsi                  |    2 +-
 arch/arm/boot/dts/exynos4412-odroidx.dts           |    2 +-
 arch/arm/boot/dts/exynos4412-origen.dts            |    2 +-
 arch/arm/boot/dts/exynos4412-smdk4412.dts          |    2 +-
 arch/arm/boot/dts/exynos4412.dtsi                  |    2 +-
 arch/arm/boot/dts/exynos4x12.dtsi                  |    4 +-
 arch/arm/boot/dts/exynos5250-arndale.dts           |    2 +-
 arch/arm/boot/dts/exynos5250-smdk5250.dts          |    2 +-
 arch/arm/boot/dts/exynos5250-snow.dts              |    4 +-
 arch/arm/boot/dts/exynos5250.dtsi                  |   23 +++-
 arch/arm/boot/dts/exynos5440-sd5v1.dts             |    2 +-
 arch/arm/boot/dts/exynos5440-ssdk5440.dts          |    2 +-
 arch/arm/boot/dts/exynos5440.dtsi                  |    2 +-
 arch/arm/boot/dts/s3c2416-smdk2416.dts             |    2 +-
 arch/arm/boot/dts/s3c2416.dtsi                     |    4 +-
 arch/arm/boot/dts/s3c24xx.dtsi                     |    2 +-
 drivers/clk/samsung/Makefile                       |    1 +
 drivers/clk/samsung/clk-exynos-audss.c             |  133 ++++++++++++++++++++
 include/dt-bindings/clk/exynos-audss-clk.h         |   25 ++++
 26 files changed, 269 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/clk-exynos-audss.txt
 create mode 100644 drivers/clk/samsung/clk-exynos-audss.c
 create mode 100644 include/dt-bindings/clk/exynos-audss-clk.h
Signature · 1 line
1.7.4.4
#1 lore raw

PATCH v4 1/4 ARM: samsung: use #include for all device trees

Replace /include/ (dtc) with #include (C pre-processor) for all Samsung DT files

---
 arch/arm/boot/dts/exynos4.dtsi                  |    2 +-
 arch/arm/boot/dts/exynos4210-origen.dts         |    2 +-
 arch/arm/boot/dts/exynos4210-smdkv310.dts       |    2 +-
 arch/arm/boot/dts/exynos4210-trats.dts          |    2 +-
 arch/arm/boot/dts/exynos4210-universal_c210.dts |    2 +-
 arch/arm/boot/dts/exynos4210.dtsi               |    4 ++--
 arch/arm/boot/dts/exynos4212.dtsi               |    2 +-
 arch/arm/boot/dts/exynos4412-odroidx.dts        |    2 +-
 arch/arm/boot/dts/exynos4412-origen.dts         |    2 +-
 arch/arm/boot/dts/exynos4412-smdk4412.dts       |    2 +-
 arch/arm/boot/dts/exynos4412.dtsi               |    2 +-
 arch/arm/boot/dts/exynos4x12.dtsi               |    4 ++--
 arch/arm/boot/dts/exynos5250-arndale.dts        |    2 +-
 arch/arm/boot/dts/exynos5250-smdk5250.dts       |    2 +-
 arch/arm/boot/dts/exynos5250-snow.dts           |    4 ++--
 arch/arm/boot/dts/exynos5250.dtsi               |    4 ++--
 arch/arm/boot/dts/exynos5440-sd5v1.dts          |    2 +-
 arch/arm/boot/dts/exynos5440-ssdk5440.dts       |    2 +-
 arch/arm/boot/dts/exynos5440.dtsi               |    2 +-
 arch/arm/boot/dts/s3c2416-smdk2416.dts          |    2 +-
 arch/arm/boot/dts/s3c2416.dtsi                  |    4 ++--
 arch/arm/boot/dts/s3c24xx.dtsi                  |    2 +-
 22 files changed, 27 insertions(+), 27 deletions(-)
arch/arm/boot/dts/exynos4.dtsi +1 -1
index bed40ee..3f94fe8 100644
@@ -19,7 +19,7 @@
  * published by the Free Software Foundation.
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
 	interrupt-parent = <&gic>;
arch/arm/boot/dts/exynos4210-origen.dts +1 -1
index bcf8079..5f851d7 100644
@@ -15,7 +15,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos4210.dtsi"
+#include "exynos4210.dtsi"
 
 / {
 	model = "Insignal Origen evaluation board based on Exynos4210";
arch/arm/boot/dts/exynos4210-smdkv310.dts +1 -1
index 91332b7..9c01b71 100644
@@ -15,7 +15,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos4210.dtsi"
+#include "exynos4210.dtsi"
 
 / {
 	model = "Samsung smdkv310 evaluation board based on Exynos4210";
arch/arm/boot/dts/exynos4210-trats.dts +1 -1
index 9a14484..94eebff 100644
@@ -13,7 +13,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos4210.dtsi"
+#include "exynos4210.dtsi"
 
 / {
 	model = "Samsung Trats based on Exynos4210";
arch/arm/boot/dts/exynos4210-universal_c210.dts +1 -1
index 345cdb5..889cdad 100644
@@ -13,7 +13,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos4210.dtsi"
+#include "exynos4210.dtsi"
 
 / {
 	model = "Samsung Universal C210 based on Exynos4210 rev0";
arch/arm/boot/dts/exynos4210.dtsi +2 -2
index 366795a..75c2756 100644
@@ -19,8 +19,8 @@
  * published by the Free Software Foundation.
 */
 
-/include/ "exynos4.dtsi"
-/include/ "exynos4210-pinctrl.dtsi"
+#include "exynos4.dtsi"
+#include "exynos4210-pinctrl.dtsi"
 
 / {
 	compatible = "samsung,exynos4210";
arch/arm/boot/dts/exynos4212.dtsi +1 -1
index c0f60f4..6f34d7f 100644
@@ -17,7 +17,7 @@
  * published by the Free Software Foundation.
 */
 
-/include/ "exynos4x12.dtsi"
+#include "exynos4x12.dtsi"
 
 / {
 	compatible = "samsung,exynos4212";
arch/arm/boot/dts/exynos4412-odroidx.dts +1 -1
index 53bc8bf..7bb8d48 100644
@@ -12,7 +12,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos4412.dtsi"
+#include "exynos4412.dtsi"
 
 / {
 	model = "Hardkernel ODROID-X board based on Exynos4412";
arch/arm/boot/dts/exynos4412-origen.dts +1 -1
index 790a999..df097b5 100644
@@ -13,7 +13,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos4412.dtsi"
+#include "exynos4412.dtsi"
 
 / {
 	model = "Insignal Origen evaluation board based on Exynos4412";
arch/arm/boot/dts/exynos4412-smdk4412.dts +1 -1
index c52b01f..1e816fa 100644
@@ -13,7 +13,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos4412.dtsi"
+#include "exynos4412.dtsi"
 
 / {
 	model = "Samsung SMDK evaluation board based on Exynos4412";
arch/arm/boot/dts/exynos4412.dtsi +1 -1
index 270b389..e743e67 100644
@@ -17,7 +17,7 @@
  * published by the Free Software Foundation.
 */
 
-/include/ "exynos4x12.dtsi"
+#include "exynos4x12.dtsi"
 
 / {
 	compatible = "samsung,exynos4412";
arch/arm/boot/dts/exynos4x12.dtsi +2 -2
index e3380a7..8896bb5 100644
@@ -17,8 +17,8 @@
  * published by the Free Software Foundation.
 */
 
-/include/ "exynos4.dtsi"
-/include/ "exynos4x12-pinctrl.dtsi"
+#include "exynos4.dtsi"
+#include "exynos4x12-pinctrl.dtsi"
 
 / {
 	aliases {
arch/arm/boot/dts/exynos5250-arndale.dts +1 -1
index 02cfc76..8e27120 100644
@@ -10,7 +10,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos5250.dtsi"
+#include "exynos5250.dtsi"
 
 / {
 	model = "Insignal Arndale evaluation board based on EXYNOS5250";
arch/arm/boot/dts/exynos5250-smdk5250.dts +1 -1
index 3e0c792..f2a025e 100644
@@ -10,7 +10,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos5250.dtsi"
+#include "exynos5250.dtsi"
 
 / {
 	model = "SAMSUNG SMDK5250 board based on EXYNOS5250";
arch/arm/boot/dts/exynos5250-snow.dts +2 -2
index d449feb..fd711e2 100644
@@ -9,8 +9,8 @@
 */
 
 /dts-v1/;
-/include/ "exynos5250.dtsi"
-/include/ "cros5250-common.dtsi"
+#include "exynos5250.dtsi"
+#include "cros5250-common.dtsi"
 
 / {
 	model = "Google Snow";
arch/arm/boot/dts/exynos5250.dtsi +2 -2
index 9dfc6de..bccda67 100644
@@ -17,8 +17,8 @@
  * published by the Free Software Foundation.
 */
 
-/include/ "skeleton.dtsi"
-/include/ "exynos5250-pinctrl.dtsi"
+#include "skeleton.dtsi"
+#include "exynos5250-pinctrl.dtsi"
 
 / {
 	compatible = "samsung,exynos5250";
arch/arm/boot/dts/exynos5440-sd5v1.dts +1 -1
index ef747b5..5e84c5f 100644
@@ -10,7 +10,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos5440.dtsi"
+#include "exynos5440.dtsi"
 
 / {
 	model = "SAMSUNG SD5v1 board based on EXYNOS5440";
arch/arm/boot/dts/exynos5440-ssdk5440.dts +1 -1
index d55042b..2fd6646 100644
@@ -10,7 +10,7 @@
 */
 
 /dts-v1/;
-/include/ "exynos5440.dtsi"
+#include "exynos5440.dtsi"
 
 / {
 	model = "SAMSUNG SSDK5440 board based on EXYNOS5440";
arch/arm/boot/dts/exynos5440.dtsi +1 -1
index f6b1c89..13b40b3 100644
@@ -9,7 +9,7 @@
  * published by the Free Software Foundation.
 */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
 	compatible = "samsung,exynos5440";
arch/arm/boot/dts/s3c2416-smdk2416.dts +1 -1
index ad1dd09..59594cf 100644
@@ -9,7 +9,7 @@
  */
 
 /dts-v1/;
-/include/ "s3c2416.dtsi"
+#include "s3c2416.dtsi"
 
 / {
 	model = "SMDK2416";
arch/arm/boot/dts/s3c2416.dtsi +2 -2
index 6809324..e6555bd 100644
@@ -8,8 +8,8 @@
  * published by the Free Software Foundation.
  */
 
-/include/ "s3c24xx.dtsi"
-/include/ "s3c2416-pinctrl.dtsi"
+#include "s3c24xx.dtsi"
+#include "s3c2416-pinctrl.dtsi"
 
 / {
 	model = "Samsung S3C2416 SoC";
arch/arm/boot/dts/s3c24xx.dtsi +1 -1
index cab46ff..2d1d7dc 100644
@@ -8,7 +8,7 @@
  * published by the Free Software Foundation.
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
 	compatible = "samsung,s3c24xx";
Signature · 1 line
1.7.4.4
#2 lore raw

PATCH v4 2/4 clk: samsung: register audio subsystem clocks using common clock framework

In reply to Padmavathi Venna

Audio subsystem is introduced in s5pv210 and exynos platforms. This has seperate clock controller which can control i2s0 and pcm0 clocks. This patch registers the audio subsystem clocks with the common clock framework on Exynos family.

---
 .../devicetree/bindings/clock/clk-exynos-audss.txt |   64 ++++++++++
 drivers/clk/samsung/Makefile                       |    1 +
 drivers/clk/samsung/clk-exynos-audss.c             |  133 ++++++++++++++++++++
 include/dt-bindings/clk/exynos-audss-clk.h         |   25 ++++
 4 files changed, 223 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/clk-exynos-audss.txt
 create mode 100644 drivers/clk/samsung/clk-exynos-audss.c
 create mode 100644 include/dt-bindings/clk/exynos-audss-clk.h
Documentation/devicetree/bindings/clock/clk-exynos-audss.txt new file +64 -0
new file mode 100644
index 0000000..c401134
@@ -0,0 +1,64 @@
+* Samsung Audio Subsystem Clock Controller
+
+The Samsung Audio Subsystem clock controller generates and supplies clocks
+to Audio Subsystem block available in the S5PV210 and Exynos SoCs. The clock
+binding described here is applicable to all SoC's in Exynos family.
+
+Required Properties:
+
+- compatible: should be one of the following:
+  - "samsung,exynos4210-audss-clock" - controller compatible with all Exynos4 SoCs.
+  - "samsung,exynos5250-audss-clock" - controller compatible with all Exynos5 SoCs.
+
+- reg: physical base address and length of the controller's register set.
+
+- #clock-cells: should be 1.
+
+The following is the list of clocks generated by the controller. Each clock is
+assigned an identifier and client nodes use this identifier to specify the
+clock which they consume. Some of the clocks are available only on a particular
+Exynos4 SoC and this is specified where applicable.
+
+Provided clocks:
+
+Clock           ID      SoC (if specific)
+-----------------------------------------------
+
+mout_audss      0
+mout_i2s        1
+dout_srp        2
+dout_bus        3
+dout_i2s        4
+srp_clk         5
+i2s_bus         6
+sclk_i2s        7
+pcm_bus         8
+sclk_pcm        9
+
+Example 1: An example of a clock controller node is listed below.
+
+clock_audss: audss-clock-controller@3810000 {
+	compatible = "samsung,exynos5250-audss-clock";
+	reg = <0x03810000 0x0C>;
+	#clock-cells = <1>;
+};
+
+Example 2: I2S controller node that consumes the clock generated by the clock
+           controller. Refer to the standard clock bindings for information
+           about 'clocks' and 'clock-names' property.
+
+i2s0: i2s@03830000 {
+	compatible = "samsung,i2s-v5";
+	reg = <0x03830000 0x100>;
+	dmas = <&pdma0 10
+		&pdma0 9
+		&pdma0 8>;
+	dma-names = "tx", "rx", "tx-sec";
+	clocks = <&clock_audss EXYNOS_I2S_BUS>,
+		<&clock_audss EXYNOS_I2S_BUS>,
+		<&clock_audss EXYNOS_SCLK_I2S>,
+		<&clock_audss EXYNOS_MOUT_AUDSS>,
+		<&clock_audss EXYNOS_MOUT_I2S>;
+	clock-names = "iis", "i2s_opclk0", "i2s_opclk1",
+	"mout_audss", "mout_i2s";
+};
drivers/clk/samsung/Makefile +1 -0
index b7c232e..1876810 100644
@@ -6,3 +6,4 @@ obj-$(CONFIG_COMMON_CLK)	+= clk.o clk-pll.o
 obj-$(CONFIG_ARCH_EXYNOS4)	+= clk-exynos4.o
 obj-$(CONFIG_SOC_EXYNOS5250)	+= clk-exynos5250.o
 obj-$(CONFIG_SOC_EXYNOS5440)	+= clk-exynos5440.o
+obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos-audss.o
drivers/clk/samsung/clk-exynos-audss.c new file +133 -0

133 lines not on this page · raw message

include/dt-bindings/clk/exynos-audss-clk.h new file +25 -0
new file mode 100644
index 0000000..4d2d843
@@ -0,0 +1,25 @@
+/*
+ * This header provides constants for Samsung audio subsystem
+ * clock controller.
+ *
+ * The constants defined in this header are being used in dts
+ * and exynos audss driver.
+ */
+
+#ifndef _DT_BINDINGS_CLK_EXYNOS_AUDSS_H
+#define _DT_BINDINGS_CLK_EXYNOS_AUDSS_H
+
+#define EXYNOS_MOUT_AUDSS	0
+#define EXYNOS_MOUT_I2S	1
+#define EXYNOS_DOUT_SRP	2
+#define EXYNOS_DOUT_BUS	3
+#define EXYNOS_DOUT_I2S	4
+#define EXYNOS_SRP_CLK		5
+#define EXYNOS_I2S_BUS		6
+#define EXYNOS_SCLK_I2S	7
+#define EXYNOS_PCM_BUS		8
+#define EXYNOS_SCLK_PCM	9
+
+#define EXYNOS_AUDSS_MAX_CLKS	10
+
+#endif
Signature · 1 line
1.7.4.4
#3 lore raw

Re: [PATCH V4 2/4] clk: samsung: register audio subsystem clocks using common clock framework

Padmavathi,

drivers/clk/samsung/clk-exynos-audss.c line 36

Quoted 8 lines · Padmavathi Venna
drivers/clk/samsung/clk-exynos-audss.c new file +8 -0
+static unsigned long reg_save[][2] = {
+       {ASS_CLK_SRC,  0},
+       {ASS_CLK_DIV,  0},
+       {ASS_CLK_GATE, 0},
+};
+
+/* list of all parent clock list */
+static const char *mout_audss_p[] = { "fin_pll", "fout_epll" };

I think this is supposed to be "xxti" which might or might not be "fin_pll". In the exynos4 code these are two different clocks that are chosen by OM[0]. I'd bet that 99% of the time they are the same, but it seems better to use "xxti".

At the moment the 5250 code doesn't expose "xxti". It probably should. Andrew (CCed) is looking at this.

drivers/clk/samsung/clk-exynos-audss.c line 44

Quoted 8 lines
drivers/clk/samsung/clk-exynos-audss.c new file +8 -0
+static const char *mout_i2s_p[] = { "mout_audss", "cdclk0", "sclk_audio0" };
+
+#ifdef CONFIG_PM_SLEEP
+static int exynos_audss_clk_suspend(void)
+{
+       int i;
+
+       for (i = 0; i < 3; i++)

Can't you use ARRAY_SIZE?

Quoted 22 lines
drivers/clk/samsung/clk-exynos-audss.c new file +22 -0
+void __init exynos_audss_clk_init(struct device_node *np)
+{
+       reg_base = of_iomap(np, 0);
+       if (!reg_base) {
+               pr_err("%s: failed to map audss registers\n", __func__);
+               return;
+       }
+
+       clk_table = kzalloc(sizeof(struct clk *) * EXYNOS_AUDSS_MAX_CLKS,
+                               GFP_KERNEL);
+       if (!clk_table) {
+               pr_err("%s: could not allocate clk lookup table\n", __func__);
+               return;
+       }
+
+       clk_data.clks = clk_table;
+       clk_data.clk_num = EXYNOS_AUDSS_MAX_CLKS;
+       of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
+
+       clk_table[EXYNOS_MOUT_AUDSS] = clk_register_mux(NULL, "mout_audss",
+                               mout_audss_p, ARRAY_SIZE(mout_audss_p), 0,
+                               reg_base + ASS_CLK_SRC, 0, 1, 0, &lock);

drivers/clk/samsung/clk-exynos-audss.c line 96

Quoted 10 lines
drivers/clk/samsung/clk-exynos-audss.c new file +10 -0
+
+       clk_table[EXYNOS_MOUT_I2S] = clk_register_mux(NULL, "mout_i2s",
+                               mout_i2s_p, ARRAY_SIZE(mout_i2s_p), 0,
+                               reg_base + ASS_CLK_SRC, 2, 2, 0, &lock);
+
+       clk_table[EXYNOS_DOUT_SRP] = clk_register_divider(NULL, "dout_srp",
+                               "mout_audss", 0, reg_base + ASS_CLK_DIV, 0, 4,
+                               0, &lock);
+
+       clk_table[EXYNOS_DOUT_BUS] = clk_register_divider(NULL, "dout_bus",

I'm learning that clock names need to be globally unique in a given system. Perhaps "dout_aud_bus" might be more descriptive and less likely to cause conflicts?

#4 lore raw

Re: [PATCH V4 2/4] clk: samsung: register audio subsystem clocks using common clock framework

Quoted 5 lines
Quoted 5 lines
drivers/clk/samsung/clk-exynos-audss.c new file +5 -0
+static unsigned long reg_save[][2] = {
+       {ASS_CLK_SRC,  0},
+       {ASS_CLK_DIV,  0},
+       {ASS_CLK_GATE, 0},
+};
Quoted 8 lines

drivers/clk/samsung/clk-exynos-audss.c line 36

Quoted 3 lines
drivers/clk/samsung/clk-exynos-audss.c new file +3 -0
+
+/* list of all parent clock list */
+static const char *mout_audss_p[] = { "fin_pll", "fout_epll" };

I think this is supposed to be "xxti" which might or might not be "fin_pll". In the exynos4 code these are two different clocks that are chosen by OM[0]. I'd bet that 99% of the time they are the same, but it seems better to use "xxti".

OM[0] also appears to mux the input here between "xxti" and "xusbxti" as well. So this should probably remain "fin_pll".

Quoted 2 lines

At the moment the 5250 code doesn't expose "xxti". It probably should. Andrew (CCed) is looking at this.

Yes, xxti is used directly elsewhere (SPI and UART, from what I can tell), but not here.

-Andrew

#5 lore raw

Re: [PATCH V4 2/4] clk: samsung: register audio subsystem clocks using common clock framework

Andrew,

Quoted 7 lines · Andrew Bresticker
Quoted 4 lines

I think this is supposed to be "xxti" which might or might not be "fin_pll". In the exynos4 code these are two different clocks that are chosen by OM[0]. I'd bet that 99% of the time they are the same, but it seems better to use "xxti".

OM[0] also appears to mux the input here between "xxti" and "xusbxti" as well. So this should probably remain "fin_pll".

Thanks! ...so I'm OK with this landing "as-is" or a re-spin with nits fixed, since all of the rest of my comments were just nits...

#6 lore raw

PATCH v4 3/4 ARM: dts: add Exynos audio subsystem clock controller node

In reply to Padmavathi Venna

Audio subsystem introduced in s5pv210 and exynos platforms which has a internal clock controller. This patch adds a node for the same on exynos5250.

---
 arch/arm/boot/dts/exynos5250.dtsi |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +6 -0
index bccda67..388983e 100644
@@ -72,6 +72,12 @@
 		#clock-cells = <1>;
 	};
 
+	clock_audss: audss-clock-controller@3810000 {
+		compatible = "samsung,exynos5250-audss-clock";
+		reg = <0x03810000 0x0C>;
+		#clock-cells = <1>;
+	};
+
 	gic:interrupt-controller@10481000 {
 		compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
 		#interrupt-cells = <3>;
Signature · 1 line
1.7.4.4
#7 lore raw

Re: [PATCH V4 3/4] ARM: dts: add Exynos audio subsystem clock controller node

Padmavathi,

Quoted 15 lines · Padmavathi Venna

Audio subsystem introduced in s5pv210 and exynos platforms which has a internal clock controller. This patch adds a node for the same on exynos5250.

---
 arch/arm/boot/dts/exynos5250.dtsi |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +0 -0
index bccda67..388983e 100644

arch/arm/boot/dts/exynos5250.dtsi line 75

Quoted 4 lines
arch/arm/boot/dts/exynos5250.dtsi +1 -0
@@ -72,6 +72,12 @@
                #clock-cells = <1>;
        };
 
+       clock_audss: audss-clock-controller@3810000 {

Nit: other places in the same file have the leading 0, like
i2s0: i2s@03830000 {

So you could follow suit and do:

  clock_audss: audss-clock-controller@03810000 {

-Doug

#8 lore raw

Re: [PATCH V4 3/4] ARM: dts: add Exynos audio subsystem clock controller node

Hi Doug,

Quoted 21 lines · Doug Anderson

Padmavathi,

Quoted 18 lines · Padmavathi Venna

Audio subsystem introduced in s5pv210 and exynos platforms which has a internal clock controller. This patch adds a node for the same on exynos5250.

---
 arch/arm/boot/dts/exynos5250.dtsi |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +0 -0
index bccda67..388983e 100644
@@ -72,6 +72,12 @@
                #clock-cells = <1>;
        };
 
Quoted 1 line

arch/arm/boot/dts/exynos5250.dtsi line 75

Quoted 1 line
arch/arm/boot/dts/exynos5250.dtsi +1 -0
+       clock_audss: audss-clock-controller@3810000 {

I removed this leading 0 as Tomasz Figa suggested.

Quoted 3 lines

Nit: other places in the same file have the leading 0, like
i2s0: i2s@03830000 {

This was the patch which got merged earlier. So I didn't modify this. Is it okey if I remove leading 0 for both of the nodes now?

Quoted 6 lines

So you could follow suit and do:

  clock_audss: audss-clock-controller@03810000 {

-Doug

Thanks
Padma

Reviewed-by
#9 lore raw

Re: [PATCH V4 3/4] ARM: dts: add Exynos audio subsystem clock controller node

Padma,

Quoted 24 lines · Padma Venkat

Hi Doug,

Quoted 21 lines · Doug Anderson

Padmavathi,

Quoted 18 lines · Padmavathi Venna

Audio subsystem introduced in s5pv210 and exynos platforms which has a internal clock controller. This patch adds a node for the same on exynos5250.

---
 arch/arm/boot/dts/exynos5250.dtsi |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +0 -0
index bccda67..388983e 100644
@@ -72,6 +72,12 @@
                #clock-cells = <1>;
        };
 
Quoted 3 lines
Quoted 1 line

arch/arm/boot/dts/exynos5250.dtsi line 75

Quoted 1 line
arch/arm/boot/dts/exynos5250.dtsi +1 -0
+       clock_audss: audss-clock-controller@3810000 {

I removed this leading 0 as Tomasz Figa suggested.

Let's just leave this as-is if Tomasz wants no leading 0. I don't much care either way but it's really nice if we're consistent within the file.

Quoted 5 lines
Quoted 2 lines

Nit: other places in the same file have the leading 0, like
i2s0: i2s@03830000 {

This was the patch which got merged earlier. So I didn't modify this. Is it okey if I remove leading 0 for both of the nodes now?

No, don't touch the i2s0 one in this patch. I guess we'll have to merge a "cleanup" patch sometime later to try to normalize all this stuff, since nobody seems to be keeping a close eye on keeping it consistent. I also see a whole bunch that have the 0x in the name which is yet another inconsistency.

#10 lore raw

PATCH v4 4/4 ARM: dts: add clock provider information for i2s controllers in Exynos5250

In reply to Padmavathi Venna

Add clock lookup information for i2s controllers on exynos5250 SoC.

---
 arch/arm/boot/dts/exynos5250.dtsi |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +13 -0
index 388983e..2b917ba 100644
@@ -20,6 +20,8 @@
 #include "skeleton.dtsi"
 #include "exynos5250-pinctrl.dtsi"
 
+#include <dt-bindings/clk/exynos-audss-clk.h>
+
 / {
 	compatible = "samsung,exynos5250";
 	interrupt-parent = <&gic>;
@@ -457,6 +459,13 @@
 			&pdma0 9
 			&pdma0 8>;
 		dma-names = "tx", "rx", "tx-sec";
+		clocks = <&clock_audss EXYNOS_I2S_BUS>,
+			<&clock_audss EXYNOS_I2S_BUS>,
+			<&clock_audss EXYNOS_SCLK_I2S>,
+			<&clock_audss EXYNOS_MOUT_AUDSS>,
+			<&clock_audss EXYNOS_MOUT_I2S>;
+		clock-names = "iis", "i2s_opclk0", "i2s_opclk1",
+				"mout_audss", "mout_i2s";
 		samsung,supports-6ch;
 		samsung,supports-rstclr;
 		samsung,supports-secdai;
@@ -471,6 +480,8 @@
 		dmas = <&pdma1 12
 			&pdma1 11>;
 		dma-names = "tx", "rx";
+		clocks = <&clock 307>;
+		clock-names = "iis";
 		pinctrl-names = "default";
 		pinctrl-0 = <&i2s1_bus>;
 	};
@@ -481,6 +492,8 @@
 		dmas = <&pdma0 12
 			&pdma0 11>;
 		dma-names = "tx", "rx";
+		clocks = <&clock 308>;
+		clock-names = "iis";
 		pinctrl-names = "default";
 		pinctrl-0 = <&i2s2_bus>;
 	};
Signature · 1 line
1.7.4.4
#11 lore raw

Re: [PATCH V4 4/4] ARM: dts: add clock provider information for i2s controllers in Exynos5250

Padmavathi,

arch/arm/boot/dts/exynos5250.dtsi line 468

Quoted 7 lines · Padmavathi Venna
arch/arm/boot/dts/exynos5250.dtsi +7 -0
+               clocks = <&clock_audss EXYNOS_I2S_BUS>,
+                       <&clock_audss EXYNOS_I2S_BUS>,
+                       <&clock_audss EXYNOS_SCLK_I2S>,
+                       <&clock_audss EXYNOS_MOUT_AUDSS>,
+                       <&clock_audss EXYNOS_MOUT_I2S>;
+               clock-names = "iis", "i2s_opclk0", "i2s_opclk1",
+                               "mout_audss", "mout_i2s";

Are there bindings for these clocks? Would be nice to see a description for what they are supposed to be.

I looked up i2s_opclk0 / i2s_opclk1 and they look reasonable at a quick glance. ...and it does seem right that iis and i2s_opclk0 are the same. ...but I don't see any place that uses the last two. Is there an in-flight patch?

-Doug

#12 lore raw

Re: [PATCH V4 4/4] ARM: dts: add clock provider information for i2s controllers in Exynos5250

Hi Doug,

Quoted 11 lines · Doug Anderson

Padmavathi,

arch/arm/boot/dts/exynos5250.dtsi line 468

Quoted 7 lines · Padmavathi Venna
arch/arm/boot/dts/exynos5250.dtsi +7 -0
+               clocks = <&clock_audss EXYNOS_I2S_BUS>,
+                       <&clock_audss EXYNOS_I2S_BUS>,
+                       <&clock_audss EXYNOS_SCLK_I2S>,
+                       <&clock_audss EXYNOS_MOUT_AUDSS>,
+                       <&clock_audss EXYNOS_MOUT_I2S>;
+               clock-names = "iis", "i2s_opclk0", "i2s_opclk1",
+                               "mout_audss", "mout_i2s";
Quoted 2 lines

Are there bindings for these clocks? Would be nice to see a description for what they are supposed to be.

Yes. They have bindings. I will add the description.

Quoted 5 lines

I looked up i2s_opclk0 / i2s_opclk1 and they look reasonable at a quick glance. ...and it does seem right that iis and i2s_opclk0 are the same. ...but I don't see any place that uses the last two. Is there an in-flight patch?

I don't have any patch for these right now. These are used internally. But as these are i2s0 base clocks I added here.

Quoted 2 lines

-Doug

Thanks
Padma