IMX8MP Verdin on Mallow carrier board

Hi all,

I am trying to use the I2S interface (SAI1) on the IMX8M Plus on the Mallow board. I connected the wires to the following I2S_1 pin on the extension headers to the audio board. What I can see is the the BCLK and SYNC clock are not uniform.

Mallow board:
X19:

  • pin 11 (BCLK)
  • pin 12 (SYNC)
  • pin 13 (DOUT)

Screenshot from 2024-10-09 08-15-56

The top signal in the picture is the BCLK, the second is SYNC.

Here’s my DTS configuration for the SAI1 (I2S_1) interface.

&sai1 {
#sound-dai-cells = <0>;
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_sai1>;
//fsl,sai-asynchronous;
assigned-clocks = <&clk IMX8MP_CLK_SAI1>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
assigned-clock-rates = <196608000>;
//fsl,dataline = <1 0x0 0x1>;
status = “okay”;
};

pinctrl_sai1: sai1grp {
	fsl,pins =
		<MX8MP_IOMUXC_SAI1_MCLK__AUDIOMIX_SAI1_MCLK			0x1d6>,	/* SODIMM 38 */
		<MX8MP_IOMUXC_SAI1_RXD0__AUDIOMIX_SAI1_RX_DATA00	0xd6>,	/* SODIMM 36 */
		<MX8MP_IOMUXC_SAI5_MCLK__AUDIOMIX_SAI1_TX_BCLK		0x1d6>,	/* SODIMM 30 */
		<MX8MP_IOMUXC_SAI5_RXD1__AUDIOMIX_SAI1_TX_SYNC		0x1d6>,	/* SODIMM 32 */
		<MX8MP_IOMUXC_SAI5_RXFS__AUDIOMIX_SAI1_TX_DATA00	        0x1d6>;	/* SODIMM 34 */
};

I also see random activity on the lines even when I am not playing audio. Is this the result of some pin-muxing conflict?

Has anyone seen a similar issue?

Regards,
Tom

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hi Tom,

From the information provided, it seems like you are experiencing issues with the I2S interface (SAI1) on the IMX8M Plus when using the Mallow Carrier Board. The non-uniform BCLK and SYNC signals, along with random activity on the lines, could indeed be indicative of a pin-muxing conflict or misconfiguration.

Here are a few suggestions to troubleshoot and potentially resolve the issue:

  1. Pin Configuration: Double-check the pin configuration in your device tree. Ensure that the pins you are using for BCLK, SYNC, and DOUT are correctly configured and do not conflict with other peripherals. The pinctrl settings should match the physical connections on the Mallow board.

  2. Clock Configuration: Verify the clock settings in your DTS configuration. Ensure that the assigned clocks and clock rates are correct for your application. The assigned-clock-rates value should match the expected frequency for your I2S interface.

  3. Check for Conflicts: Look for any other device tree nodes that might be using the same pins or clocks. Conflicts can arise if multiple peripherals are trying to use the same resources.

  4. Driver Support: Ensure that the SAI1 driver is properly enabled and configured in your kernel. Check the kernel documentation for any specific requirements or configurations needed for the SAI1 interface.

  5. Debugging: Use tools like devmem2 or memtool to inspect the register values for the IOMUX and clock settings. This can help identify if the hardware is configured as expected.

  6. Consult Documentation: Refer to the Verdin iMX8M Plus and Mallow Carrier Board documentation for any specific notes or errata related to the I2S interface.

If the issue persists, consider reaching out to Toradex technical support for further assistance. They may have additional insights or updates that could help resolve the problem.

Regards,
[Your Name]

Please, also check if these links can help you solve your problem:

Pin Multiplexing - Changing Pin Functionalities in the Linux Device Tree | Toradex Developer Center.

The clock rate you’ve assigned (196+ MHz) is unusually high and may be causing sampling artifacts in your logic analyzer. Typically, clock rates for the SAI interface are set to 24,576,000 Hz or 49,152,000 Hz.

Also, keep in mind that the Verdin development board is equipped with an NAU88C22YG codec, and the Dahlia carrier board uses a WM8904CGEFL codec. You can refer to the device trees for these boards as examples.

https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi?h=toradex_ti-linux-6.6.y#n162

https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi?h=toradex_ti-linux-6.6.y#n141