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.

AM625-Q1: Audio codec Mcasp2 bring up

Part Number: AM625-Q1


Tool/software:

Hi ,

We are trying to bring up MCASP 2 lines for audio codec on AM6254-Q1 similar to EVM .

Only change is we are using 0x18 address and mcasp2 .

Aplay command exits after playing audio in EVM but in our board after aplay ,it's stuck and need to give Ctrl+c to exit 

We doubt on mcasp2 fragment definition in device tree

Board test log:

root@am62xx-evm:~# cd /usr/share/sounds/alsa/
root@am62xx-evm:/usr/share/sounds/alsa# aplay Front_Left.wav
Playing WAVE 'Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
^CAborted by signal Interrupt...
aplay: pcm_write:2127: write error: Interrupted system call
root@am62xx-evm:/usr/share/sounds/alsa# lsmod
Module                  Size  Used by
can_raw                24576  2
can                    24576  1 can_raw
iptable_nat            16384  0
nf_nat                 49152  1 iptable_nat
nf_conntrack          126976  1 nf_nat
nf_defrag_ipv6         20480  1 nf_conntrack
nf_defrag_ipv4         16384  1 nf_conntrack
libcrc32c              16384  2 nf_conntrack,nf_nat
iptable_mangle         16384  0
iptable_filter         16384  0
bluetooth             581632  2
ecdh_generic           16384  1 bluetooth
ecc                    36864  1 ecdh_generic
rpmsg_ctrl             16384  0
rpmsg_char             16384  1 rpmsg_ctrl
crct10dif_ce           16384  1
snd_soc_simple_card    20480  0
snd_soc_simple_card_utils    24576  1 snd_soc_simple_card
pvrsrvkm             1347584  8
display_connector      16384  0
phy_can_transceiver    16384  3
brcmfmac              249856  0
brcmutil               20480  1 brcmfmac
cfg80211              888832  1 brcmfmac
ti_k3_r5_remoteproc    28672  0
virtio_rpmsg_bus       20480  0
rpmsg_ns               16384  1 virtio_rpmsg_bus
rtc_ti_k3              16384  1
k3_j72xx_bandgap       20480  0
rti_wdt                16384  0
ti_k3_m4_remoteproc    16384  0
ti_k3_common           16384  1 ti_k3_m4_remoteproc
snd_soc_davinci_mcasp    32768  2
snd_soc_ti_udma        16384  1 snd_soc_davinci_mcasp
snd_soc_ti_edma        16384  1 snd_soc_davinci_mcasp
sa2ul                  36864  0
snd_soc_ti_sdma        16384  1 snd_soc_davinci_mcasp
cdns_dphy_rx           16384  0
mcrc                   16384  0
ilitek_ts_i2c          20480  0
snd_soc_tlv320aic3x_i2c    16384  1
sii902x                20480  0
m_can_platform         16384  0
snd_soc_tlv320aic3x    77824  1 snd_soc_tlv320aic3x_i2c
m_can                  24576  1 m_can_platform
can_dev                36864  1 m_can
spi_omap2_mcspi        24576  0
optee_rng              16384  0
rng_core               20480  2 optee_rng
fuse                  131072  1
ip_tables              32768  3 iptable_filter,iptable_nat,iptable_mangle
x_tables               40960  4 iptable_filter,ip_tables,iptable_nat,iptable_mangle
ipv6                  479232  56
root@am62xx-evm:/usr/share/sounds/alsa# lsmod |grep snd
snd_soc_simple_card    20480  0
snd_soc_simple_card_utils    24576  1 snd_soc_simple_card
snd_soc_davinci_mcasp    32768  2
snd_soc_ti_udma        16384  1 snd_soc_davinci_mcasp
snd_soc_ti_edma        16384  1 snd_soc_davinci_mcasp
snd_soc_ti_sdma        16384  1 snd_soc_davinci_mcasp
snd_soc_tlv320aic3x_i2c    16384  1
snd_soc_tlv320aic3x    77824  1 snd_soc_tlv320aic3x_i2c
root@am62xx-evm:/usr/share/sounds/alsa# i2cdetect -r 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@am62xx-evm:/usr/share/sounds/alsa# 18 is audio codec i2c address
-sh: 18: command not found
root@am62xx-evm:/usr/share/sounds/alsa# pinmux proper
-sh: pinmux: command not found
root@am62xx-evm:/usr/share/sounds/alsa#

Provided below Device tree for your reference

// SPDX-License-Identifier: GPL-2.0
/*
 *
 * AM625 Minimal dts file
 * Copyright (C) 2021-2022 Texas Instruments Incorporated - https://www.ti.com/
 *
 */

/dts-v1/;

#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/net/ti-dp83867.h>
#include "k3-pinctrl.h"
#include "k3-am625.dtsi"


/ {
    compatible = "ti,am625-sk","ti,am625";
    model = " debug ";

    aliases {
        serial0 = &mcu_uart0;
        serial1 = &wkup_uart0;
        serial2 = &main_uart0;
        serial3 = &main_uart1;
        serial4 = &main_uart4;
        serial5 = &main_uart6;
        mmc0 = &sdhci0;
        mmc1 = &sdhci1;
        mmc2 = &sdhci2;
        spi0 = &ospi0;
        spi1 = &main_spi0;
        gpio0 = &main_gpio0;
        gpio1 = &main_gpio1;
        gpio2 = &mcu_gpio0;
        i2c0 = &main_i2c0;
        i2c1 = &main_i2c1;
        i2c2 = &main_i2c2;
        i2c3 = &main_i2c3;
        i2c4 = &wkup_i2c0;
        i2c5 = &mcu_i2c0;
        can0 = &main_mcan0;
        can1 = &mcu_mcan0;
        can2 = &mcu_mcan1;
    };

    cpus {
        /delete-node/ cpu@2;
        /delete-node/ cpu@3;
    };

    chosen {
        #address-cells = <2>;
        #size-cells = <2>;
        ranges;

        stdout-path = "serial2:115200n8";
        bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";

        framebuffer0: framebuffer@0 {
            compatible = "simple-framebuffer";
            power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>;
            clocks = <&k3_clks 186 6>,
                 <&k3_clks 186 0>,
                 <&k3_clks 186 2>;
            display = <&dss>;
            status = "disabled";
        };
    };

    opp-table {
        /* Add 1.4GHz OPP for am625-sk board. Requires VDD_CORE to be at 0.85V */
        opp-1400000000 {
            opp-hz = /bits/ 64 <1400000000>;
            opp-supported-hw = <0x01 0x0004>;
            clock-latency-ns = <6000000>;
        };
    };

    memory@80000000 {
        device_type = "memory";
        /* 2G RAM */
        reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
    };

    reserved-memory {
        #address-cells = <2>;
        #size-cells = <2>;
        ranges;

        ramoops@9c700000 {
            compatible = "ramoops";
            reg = <0x00 0x9c700000 0x00 0x00100000>;
            record-size = <0x8000>;
            console-size = <0x8000>;
            ftrace-size = <0x00>;
            pmsg-size = <0x8000>;
        };

        /* global cma region */
        linux,cma {
            compatible = "shared-dma-pool";
            reusable;
            size = <0x00 0x8000000>;
            linux,cma-default;
        };

        rtos_ipc_memory_region: ipc-memories@9c800000 {
            compatible = "shared-dma-pool";
            reg = <0x00 0x9c800000 0x00 0x00300000>;
            no-map;
        };

        mcu_m4fss_dma_memory_region: m4f-dma-memory@9cb00000 {
            compatible = "shared-dma-pool";
            reg = <0x00 0x9cb00000 0x00 0x100000>;
            no-map;
        };

        mcu_m4fss_memory_region: m4f-memory@9cc00000 {
            compatible = "shared-dma-pool";
            reg = <0x00 0x9cc00000 0x00 0xe00000>;
            no-map;
        };

        wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9da00000 {
            compatible = "shared-dma-pool";
            reg = <0x00 0x9da00000 0x00 0x00100000>;
            no-map;
        };

        wkup_r5fss0_core0_memory_region: r5f-memory@9db00000 {
            compatible = "shared-dma-pool";
            reg = <0x00 0x9db00000 0x00 0x00c00000>;
            no-map;
        };
        
        secure_tfa_ddr: tfa@9e780000 {
            reg = <0x00 0x9e780000 0x00 0x80000>;
            alignment = <0x1000>;
            no-map;
        };

        secure_ddr: optee@9e800000 {
            reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
            alignment = <0x1000>;
            no-map;
        };
    };

    vmain_pd: regulator-0 {
        /* TPS65988 PD CONTROLLER OUTPUT */
        compatible = "regulator-fixed";
        regulator-name = "vmain_pd";
        regulator-min-microvolt = <5000000>;
        regulator-max-microvolt = <5000000>;
        regulator-always-on;
        regulator-boot-on;
    };

    vcc_5v0: regulator-1 {
        /* Output of LM34936 */
        compatible = "regulator-fixed";
        regulator-name = "vcc_5v0";
        regulator-min-microvolt = <5000000>;
        regulator-max-microvolt = <5000000>;
        vin-supply = <&vmain_pd>;
        regulator-always-on;
        regulator-boot-on;
    };

    vcc_3v3_sys: regulator-2 {
        /* output of LM61460-Q1 */
        compatible = "regulator-fixed";
        regulator-name = "vcc_3v3_sys";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        vin-supply = <&vmain_pd>;
        regulator-always-on;
        regulator-boot-on;
    };

    vdd_mmc1: regulator-3 {
        /* TPS22918DBVR */
        compatible = "regulator-fixed";
        regulator-name = "vdd_mmc1";
        pinctrl-names = "default";
        pinctrl-0 = <&vdd_3v3_sd_pins_default>;
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        regulator-boot-on;
        enable-active-high;
        vin-supply = <&vcc_3v3_sys>;
        gpio = <&main_gpio0 76 GPIO_ACTIVE_HIGH>;
    };

    vdd_sd_dv: regulator-4 {
        /* Output of TLV71033 */
        compatible = "regulator-gpio";
        regulator-name = "tlv71033";
        pinctrl-names = "default";
        pinctrl-0 = <&vdd_sd_dv_pins_default>;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <3300000>;
        regulator-boot-on;
        vin-supply = <&vcc_5v0>;
        gpios = <&main_gpio0 40 GPIO_ACTIVE_HIGH>;
        states = <1800000 0x0>,
                 <3300000 0x1>;
    };

    vcc_1v8: regulator-5 {
        /* output of TPS6282518DMQ */
        compatible = "regulator-fixed";
        regulator-name = "vcc_1v8";
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        vin-supply = <&vcc_3v3_sys>;
        regulator-always-on;
        regulator-boot-on;
    };

    bt_en: regulator-6 {
        compatible = "regulator-fixed";
        regulator-name = "bt_en";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        vin-supply = <&vcc_3v3_sys>;
        enable-active-high;
        gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&bt_en_pins_default>;
    };

    wlan_en: regulator-7 {
        compatible = "regulator-fixed";
        regulator-name = "wlan_en";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        vin-supply = <&vcc_3v3_sys>;
        enable-active-high;
        gpios = <&main_gpio0 36 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&wlan_en_pins_default>;
    };

    vdd_core: regulator-8 {
        /* output of TPS62826DMQ */
        compatible = "regulator-fixed";
        regulator-name = "vdd_core";
        regulator-min-microvolt = <850000>;
        regulator-max-microvolt = <850000>;
        vin-supply = <&vcc_3v3_sys>;
        regulator-always-on;
        regulator-boot-on;
    };

    tlv320_mclk: clk-0 {
        #clock-cells = <0>;
        compatible = "fixed-clock";
        clock-frequency = <12288000>;
    };

    codec_audio: sound {
        compatible = "simple-audio-card";
        simple-audio-card,name = "AM62x-SKEVM";
        simple-audio-card,widgets =
            "Headphone",    "Headphone Jack",
            "Line",     "Line In",
            "Microphone",   "Microphone Jack";
        simple-audio-card,routing =
            "Headphone Jack",   "HPLOUT",
            "Headphone Jack",   "HPROUT",
            "LINE1L",       "Line In",
            "LINE1R",       "Line In",
            "MIC3R",        "Microphone Jack",
            "Microphone Jack",  "Mic Bias";
        simple-audio-card,format = "dsp_b";
        simple-audio-card,bitclock-master = <&sound_master>;
        simple-audio-card,frame-master = <&sound_master>;
        simple-audio-card,bitclock-inversion;

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

        sound_master: simple-audio-card,codec {
            sound-dai = <&tlv320aic3106>;
            clocks = <&tlv320_mclk>;
        };
    };

    hdmi0: connector {
        compatible = "hdmi-connector";
        label = "hdmi";
        type = "a";
        port {
            hdmi_connector_in: endpoint {
                remote-endpoint = <&sii9022_out>;
            };
        };
    };

    transceiver1: can-phy0 {
        compatible = "ti,tcan1042";
        #phy-cells = <0>;
        max-bitrate = <5000000>;
    };

    transceiver2: can-phy1 {
        compatible = "ti,tcan1042";
        #phy-cells = <0>;
        max-bitrate = <5000000>;
    };

    transceiver3: can-phy2 {
        compatible = "ti,tcan1042";
        #phy-cells = <0>;
        max-bitrate = <5000000>;
    };

    leds {
        compatible = "gpio-leds";
        pinctrl-names = "default";
        pinctrl-0 = <&usr_led_pins_default>;

        led-0 {
            label = "am62-sk:green:heartbeat";
            gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>;
            linux,default-trigger = "heartbeat";
            function = LED_FUNCTION_HEARTBEAT;
            default-state = "off";
        };
    };
};


&cluster0 {
    /delete-node/ core2;
    /delete-node/ core3;
};


&main_pmx0 {

    gpio0_pins_default: gpio0-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0004, PIN_OUTPUT, 7) /* (G18) OSPI0_LBCLKO.GPIO0_1 */
            AM62X_IOPAD(0x0030, PIN_OUTPUT, 7) /* (F17) OSPI0_CSn1 */ /* OSPI Reset */
            AM62X_IOPAD(0x0034, PIN_OUTPUT, 7) /* (E17) OSPI0_CSn2 */ /* OSPI Interrupt */
            AM62X_IOPAD(0x0038, PIN_OUTPUT, 7) /* (E18) OSPI0_CSn3.GPIO0_14 */
            AM62X_IOPAD(0x003c, PIN_INPUT, 7) /* (K19) GPMC0_AD0.GPIO0_15 */
            AM62X_IOPAD(0x0040, PIN_INPUT, 7) /* (L19) GPMC0_AD1.GPIO0_16 */
            AM62X_IOPAD(0x0044, PIN_INPUT, 7) /* (L20) GPMC0_AD2.GPIO0_17 */
            AM62X_IOPAD(0x0048, PIN_INPUT, 7) /* (L21) GPMC0_AD3.GPIO0_18 */
            AM62X_IOPAD(0x004c, PIN_INPUT, 7) /* (M21) GPMC0_AD4.GPIO0_19 */
            AM62X_IOPAD(0x0050, PIN_INPUT, 7) /* (L17) GPMC0_AD5.GPIO0_20 */
            AM62X_IOPAD(0x0054, PIN_INPUT, 7) /* (L18) GPMC0_AD6.GPIO0_21 */
            AM62X_IOPAD(0x00a8, PIN_OUTPUT, 7) /* (J18) GPMC0_CSn0.GPIO0_41 */
            AM62X_IOPAD(0x0130, PIN_OUTPUT, 7) /* (W16) RGMII1_TXC.GPIO0_74 */
            AM62X_IOPAD(0x013c, PIN_OUTPUT, 7) /* (Y17) RGMII1_TD2.GPIO0_77 */
            AM62X_IOPAD(0x0140, PIN_OUTPUT, 7) /* (AA18) RGMII1_TD3.GPIO0_78 */
            AM62X_IOPAD(0x0144, PIN_INPUT, 7) /* (W14) RGMII1_RX_CTL.GPIO0_79 */
            AM62X_IOPAD(0x0148, PIN_INPUT, 7) /* (AA16) RGMII1_RXC.GPIO0_80 */
            AM62X_IOPAD(0x014c, PIN_INPUT, 7) /* (W15) RGMII1_RD0.GPIO0_81 */
            AM62X_IOPAD(0x0150, PIN_INPUT, 7) /* (Y16) RGMII1_RD1.GPIO0_82 */
            AM62X_IOPAD(0x0154, PIN_INPUT, 7) /* (AA17) RGMII1_RD2.GPIO0_83 */
            AM62X_IOPAD(0x0158, PIN_INPUT, 7) /* (Y15) RGMII1_RD3.GPIO0_84 */
            AM62X_IOPAD(0x015c, PIN_OUTPUT, 7) /* (U16) MDIO0_MDIO.GPIO0_85 */
            AM62X_IOPAD(0x0160, PIN_OUTPUT, 7) /* (V17) MDIO0_MDC.GPIO0_86 */
            AM62X_IOPAD(0x0164, PIN_OUTPUT, 7) /* (Y21) RGMII2_TX_CTL.GPIO0_87 */
            AM62X_IOPAD(0x0168, PIN_OUTPUT, 7) /* (Y18) RGMII2_TXC.GPIO0_88 */
        >;
    };

    gpio1_pins_default: gpio1-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x017c, PIN_INPUT, 7) /* (W19) RGMII2_RX_CTL.GPIO1_1 */
            AM62X_IOPAD(0x0188, PIN_OUTPUT, 7) /* (Y20) RGMII2_RD1.GPIO1_4 */
            AM62X_IOPAD(0x0190, PIN_OUTPUT, 7) /* (W20) RGMII2_RD3.GPIO1_6 */
            AM62X_IOPAD(0x01f0, PIN_OUTPUT, 7) /* (C14) EXT_REFCLK1.GPIO1_30 */ /* ADC Reset */
            AM62X_IOPAD(0x01f4, PIN_INPUT, 7) /* (B16) EXTINTn.GPIO1_31 */
            AM62X_IOPAD(0x0254, PIN_OUTPUT, 7) /* (D17) USB0_DRVVBUS.GPIO1_50 */
        >;
    };
    
    main_i2c0_pins_default: main-i2c0-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (E12) I2C0_SCL */
            AM62X_IOPAD(0x01e4, PIN_INPUT_PULLUP, 0) /* (D14) I2C0_SDA */
        >;
    };

    main_i2c1_pins_default: main-i2c1-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x01e8, PIN_INPUT_PULLUP, 0) /* (A17) I2C1_SCL */
            AM62X_IOPAD(0x01ec, PIN_INPUT_PULLUP, 0) /* (A16) I2C1_SDA */
        >;
    };

    main_i2c2_pins_default: main-i2c2-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x00b0, PIN_INPUT_PULLUP, 1) /* (H18) GPMC0_CSn2.I2C2_SCL */
            AM62X_IOPAD(0x00b4, PIN_INPUT_PULLUP, 1) /* (H19) GPMC0_CSn3.I2C2_SDA */
        >;
    };

    main_i2c3_pins_default: main-i2c3-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x01d0, PIN_INPUT_PULLUP, 2) /* (B14) UART0_CTSn.I2C3_SCL */
            AM62X_IOPAD(0x01d4, PIN_INPUT_PULLUP, 2) /* (C13) UART0_RTSn.I2C3_SDA */
        >;
    };

    main_uart0_pins_default: main-uart0-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14) UART0_RXD */
            AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
        >;
    };

    main_uart1_pins_default: main-uart1-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19) MCASP0_AXR3.UART1_CTSn */
            AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19) MCASP0_AXR2.UART1_RTSn */
            AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19) MCASP0_AFSR.UART1_RXD */
            AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20) MCASP0_ACLKR.UART1_TXD */
        >;
    };

    main_uart4_pins_default: main-uart4-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0124, PIN_INPUT, 3) /* (D20) MMC2_SDCD.UART4_RXD */
            AM62X_IOPAD(0x0128, PIN_OUTPUT, 3) /* (C20) MMC2_SDWP.UART4_TXD */
        >;
    };

    main_uart6_pins_default: main-uart6-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x009c, PIN_INPUT, 3) /* (P17) GPMC0_WAIT1.UART6_RXD */
            AM62X_IOPAD(0x00a0, PIN_OUTPUT, 3) /* (J20) GPMC0_WPn.UART6_TXD */
        >;
    };

    main_mmc0_pins_default: main-mmc0-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0220, PIN_INPUT_PULLUP, 0) /* (Y3) MMC0_CMD */
            AM62X_IOPAD(0x0218, PIN_OUTPUT, 0) /* (AB1) MMC0_CLK */
            AM62X_IOPAD(0x0214, PIN_INPUT_PULLUP, 0) /* (AA2) MMC0_DAT0 */
            AM62X_IOPAD(0x0210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */
            AM62X_IOPAD(0x020c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */
            AM62X_IOPAD(0x0208, PIN_INPUT_PULLUP, 0) /* (Y4) MMC0_DAT3 */
            AM62X_IOPAD(0x0204, PIN_INPUT_PULLUP, 0) /* (AB2) MMC0_DAT4 */
            AM62X_IOPAD(0x0200, PIN_INPUT_PULLUP, 0) /* (AC1) MMC0_DAT5 */
            AM62X_IOPAD(0x01fc, PIN_INPUT_PULLUP, 0) /* (AD2) MMC0_DAT6 */
            AM62X_IOPAD(0x01f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
        >;
    };

    main_mmc1_pins_default: main-mmc1-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */
            AM62X_IOPAD(0x234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */
            AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22/A19) MMC1_DAT0 */
            AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21/B19) MMC1_DAT1 */
            AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21/B20) MMC1_DAT2 */
            AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22/C19) MMC1_DAT3 */
            AM62X_IOPAD(0x240, PIN_INPUT, 0) /* (D17/C15) MMC1_SDCD */
        >;
    };

    main_mmc2_pins_default: main-mmc2-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD */
            AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK */
            AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0 */
            AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1 */
            AM62X_IOPAD(0x10c, PIN_INPUT, 0) /* (E23) MMC2_DAT2 */
            AM62X_IOPAD(0x108, PIN_INPUT, 0) /* (D24) MMC2_DAT3 */
            AM62X_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */
        >;
    };

    ospi0_pins_default: ospi0-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0000, PIN_OUTPUT, 0) /* (G19) OSPI0_CLK */
            AM62X_IOPAD(0x002c, PIN_OUTPUT, 0) /* (F19) OSPI0_CSn0 */
            AM62X_IOPAD(0x000c, PIN_INPUT, 0) /* (F18) OSPI0_D0 */
            AM62X_IOPAD(0x0010, PIN_INPUT, 0) /* (G17) OSPI0_D1 */
            AM62X_IOPAD(0x0014, PIN_INPUT, 0) /* (F21) OSPI0_D2 */
            AM62X_IOPAD(0x0018, PIN_INPUT, 0) /* (F20) OSPI0_D3 */
            AM62X_IOPAD(0x001c, PIN_INPUT, 0) /* (G21) OSPI0_D4 */
            AM62X_IOPAD(0x0020, PIN_INPUT, 0) /* (H21) OSPI0_D5 */
            AM62X_IOPAD(0x0024, PIN_INPUT, 0) /* (G20) OSPI0_D6 */
            AM62X_IOPAD(0x0028, PIN_INPUT, 0) /* (J21) OSPI0_D7 */
            AM62X_IOPAD(0x0008, PIN_INPUT, 0) /* (H20) OSPI0_DQS */
        >;
    };

    main_spi0_pins_default: main-spi0-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x01bc, PIN_OUTPUT, 0) /* (D12) SPI0_CLK */
            AM62X_IOPAD(0x01b4, PIN_OUTPUT, 0) /* (C11) SPI0_CS0 */
            AM62X_IOPAD(0x01b8, PIN_INPUT, 0) /* (D13) SPI0_CS1 */
            AM62X_IOPAD(0x01c0, PIN_OUTPUT, 0) /* (C12) SPI0_D0 */
            AM62X_IOPAD(0x01c4, PIN_INPUT, 0) /* (A14) SPI0_D1 */
        >;
    };

    main_mcasp2_pins_default: main-mcasp2-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0178, PIN_INPUT, 2) /* (V16) RGMII2_TD3.MCASP2_ACLKX */
            AM62X_IOPAD(0x0174, PIN_INPUT, 2) /* (W17) RGMII2_TD2.MCASP2_AFSX */
            AM62X_IOPAD(0x018c, PIN_INPUT, 2) /* (Y19) RGMII2_RD2.MCASP2_AXR0 */
            AM62X_IOPAD(0x0180, PIN_INPUT, 2) /* (V18) RGMII2_RXC.MCASP2_AXR1 */
        >;
    };

    main_dss0_pins_default: main-dss0-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0100, PIN_OUTPUT, 0) /* (AC25) VOUT0_VSYNC */
            AM62X_IOPAD(0x00f8, PIN_OUTPUT, 0) /* (AB24) VOUT0_HSYNC */
            AM62X_IOPAD(0x0104, PIN_OUTPUT, 0) /* (AC24) VOUT0_PCLK */
            AM62X_IOPAD(0x00fc, PIN_OUTPUT, 0) /* (Y20) VOUT0_DE */
            AM62X_IOPAD(0x00b8, PIN_OUTPUT, 0) /* (U22) VOUT0_DATA0 */
            AM62X_IOPAD(0x00bc, PIN_OUTPUT, 0) /* (V24) VOUT0_DATA1 */
            AM62X_IOPAD(0x00c0, PIN_OUTPUT, 0) /* (W25) VOUT0_DATA2 */
            AM62X_IOPAD(0x00c4, PIN_OUTPUT, 0) /* (W24) VOUT0_DATA3 */
            AM62X_IOPAD(0x00c8, PIN_OUTPUT, 0) /* (Y25) VOUT0_DATA4 */
            AM62X_IOPAD(0x00cc, PIN_OUTPUT, 0) /* (Y24) VOUT0_DATA5 */
            AM62X_IOPAD(0x00d0, PIN_OUTPUT, 0) /* (Y23) VOUT0_DATA6 */
            AM62X_IOPAD(0x00d4, PIN_OUTPUT, 0) /* (AA25) VOUT0_DATA7 */
            AM62X_IOPAD(0x00d8, PIN_OUTPUT, 0) /* (V21) VOUT0_DATA8 */
            AM62X_IOPAD(0x00dc, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA9 */
            AM62X_IOPAD(0x00e0, PIN_OUTPUT, 0) /* (V20) VOUT0_DATA10 */
            AM62X_IOPAD(0x00e4, PIN_OUTPUT, 0) /* (AA23) VOUT0_DATA11 */
            AM62X_IOPAD(0x00e8, PIN_OUTPUT, 0) /* (AB25) VOUT0_DATA12 */
            AM62X_IOPAD(0x00ec, PIN_OUTPUT, 0) /* (AA24) VOUT0_DATA13 */
            AM62X_IOPAD(0x00f0, PIN_OUTPUT, 0) /* (Y22) VOUT0_DATA14 */
            AM62X_IOPAD(0x00f4, PIN_OUTPUT, 0) /* (AA21) VOUT0_DATA15 */
            AM62X_IOPAD(0x005c, PIN_OUTPUT, 1) /* (R24) GPMC0_AD8.VOUT0_DATA16 */
            AM62X_IOPAD(0x0060, PIN_OUTPUT, 1) /* (R25) GPMC0_AD9.VOUT0_DATA17 */
            AM62X_IOPAD(0x0064, PIN_OUTPUT, 1) /* (T25) GPMC0_AD10.VOUT0_DATA18 */
            AM62X_IOPAD(0x0068, PIN_OUTPUT, 1) /* (R21) GPMC0_AD11.VOUT0_DATA19 */
            AM62X_IOPAD(0x006c, PIN_OUTPUT, 1) /* (T22) GPMC0_AD12.VOUT0_DATA20 */
            AM62X_IOPAD(0x0070, PIN_OUTPUT, 1) /* (T24) GPMC0_AD13.VOUT0_DATA21 */
            AM62X_IOPAD(0x0074, PIN_OUTPUT, 1) /* (U25) GPMC0_AD14.VOUT0_DATA22 */
            AM62X_IOPAD(0x0078, PIN_OUTPUT, 1) /* (U24) GPMC0_AD15.VOUT0_DATA23 */
        >;
    };

    vdd_3v3_sd_pins_default: vdd-3v3-sd-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0138, PIN_OUTPUT, 7) /* (AA19) RGMII1_TD1.GPIO0_76 */
        >;
    };

    vdd_sd_dv_pins_default: vdd-sd-dv-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x00a4, PIN_OUTPUT, 7) /* (J19) GPMC0_DIR.GPIO0_40 */
        >;
    };

    bt_en_pins_default: bt-en-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x007c, PIN_OUTPUT, 7) /* (M19) GPMC0_CLK.GPIO0_31 */ /* BT Regulator */
        >;
    };

    wlan_en_pins_default: wlan-en-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0094, PIN_OUTPUT, 7) /* (K18) GPMC0_BE1n.GPIO0_36 */
        >;
    };

    main_wlirq_pins_default: main-wlirq-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x00ac, PIN_INPUT, 7) /* (H17) GPMC0_CSn1.GPIO0_42 */
        >;
    };

    main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0184, PIN_INPUT, 7) /* (W18) RGMII2_RD0.GPIO1_3 */
        >;
    };

    hdmi_pins_default: hdmi-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x0134, PIN_INPUT, 7) /* (U14) RGMII1_TD0.GPIO0_75 */ /* HDMI Interrupt */
            AM62X_IOPAD(0x012c, PIN_OUTPUT, 7) /* (V15) RGMII1_TX_CTL.GPIO0_73 */ /* HDMI Reset */
        >;
    };

    main_mcan0_pins_default: main-mcan0-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x01dc, PIN_INPUT, 0) /* (E15) MCAN0_RX */
            AM62X_IOPAD(0x01d8, PIN_OUTPUT, 0) /* (C15) MCAN0_TX */
        >;
    };

    touch_pins_default: touch-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x016c, PIN_INPUT, 7) /* (AA20) RGMII2_TD0.GPIO0_89 */ /* Touch Interrupt */
            AM62X_IOPAD(0x0170, PIN_OUTPUT, 7) /* (U15) RGMII2_TD1.GPIO0_90 */ /* Touch Reset */
        >;
    };

    usr_led_pins_default: usr-led-pins-default {
        pinctrl-single,pins = <
            AM62X_IOPAD(0x244, PIN_OUTPUT, 7) /* (C17/B15) MMC1_SDWP.GPIO1_49 */
        >;
    };
};

&mcu_pmx0 {

    mcu_mcan0_pins_default: mcu-mcan0-pins-default {
        pinctrl-single,pins = <
            AM62X_MCU_IOPAD(0x0038, PIN_INPUT, 0) /* (B3) MCU_MCAN0_RX */
            AM62X_MCU_IOPAD(0x0034, PIN_OUTPUT, 0) /* (D6) MCU_MCAN0_TX */
        >;
    };

    mcu_mcan1_pins_default: mcu-mcan1-pins-default {
        pinctrl-single,pins = <
            AM62X_MCU_IOPAD(0x0040, PIN_INPUT, 0) /* (D4) MCU_MCAN1_RX */
            AM62X_MCU_IOPAD(0x003c, PIN_OUTPUT, 0) /* (E5) MCU_MCAN1_TX */
        >;
    };
};


&main_rti2 {
 status = "disabled";
};

&main_rti3 {
 status = "disabled";
};

&main_uart0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&main_uart0_pins_default>;
    interrupts-extended = <&gic500 GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>,
                   <&main_pmx0 0x1c8>; /* (D14) UART0_RXD PADCONFIG114 */
    interrupt-names = "irq", "wakeup";
};

&main_uart1 {
    status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&main_uart1_pins_default>;
};

&main_uart4 {
    status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&main_uart4_pins_default>;
};

&main_uart6 {
    status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&main_uart6_pins_default>;
};

&main_uart2 {
    status = "disabled";
};

&main_uart3 {
    status = "disabled";
};

&main_uart5 {
    status = "disabled";
};

&main_i2c0 {
    pinctrl-names = "default";
    pinctrl-0 = <&main_i2c0_pins_default>;
    clock-frequency = <400000>;
    status = "okay";
};

&main_i2c1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&main_i2c1_pins_default>;
    clock-frequency = <400000>;

    tlv320aic3106: audio-codec@18 {
        #sound-dai-cells = <0>;
        compatible = "ti,tlv320aic3106";
        reg = <0x18>;
        ai3x-micbias-vg = <1>;  /* 2.0V */

        /* Regulators */
        AVDD-supply = <&vcc_3v3_sys>;
        IOVDD-supply = <&vcc_3v3_sys>;
        DRVDD-supply = <&vcc_3v3_sys>;
    };

    sii9022: sii9022@3b {
        compatible = "sil,sii9022";
        reg = <0x3b>;
        pinctrl-names = "default";
        pinctrl-0 = <&hdmi_pins_default>;

        interrupt-parent = <&main_gpio0>;
        interrupts = <75 IRQ_TYPE_EDGE_FALLING>;
        irq-gpios = <&main_gpio0 75 GPIO_ACTIVE_LOW>;
        reset-gpios = <&main_gpio0 73 GPIO_ACTIVE_LOW>;
        sil,i2s-data-lanes = < 0 >;

        ports {
            #address-cells = <1>;
            #size-cells = <0>;

            port@0 {
                reg = <0>;

                sii9022_in: endpoint {
                    remote-endpoint = <&dpi1_out>;
                };
            };

            port@1 {
                reg = <1>;

                sii9022_out: endpoint {
                    remote-endpoint = <&hdmi_connector_in>;
                };
            };
        };
    };

        ili2130: touchscreen@41 {
            status = "okay";
            compatible = "ilitek,ili2130";
            reg = <0x41>;
        pinctrl-names = "default";
        pinctrl-0 = <&touch_pins_default>;

            interrupt-parent = <&main_gpio0>;
            interrupts = <89 IRQ_TYPE_EDGE_FALLING>;
            irq-gpios = <&main_gpio0 89 GPIO_ACTIVE_LOW>;
            reset-gpios = <&main_gpio0 90 GPIO_ACTIVE_LOW>;
        };
};

&main_i2c2 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&main_i2c2_pins_default>;
    clock-frequency = <400000>;
};

&main_i2c3 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&main_i2c3_pins_default>;
    clock-frequency = <100000>;

    exp1: gpio@23 {
        compatible = "ti,tca6424";
        reg = <0x23>;
        gpio-controller;
        #gpio-cells = <2>;
        gpio-line-names = "12V_GPI1_OUT", "12V_GPI2_OUT",
                   "12V_GPI3_OUT", "12V_GPI4_OUT",
                   "12V_GPI5_OUT", "12V_GPI6_OUT",
                   "12V_GPI7_OUT", "12V_GPI8_OUT",
                   "12V_GPI9_OUT", "12V_GPI10_OUT",
                   "12V_GPI11_OUT", "12V_GPI12_OUT",
                   "12V_GPO1_IN", "12V_GPO2_IN",
                   "12V_GPO3_IN", "12V_GPO4_IN",
                   "12V_GPO5678_FAULT2", "12V_GPO5678_FAULT1",
                   "12V_GPO1234_FAULT2", "12V_GPO1234_FAULT1",
                   "12V_GPO8_IN", "12V_GPO7_IN",
                   "12V_GPO6_IN", "12V_GPO5_IN";

        pinctrl-names = "default";
        pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;

        interrupt-parent = <&main_gpio1>;
        interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };
};

&main_gpio0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&gpio0_pins_default>;
};

&main_gpio1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&gpio1_pins_default>;
};

&sdhci0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&main_mmc0_pins_default>;
    disable-wp;
};

&sdhci1 {
    /* SD/MMC */
    vmmc-supply = <&vdd_mmc1>;
    vqmmc-supply = <&vdd_sd_dv>;
    pinctrl-names = "default";
    pinctrl-0 = <&main_mmc1_pins_default>;
    ti,driver-strength-ohm = <50>;
    disable-wp;
    no-1-8-v;
    status = "okay";
};

&sdhci2 {
    status = "okay";
    vmmc-supply = <&wlan_en>;
        vqmmc-supply = <&bt_en>;
    pinctrl-names = "default";
    pinctrl-0 = <&main_mmc2_pins_default>;
    bus-width = <4>;
    non-removable;
    ti,fails-without-test-cd;
    cap-power-off-card;
    keep-power-in-suspend;
    ti,driver-strength-ohm = <50>;
    assigned-clocks = <&k3_clks 157 158>;
    assigned-clock-parents = <&k3_clks 157 160>;

    #address-cells = <1>;
    #size-cells = <0>;
};

&ospi0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&ospi0_pins_default>;

    flash@0{
        compatible = "jedec,spi-nor";
        reg = <0x0>;
        spi-tx-bus-width = <8>;
        spi-rx-bus-width = <8>;
        spi-max-frequency = <25000000>;
        cdns,tshsl-ns = <60>;
        cdns,tsd2d-ns = <60>;
        cdns,tchsh-ns = <60>;
        cdns,tslch-ns = <60>;
        cdns,read-delay = <4>;

        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
                label = "ospi.tiboot3";
                reg = <0x0 0x80000>;
            };

            partition@80000 {
                label = "ospi.tispl";
                reg = <0x80000 0x200000>;
            };

            partition@280000 {
                label = "ospi.u-boot";
                reg = <0x280000 0x400000>;
            };

            partition@680000 {
                label = "ospi.env";
                reg = <0x680000 0x40000>;
            };

            partition@6c0000 {
                label = "ospi.env.backup";
                reg = <0x6c0000 0x40000>;
            };

            partition@800000 {
                label = "ospi.rootfs";
                reg = <0x800000 0x37c0000>;
            };

            partition@3fc0000 {
                label = "ospi.phypattern";
                reg = <0x3fc0000 0x40000>;
            };
        };
    };
};

&main_spi0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&main_spi0_pins_default>;

    adc@0 {
        compatible = "ti,ads8344";
        reg = <0>;
        spi-max-frequency = <1000000>;
        vref-supply = <&vcc_5v0>;
        #io-channel-cells = <1>;
    };
};

&main_mcan0 {
    pinctrl-names = "default";
    pinctrl-0 = <&main_mcan0_pins_default>;
    phys = <&transceiver1>;
    status = "okay";
};

/* MCU periperhals */
&mcu_uart0 {
    status = "disabled";
};

&mcu_i2c0 {
    status = "disabled";
};

&mcu_mcan0 {
    pinctrl-names = "default";
    pinctrl-0 = <&mcu_mcan0_pins_default>;
    phys = <&transceiver2>;
    status = "okay";
};

&mcu_mcan1 {
    pinctrl-names = "default";
    pinctrl-0 = <&mcu_mcan1_pins_default>;
    phys = <&transceiver3>;
    status = "okay";
};

/* mcu_gpio0 and mcu_gpio_intr are reserved for mcu firmware usage */
&mcu_gpio_intr {
    status = "reserved";
};

&mcu_gpio0 {
    status = "reserved";
};

/* WKUP periperhals */
&wkup_conf {
    status = "okay";
};

&chipid {
    status = "okay";
};

/* wkup_uart0 is reserved for firmware usage */
&wkup_uart0 {
    status = "reserved";
};

&wkup_i2c0 {
    status = "disabled";
};

&mcu_m4fss {
    mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
    memory-region = <&mcu_m4fss_dma_memory_region>,
            <&mcu_m4fss_memory_region>;
};

&wkup_r5fss0_core0 {
    mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
    memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
            <&wkup_r5fss0_core0_memory_region>;
};

&mailbox0_cluster0 {
    mbox_m4_0: mbox-m4-0 {
        ti,mbox-rx = <0 0 0>;
        ti,mbox-tx = <1 0 0>;
    };

    mbox_r5_0: mbox-r5-0 {
        ti,mbox-rx = <2 0 0>;
        ti,mbox-tx = <3 0 0>;
    };
};

&mcasp2 {
    status = "okay";
    #sound-dai-cells = <0>;

    pinctrl-names = "default";
    pinctrl-0 = <&main_mcasp2_pins_default>;

    op-mode = <0>;          /* MCASP_IIS_MODE */
    tdm-slots = <2>;

    serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
           1 2 0 0
           0 0 0 0
           0 0 0 0
           0 0 0 0
    >;
    tx-num-evt = <0>;
    rx-num-evt = <0>;
};

&tlv320aic3106 {
    DVDD-supply = <&vcc_1v8>;
};

&dphy0 {
    status = "okay";
};

&dss {
    pinctrl-names = "default";
    pinctrl-0 = <&main_dss0_pins_default>;
};

&dss_ports {
    /* VP2: DPI Output */
    hdmi0_dss: port@1 {
        reg = <1>;

        dpi1_out: endpoint {
            remote-endpoint = <&sii9022_in>;
        };
    };
};

&pruss {
        status = "disabled";
};

&cpsw3g {
    status = "disabled";
};

&cpsw_port1 {
    status = "disabled";
};

&cpsw3g_mdio {
    status = "disabled";
};

&epwm0 {
    status = "disabled";
};

&epwm1 {
    status = "disabled";
};

&epwm2 {
    status = "disabled";
};

&ecap0 {
    status = "disabled";
};

&ecap1 {
    status = "disabled";
};

&ecap2 {
    status = "disabled";
};

 

Kindly do the needful

 

Regards

Pawan

 

 

 

  • Hi Pawan,

    If I understand correctly your part number is 17.2 x 17.2 mm package (AMC) and you are trying to get audio functionality using McASP2 with this SoC. From the Device tree changes, I don't see any issues.

    May I know what software base are you testing this with? Is the SDK software version 9.2.1? Because audio seems to be working fine in both playback and capture on AM62x.

    Best Regards,

    Suren

  • Hi Suren,

    Yes it's AMC package. We are using ti-linux kernel 6.1y  release  9.2.1.    

    In EVM its working. 

    Only observation is we get 

    Aplay command exits after playing audio in EVM but in our board after aplay ,it's stuck and need to give Ctrl+c to exit 

    How to check if MCASP lines are properly configured from Linux userspace?

    Regards

    Pawan

  • Hi Pawan,

    On the PinMux, can you change the AXR0 to OUTPUT instead of INPUT as pointed in the below commit:

    git.ti.com/.../

    SDK 10.0 would be released by 16th August. Please have it tested with that release and see if it resolves the issue.

    I verified this on my setup:

    root@am62pxx-evm:~# amixer -c 0 cset numid=71 on
    numid=71,iface=MIXER,name='Right PGA Mixer Mic3R Switch'
      ; type=BOOLEAN,access=rw------,values=1
      : values=on
    root@am62pxx-evm:~# amixer -c 0 cset numid=70 on
    numid=70,iface=MIXER,name='Right PGA Mixer Mic3L Switch'
      ; type=BOOLEAN,access=rw------,values=1
      : values=on
    root@am62pxx-evm:~# amixer -c 0 cset numid=64 on
    numid=64,iface=MIXER,name='Left PGA Mixer Mic3L Switch'
      ; type=BOOLEAN,access=rw------,values=1
      : values=on
    root@am62pxx-evm:~# amixer -c 0 cset numid=65 on
    numid=65,iface=MIXER,name='Left PGA Mixer Mic3R Switch'
      ; type=BOOLEAN,access=rw------,values=1
      : values=on
    root@am62pxx-evm:~# amixer -c 0 cset numid=15 127
    numid=15,iface=MIXER,name='PCM Playback Volume'
      ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
      : values=127,127
      | dBscale-min=-63.50dB,step=0.50dB,mute=0
    root@am62pxx-evm:~# i2cdetect -r 1
    WARNING! This program can confuse your I2C bus, cause data loss and worse!
    I will probe file /dev/i2c-1 using receive byte commands.
    I will probe address range 0x08-0x77.
    Continue? [Y/n] Y
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:                         -- -- -- -- -- -- -- -- 
    10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- 
    20: -- -- UU UU -- -- -- -- -- -- -- -- -- -- -- -- 
    30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- 
    40: 40 41 -- -- -- 45 -- 47 48 49 -- -- 4c 4d -- -- 
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- -- 
    70: -- -- -- -- -- -- -- --                         
    root@am62pxx-evm:~# arecord -Dhw:0,0 -r 48000 -c 2 --period-size=64 -d 20 -f S16_LE | aplay -Dhw:0,0
    Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
    Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
    root@am62pxx-evm:~# 

    And it worked fine without me having to interrupt the playback.

    Or you can take the kernel(6.6) that is part of the  SDK10.0 release

    git.ti.com/.../

    Best Regards,

    Suren

  • Hi Suren,

    We tried it as output, still no audio. 

    OUTPUT instead of INPUT

    Aplay command exits after playing audio in EVM but in our board after aplay ,it's stuck and need to give Ctrl+c to exit 

    Same observation as before.

    release and see if it resolves the issue.

    Hope it solves. But is there any thing else I need to check ?

    Is everything loaded properly? Or do you need any log to verify driver or check commands ? Please let me know if any

    Regards

    Pawan

  • Can you check whether the bitclock, framesync are correct? 

    If not, I would suggest to retest with 10.0 SDK thats going to be released next week.

    Best Regards,

    Suren