Skip to content
Snippets Groups Projects
Commit 81f402f2 authored by Gianfranco Mariotti's avatar Gianfranco Mariotti
Browse files

[C61] add MAX98357A audio support

* audio over SAI3 interface
* sound works only at 48000Hz: this derives from SAI3 assigned clock rate.
* Test details:
  aplay --device sysdefault:CARD=max98457a /usr/share/sounds/alsa/Noise.wav
parent 488d893f
No related branches found
No related tags found
No related merge requests found
......@@ -141,6 +141,33 @@
regulator-always-on;
};
max98357a: audio-codec-0 {
compatible = "maxim,max98357a";
sdmode-gpios = <&pca6416_20 11 GPIO_ACTIVE_HIGH>;
sdmode,gpio-probe-only;
#sound-dai-cells = <0>;
status = "okay";
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "max98457a";
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&cpudai>;
simple-audio-card,bitclock-master = <&cpudai>;
simple-audio-card,widgets = "Speaker", "Speakers";
simple-audio-card,routing = "Speakers", "Speaker";
status = "okay";
cpudai: simple-audio-card,cpu {
sound-dai = <&sai3>;
};
simple-audio-card,codec {
sound-dai = <&max98357a>;
};
};
sound-micfil {
compatible = "fsl,imx-audio-micfil";
model = "imx-audio-micfil";
......@@ -493,7 +520,10 @@
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <24576000>;
assigned-clock-rates = <196608000>;
fsl,sai-mclk-direction-output;
fsl,sai-synchronous-rx;
#sound-dai-cells = <0>;
status = "okay";
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment