Hello,
I’m working with a Colibri iMX6ULL 512MB Wi-Fi / Bluetooth | V1.1A installed on to a custom carrier board. We’re using the following setup:
- Hardware: Colibri iMX6ULL 512MB WB IT V1.1A
- Software version: Toradex Embedded Linux Console Demo v2.8b6, release 2019-12-10.
- Kernel version: 4.9.166 (from git branch Colibri-iMX6ULL_LXDE-Image_2.8b6.184-20190401)
- I had trouble getting yocto to compile, so I just downloaded and compiled the kernel using colibri-imx6ull_defconfig and added the drivers for the SGTL5000, as shown in the diff attached to this post.
The board has an SGTL5000 codec connected to SAI3, as shown below:
[upload|dwCdUhpxyDcUN+G/40dzAfFsAaM=]
[upload|7pHtV3M/XJoaPQA1kKmUbnBTCOc=]
I’ve been trying to configure the SAI3 port so that in addition to providing sound output to the codec chip, I want it to provide SYS_MCLK as well. I’ve been trying to modify the device tree to achieve this, using some of the existing examples as a reference, but unfortunately, I haven’t been able to get any output on MCLK. If we provide the SGTL5000 with an external MCLK, the SGTL5000 can be probed over the I2C lines just fine, but we get the following error in dmesg:
[ 2.105996] sgtl5000 0-000a: sgtl5000 revision 0x11
[ 2.117718] sgtl5000 0-000a: Using internal LDO instead of VDDD: check ER1
[ 2.166052] imx-sgtl5000 sound: ASoC: CPU DAI (null) not registered
[ 2.176372] imx-sgtl5000 sound: snd_soc_register_card failed (-517)
[ 2.452564] imx-sgtl5000 sound: ASoC: CPU DAI (null) not registered
[ 2.460539] imx-sgtl5000 sound: snd_soc_register_card failed (-517)
[ 2.958312] imx-sgtl5000 sound: ASoC: CPU DAI (null) not registered
[ 2.968292] imx-sgtl5000 sound: snd_soc_register_card failed (-517)
[ 3.130565] imx-sgtl5000 sound: ASoC: CPU DAI (null) not registered
[ 3.138826] imx-sgtl5000 sound: snd_soc_register_card failed (-517)
Here’s the device tree I’m using:
/dts-v1/;
#include "imx6ull-colibri.dtsi"
#include "imx6ull-colibri-eval-v3.dtsi"
/ {
model = "Precept Health MedManager";
compatible = "toradex,colibri_imx6ull-wifi-eval", "fsl,imx6ull";
clocks {
mclk: mclk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <12288000>;
};
};
sound {
compatible = "fsl,imx-audio-sgtl5000";
model = "imx-audio-sgtl5000";
ssi-controller = <&sai3>;
asrc-controller = <&asrc>;
codec-master;
cpu-dai = <&sai3>;
audio-codec = <&sgtl5000>;
audio-routing =
"Line Out Jack", "LINE_OUT";
mux-int-port = <1>;
mux-ext-port = <3>;
};
};
/delete-node/ &mcp251x0;
/delete-node/ &atmel_mxt_ts;
/delete-node/ &touch;
&spidev0 {
status = "okay";
};
&i2c1 {
sgtl5000: codec@a {
compatible = "fsl,sgtl5000";
reg = <0xa>;
clocks = <&mclk>;
micbias-resistor-k-ohms = <2>;
micbias-voltage-m-volts = <2250>;
VDDA-supply = <®_module_3v3>;
VDDIO-supply = <®_module_3v3>;
status = "okay";
/*#sound-dai-cells = <0>;*/
};
};
&pinctrl_lcdif_dat {
fsl,pins = <>;
};
&pinctrl_lcdif_ctrl {
fsl,pins = <>;
};
&pinctrl_pwm7 {
fsl,pins = <>;
};
&pinctrl_hog_4 {
fsl,pins = <>;
};
&pinctrl_hog_2 {
fsl,pins = <>;
};
&iomuxc {
imx6ull-colibri {
pinctrl_sai3: sai3grp {
fsl,pins = <
MX6UL_PAD_LCD_DATA13__SAI3_TX_BCLK 0x17088
MX6UL_PAD_LCD_ENABLE__SAI3_TX_SYNC 0x17088
MX6UL_PAD_LCD_DATA15__SAI3_TX_DATA 0x11088
MX6UL_PAD_LCD_DATA14__SAI3_RX_DATA 0x11088
MX6UL_PAD_LCD_DATA09__SAI3_MCLK 0x17088
>;
};
pinctrl_htrc: htrcgrp {
fsl,pins = <
MX6UL_PAD_ENET1_TX_CLK__GPIO2_IO06 0x74
MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x74
MX6UL_PAD_CSI_DATA04__GPIO4_IO25 0x74
>;
};
};
};
&sai3 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clks IMX6UL_CLK_SAI3_SEL>,
<&clks IMX6UL_CLK_SAI3>;
assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
assigned-clock-rates = <0>, <12288000>;
fsl,sai-mclk-direction-output;
status = "okay";
};
I’ve attached the dmesg log output here.
The output of clk_summary can be found here.
Can anyone help us identify what’s wrong here? Thanks,