I've read all the documents suggested by you and this is the outcome:
* route SAI3 signals to the J1001 connector
* probe simple-audio-card soundcard
Probe errors still happen, changes are made to the imx93-11x11-evk.dts device tree - disabling all the other sound cards and setting the SAI3 clock to a higher value. SAI3 routing is set with reg_audio_switch1 node, similarly to how it's done in the imx93-11x11-evk-aud-hat.dts.
/ {
reg_audio_switch1: regulator-audio-switch1 {
compatible = "regulator-fixed";
regulator-name = "audio-switch1";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&adp5585gpio 4 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
pcm5102a: pcm5102a-codec {
#sound-dai-cells = <0>;
compatible = "ti,pcm5102a";
};
sound-pcm5102a {
compatible = "simple-audio-card";
simple-audio-card,name = "pcm5102a-audio";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-inversion;
simple-audio-card,frame-master = <&pcm5102a_cpu>;
simple-audio-card,bitclock-master = <&pcm5102a_cpu>;
pcm5102a_cpu: simple-audio-card,cpu {
sound-dai = <&sai3>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
};
pcm5102a_dai: simple-audio-card,codec {
sound-dai = <&pcm5102a>;
};
};
};
&sai3 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX93_CLK_SAI3>;
assigned-clock-parents = <&clk IMX93_CLK_AUDIO_PLL>;
assigned-clock-rates = <24576000>;
fsl,sai-mclk-direction-output;
status = "okay";
};
The probe error is as below:
dmesg output:
[ 20.376045] simple_probe START!
[ 20.379236] CODEC found: sound-pcm5102a
[ 20.383100] simple-card error!
[ 20.386346] CODEC found: sound-pcm5102a
[ 20.390458] simple-card error!
[ 20.393681] CODEC found: sound-pcm5102a
[ 20.397741] simple-card error!
[ 20.401419] platform sound-pcm5102a: deferred probe pending
[ 20.408157] platform regulator-dvdd_sel: deferred probe pending
[ 20.415109] platform regulator-dvdd: deferred probe pending
[ 20.421724] platform regulator-vdd: deferred probe pending
[ 20.428267] platform regulator-vddo: deferred probe pending
[ 20.434929] platform regulator-vaa_sel: deferred probe pending
[ 20.441818] platform regulator-avdd: deferred probe pending
[ 20.448467] i2c 2-003c: deferred probe pending
cat /sys/kernel/debug/devices_deferred
sound-pcm5102a asoc-simple-card: parse error
regulator-dvdd_sel platform: wait for supplier gpio-isp@34
regulator-dvdd platform: wait for supplier gpio-isp@34
regulator-vdd platform: wait for supplier gpio-isp@34
regulator-vddo platform: wait for supplier gpio-isp@34
regulator-vaa_sel platform: wait for supplier gpio-isp@34
regulator-avdd platform: wait for supplier gpio-isp@34
2-003c i2c: wait for supplier gpio-isp@34
I'm not sure if all the "deferred" messages are related to the sound-pcm5102a, or just the first one, this seems like a problem related to adp5585, the U103 Mux controlled by I2C. What am I missing here?