Skip to content

Commit feebfe9

Browse files
Andrejs Cainikovsr-vignesh
authored andcommitted
arm64: dts: k3-am625-verdin: enable nau8822 pll
In current configuration, nau8822 codec on development carrier board provides distorted audio output. This happens due to reference clock is fixed to 25MHz and no PLL is enabled. Following is the calculation of deviation error for different frequencies: 44100Hz: fs = 256 (fixed) prescaler = 2 target frequency = 44100 * 256 * 2 = 22579200 deviation = 22579200 vs 25000000 = 9.6832% 48000Hz: fs = 256 (fixed) prescaler = 2 target frequency = 48000 * 256 * 2 = 24576000 deviation = 24576000 vs 25000000 = 1.696% Enabling nau822 PLL via providing mclk-fs property to simple-audio-card configures clocks properly, but also adjusts audio reference clock (mclk), which in case of TI AM62 should be avoided, as it only supports 25MHz output [1][2]. This change enables PLL on nau8822 by providing mclk-fs, and moves away audio reference clock from DAI configuration, which prevents simple-audio-card to adjust it before every playback [3]. [1]: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1175479/processor-sdk-am62x-output-audio_ext_refclk0-as-mclk-for-codec-and-mcbsp/4444986#4444986 [2]: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1188051/am625-audio_ext_refclk1-clock-output---dts-support/4476322#4476322 [3]: sound/soc/generic/simple-card-utils.c#L441 Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Link: https://lore.kernel.org/r/20240418105730.120913-1-andrejs.cainikovs@gmail.com Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
1 parent b6861f1 commit feebfe9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

arch/arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
simple-audio-card,bitclock-master = <&codec_dai>;
1515
simple-audio-card,format = "i2s";
1616
simple-audio-card,frame-master = <&codec_dai>;
17+
simple-audio-card,mclk-fs = <256>;
1718
simple-audio-card,name = "verdin-nau8822";
1819
simple-audio-card,routing =
1920
"Headphones", "LHP",
@@ -34,7 +35,6 @@
3435
"Line", "Line In";
3536

3637
codec_dai: simple-audio-card,codec {
37-
clocks = <&audio_refclk1>;
3838
sound-dai = <&nau8822_1a>;
3939
};
4040

@@ -107,6 +107,8 @@
107107
reg = <0x1a>;
108108
pinctrl-names = "default";
109109
pinctrl-0 = <&pinctrl_i2s1_mclk>;
110+
clock-names = "mclk";
111+
clocks = <&audio_refclk1>;
110112
#sound-dai-cells = <0>;
111113
};
112114

0 commit comments

Comments
 (0)