&sai5 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai5>;
assigned-clocks = <&clk IMX8MN_CLK_SAI5>;
assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
assigned-clock-rates = <49152000>;
clocks = <&clk IMX8MN_CLK_SAI5_IPG>, <&clk IMX8MN_CLK_DUMMY>,
<&clk IMX8MN_CLK_SAI5_ROOT>, <&clk IMX8MN_CLK_DUMMY>,
<&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_AUDIO_PLL1_OUT>,
<&clk IMX8MN_AUDIO_PLL2_OUT>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
fsl,sai-multi-lane;
fsl,sai-asynchronous;
fsl,dataline = <1 0x07 0x00>;
status = "okay";
dmas = <&sdma2 8 25 0>, <&sdma2 9 25 0>;
};
&sai2 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
assigned-clocks = <&clk IMX8MN_CLK_SAI2>;
assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
clocks = <&clk IMX8MN_CLK_SAI2_IPG>, <&clk IMX8MN_CLK_DUMMY>,
<&clk IMX8MN_CLK_SAI2_ROOT>, <&clk IMX8MN_CLK_DUMMY>,
<&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_AUDIO_PLL1_OUT>,
<&clk IMX8MN_AUDIO_PLL2_OUT>;
assigned-clock-rates = <49152000>;
fsl,sp-slave-mode;
fsl,sai-asynchronous;
status = "okay";
fsl,dataline = <1 0x03 0x00>;
fsl,sai-multi-lane;
dmas = <&sdma2 2 25 0>, <&sdma2 3 25 0>;
};
pinctrl_sai5: sai5grp {
fsl,pins = <
MX8MN_IOMUXC_SAI5_MCLK_SAI5_MCLK 0xd6
MX8MN_IOMUXC_SAI5_RXC_SAI5_RX_BCLK 0xd6
MX8MN_IOMUXC_SAI5_RXFS_SAI5_RX_SYNC 0xd6
MX8MN_IOMUXC_SAI5_RXD0_SAI5_RX_DATA0 0xd6
MX8MN_IOMUXC_SAI5_RXD1_SAI5_RX_DATA1 0xd6
MX8MN_IOMUXC_SAI5_RXD2_SAI5_RX_DATA2 0xd6
>;
};
pinctrl_sai2: sai2grp {
fsl,pins = <
MX8MN_IOMUXC_SAI2_MCLK_SAI2_MCLK 0x0
MX8MN_IOMUXC_SAI2_RXC_SAI2_RX_BCLK 0x0
MX8MN_IOMUXC_SAI2_RXFS_SAI2_RX_SYNC 0xd6
MX8MN_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0 0xd6
MX8MN_IOMUXC_SAI3_RXC_SAI2_RX_DATA1 0xd6
>;
};
sdma2: dma-controller@302c0000 {
compatible = "fsl,imx8mn-sdma", "fsl,imx8mq-sdma", "fsl,imx7d-sdma";
reg = <0x302c0000 0x10000>;
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MN_CLK_SDMA2_ROOT>,
<&clk IMX8MN_CLK_SDMA2_ROOT>;
clock-names = "ipg", "ahb";
#dma-cells = <3>;
fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin";
};
Hello @evancornell ,
I hope you are doing well.
->This is because the SAI controller is configured to use a different channel order than the physical pin connections. The channel order that is used by the SAI controller is defined in the DTS file.
->One needs to change the channel order in the DTS files for SAI5 and SAI2 to match the physical pin connections. After that, it should work in the order.
->Please check by adding the below line in the dts file of the sai node.
fsl,sai-channel-map = <0 1 2 3 5 4>;
->Once updated the DTS files, Please rebuild the kernel and boot loader.
I hope this helps!
Thanks & Regards,
Sanket Parekh
Sanket,
Thanks for your reply. Can you please provide example reference code showing usage of that parameter? We are not seeing where that parameter usage affects lower-level driver settings.
Thanks,
Evan
Hello @evancornell ,
I hope you are doing well.
Please accept my apology for the inconvenience.
Please refer to the location given below for channel mapping.
Documentation/sound/alsa/Channel-Mapping-API.txt
One can also refer this link given below
https://community.nxp.com/t5/i-MX-Processors/Multi-Lane-SAI/m-p/1353481#M181355
It will help you!
Thanks & Regards,
Sanket Parekh