* [PATCH] ARM: dts: stm32: add system-clock-direction-out on stm32mp15xx-dkx
@ 2025-05-21 15:04 Olivier Moysan
2025-07-04 9:20 ` Alexandre TORGUE
0 siblings, 1 reply; 2+ messages in thread
From: Olivier Moysan @ 2025-05-21 15:04 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue
Cc: Olivier Moysan, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
The commit 5725bce709db
("ASoC: simple-card-utils: Unify clock direction by clk_direction")
corrupts the audio on STM32MP15 DK sound cards.
The parent clock is not correctly set, because set_sai_ck_rate() is not
executed in stm32_sai_set_sysclk() callback.
This occurs because set_sysclk() is called with the wrong direction,
SND_SOC_CLOCK_IN instead of SND_SOC_CLOCK_OUT.
Add system-clock-direction-out property in SAI2A endpoint node of
STM32MP15XX-DKX device tree, to specify the MCLK clock direction.
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
---
arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
index a5511b1f0ce3..c74e36676d1b 100644
--- a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
@@ -515,6 +515,7 @@ sai2a_endpoint: endpoint {
remote-endpoint = <&cs42l51_tx_endpoint>;
dai-format = "i2s";
mclk-fs = <256>;
+ system-clock-direction-out;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: dts: stm32: add system-clock-direction-out on stm32mp15xx-dkx
2025-05-21 15:04 [PATCH] ARM: dts: stm32: add system-clock-direction-out on stm32mp15xx-dkx Olivier Moysan
@ 2025-07-04 9:20 ` Alexandre TORGUE
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre TORGUE @ 2025-07-04 9:20 UTC (permalink / raw)
To: Olivier Moysan, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin
Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel
Hi Olivier
On 5/21/25 17:04, Olivier Moysan wrote:
> The commit 5725bce709db
> ("ASoC: simple-card-utils: Unify clock direction by clk_direction")
> corrupts the audio on STM32MP15 DK sound cards.
> The parent clock is not correctly set, because set_sai_ck_rate() is not
> executed in stm32_sai_set_sysclk() callback.
> This occurs because set_sysclk() is called with the wrong direction,
> SND_SOC_CLOCK_IN instead of SND_SOC_CLOCK_OUT.
>
> Add system-clock-direction-out property in SAI2A endpoint node of
> STM32MP15XX-DKX device tree, to specify the MCLK clock direction.
>
> Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
> ---
> arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
> index a5511b1f0ce3..c74e36676d1b 100644
> --- a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
> +++ b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
> @@ -515,6 +515,7 @@ sai2a_endpoint: endpoint {
> remote-endpoint = <&cs42l51_tx_endpoint>;
> dai-format = "i2s";
> mclk-fs = <256>;
> + system-clock-direction-out;
> dai-tdm-slot-num = <2>;
> dai-tdm-slot-width = <32>;
> };
Applied on stm32-next.
Thanks !!
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-04 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 15:04 [PATCH] ARM: dts: stm32: add system-clock-direction-out on stm32mp15xx-dkx Olivier Moysan
2025-07-04 9:20 ` Alexandre TORGUE
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).