How to configure imx8mq pcm dts

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure imx8mq pcm dts

750 Views
sinc
Contributor I

How to configure the PCM of the wifi/bt module in imx8mqevk,

Now I want to do a loop back test on the pcm of wifi/bt in the imx8mqevk development board, but I checked dts and found that sai3 is not configured. Now I want to know how to configure DTS if I only do pcm loopback test

0 Kudos
Reply
1 Reply

364 Views
Nelson7896mari
Contributor I

To configure the PCM (Pulse Code Modulation) interface for loopback testing on the WiFi/BT module in the i.MX8MQEVK development board, you'll need to modify the device tree source (DTS) file for your board. Below are the general steps for configuring PCM loopback testing:

Find the device tree source file for your i.MX8MQEVK board. The DTS file typically resides in the arch/arm/boot/dts/ directory of your kernel source tree. The exact file name may vary based on your board's specific configuration.

SAI is commonly used for PCM audio interfaces. You'll need to configure the SAI controller corresponding to the WiFi/BT module's PCM interface.

Open the DTS file in a text editor (e.g., imx8mq-evk.dts or similar). Look for the SAI node that corresponds to the PCM interface you want to configure.

Example: 

 

&sai3 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_sai3>;
    status = "okay"; // Make sure the SAI controller is enabled

    // Add PCM configuration properties here
    // Example properties:
    // ...
};

 

 

Within the SAI node, add the necessary properties to configure it for PCM loopback testing. This includes settings such as clocking, data format (bits per sample, channels, etc.), and routing.

 

&sai3 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_sai3>;
    status = "okay"; // Make sure the SAI controller is enabled

    // Configure PCM properties
    sound-dai = <&pcm_loopback>;
    pinctrl_sai3: sai3grp {
        fsl,pins = <
            MX8MQ_IOMUXC_SAI3_RXD_DATA0__SAI3_RXD_DATA0 0x80000000
            MX8MQ_IOMUXC_SAI3_TXFS_SYNC__SAI3_TX_SYNC 0x80000000
            MX8MQ_IOMUXC_SAI3_MCLK__SAI3_MCLK 0x80000000
            MX8MQ_IOMUXC_SAI3_TXD_DATA__SAI3_TX_DATA 0x80000000
        >;
    };
};

pcm_loopback: pcm_loopback {
    compatible = "loopback";
    type = "loopback";
    status = "okay"; // Make sure the loopback device is enabled
};

 

 

Build and Deploy Device Tree Changes:
After editing the DTS file, save the changes. Build the device tree binary (DTB) for your board using the appropriate toolchain and configuration. Replace the existing DTB with the newly built one in your boot partition.

Test PCM Loopback:
Once the device tree changes are deployed and the board boots up with the modified DTB, you can test the PCM loopback functionality using appropriate testing tools or applications.

Keep in mind that the exact configuration and properties may vary based on your board's hardware setup and the specifics of the PCM loopback test you want to perform. Consult the Sedgwick i.MX8MQ reference manual, the Linux kernel documentation, and relevant forums or communities for further guidance and troubleshooting.

0 Kudos
Reply