* [PATCH 1/2] ARM: dts: exynos: Correct clocks for Exynos4 I2S module
@ 2016-12-08 11:01 Marek Szyprowski
2016-12-08 11:01 ` [PATCH 2/2] ARM: dts: exynos: Fix initial clocks configuration on Odroid X/X2/U3 boards Marek Szyprowski
2016-12-08 16:42 ` [PATCH 1/2] ARM: dts: exynos: Correct clocks for Exynos4 I2S module Krzysztof Kozlowski
0 siblings, 2 replies; 6+ messages in thread
From: Marek Szyprowski @ 2016-12-08 11:01 UTC (permalink / raw)
To: linux-samsung-soc
Cc: Marek Szyprowski, Sylwester Nawrocki, Krzysztof Kozlowski,
Bartlomiej Zolnierkiewicz, Chanwoo Choi
"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.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
arch/arm/boot/dts/exynos4.dtsi | 6 ++++--
arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 ----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index c64737b..23d85601 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -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>;
diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
index 8aa19ba..7815efd 100644
--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
@@ -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 {
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] ARM: dts: exynos: Fix initial clocks configuration on Odroid X/X2/U3 boards
2016-12-08 11:01 [PATCH 1/2] ARM: dts: exynos: Correct clocks for Exynos4 I2S module Marek Szyprowski
@ 2016-12-08 11:01 ` Marek Szyprowski
2016-12-08 16:44 ` Krzysztof Kozlowski
2016-12-08 16:42 ` [PATCH 1/2] ARM: dts: exynos: Correct clocks for Exynos4 I2S module Krzysztof Kozlowski
1 sibling, 1 reply; 6+ messages in thread
From: Marek Szyprowski @ 2016-12-08 11:01 UTC (permalink / raw)
To: linux-samsung-soc
Cc: Marek Szyprowski, Sylwester Nawrocki, Krzysztof Kozlowski,
Bartlomiej Zolnierkiewicz, Chanwoo Choi
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).
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
index 7815efd..b6b0f50 100644
--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
@@ -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>;
};
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] ARM: dts: exynos: Correct clocks for Exynos4 I2S module
2016-12-08 11:01 [PATCH 1/2] ARM: dts: exynos: Correct clocks for Exynos4 I2S module Marek Szyprowski
2016-12-08 11:01 ` [PATCH 2/2] ARM: dts: exynos: Fix initial clocks configuration on Odroid X/X2/U3 boards Marek Szyprowski
@ 2016-12-08 16:42 ` Krzysztof Kozlowski
1 sibling, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2016-12-08 16:42 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-samsung-soc, Sylwester Nawrocki, Krzysztof Kozlowski,
Bartlomiej Zolnierkiewicz, Chanwoo Choi
On Thu, Dec 08, 2016 at 12:01:53PM +0100, Marek Szyprowski wrote:
> "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.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> arch/arm/boot/dts/exynos4.dtsi | 6 ++++--
> arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 ----
Please update also exynos4412-itop-elite.dts
Beside that looks good.
Krzysztof
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index c64737b..23d85601 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -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>;
> diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> index 8aa19ba..7815efd 100644
> --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> @@ -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 {
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] ARM: dts: exynos: Fix initial clocks configuration on Odroid X/X2/U3 boards
2016-12-08 11:01 ` [PATCH 2/2] ARM: dts: exynos: Fix initial clocks configuration on Odroid X/X2/U3 boards Marek Szyprowski
@ 2016-12-08 16:44 ` Krzysztof Kozlowski
2016-12-08 17:07 ` Sylwester Nawrocki
0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2016-12-08 16:44 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-samsung-soc, Sylwester Nawrocki, Krzysztof Kozlowski,
Bartlomiej Zolnierkiewicz, Chanwoo Choi
On Thu, Dec 08, 2016 at 12:01:54PM +0100, Marek Szyprowski wrote:
> 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).
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
Looks correct, for the reference:
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Does this fixes any encountered issue (real one)? I wonder whether this
should go to fixes or not.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] ARM: dts: exynos: Fix initial clocks configuration on Odroid X/X2/U3 boards
2016-12-08 16:44 ` Krzysztof Kozlowski
@ 2016-12-08 17:07 ` Sylwester Nawrocki
2016-12-08 17:13 ` Krzysztof Kozlowski
0 siblings, 1 reply; 6+ messages in thread
From: Sylwester Nawrocki @ 2016-12-08 17:07 UTC (permalink / raw)
To: Krzysztof Kozlowski, Marek Szyprowski
Cc: linux-samsung-soc, Bartlomiej Zolnierkiewicz, Chanwoo Choi,
linux-clk
On 12/08/2016 05:44 PM, Krzysztof Kozlowski wrote:
> On Thu, Dec 08, 2016 at 12:01:54PM +0100, Marek Szyprowski wrote:
>> 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).
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>> arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 20 ++++++++++----------
>> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> Looks correct, for the reference:
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> Does this fixes any encountered issue (real one)? I wonder whether this
> should go to fixes or not.
With current code there is no issues, and in fact there should be no
such timing dependencies in DT to rely on. However, the binding convention
is to put assigned-clock* properties in a node of a device they belong
to and in this case the 'clock_audss' is more appropriate than the 'sound'
node. This patch doesn't fix any bug with current code but it might save
us some trouble with future changes.
--
Thanks,
Sylwester
> ---
> arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> index 7815efd..b6b0f50 100644
> --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> @@ -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>;
> };
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] ARM: dts: exynos: Fix initial clocks configuration on Odroid X/X2/U3 boards
2016-12-08 17:07 ` Sylwester Nawrocki
@ 2016-12-08 17:13 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2016-12-08 17:13 UTC (permalink / raw)
To: Sylwester Nawrocki
Cc: Krzysztof Kozlowski, Marek Szyprowski, linux-samsung-soc,
Bartlomiej Zolnierkiewicz, Chanwoo Choi, linux-clk
On Thu, Dec 08, 2016 at 06:07:02PM +0100, Sylwester Nawrocki wrote:
> On 12/08/2016 05:44 PM, Krzysztof Kozlowski wrote:
> > On Thu, Dec 08, 2016 at 12:01:54PM +0100, Marek Szyprowski wrote:
> >> 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).
> >>
> >> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> >> ---
> >> arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 20 ++++++++++----------
> >> 1 file changed, 10 insertions(+), 10 deletions(-)
> >
> > Looks correct, for the reference:
> > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> >
> > Does this fixes any encountered issue (real one)? I wonder whether this
> > should go to fixes or not.
>
> With current code there is no issues, and in fact there should be no
> such timing dependencies in DT to rely on. However, the binding convention
> is to put assigned-clock* properties in a node of a device they belong
> to and in this case the 'clock_audss' is more appropriate than the 'sound'
> node. This patch doesn't fix any bug with current code but it might save
> us some trouble with future changes.
>
Thanks for explanation. I am not planning any pull requests for this
cycle so the patch will have to wait till the end of 4.10-rc1
merge window.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-12-08 17:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08 11:01 [PATCH 1/2] ARM: dts: exynos: Correct clocks for Exynos4 I2S module Marek Szyprowski
2016-12-08 11:01 ` [PATCH 2/2] ARM: dts: exynos: Fix initial clocks configuration on Odroid X/X2/U3 boards Marek Szyprowski
2016-12-08 16:44 ` Krzysztof Kozlowski
2016-12-08 17:07 ` Sylwester Nawrocki
2016-12-08 17:13 ` Krzysztof Kozlowski
2016-12-08 16:42 ` [PATCH 1/2] ARM: dts: exynos: Correct clocks for Exynos4 I2S module Krzysztof Kozlowski
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.