Hello,
After enabling audio on our project we decided we don’t want to use NAU8822 audio IC, but MAX98357 IC. After searching online for an MAX overlay I’ve came across this topic
and I’ve created my overlay:
/dts-v1/;
/plugin/;
//#include <imx8mm-pinfunc.h>
#include <dt-bindings/clock/imx8mm-clock.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
/ {
compatible = "toradex,verdin-imx8mm";
fragment@0
{
target-path = "/";
__overlay__{
codec_max: max98357a@0
{
compatible = "maxim,max98357a";
#sound-dai-cells = <0>;
status = "okay";
};
};
};
fragment@1
{
target = <&nau8822_1a>;
__overlay__{
status = "disabled";
};
};
fragment@2
{
target = <&sound_card>;
__overlay__{
compatible = "simple-audio-card";
simple-audio-card,bitclock-master = <&dailink_master_cpu>;
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&dailink_master_cpu>;
simple-audio-card,name = "max98357a";
dailink_master: simple-audio-card,codec {
sound-dai = <&codec_ma>;
clocks = <&clk IMX8MM_CLK_SAI2_ROOT>;
};
dailink_master_cpu: simple-audio-card,cpu {
sound-dai = <&sai2>;
};
};
};
};
I’ve compiled overlay and max98357 module using torizoncore-builder and copied them to my Verdin. After reboot, new node max98357a is created in /proc/device-tree/, however no max98357 module is applied and after manually inserting module:
cd /lib/modules/*version*/extra/
sudo insmod max98357a.ko
dmesg outputs this:
Can someone point out what am I doing wrong ?