SDAA199 December   2025 AM620-Q1 , AM625 , AM625-Q1 , AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM62P , AM62P-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. Introduction
  5. Software Architecture
  6. Sound Card Information
  7. McASP - External Signals
  8. MCASP Clock Generation and Configurations
  9. Dummy Sound Card DTS Changes
  10. Single DAI Link or a Single Sound Card
  11. Multiple DAI Links - Single Card but Multiple Sub-Devices
  12. MCASP - Practical Examples
  13. 10McASP as a Receiver
    1. 10.1 ADC or Codec as Clock Master
    2. 10.2 Device Tree Changes - Codec as Master and MCASP as Slave
  14. 11MCASP as Transmitter
    1. 11.1 Device Tree Changes - With Codec as Slave and MCASP as Master
  15. 12References

Device Tree Changes - Codec as Master and MCASP as Slave

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 = <&mcasp1>;
    };
 
    sound_master: simple-audio-card,codec {
        sound-dai = <&tlv320aic3106>;
        clocks = <&tlv320_mclk>;
    };
};
 
tlv320aic3106: audio-codec@1b {
    #sound-dai-cells = <0>;
    compatible = "ti,tlv320aic3106";
    reg = <0x1b>;
    ai3x-micbias-vg = <1>;  /* 2.0V */
};

Reference: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts?h=ti-linux-6.12.y

Important things to note:

  • McASP’s receive clock pins, ACLKR and AFSR, are operating as inputs. The ADC, as the clock master, is driving those clock lines. McASP must be configured as the clock slave, which means that the ACLKR and AFSR pins must be configured as inputs, and must be configured for an EXTERNAL clock source. These two things sound equivalent, but they are not. McASP pin direction and clock source are two different settings. For more information on how to configure this, see the device-specific TRM.
  • AHCLKR is not used, only bit clock and frame sync are required. AHCLKR is only necessary if the McASP’s Rx section is fed a high-frequency clock and must then divide it down in order to generate bitclock and frame sync. In the above example, this is not necessary, since there is no need for McASP to generate Rx clocks.

main_mcasp1_pins_default: main-mcasp1-default-pins {
        pinctrl-single,pins = <
            AM62PX_IOPAD(0x0090, PIN_INPUT, 2) /* (U24) GPMC0_BE0n_CLE.MCASP1_ACLKX */
            AM62PX_IOPAD(0x0098, PIN_INPUT, 2) /* (AA24) GPMC0_WAIT0.MCASP1_AFSX */
            AM62PX_IOPAD(0x008c, PIN_OUTPUT, 2) /* (T25) GPMC0_WEn.MCASP1_AXR0 */
            AM62PX_IOPAD(0x0084, PIN_INPUT, 2) /* (R25) GPMC0_ADVn_ALE.MCASP1_AXR2 */
        >;
    };
 
&mcasp1 {
    status = "okay";
    #sound-dai-cells = <0>;
 
    pinctrl-names = "default";
    pinctrl-0 = <&main_mcasp1_pins_default>;
 
    op-mode = <0>;          /* MCASP_IIS_MODE */
    tdm-slots = <2>;
 
    serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
           1 0 2 0
           0 0 0 0
           0 0 0 0
           0 0 0 0
    >;
};