This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM68A: Pin Conflict Error with McASP1 on AM68A When Using INMP441 Microphone

Part Number: AM68A
Other Parts Discussed in Thread: SYSCONFIG, SK-AM68, TDA4VM, AM68

Tool/software:

I am working with the AM68A board and attempting to interface the INMP441 microphone via I²S using McASP1. Here are my pin connections:

  • VDD → Pin 17 (3.3V)

  • GND → Pin 6

  • SCK/BCLK (I²S_BCLK) → Pin 12 (I2S_SCLK)

  • WS/LRC (I²S_FS) → Pin 35 (I2S_FS)

  • SD (I²S_DIN) → Pin 38 (I2S_DIN)

  • SEL/LR → Pin 39

After making these connections, I ran the command:

dmesg | grep -i mcasp

And encountered the following error:

[ 7.911951] pinctrl-single 11c000.pinctrl: pin PIN46 already requested by 600000.gpio; cannot claim for 2b10000.mcasp
[ 7.926309] pinctrl-single 11c000.pinctrl: pin-46 (2b10000.mcasp) status -22
[ 7.935282] pinctrl-single 11c000.pinctrl: could not request pin 46 (PIN46) from group mcasp1-default-pins on device pinctrl-single
[ 7.947510] davinci-mcasp 2b10000.mcasp: Error applying setting, reverse things back

Upon checking k3-am68-sk.dts, I found the following entry for McASP1 pin configuration:

mcasp1-default-pins { pinctrl-single,pins = <0xb8 0x01 0xbc 0x01 0xc0 0x40001 0xb4 0x01>; phandle = <0x6a>; };

It seems that PIN46 is already allocated to 600000.gpio, preventing McASP1 from acquiring it.

Questions:

  1. How can I resolve this pin conflict to enable McASP1 for I²S operation?

  2. Can I remap McASP1 to different pins in the device tree, or do I need to release PIN46 from GPIO first?

  3. If PIN46 is necessary for McASP1, what modifications should I make in the device tree to properly configure the pinmux settings?

  • Hi Mohammed,

    To use specifically McASP1, its pins must be released by GPIO peripheral in the device tree. There are no alternative pins to use McASP1 on the device.

    To change the pinmux settings, you can use our online SysConfig Pinmux Tool (PMT) which outputs a devicetree.dtsi file with a pinmux configuration based on your selections. Here is a direct link to SysConfig PMT for AM68A. Alternatively, you can determine the proper mux modes using the Pin Attributes table in the device datasheet. 

    Sample output:

    /* This file was auto-generated by TI PinMux on 4/4/2025 at 11:57:15 AM. */
    /* This file should only be used as a reference. Some pins/peripherals, */
    /* depending on your use case, may need additional configuration. */
    
    &main_pmx0 {
        mymcasp1_pins_default: mymcasp1-default-pins {
            pinctrl-single,pins = <
                J721S2_IOPAD(0x084, PIN_INPUT, 3) /* (AA28) MCASP0_AXR5.MCASP1_ACLKR */
                J721S2_IOPAD(0x0b8, PIN_INPUT, 1) /* (AA24) MCASP1_ACLKX */
                J721S2_IOPAD(0x088, PIN_INPUT, 3) /* (AD27) MCASP0_AXR6.MCASP1_AFSR */
                J721S2_IOPAD(0x0bc, PIN_INPUT, 1) /* (V28) MCASP1_AFSX */
                J721S2_IOPAD(0x0c0, PIN_INPUT, 1) /* (T28) MCASP1_AXR0 */
                J721S2_IOPAD(0x04c, PIN_INPUT, 1) /* (V27) MCASP1_AXR1 */
                J721S2_IOPAD(0x050, PIN_INPUT, 1) /* (W27) MCASP1_AXR2 */
                J721S2_IOPAD(0x0b0, PIN_INPUT, 1) /* (AD26) MCASP1_AXR3 */
                J721S2_IOPAD(0x0b4, PIN_INPUT, 1) /* (U25) MCASP1_AXR4 */
            >;
        };
    
    };
    
    

  • i'm unsure Where exactly to place this configuration file and how to rebuild the device tree after adding it,

  • Hi Mohammed,

    It should be possible to modify k3-am68-sk-base-board.dts using k3-j721s2-common-proc-board.dts as reference for the McASP nodes.

    To build the device tree and install it onto your MicroSD card, please follow the guide here: Processor SDK Linux for AM68: 3.2.1. Users Guide. Specifically, follow 3.2.1.5.2. Compiling the Device Tree Binaries and then 3.2.1.7.1. Installing the Kernel Image and Device Tree Binaries.


  • As per the SK-AM68 Processor Starter Kit User Guide, the 40-pin header provides the following McASP1 signals, which appear to support only one microphone:

    Pin No  | Pin Name   | Description              | Direction  
    --------|------------|--------------------------|-----------
    12      | I2S_SCLK   | McASP1 ACLKX (AA24)      | Bi-Directional  
    35      | I2S_FS     | McASP1 FSX (V28)         | Bi-Directional  
    38      | I2S_DIN    | McASP1 AXR (T28)         | Bi-Directional  
    40      | I2S_DOUT   | McASP1 AXR (U25)         | Bi-Directional  
    

    However, McASP1 supports 5 serializers. Does this mean I can connect 5 microphones? If yes, how can I configure the additional AXR pins through the 40-pin header?


    iam using EVM board not a custom board.

  • Hi Mohammed,

    This appears to be a duplicate question to the one posed in this thread: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1470472/processor-sdk-am68-audio-support/5731757#5731757

    Let's continue discussion there.


  • Hi Mark L.
    I am working with the AM68A board and have made changes to the Device Tree Source (DTS) file to integrate an ICS43432 digital microphone. I modified the following DTS file located at:

    yocto-build/build/arago-tmp-default-glibc/work-shared/am68-sk/kernel-source/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
    

    My Modifications:

    &main_pmx0 {
        mymcasp1_pins_default: mymcasp1-default-pins {
            pinctrl-single,pins = <
                J721S2_IOPAD(0x084, PIN_INPUT, 3) /* (AA28) MCASP0_AXR5.MCASP1_ACLKR */
                J721S2_IOPAD(0x0b8, PIN_INPUT, 1) /* (AA24) MCASP1_ACLKX */
                J721S2_IOPAD(0x088, PIN_INPUT, 3) /* (AD27) MCASP0_AXR6.MCASP1_AFSR */
                J721S2_IOPAD(0x0bc, PIN_INPUT, 1) /* (V28) MCASP1_AFSX */
                J721S2_IOPAD(0x0c0, PIN_INPUT, 1) /* (T28) MCASP1_AXR0 */
                J721S2_IOPAD(0x04c, PIN_INPUT, 1) /* (V27) MCASP1_AXR1 */
                J721S2_IOPAD(0x050, PIN_INPUT, 1) /* (W27) MCASP1_AXR2 */
                J721S2_IOPAD(0x0b0, PIN_INPUT, 1) /* (AD26) MCASP1_AXR3 */
                J721S2_IOPAD(0x0b4, PIN_INPUT, 1) /* (U25) MCASP1_AXR4 */
            >;
        };
    };
    
    &mcasp1 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&mymcasp1_pins_default>;
    
        op-mode = <0>;
        tdm-slots = <2>;
        serial-dir = <1>; // AXR0 input
        tx-num-evt = <1>;
        rx-num-evt = <1>;
    };
    
    &sound {
        status = "okay";
    
        simple-audio-card,name = "ICS43432 Mic";
        simple-audio-card,format = "i2s";
        simple-audio-card,bitclock-master = <&cpu_dai>;
        simple-audio-card,frame-master = <&cpu_dai>;
    
        simple-audio-card,cpu {
            sound-dai = <&mcasp1>;
        };
    
        cpu_dai: simple-audio-card,codec {
            sound-dai = <&dummy_codec>;
        };
    };
    
    dummy_codec: dummy-codec {
        compatible = "linux,dummy-codec";
    };
    

    Build and Flash Steps:

    After modifying the DTS, I rebuilt the image using the following command:

    MACHINE="am68-sk" bitbake -k tisdk-edgeai-image
    

    I then flashed the image to an SD card and booted the AM68A board.

    Microphone Connections (ICS43432):

    • VCC: 3.3V

    • GND: GND

    • L/R: Connected to GND (to select Left channel)

    • SCK: PIN 12

    • WS: PIN 35

    • SD: PIN 38

    Issue:

    The microphone is not being detected on the system. I would like to confirm:

    1. Is k3-am68-sk-base-board.dts the correct file for configuring MCASP1 for the AM68A board?

    2. Are there any additional modifications required ?

    3. Do I need to enable or modify any audio drivers or kernel configs related to dummy_codec or MCASP1 for this to work?


  • Hi Mohammed,

    Can you please follow along the debug steps outlined in this thread (https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1501141/tda4vm-mcasp1-can-not-work) and see if it works out for you? This is for the TDA4VM device but the changes should be similar to AM68A.

    Is k3-am68-sk-base-board.dts the correct file for configuring MCASP1 for the AM68A board?

    According to the linked thread, it looks like a .dtso file is created to configure the McASP1 instead of modifying k3-am68-sk-base-board.dts.

    • Are there any additional modifications required ?

    • Do I need to enable or modify any audio drivers or kernel configs related to dummy_codec or MCASP1 for this to work?

    In the thread I linked, it looks like you may need to add dt bindings dummy-codec.

    Please respond here and let me know how that works out for you.

    Regards,
    Mark


  • Hi,
    can you share which dts file is used for configure ?can you share the steps ?

  • Hi Mohammed,

    I believe you create a new device tree overlay file. Instructions to enable DT overlay can be found here: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-am68/10_01_08_01/exports/docs/linux/How_to_Guides/Target/How_to_enable_DT_overlays_in_linux.html

    Regards,
    Mark

  • Hi,

    I am working on the AM68A SK board (J721S2 SoC) and attempting to compile a custom device tree overlay for connecting an ICS43432 audio codec (via I2S using `mcasp1`). However, I'm encountering a syntax error during compilation, even though the file appears to be structurally correct.

    ---

    Board: AM68A SK (J721S2)
    Yocto Build Directory:
    /home/yocto-build/build/arago-tmp-default-glibc/work-shared/am68-sk/kernel-source/arch/arm64/boot/dts/ti/

    File Created :  k3-j721s2-ics43432.dtso


    sudo dtc -O dtb -o k3-j721s2-ics43432.dtbo -b 0 -@ k3-j721s2-ics43432.dtso
    ```

    Error Output:

    Error: k3-j721s2-ics43432.dtso:31.21-22 syntax error
    FATAL ERROR: Unable to parse input tree

    Device Tree Overlay File(`k3-j721s2-ics43432.dtso`):


    /dts-v1/;
    /plugin/;

    / {
    compatible = "ti,j721s2-evm";

    fragment@0 {
    target-path = "/";
    __overlay__ {
    sound_i2s: sound {
    compatible = "simple-audio-card";
    simple-audio-card,name = "ICS43432";
    simple-audio-card,format = "i2s";
    simple-audio-card,bitclock-master = <&dailink_master>;
    simple-audio-card,frame-master = <&dailink_master>;
    simple-audio-card,cpu {
    sound-dai = <&mcasp1>;
    };
    simple-audio-card,codec {
    sound-dai = <&adau7002>;
    };
    };
    };
    };

    fragment@1 {
    target = <&main_pmx0>;
    __overlay__ {
    mymcasp1_pins_default: mymcasp1-default-pins {
    pinctrl-single,pins = <
    J721S2_IOPAD(0x084, PIN_INPUT, 3) /* MCASP1_ACLKR */
    J721S2_IOPAD(0x0b8, PIN_INPUT, 1) /* MCASP1_ACLKX */
    J721S2_IOPAD(0x088, PIN_INPUT, 3) /* MCASP1_AFSR */
    J721S2_IOPAD(0x0bc, PIN_INPUT, 1) /* MCASP1_AFSX */
    J721S2_IOPAD(0x0c0, PIN_INPUT, 1) /* MCASP1_AXR0 */
    J721S2_IOPAD(0x04c, PIN_INPUT, 1) /* MCASP1_AXR1 */
    >;
    };
    };
    };

    fragment@2 {
    target = <&mcasp1>;
    __overlay__ {
    #sound-dai-cells = <0>;
    pinctrl-names = "default";
    pinctrl-0 = <&mymcasp1_pins_default>;
    status = "okay";
    op-mode = <0>; /* MCASP_IIS_MODE */
    tdm-slots = <2>;
    serial-dir = <1 0>;
    rx-num-evt = <32>;
    tx-num-evt = <32>;
    };
    };

    fragment@3 {
    target-path = "/";
    __overlay__ {
    adau7002: adau7002@0 {
    #sound-dai-cells = <0>;
    compatible = "adi,adau7002";
    reg = <0>;
    status = "okay";
    };
    };
    };
    };
    -why happen this issue?
    -Is this the correct step? If not, please provide the correct steps from the beginning 

  • Hi Mohammed,

    Can you build the device tree with the Linux kernel's make system?

    # Assuming k3-j721s2-ics43432.dtso is in the arch/arm64/boot/dts/ti/ directory
    # set ARCH and CROSS_COMPILE variables
    make DTC_FLAGS=-@ ti/k3-j721s2-ics43432.dtbo

    Best,
    Jared


    1. Created a custom Device Tree Overlay file named k3-j721s2-ics43432.dtso
      Path:
      yocto-build/build/arago-tmp-default-glibc/work-shared/am68-sk/kernel-source/arch/arm64/boot/dts/ti/

    2. Added the entry for the overlay in the corresponding Makefile. (dtb-$(CONFIG_ARCH_K3) += k3-j721s2-ics43432.dtbo)

    3.  
    4. and run below command

      make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 clean

      make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 dtbs

    5. While running the make dtbs command, an error occurred during the overlay compilation step.
       

      Error: arch/arm64/boot/dts/ti/k3-j721s2-ics43432.dtso:33.21-22 syntax error
      FATAL ERROR: Unable to parse input tree
      make[3]: *** [scripts/Makefile.lib:426: arch/arm64/boot/dts/ti/k3-j721s2-ics43432.dtbo] Error 1
      make[2]: *** [scripts/Makefile.build:480: arch/arm64/boot/dts/ti] Error 2
      make[1]: *** [/home/niyas/version-10/yocto-build/build/arago-tmp-default-glibc/work-shared/am68-sk/kernel-source/Makefile:1398: dtbs] Error 2
      make: *** [Makefile:234: __sub-make] Error 2
      niyas@niyas-Z790-UD:~/version-10/yocto-build/build/arago-tmp-default-glibc/work-shared/am68-sk/kernel-source$

    6.  dtso file :-
      /dts-v1/;
      /plugin/;

      #include <dt-bindings/gpio/gpio.h>

      &{/} {
          compatible = "ti,j721s2-evm";

          fragment@0 {
              target-path = "/";
              __overlay__ {
                  sound_i2s: sound {
                      compatible = "simple-audio-card";
                      simple-audio-card,name = "ICS43432";
                      simple-audio-card,format = "i2s";
                      simple-audio-card,bitclock-master = <&dailink_master>;
                      simple-audio-card,frame-master = <&dailink_master>;
                      simple-audio-card,cpu {
                          sound-dai = <&mcasp1>;
                      };
                      simple-audio-card,codec {
                          sound-dai = <&adau7002>;
                      };
                  };
              };
          };

          fragment@1 {
              target = <&main_pmx0>;
              __overlay__ {
                  mymcasp1_pins_default: mymcasp1-default-pins {
                      pinctrl-single,pins = <
                          J721S2_IOPAD(0x084, PIN_INPUT, 3) /* MCASP1_ACLKR */
                          J721S2_IOPAD(0x0b8, PIN_INPUT, 1) /* MCASP1_ACLKX */
                          J721S2_IOPAD(0x088, PIN_INPUT, 3) /* MCASP1_AFSR */
                          J721S2_IOPAD(0x0bc, PIN_INPUT, 1) /* MCASP1_AFSX */
                          J721S2_IOPAD(0x0c0, PIN_INPUT, 1) /* MCASP1_AXR0 */
                          J721S2_IOPAD(0x04c, PIN_INPUT, 1) /* MCASP1_AXR1 */
                      >;
                  };
              };
          };

          fragment@2 {
              target = <&mcasp1>;
              __overlay__ {
                  #sound-dai-cells = <0>;
                  pinctrl-names = "default";
                  pinctrl-0 = <&mymcasp1_pins_default>;
                  status = "okay";
                  op-mode = <0>; /* MCASP_IIS_MODE (I2S) */
                  tdm-slots = <2>; /* 2 channels (stereo) */
                  serial-dir = <1 0>; /* AXR0: RX, AXR1: TX */
                  rx-num-evt = <32>;
                  tx-num-evt = <32>;
              };
          };

          /* Add adau7002 codec node here */
          adau7002: adau7002@1a {
              compatible = "adi,adau7002";
              reg = <0x1a>; /* I2C address of the ADau7002 codec */
              clocks = <&clk_i2s>;
              clock-names = "mclk";
              #sound-dai-cells = <0>;
              status = "okay";
          };
      };



      Also use dtbo-$(CONFIG_ARCH_K3) += k3-j721s2-xyz.dtb in the Makefile instead of the dtbo-$(CONFIG_ARCH_K3) += k3-j721s2-xyz.dtbo.  this did not produce a compilation error, but is also did not generate the .dtbo file in the expected output path (yocto-build/build/arago-tmp-default-glibc/work-shared/am68-sk/kernel-source/arch/arm64/boot/dts/ti/).

      so please give me the solution how to solve this


  • Hi Mohammed,

    It's likely because you don't have the k3-pinctrl.h file included. The macro J721S2_IOPAD is therefore undefined.

    In the future, can you put your code in a code block or attach the file, so I can see the line number that the syntax error points to?

    Best,
    Jared

  • Hi Jared McArthur,

    I successfully compiled the .dtso file to .dtbo after including k3-pinctrl.h — thank you for the guidance.

    Here’s the summary of the steps I followed:

    - build is successful, the required DT overlay files shall be found,


      version-10/yocto-build/build/arago-tmp-default-glibc/work-shared/am68-sk/kernel-source/arch/arm64/boot/dts/ti/k3-j721s2-ics43432.dtbo


    - Copy this DT overlay file to the boot/dtb/ti directory of the root partition of the SD card.
      

    sudo cp arch/arm64/boot/dts/ti/k3-j721s2-ics43432.dtbo <path-to-sd-root>/boot/dtb/ti/

    niyas@niyas-Z790-UD:~$ ls /media/niyas/rootfs/boot/dtb/ti

     found;
                    k3-j721s2-ics43432.dtbo 

     
    -Update the uEnv.txt file under the boot partition of the SD card, to let u-boot recognize the overlay

      name_overlays=ti/k3-j721s2-edgeai-apps.dtbo ti/k3-j721s2-ics43432.dtbo
    - Unmount and eject the SD card

        sync
       sudo umount /media/niyas/BOOT
       sudo umount /media/niyas/rootfs

      Plug it back in the AM68 board and turn the board on.

     Issue:

    After booting the board and running:

    arecord -l
    

    The ICS43432 mic is not detected.

    Could you please advise if any additional menuconfig options, kernel configuration, or changes inside the .dtso file are required to register the I2S input (mcasp1) and dummy codec properly?
    can you share the microphone supported codec ?

    below dtso file ,
     

    /dts-v1/;
    /plugin/;

    #include <dt-bindings/gpio/gpio.h>
    #include "k3-pinctrl.h"

    / {
        fragment@0 {
            target = <&main_pmx0>;
            __overlay__ {
                mymcasp1_pins_default: mymcasp1-default-pins {
                    pinctrl-single,pins = <
                        J721S2_IOPAD(0x084, PIN_INPUT, 3) /* (AA28) MCASP0_AXR5.MCASP1_ACLKR */
                        J721S2_IOPAD(0x0b8, PIN_INPUT, 1) /* (AA24) MCASP1_ACLKX */
                        J721S2_IOPAD(0x088, PIN_INPUT, 3) /* (AD27) MCASP0_AXR6.MCASP1_AFSR */
                        J721S2_IOPAD(0x0bc, PIN_INPUT, 1) /* (V28) MCASP1_AFSX */
                        J721S2_IOPAD(0x0c0, PIN_INPUT, 1) /* (T28) MCASP1_AXR0 */
                        J721S2_IOPAD(0x04c, PIN_INPUT, 1) /* (V27) MCASP1_AXR1 */
                        J721S2_IOPAD(0x050, PIN_INPUT, 1) /* (W27) MCASP1_AXR2 */
                        J721S2_IOPAD(0x0b0, PIN_INPUT, 1) /* (AD26) MCASP1_AXR3 */
                        J721S2_IOPAD(0x0b4, PIN_INPUT, 1) /* (U25) MCASP1_AXR4 */
                    >;
                };
            };
        };

        fragment@1 {
            target = <&mcasp1>;
            __overlay__ {
                #sound-dai-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&mymcasp1_pins_default>;
                status = "okay";
                op-mode = <0>; /* MCASP_IIS_MODE */
                tdm-slots = <2>;
                num-serializer = <4>;
                serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
                    2 0 0 0
                >;
                tx-num-evt = <1>;
                rx-num-evt = <1>;
            };
        };

        fragment@2 {
            target-path = "/";
            __overlay__ {
                sound {
                    compatible = "simple-audio-card";
                    simple-audio-card,name = "ics43432-mcasp1";
                    simple-audio-card,format = "i2s";
                    simple-audio-card,bitclock-master = <&dailink0_master>;
                    simple-audio-card,frame-master = <&dailink0_master>;

                    simple-audio-card,cpu {
                        sound-dai = <&mcasp1>;
                    };

                    dailink0_master: simple-audio-card,codec {
                        sound-dai = <&ics43432>;
                    };
                };

                ics43432: ics43432 {
                    compatible = "invensense,ics43432";
                    #sound-dai-cells = <0>;
                };
            };
        };
    };

  • Hi Mohammed,

    You need to enable the CONFIG_SND_SOC_ICS43432 config within the .config to support the ics43432.c driver.

    I don't know if this is enabled by default. You can run lsmod or dmesg to see if the driver has started.

    If you want to enable the dummy codec, please follow the steps outlined in the E2E thread that Mark sent: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1501141/tda4vm-mcasp1-can-not-work 

    I am not familiar with the microphone you are using, so I don't know what specifically is the "microphone supported codec".

    Best,
    Jared

  • Hi,

    Thanks for the clarification.

    Yes, I have already enabled CONFIG_SND_SOC_ICS43432=y in my kernel .config file and confirmed it is set correctly. I also verified during boot that the driver is not loaded, and running dmesg | grep ics43432 does not show any activity, indicating the overlay or driver may not be initializing.

    Mic Pin pin no Connected To Description
    SD 38 McASP #1 (T28)  Serial data out
    WS 35  McASP #1 FSX (V28) Word select (LR clock)
    SCK 12 MCASP1_ACLKX I2S bit clock
    VDD 1 3.3V power
    GND 6 Ground
  • Hi Mohammed,

    Look for the node within the /proc/device-tree directory to see if the overlay has been applied correctly.

    Best,
    Jared

  • Hi Jared McArthur,

    device tree found ics43432 but still microphone not detect .

    I came across the patch referenced in the TI forum post:
     https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1501141/tda4vm-mcasp1-can-not-work which adds Device Tree bindings for the snd-soc-dummy-dai codec. It seems to provide a simple-card without a codec for testing purposes.

    Could you please confirm if this patch is required for my system? If so, how can I apply it, and where would I need to place the modified code? Alternatively, if this patch has already been incorporated into the kernel or device tree for my platform, could you point me to the relevant configuration or guide me through enabling it?

  • Hi Mohammed,

    Before answering your questions, can you send your dmesg log? It may have messages that will reveal the issue.

    To answer your questions:

    Could you please confirm if this patch is required for my system?

    The patch shouldn't be required if the ics43432 has a codec driver.

    If so, how can I apply it, and where would I need to place the modified code?

    The patch applies on top of the kernel itself.

    Alternatively, if this patch has already been incorporated into the kernel or device tree for my platform, could you point me to the relevant configuration or guide me through enabling it?

    You would need to change the codec used in the device tree to the dummy codec.

    Best,
    Jared

  • Hi Jared McArthur

    Below some logs ,

    and also i found some log after booting 
    [    3.014493] ALSA device list:
    [    3.017454]   No soundcards found.
    [    3.021078] Waiting for root device PARTUUID=076c4a2a-02...
    [   13.198554] platform 4fb0000.mmc: deferred probe pending
    [   13.203865] platform regulator-tlv71033: deferred probe pending
    [   33.934222] vdd_mmc1: disabling


    Device Tree -> Present (/proc/device-tree/ics43432)

    Driver Config -> CONFIG_SND_SOC_ICS43432=y

    Sound Cards --- no soundcards --

    ALSA -> arecord -l and aplay -l → No devices

    my file name is :k3-am68-sk-ics43432.dtso

     uEnv.txt  file add:

      name_overlays=ti/k3-j721s2-edgeai-apps.dtbo ti/k3-am68-sk-ics43432.dtbo ti/k3-am68-sk-rpi-hdr-ehrpwm.dtbo 

    microphone pin connection

    sck- pin no 12
    sd - pin no 38
    ws - pin 35



    How solve the issue ?


     



  • Hi Mohammed,

    I see there is a pin conflict between the McASP and GPIO. That needs to be resolved.

    Best,
    Jared

  • Hi ,

    I modified the k3-am68-sk-base-board.dts and k3-am68-sk-rpi-hdr-ehrpwm.dtso files by commenting out the pin that is allocated for microphone usage for avoiding the pin conflict 



    k3-am68-sk-rpi-hdr-ehrpwm.dtso

    after modification i done below stpes 

    make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 clean

    make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 dtbs

    Copy this DT overlay file to the boot/dtb/ti directory of the root partition of the SD card both k3-am68-sk-base-board.dtb and own microphone dtbo file (k3-am68-sk-ics43432.dtbo) and

    Update the uEnv.txt file under the boot partition of the SD card

     name_overlays=ti/k3-j721s2-edgeai-apps.dtbo ti/k3-am68-sk-ics43432.dtbo ti/k3-am68-sk-rpi-hdr-ehrpwm.dtbo 

    After inserting the SD card into the EVM board, the system gets stuck and does not boot completely. The issue is described below



    why not running completely ? I   modify only these two files to avoid the pin conflict, or are there any other files that need to be changed as well?

  • Hi Mohammed,

    For now, can you remove the ti/k3-am68-sk-rpi-hdr-ehrpwm.dtbo from name_overlays?

    I would like to just get the microphone up and running for now.

    Additionally, how are you using pins that aren't pinned out to the header?

    For example, AA28, AD27, V27, W27 are pinned to the dss, and AD26 is pinned to an i2c.

    You shouldn't have physical access to these pins.

    Best,
    Jared

  • HI Jared McArthur,
    How solve below issue ?

  • Hi Jared McArthur,

    The pin conflict issue was resolved after commenting out the microphone-used pins in another file. However, after flashing the DTS and DTSO files, I encountered a 'no soundcard' issue, which I have described below.







    root@am68a-sk:~# cat /proc/device-tree/bus@100000/mcasp@2b10000/status

    okay

    I believe McASP1 has been applied successfull,

    and after i change my k3-am68-sk-ics43432.dtso file mention below 



    /dts-v1/;
    /plugin/;

    #include <dt-bindings/gpio/gpio.h>
    #include "k3-pinctrl.h"

    / {
        fragment@0 {
            target = <&main_pmx0>;
            __overlay__ {
                mymcasp1_pins_default: mymcasp1-default-pins {
                    pinctrl-single,pins = <
                        J721S2_IOPAD(0x0b8, PIN_INPUT, 1) /* MCASP1_ACLKX */
                        J721S2_IOPAD(0x0bc, PIN_INPUT, 1) /* MCASP1_AFSX */
                        J721S2_IOPAD(0x0c0, PIN_INPUT, 1) /* MCASP1_AXR0 */
                    >;
                };
            };
        };

        fragment@1 {
            target-path = "/bus@100000/mcasp@2b10000";
            __overlay__ {
                status = "okay";
                #sound-dai-cells = <0>;
                op-mode = <0>; /* MCASP_IIS_MODE */
                tdm-slots = <2>;
                num-serializer = <4>;
                serial-dir = <2 0 0 0>; /* 2: RX */
                tx-num-evt = <1>;
                rx-num-evt = <1>;
                pinctrl-names = "default";
                pinctrl-0 = <&mymcasp1_pins_default>;
            };
        };

        fragment@2 {
            target-path = "/";
            __overlay__ {
                sound: sound {
                    compatible = "simple-audio-card";
                    simple-audio-card,name = "ics43432-audio";
                    simple-audio-card,format = "i2s";
                    simple-audio-card,bitclock-master = <&dailink0_master>;
                    simple-audio-card,frame-master = <&dailink0_master>;

                    simple-audio-card,cpu {
                        sound-dai = <0xdeadbeef>; /* dummy value, patched at runtime */
                    };

                    dailink0_master: simple-audio-card,codec {
                        sound-dai = <&dummy_codec>;
                    };
                };

                dummy_codec: dummy_codec {
                    compatible = "linux,snd-soc-dummy";
                    #sound-dai-cells = <0>;
                };
            };
        };
    };

    after flashing this code i get another error 


    root@am68a-sk:/opt/edgeai-gst-apps# arecord -l
    arecord: device_list:279: no soundcards found...
    root@am68a-sk:/opt/edgeai-gst-apps# dmesg | grep -i mcasp1
    root@am68a-sk:/opt/edgeai-gst-apps# dmesg | grep -i audio
    [ 8.220769] OF: /sound/simple-audio-card,cpu: could not find phandle -559038737
    root@am68a-sk:/opt/edgeai-gst-apps# dmesg | grep -i sound
    [ 0.509743] Advanced Linux Sound Architecture Driver Initialized.
    [ 2.963906] No soundcards found.
    [ 8.220769] OF: /sound/simple-audio-card,cpu: could not find phandle -559038737
    [ 8.312499] asoc-simple-card sound: error -EINVAL: parse error
    [ 8.373358] asoc-simple-card: probe of sound failed with error -22
    root@am68a-sk:/opt/edgeai-gst-apps# dmesg | grep -i overlay
    root@am68a-sk:/opt/edgeai-gst-apps# ls /proc/device-tree/sound
    compatible phandle simple-audio-card,codec simple-audio-card,format simple-audio-card,name
    name simple-audio-card,bitclock-master simple-audio-card,cpu simple-audio-card,frame-master
    root@am68a-sk:/opt/edgeai-gst-apps# cd scripts
    root@am68a-sk:/opt/edgeai-gst-apps/scripts# ls
    compile_cpp_apps.sh gst_tracers install_gst_plugins.sh install_tiovx_kernels.sh remote_streaming setup_cameras_v3link.sh
    detect_soc.sh install_apps_utils.sh install_robotics_sdk.sh install_tiovx_modules.sh setup_camera_ox05b.sh setup_wallpaper.sh
    get_fb_resolution.c install_dl_inferer.sh install_ti_gpio_libs.sh perf_stats setup_cameras.sh
    root@am68a-sk:/opt/edgeai-gst-apps/scripts# ./install_ti_gpio_libs.sh

    how to solve this issue ?
    what is the exact issue ?
    why show sound-card not found ?

  • Hi Mohammed,

    Please look at preexisting examples of McASP device-tree nodes for your settings.

    Why do you have this?

        simple-audio-card,cpu {
            sound-dai = <0xdeadbeef>; /* dummy value, patched at runtime */
        };
    

    The sound-dai should point to the relevant McASP node.

    If you use the "linux,snd-soc-dummy", did you apply the required patch? Patch is referenced in this thread: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1501141/tda4vm-mcasp1-can-not-work 

    Best,
    Jared

  • Hi Jared McArthur,

    Now the microphone is detected. Thank you for your support. However, I have one issue during recording, which I have mentioned below,

    arecord: pcm_read:2272: read error: Input/output error

    Supported hardware parameter,



    below mention my current k3-am68-sk-ics43432.dtso file
    /dts-v1/;
    /plugin/;

    #include <dt-bindings/gpio/gpio.h>
    #include "k3-pinctrl.h"

    &main_pmx0 {
        mymcasp1_pins_default: mymcasp1-default-pins {
            pinctrl-single,pins = <
                J721S2_IOPAD(0x0b8, PIN_OUTPUT, 1) /* MCASP1_ACLKX */
                J721S2_IOPAD(0x0bc, PIN_OUTPUT, 1) /* MCASP1_AFSX */
                J721S2_IOPAD(0x0c0, PIN_INPUT, 1) /* MCASP1_AXR0 */
            >;
        };
    };

    &mcasp1 {
        status = "okay";
        #sound-dai-cells = <0>;
        op-mode = <0>; /* MCASP_IIS_MODE */
        tdm-slots = <2>;
        num-serializer = <4>;
        serial-dir = <2 0 0 0>; /* Serializer 0 as RX */
        tx-num-evt = <0>;
        rx-num-evt = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&mymcasp1_pins_default>;
    };

    &{/} {
        sound: sound {
            compatible = "simple-audio-card";
            simple-audio-card,name = "mcasp1-audio";
            simple-audio-card,format = "i2s";
            simple-audio-card,bitclock-master = <&mcasp_codec>;
            simple-audio-card,frame-master = <&mcasp_codec>;

            simple-audio-card,cpu {
                sound-dai = <&mcasp1>;
            };

            mcasp_codec: simple-audio-card,codec {
                sound-dai = <&dmic_codec>;
            };
        };

        dmic_codec: dmic_codec {
            compatible = "dmic-codec";
            #sound-dai-cells = <0>;
        };
    };



    How to solve this issue ?

  • Hi Jared McArthur,
      

    i modifi the code
    /dts-v1/;
    /plugin/;

    #include <dt-bindings/gpio/gpio.h>
    #include "k3-pinctrl.h"

    &main_pmx0 {
        mymcasp1_pins_default: mymcasp1-default-pins {
            pinctrl-single,pins = <
                J721S2_IOPAD(0x0b8, PIN_OUTPUT, 1) /* MCASP1_ACLKX */
                J721S2_IOPAD(0x0bc, PIN_OUTPUT, 1) /* MCASP1_AFSX */
                J721S2_IOPAD(0x0c0, PIN_INPUT, 1) /* MCASP1_AXR0 */
            >;
        };
    };

    &mcasp1 {
        status = "okay";
        #sound-dai-cells = <0>;
        op-mode = <0>; /* MCASP_IIS_MODE */

        auxclk-fs-ratio = <256>;
        tdm-slots = <2>;
        num-serializer = <4>;
        serial-dir = <2 0 0 0>; /* Serializer 0 as RX */
        tx-num-evt = <0>;
        rx-num-evt = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&mymcasp1_pins_default>;
    };

    &{/} {
        sound: sound {
            compatible = "simple-audio-card";
            simple-audio-card,name = "mcasp1-audio";
            simple-audio-card,format = "i2s";
            simple-audio-card,bitclock-master = <&mcasp_codec>;
            simple-audio-card,frame-master = <&mcasp_codec>;

            simple-audio-card,cpu {
                sound-dai = <&mcasp1>;
            };

            mcasp_codec: simple-audio-card,codec {
                sound-dai = <&dmic_codec>;
                system-clock-direction-out;
            };
        };

        dmic_codec: dmic_codec {
            compatible = "dmic-codec";
            #sound-dai-cells = <0>;
        };
    };


    but still face the issue can you update my code ?

  • Hi Mohammed,

    The simple-audio-card,bitclock-master and simple-audio-card,frame-master need to point to the simple-audio-card,cpu.

    Please look at the comment I sent previously. It has an example device-tree, you just need to follow the setup.

    Best,
    Jared

  • Hi Jared,
    Now its working 
    thank you ,