Skip to contentSkip to conversation

ARM: dts: exynos: Correct clocks for Exynos4 I2S module

PATCH Applied Marek Szyprowski 2 participants 6 messages Dec 9, 2016 – Dec 28, 2016

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

PATCH v2 1/2 ARM: dts: exynos: Correct clocks for Exynos4 I2S module

"iis", "i2s_opclk0" and "i2s_opclk1" are standard clocks for Exynos4 I2S hardware module, so they should be defined in .dtsi file not in the random board .dts file.

---
Changelog:
v2:
- added changes for exynos4412-itop-elite board

---
 arch/arm/boot/dts/exynos4.dtsi                  | 6 ++++--
 arch/arm/boot/dts/exynos4412-itop-elite.dts     | 4 ----
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 ----
 3 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/boot/dts/exynos4.dtsi +4 -2
index c64737b..23d85601 100644
@@ -64,8 +64,10 @@
 	i2s0: i2s@03830000 {
 		compatible = "samsung,s5pv210-i2s";
 		reg = <0x03830000 0x100>;
-		clocks = <&clock_audss EXYNOS_I2S_BUS>;
-		clock-names = "iis";
+		clocks = <&clock_audss EXYNOS_I2S_BUS>,
+			 <&clock_audss EXYNOS_DOUT_AUD_BUS>,
+			 <&clock_audss EXYNOS_SCLK_I2S>;
+		clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
 		#clock-cells = <1>;
 		clock-output-names = "i2s_cdclk0";
 		dmas = <&pdma0 12>, <&pdma0 11>, <&pdma0 10>;
arch/arm/boot/dts/exynos4412-itop-elite.dts +0 -4
index 76d87f3..1ac9129 100644
@@ -198,10 +198,6 @@
 	pinctrl-0 = <&i2s0_bus>;
 	pinctrl-names = "default";
 	status = "okay";
-	clocks = <&clock_audss EXYNOS_I2S_BUS>,
-		 <&clock_audss EXYNOS_DOUT_AUD_BUS>,
-		 <&clock_audss EXYNOS_SCLK_I2S>;
-	clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
 };
 
 &pinctrl_1 {
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +0 -4
index 8aa19ba..7815efd 100644
@@ -503,10 +503,6 @@
 	pinctrl-0 = <&i2s0_bus>;
 	pinctrl-names = "default";
 	status = "okay";
-	clocks = <&clock_audss EXYNOS_I2S_BUS>,
-		 <&clock_audss EXYNOS_DOUT_AUD_BUS>,
-		 <&clock_audss EXYNOS_SCLK_I2S>;
-	clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
 };
 
 &mixer {
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 2/2 ARM: dts: exynos: Fix initial audio clocks configuration on Exynos4 boards

Move assigned clocks properties from sound node to audio subsystem clock controller node. This way clocks topology and rates are set just after probing audio clocks controller. Leaving those properties under sound node doesn't guarantee to configure them before they are being used (for example i2s hardware module can be probed in parallel and it also require proper audio clocks configuration).

---
Changelog:
v2:
- added changes for exynos4412-itop-elite board

---
 arch/arm/boot/dts/exynos4412-itop-elite.dts     | 21 ++++++++++-----------
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 20 ++++++++++----------
 2 files changed, 20 insertions(+), 21 deletions(-)
arch/arm/boot/dts/exynos4412-itop-elite.dts +10 -11
index 1ac9129..d660930 100644
@@ -82,17 +82,6 @@
 		compatible = "simple-audio-card";
 		simple-audio-card,name = "wm-sound";
 
-		assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
-				<&clock_audss EXYNOS_MOUT_I2S>,
-				<&clock_audss EXYNOS_DOUT_SRP>,
-				<&clock_audss EXYNOS_DOUT_AUD_BUS>;
-		assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
-				<&clock_audss EXYNOS_MOUT_AUDSS>;
-		assigned-clock-rates = <0>,
-				<0>,
-				<112896000>,
-				<11289600>;
-
 		simple-audio-card,format = "i2s";
 		simple-audio-card,bitclock-master = <&link0_codec>;
 		simple-audio-card,frame-master = <&link0_codec>;
@@ -145,6 +134,16 @@
 	status = "okay";
 };
 
+&clock_audss {
+	assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
+			<&clock_audss EXYNOS_MOUT_I2S>,
+			<&clock_audss EXYNOS_DOUT_SRP>,
+			<&clock_audss EXYNOS_DOUT_AUD_BUS>;
+	assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
+			<&clock_audss EXYNOS_MOUT_AUDSS>;
+	assigned-clock-rates = <0>, <0>, <112896000>, <11289600>;
+};
+
 &ehci {
 	status = "okay";
 	/* In order to reset USB ethernet */
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +10 -10
index 7815efd..b6b0f50 100644
@@ -43,16 +43,6 @@
 
 	sound: sound {
 		compatible = "simple-audio-card";
-		assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
-				<&clock_audss EXYNOS_MOUT_I2S>,
-				<&clock_audss EXYNOS_DOUT_SRP>,
-				<&clock_audss EXYNOS_DOUT_AUD_BUS>;
-		assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
-				<&clock_audss EXYNOS_MOUT_AUDSS>;
-		assigned-clock-rates = <0>,
-				<0>,
-				<192000000>,
-				<19200000>;
 
 		simple-audio-card,format = "i2s";
 		simple-audio-card,bitclock-master = <&link0_codec>;
@@ -157,6 +147,16 @@
 	status = "okay";
 };
 
+&clock_audss {
+	assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
+			<&clock_audss EXYNOS_MOUT_I2S>,
+			<&clock_audss EXYNOS_DOUT_SRP>,
+			<&clock_audss EXYNOS_DOUT_AUD_BUS>;
+	assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
+			<&clock_audss EXYNOS_MOUT_AUDSS>;
+	assigned-clock-rates = <0>, <0>, <192000000>, <19200000>;
+};
+
 &cpu0 {
 	cpu0-supply = <&buck2_reg>;
 };
Signature · 1 line
1.9.1
maintainer Reviewed-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] ARM: dts: exynos: Fix initial audio clocks configuration on Exynos4 boards

Quoted 8 lines · Marek Szyprowski

Move assigned clocks properties from sound node to audio subsystem clock controller node. This way clocks topology and rates are set just after probing audio clocks controller. Leaving those properties under sound node doesn't guarantee to configure them before they are being used (for example i2s hardware module can be probed in parallel and it also require proper audio clocks configuration).

Quoted 9 lines

---
Changelog:
v2:
- added changes for exynos4412-itop-elite board

---
 arch/arm/boot/dts/exynos4412-itop-elite.dts     | 21 ++++++++++-----------
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 20 ++++++++++----------
 2 files changed, 20 insertions(+), 21 deletions(-)

Best regards,
Krzysztof

maintainer Applied
#3 lore raw

Re: [PATCH v2 2/2] ARM: dts: exynos: Fix initial audio clocks configuration on Exynos4 boards

In reply to Marek Szyprowski
Quoted 8 lines · Marek Szyprowski

Move assigned clocks properties from sound node to audio subsystem clock controller node. This way clocks topology and rates are set just after probing audio clocks controller. Leaving those properties under sound node doesn't guarantee to configure them before they are being used (for example i2s hardware module can be probed in parallel and it also require proper audio clocks configuration).

Quoted 9 lines

---
Changelog:
v2:
- added changes for exynos4412-itop-elite board

---
 arch/arm/boot/dts/exynos4412-itop-elite.dts     | 21 ++++++++++-----------
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 20 ++++++++++----------
 2 files changed, 20 insertions(+), 21 deletions(-)

Thanks, applied.

Best regards,
Krzysztof

maintainer Reviewed-by on v2 1/2
#4 lore raw
In reply to Marek Szyprowski
Quoted 9 lines · Marek Szyprowski

"iis", "i2s_opclk0" and "i2s_opclk1" are standard clocks for Exynos4 I2S hardware module, so they should be defined in .dtsi file not in the random board .dts file.

---
Changelog:
v2:
- added changes for exynos4412-itop-elite board

Quoted 5 lines
---
 arch/arm/boot/dts/exynos4.dtsi                  | 6 ++++--
 arch/arm/boot/dts/exynos4412-itop-elite.dts     | 4 ----
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 ----
 3 files changed, 4 insertions(+), 10 deletions(-)

For the reference:

Best regards,
Krzysztof

maintainer Applied
#5 lore raw
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Marek Szyprowski

"iis", "i2s_opclk0" and "i2s_opclk1" are standard clocks for Exynos4 I2S hardware module, so they should be defined in .dtsi file not in the random board .dts file.

Quoted 10 lines
Quoted 10 lines

---
Changelog:
v2:
- added changes for exynos4412-itop-elite board

---
 arch/arm/boot/dts/exynos4.dtsi                  | 6 ++++--
 arch/arm/boot/dts/exynos4412-itop-elite.dts     | 4 ----
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 ----
 3 files changed, 4 insertions(+), 10 deletions(-)

Thanks, applied.

Best regards,
Krzysztof