Hi,
We're developing a board with two audio codecs SGTL5000 using a IMX6 Solo System On Module (Toradex Colibri IMX6). (Kernel 3.10.17)
The SOM has one sgtl5000 integrated connected at the ssi in the slave mode, We add a new sgtl5000 on the base board connected at the ssi master mode.
I modified all my device tree to adapt to I2S Master mode.
When I remove the sgtl5000 from the SoM manually (de-soldering) the kernel could attach my second sgtl5000 (base board).
When I use a SoM with sgtl5000 + a base board with sgtl5000 , the kernel could attach just one sgtl5000.
Using 2 sgtl5000 (SoM + Base Board)
Last login: Tue Jan 26 04:10:46 UTC 2016 on ttymxc0
root@colibri-imx6:~# dmesg | grep sgtl
[ 2.367998] sgtl5000 1-000a: sgtl5000 revision 0x11
[ 2.390062] sgtl5000 2-000a: sgtl5000 revision 0x11
[ 2.435627] sgtl5000 1-000a: Failed to get supply 'VDDD': -19
[ 2.447995] sgtl5000 1-000a: Using internal LDO instead of VDDD
[ 2.469102] imx-sgtl5000 sound1.27: sgtl5000 <-> 2028000.ssi mapping ok
[ 2.479305] sgtl5000 2-000a: Failed to get supply 'VDDD': -19
[ 2.491893] sgtl5000 2-000a: Failed to set supply VDDD_LDO
[ 2.499109] sgtl5000 2-000a: failed to register regulator
[ 2.506160] sgtl5000 2-000a: Failed to register vddd internal supplies: -16
[ 2.514727] sgtl5000 2-000a: ASoC: failed to probe CODEC -16
[ 2.522002] imx-sgtl5000 sound2.28: ASoC: failed to instantiate card -16
[ 2.530371] imx-sgtl5000 sound2.28: snd_soc_register_card failed (-16)
[ 2.538556] imx-sgtl5000: probe of sound2.28 failed with error -16
[ 2.739346] #0: imx6-colibri-sgtl5000
Using Only one Sgtl5000 (Removinf the Sgtl5000 from SoM)
root@colibri-imx6:~# dmesg | grep sgtl
[ 2.216757] sgtl5000_read16: ret=-5 reg=0 addr=a
[ 2.221669] sgtl5000_read16: ret=-5 reg=0 addr=a
[ 2.226604] sgtl5000_read16: ret=-5 reg=0 addr=a
[ 2.232226] sgtl5000 2-000a: sgtl5000 revision 0x11
[ 2.259945] imx-sgtl5000 sound1.27: ASoC: CODEC (null) not registered
[ 2.266589] imx-sgtl5000 sound1.27: snd_soc_register_card failed (-517)
[ 2.273354] platform sound1.27: Driver imx-sgtl5000 requests probe deferral
[ 2.280835] sgtl5000 2-000a: Failed to get supply 'VDDD': -19
[ 2.290665] sgtl5000 2-000a: Using internal LDO instead of VDDD
[ 2.309579] imx-sgtl5000 sound2.28: sgtl5000 <-> 202c000.ssi mapping ok
[ 2.417388] imx-sgtl5000 sound1.27: ASoC: Failed to create card debugfs directory
[ 2.425044] imx-sgtl5000 sound1.27: ASoC: CODEC (null) not registered
[ 2.431595] imx-sgtl5000 sound1.27: snd_soc_register_card failed (-517)
[ 2.438347] platform sound1.27: Driver imx-sgtl5000 requests probe deferral
[ 2.475710] imx-sgtl5000 sound1.27: ASoC: Failed to create card debugfs directory
[ 2.483370] imx-sgtl5000 sound1.27: ASoC: CODEC (null) not registered
[ 2.489937] imx-sgtl5000 sound1.27: snd_soc_register_card failed (-517)
[ 2.496702] platform sound1.27: Driver imx-sgtl5000 requests probe deferral
[ 2.523435] #0: imx6-colibri-sgtl5000
[ 5.794814] imx-sgtl5000 sound1.27: ASoC: Failed to create card debugfs directory
[ 5.982093] imx-sgtl5000 sound1.27: ASoC: CODEC (null) not registered **Ok there's no sgtl5000
[ 5.988763] imx-sgtl5000 sound1.27: snd_soc_register_card failed (-517)
[ 6.084338] platform sound1.27: Driver imx-sgtl5000 requests probe deferral
Pinout
| Signal | Pin (SoM)
| | iMX6 Function | iMX6 Note1 | iMX6 Note2 | iMX6 ALT | iMX6 Pin SoC |
| DIGITAL_AUDIO_2_I2S_MASTER_DIN | 159 | | AUD3_RXD | | | ALT4 | CSI0_DATA07 |
| DIGITAL_AUDIO_2_I2S_MASTER_DOUT | 155 | | AUD3_TXD | | | ALT4 | CSI0_DATA05 |
| DIGITAL_AUDIO_2_I2S_MASTER_LRCLK | 157 | | AUD3_TXFS | | | ALT4 | CSI0_DATA06 |
| DIGITAL_AUDIO_2_I2S_MASTER_SCLK | 153 | | AUD3_TXC | | | ALT4 | CSI0_DATA04 |
Using two sgtl5000
root@colibri-imx6:~# i2cdetect -y 1 (SoM i2c sgtl5000 at 0x0a)
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- 08 -- UU -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@colibri-imx6:~# i2cdetect -y 2 (external board i2c sgtl5000 at 0x0a)
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- UU -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@colibri-imx6:~#
Some device tree modifications
imx6dl-colibri-eval-v7.dts
&i2c3 {
status = "okay";
/* M41T0M6 real time clock on carrier board */
rtc_i2c: rtc@68 {
compatible = "st,m41t00";
reg = <0x68>;
};
audioclk: ext12Mhz {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <12288000>;
};
codec2: sgtl5000@0a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
clocks = <&audioclk 0>;
VDDA-supply = <®_2p5v>;
VDDIO-supply = <®_3p3v>;
};
};
Imx6qdl-colibri-v7.dtsi
audmux {
pinctrl_audmux_t1: audmux-t1 {
fsl,pins = <
MX6QDL_PAD_KEY_COL0__AUD5_TXC 0x130b0
MX6QDL_PAD_KEY_ROW0__AUD5_TXD 0x130b0
MX6QDL_PAD_KEY_COL1__AUD5_TXFS 0x130b0
MX6QDL_PAD_KEY_ROW1__AUD5_RXD 0x130b0
>;
};
pinctrl_audmux_t2: audmux-t2 {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0
MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x130b0
MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0
MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x130b0
>;
};
};
&ssi1 {
fsl,mode = "i2s-slave";
status = "okay";
};
&ssi2 {
fsl,mode = "i2s-master";
status = "okay";
};
sound1 {
compatible = "fsl,imx6-colibri-sgtl5000",
"fsl,imx-audio-sgtl5000";
model = "imx6-colibri-sgtl5000";
ssi-controller = <&ssi1>;
audio-codec = <&codec1>;
audio-routing =
"MIC_IN", "Mic Jack",
"Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT";
mux-int-port = <1>;
mux-ext-port = <5>;
};
sound2 {
compatible = "fsl,imx6-colibri-sgtl5000",
"fsl,imx-audio-sgtl5000";
model = "imx6-colibri-sgtl5000"; //I testes with other name too, imx6-colibri-sgt5000-2
ssi-controller = <&ssi2>;
audio-codec = <&codec2>;
audio-routing =
"MIC_IN", "Mic Jack",
"Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT";
mux-int-port = <2>;
mux-ext-port = <3>;
};
&audmux {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_audmux_t1 &pinctrl_audmux_mclk_2 &pinctrl_mic_gnd
&pinctrl_audmux_t2 >;
status = "okay";
};
Someone could help to fix this problem?
Thank you very much!
Best Regards,
Caio Pereira