* [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock
@ 2014-06-15 23:39 Anssi Hannula
2014-06-15 23:39 ` [PATCH 2/2] ARM: dts: imx6: remove non-working spdif rxtx4 and rxtx6 clocks Anssi Hannula
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Anssi Hannula @ 2014-06-15 23:39 UTC (permalink / raw)
To: linux-arm-kernel
The rxtx2 clock of i.MX6 S/PDIF is currently set to "asrc" clock.
However, according to SoC documentation, rxtx2 is connected to
ASRC_EXT_CLK, a different external clock.
Testing on Cubox-i system seems to confirm that: when fsl_spdif is
forced to select rxtx2 as input clock, audio playback fails with an I/O
error.
Set rxtx2 to the dummy clock by default to prevent fsl_spdif from
selecting it.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: Nicolin Chen <Guangyu.Chen@freescale.com>
Cc: Mark Brown <broonie@kernel.org>
---
This one seems clear enough.
arch/arm/boot/dts/imx6qdl.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index ce0599134a69..3aef9a2f5fda 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -181,7 +181,7 @@
<&sdma 15 18 0>;
dma-names = "rx", "tx";
clocks = <&clks 197>, <&clks 3>,
- <&clks 197>, <&clks 107>,
+ <&clks 197>, <&clks 0>,
<&clks 0>, <&clks 118>,
<&clks 0>, <&clks 139>,
<&clks 0>;
--
1.8.4.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ARM: dts: imx6: remove non-working spdif rxtx4 and rxtx6 clocks
2014-06-15 23:39 [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock Anssi Hannula
@ 2014-06-15 23:39 ` Anssi Hannula
2014-06-16 2:31 ` Nicolin Chen
2014-06-16 2:27 ` [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock Nicolin Chen
2014-06-20 7:58 ` Shawn Guo
2 siblings, 1 reply; 5+ messages in thread
From: Anssi Hannula @ 2014-06-15 23:39 UTC (permalink / raw)
To: linux-arm-kernel
The S/PDIF rxtx4 and rxtx6 clock inputs are "ESAI_HCKT" and "MLB clock",
respectively, according to the SoC documentation, and they are currently
mapped to clocks "esai" and "mlb".
However, they do not seem to actually work correctly. Testing on a
Cubox-i system with fsl_spdif driver forced to select one of those as
input will result in I/O errors on audio playback, which I believe means
missing clock signal.
Possibly the "ESAI_HCKT" and "MLB clock" refer to some other clocks
related to ESAI and MLB, or we are missing something else.
Since audio playback will not work if fsl_spdif selects these clocks
(which happens rarely), set the inputs do dummy clocks, at least for
now.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: Nicolin Chen <Guangyu.Chen@freescale.com>
Cc: Mark Brown <broonie@kernel.org>
---
Does anyone know what is wrong here? i.e. are the clocks actually wrong
or are we maybe doing something wrong with their setup?
Also, is this the correct way to "fix" the issue, or should we rather
modify the driver to not select rxtx4/rxtx6 for now (assuming no one knows
how to fix this properly, of course)?
(I haven't been involved with device trees before)
arch/arm/boot/dts/imx6qdl.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index 3aef9a2f5fda..f0d1c2334952 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -182,8 +182,8 @@
dma-names = "rx", "tx";
clocks = <&clks 197>, <&clks 3>,
<&clks 197>, <&clks 0>,
- <&clks 0>, <&clks 118>,
- <&clks 0>, <&clks 139>,
+ <&clks 0>, <&clks 0>,
+ <&clks 0>, <&clks 0>,
<&clks 0>;
clock-names = "core", "rxtx0",
"rxtx1", "rxtx2",
--
1.8.4.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock
2014-06-15 23:39 [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock Anssi Hannula
2014-06-15 23:39 ` [PATCH 2/2] ARM: dts: imx6: remove non-working spdif rxtx4 and rxtx6 clocks Anssi Hannula
@ 2014-06-16 2:27 ` Nicolin Chen
2014-06-20 7:58 ` Shawn Guo
2 siblings, 0 replies; 5+ messages in thread
From: Nicolin Chen @ 2014-06-16 2:27 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 16, 2014 at 02:39:44AM +0300, Anssi Hannula wrote:
> The rxtx2 clock of i.MX6 S/PDIF is currently set to "asrc" clock.
> However, according to SoC documentation, rxtx2 is connected to
> ASRC_EXT_CLK, a different external clock.
>
> Testing on Cubox-i system seems to confirm that: when fsl_spdif is
> forced to select rxtx2 as input clock, audio playback fails with an I/O
> error.
>
> Set rxtx2 to the dummy clock by default to prevent fsl_spdif from
> selecting it.
>
> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
> Cc: Nicolin Chen <Guangyu.Chen@freescale.com>
> Cc: Mark Brown <broonie@kernel.org>
Acked, thank you!
P.S. We might also revive rxtx5 (SYSCLK) since the driver now has the
capability to derive clock from it.
> ---
>
> This one seems clear enough.
>
> arch/arm/boot/dts/imx6qdl.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
> index ce0599134a69..3aef9a2f5fda 100644
> --- a/arch/arm/boot/dts/imx6qdl.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl.dtsi
> @@ -181,7 +181,7 @@
> <&sdma 15 18 0>;
> dma-names = "rx", "tx";
> clocks = <&clks 197>, <&clks 3>,
> - <&clks 197>, <&clks 107>,
> + <&clks 197>, <&clks 0>,
> <&clks 0>, <&clks 118>,
> <&clks 0>, <&clks 139>,
> <&clks 0>;
> --
> 1.8.4.5
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] ARM: dts: imx6: remove non-working spdif rxtx4 and rxtx6 clocks
2014-06-15 23:39 ` [PATCH 2/2] ARM: dts: imx6: remove non-working spdif rxtx4 and rxtx6 clocks Anssi Hannula
@ 2014-06-16 2:31 ` Nicolin Chen
0 siblings, 0 replies; 5+ messages in thread
From: Nicolin Chen @ 2014-06-16 2:31 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 16, 2014 at 02:39:45AM +0300, Anssi Hannula wrote:
> The S/PDIF rxtx4 and rxtx6 clock inputs are "ESAI_HCKT" and "MLB clock",
> respectively, according to the SoC documentation, and they are currently
> mapped to clocks "esai" and "mlb".
>
> However, they do not seem to actually work correctly. Testing on a
> Cubox-i system with fsl_spdif driver forced to select one of those as
> input will result in I/O errors on audio playback, which I believe means
> missing clock signal.
>
> Possibly the "ESAI_HCKT" and "MLB clock" refer to some other clocks
> related to ESAI and MLB, or we are missing something else.
Yes, they are actually the clocks from outside of SoC: HCKT of ESAI could
be set as an input PAD while MLB clock is the bit clock used by MLB.
> Since audio playback will not work if fsl_spdif selects these clocks
> (which happens rarely), set the inputs do dummy clocks, at least for
> now.
>
> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
> Cc: Nicolin Chen <Guangyu.Chen@freescale.com>
Acked, thank you.
Nicolin
> Cc: Mark Brown <broonie@kernel.org>
> ---
>
> Does anyone know what is wrong here? i.e. are the clocks actually wrong
> or are we maybe doing something wrong with their setup?
>
> Also, is this the correct way to "fix" the issue, or should we rather
> modify the driver to not select rxtx4/rxtx6 for now (assuming no one knows
> how to fix this properly, of course)?
> (I haven't been involved with device trees before)
>
>
> arch/arm/boot/dts/imx6qdl.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
> index 3aef9a2f5fda..f0d1c2334952 100644
> --- a/arch/arm/boot/dts/imx6qdl.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl.dtsi
> @@ -182,8 +182,8 @@
> dma-names = "rx", "tx";
> clocks = <&clks 197>, <&clks 3>,
> <&clks 197>, <&clks 0>,
> - <&clks 0>, <&clks 118>,
> - <&clks 0>, <&clks 139>,
> + <&clks 0>, <&clks 0>,
> + <&clks 0>, <&clks 0>,
> <&clks 0>;
> clock-names = "core", "rxtx0",
> "rxtx1", "rxtx2",
> --
> 1.8.4.5
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock
2014-06-15 23:39 [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock Anssi Hannula
2014-06-15 23:39 ` [PATCH 2/2] ARM: dts: imx6: remove non-working spdif rxtx4 and rxtx6 clocks Anssi Hannula
2014-06-16 2:27 ` [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock Nicolin Chen
@ 2014-06-20 7:58 ` Shawn Guo
2 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2014-06-20 7:58 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 16, 2014 at 02:39:44AM +0300, Anssi Hannula wrote:
> The rxtx2 clock of i.MX6 S/PDIF is currently set to "asrc" clock.
> However, according to SoC documentation, rxtx2 is connected to
> ASRC_EXT_CLK, a different external clock.
>
> Testing on Cubox-i system seems to confirm that: when fsl_spdif is
> forced to select rxtx2 as input clock, audio playback fails with an I/O
> error.
>
> Set rxtx2 to the dummy clock by default to prevent fsl_spdif from
> selecting it.
>
> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
> Cc: Nicolin Chen <Guangyu.Chen@freescale.com>
> Cc: Mark Brown <broonie@kernel.org>
Applied both, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-20 7:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-15 23:39 [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock Anssi Hannula
2014-06-15 23:39 ` [PATCH 2/2] ARM: dts: imx6: remove non-working spdif rxtx4 and rxtx6 clocks Anssi Hannula
2014-06-16 2:31 ` Nicolin Chen
2014-06-16 2:27 ` [PATCH 1/2] ARM: dts: imx6: remove wrong spdif rxtx2 clock Nicolin Chen
2014-06-20 7:58 ` Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).