Hi,
we have a custom board with iMX6q on it, and with three DAC and one ADC connected to the ESAI bus of the MX6. I managed to load the drivers for the four of them, but I still have problems on getting data from the I2S channel in two of them.
I checked with the oscilloscope the DATA0_OUT pin and it seems the only one working. How I can configure the esai driver to send data also on the other ports?
I am using the linux kernel for imx6 4.1.15
this is what i did in the devicetree file:
&esai {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_esai>;
#sound-dai-cells = <0>;
assigned-clocks = <&clks IMX6QDL_CLK_ESAI_SEL>,
<&clks IMX6QDL_CLK_ESAI_EXTAL>;
assigned-clock-parents = <&clks IMX6QDL_CLK_PLL4_AUDIO_DIV>;
assigned-clock-rates = <0>, <24576000>;
fsl,mode = "i2s-master";
status = "okay";
};
soundcard1 {
compatible = "fsl,imx6-sabreauto-cs42888",
"fsl,imx-audio-cs42888";
model = "imx-cs42888";
esai-controller = <&esai 0>;
audio-codec = <&codec1>;
audio-routing = "LINEOUT", "DAC";
};
soundcard2 {
compatible = "fsl,imx6-sabreauto-cs42888",
"fsl,imx-audio-cs42888";
model = "imx-cs42888";
esai-controller = <&esai 1>;
audio-codec = <&codec1>;
audio-routing = "LINEOUT1", "DAC1";
};
soundcard3 {
compatible = "fsl,imx6-sabreauto-cs42888",
"fsl,imx-audio-cs42888";
model = "imx-cs42888";
esai-controller = <&esai 2>;
audio-codec = <&codec3>;
audio-routing = "LINEOUT2", "DAC2";
};
Hi Claudio
one can check pinmux settings in pinctrl_esai: esaigrp:
linux/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
imx6qdl-sabreauto.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel
and recheck with debugger if these processor pads are configured properly
using Sabre AI schematic
Schematics (5)
Design files for i.MX 6Quad and i.MX 6DualLite CPU1 Cards
Design files for Base Board
SABRE|Automotive-Infotainment|i.MX6|NXP
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
this is my pinmux setting
pinctrl_esai: esaigrp {
fsl,pins = <
MX6QDL_PAD_ENET_CRS_DV__ESAI_TX_CLK 0x1b030
MX6QDL_PAD_ENET_RXD1__ESAI_TX_FS 0x1b030
MX6QDL_PAD_ENET_TX_EN__ESAI_TX3_RX2 0x1b030
MX6QDL_PAD_GPIO_5__ESAI_TX2_RX3 0x1b030
MX6QDL_PAD_ENET_TXD0__ESAI_TX4_RX1 0x1b030
MX6QDL_PAD_ENET_MDC__ESAI_TX5_RX0 0x1b030
MX6QDL_PAD_GPIO_17__ESAI_TX0 0x1b030
MX6QDL_PAD_NANDF_CS3__ESAI_TX1 0x1b030
MX6QDL_PAD_ENET_MDIO__ESAI_RX_CLK 0x1b030
MX6QDL_PAD_GPIO_9__ESAI_RX_FS 0x1b030
>;
};
It seems everything correct, I checked a couple of days ago if they were correctly set, but when I try to use another DAC connected in a different channel I can see the clock and the frame select but not the data. The data always goes on esai_tx0 path and can't figure out why. There is some ESAI registry to set to enable the proper TX channel? I tried with to write in a different way the TECR registry but when I modifty that registry, also the TX0 disappears.
Regards
Claudio
Hi Claudio
one can try to run Demo Image on Sabre AI board and then compare its ESAI registers with custom board
Best regards
igor