[PATCH 3/3] ARM: dts: stm32: Use SAI to generate bit and frame clock on STM32MP15xx DHCOM PDK2

Marek Vasut marex at denx.de
Fri Aug 30 14:56:38 PDT 2024


By default the SGTL5000 derives bit and frame clock from MCLK, which
does not produce particularly accurate results. The SGTL5000 PLL does
improve the accuracy, but also increases power consumption. Using the
SoC SAI interface as bit and frame clock source results in the best
accuracy without the power consumption increase downside. Switch the
bit and frame clock direction from SAI to SGTL5000, reduce mclk-fs to
match.

Signed-off-by: Marek Vasut <marex at denx.de>
---
Cc: Alexandre Torgue <alexandre.torgue at foss.st.com>
Cc: Conor Dooley <conor+dt at kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt at kernel.org>
Cc: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
Cc: Rob Herring <robh at kernel.org>
Cc: devicetree at vger.kernel.org
Cc: kernel at dh-electronics.com
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-stm32 at st-md-mailman.stormreply.com
---
 arch/arm/boot/dts/st/stm32mp15xx-dhcom-pdk2.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/st/stm32mp15xx-dhcom-pdk2.dtsi b/arch/arm/boot/dts/st/stm32mp15xx-dhcom-pdk2.dtsi
index ea933da64903c..171d7c7658fa8 100644
--- a/arch/arm/boot/dts/st/stm32mp15xx-dhcom-pdk2.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15xx-dhcom-pdk2.dtsi
@@ -191,15 +191,11 @@ sgtl5000_port: port {
 
 			sgtl5000_tx_endpoint: endpoint at 0 {
 				reg = <0>;
-				bitclock-master;
-				frame-master;
 				remote-endpoint = <&sai2a_endpoint>;
 			};
 
 			sgtl5000_rx_endpoint: endpoint at 1 {
 				reg = <1>;
-				bitclock-master;
-				frame-master;
 				remote-endpoint = <&sai2b_endpoint>;
 			};
 		};
@@ -245,10 +241,12 @@ sai2a: audio-controller at 4400b004 {
 		sai2a_port: port {
 			sai2a_endpoint: endpoint {
 				remote-endpoint = <&sgtl5000_tx_endpoint>;
+				bitclock-master;
 				dai-format = "i2s";
 				dai-tdm-slot-num = <2>;
 				dai-tdm-slot-width = <16>;
-				mclk-fs = <512>;
+				frame-master;
+				mclk-fs = <256>;
 			};
 		};
 	};
@@ -263,10 +261,12 @@ sai2b: audio-controller at 4400b024 {
 		sai2b_port: port {
 			sai2b_endpoint: endpoint {
 				remote-endpoint = <&sgtl5000_rx_endpoint>;
+				bitclock-master;
 				dai-format = "i2s";
 				dai-tdm-slot-num = <2>;
 				dai-tdm-slot-width = <16>;
-				mclk-fs = <512>;
+				frame-master;
+				mclk-fs = <256>;
 			};
 		};
 	};
-- 
2.45.2




More information about the linux-arm-kernel mailing list