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.

AM625SIP: How to config the macsp0?

Part Number: AM625SIP

Tool/software:

Hi team,

Question description:
Bclk and fclk from external clk, 4 data line receive data.

How to modify the device trees?   Sample rate=48K word-size=32bit 2ch/per date line

&mcasp0 {
pinctrl-names = "default";
pinctrl-0 = <&main_mcasp0_pins_default>;
op-mode = <0>; /* I2S mode */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
2 2 0 0
0 0 0 0
0 0 0 0
0 0 0 0
>;
tdm-slots = <2>;
rx-num-evt = <0>;
tx-num-evt = <0>;
#sound-dai-cells = <0>;
status = "okay";
};

sound_master: pdm-to-i2s {
#sound-dai-cells = <0>;
compatible = "adi,adau7002";
};

codec_audio: sound {
compatible = "simple-audio-card";
simple-audio-card,name = "AM62x-SKEVM";
simple-audio-card,format = "dsp_b";
simple-audio-card,bitclock-master = <&sound_master>;
simple-audio-card,frame-master = <&sound_master>;

simple-audio-card,dai-link@0 {
cpu {
sound-dai = <&mcasp0>;
};
codec {
sound-dai = <&sound_master>;
};
};

};

  • Roy, your question just got re-assigned to the appropriate subject matter expert. We'll get back here shortly.

  • Roy,

    The Device tree changes look okay. Also can you share the main_mcasp0_pins_default { } for the pincontrols to see if everything is correct.

    You can refer our DTS file: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi?h=ti-linux-6.6.y#n574 where we are using MCASP1 and codec is the initiator of the clocks.

    Best Regards,

    Suren

  • Hi Suren,

    When I use the device tree, the card cannot be registered, log:
    [ 9.268032] davinci-mcasp 2b00000.audio-controller: ASoC: error at snd_soc_dai_set_fmt on 2b00000.audio-controller: -
    22
    [ 9.284788] asoc-simple-card: probe of sound failed with error -22

    I add "format = "i2s" "  in dailink:

    sound_master: pdm-to-i2s {
    #sound-dai-cells = <0>;
    compatible = "adi,adau7002";
    };

    codec_audio: sound {
    compatible = "simple-audio-card";
    simple-audio-card,name = "AM62x-SKEVM25";
    simple-audio-card,format = "dsp_b";
    simple-audio-card,bitclock-master = <&sound_master>;
    simple-audio-card,frame-master = <&sound_master>;

    simple-audio-card,dai-link@0 {

    format = "i2s"
    cpu {
    sound-dai = <&mcasp0>;
    };
    codec {
    sound-dai = <&sound_master>;
    };
    };

    };

    The sound card can be registered, but when I use: 

    root@am62xx-evm:/proc/asound/AM62xSKEVM25/pcm0c# arecord -fS32_LE  -c 8 -D hw:0,0 /tmp/test.wav

    the log:


    [ 310.624612] davinci-mcasp 2b00000.audio-controller: Too fast reference clock (96000000)
    [ 310.632672] davinci-mcasp 2b00000.audio-controller: Sample-rate is off by 400 PPM
    Recording WAVE '/tmp/test.wav' : Signed 32 bit Little Endian, Rate 48000 Hz
    arecord: pcm_read:2272: read error: Input/output error


    mcasp0:
    main_mcasp0_pins_default: main-mcasp0-default-pins {
    pinctrl-single,pins = <
    AM62X_IOPAD(0x1B0, PIN_INPUT, 0) /* (A20) MCASPO_ACLKR*/
    AM62X_IOPAD(0x1AC, PIN_INPUT, 0) /* (E19) MCASP0_AFSR */
    AM62X_IOPAD(0x1A0, PIN_INPUT, 0) /* (E18) MCASP0_AXR0 */
    AM62X_IOPAD(0x19C, PIN_INPUT, 0) /* (B18) MCASP0_AXR1 */
    AM62X_IOPAD(0x198, PIN_INPUT, 0) /* (A19) MCASP0_AXR2 */
    AM62X_IOPAD(0x194, PIN_INPUT, 0) /* (B19) MCASP0_AXR3 */
    >;
    };

    mcasp0: audio-controller@2b00000 {
    compatible = "ti,am33xx-mcasp-audio";
    reg = <0x00 0x02b00000 0x00 0x2000>,
    <0x00 0x02b08000 0x00 0x400>;
    reg-names = "mpu", "dat";
    interrupts = <GIC_SPI 236 IRQ_TYPE_LEVEL_HIGH>,
    <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH>;
    interrupt-names = "tx", "rx";

    dmas = <&main_bcdma 0 0xc500 0>, <&main_bcdma 0 0x4500 0>;
    dma-names = "tx", "rx";

    clocks = <&k3_clks 190 0>;
    clock-names = "fck";
    assigned-clocks = <&k3_clks 190 0>;
    assigned-clock-parents = <&k3_clks 190 2>;
    power-domains = <&k3_pds 190 TI_SCI_PD_EXCLUSIVE>;
    status = "disabled";
    };




  • Hi Roy,

    you have configured as I2S and tdm-slots=2 can you please run the arecord command with -c 2 option and see if it works

    Best Regards,

    Suren

  • Hi Suren,

    According to https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi?h=ti-linux-6.6.y#n574, I renew the device tree:

    // SPDX-License-Identifier: GPL-2.0
    /*
     * AM625 SK: https://www.ti.com/lit/zip/sprr448
     *
     * 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-am625.dtsi"
    #include <dt-bindings/interrupt-controller/irq.h>
    #include "k3-pinctrl.h"
    
    / {
    	compatible = "ti,am625-sk", "ti,am625";
    	model = "Texas Instruments AM625 SK";
    
    	aliases {
    		serial0 = &mcu_uart0;
    		serial1 = &wkup_uart0;
    		serial2 = &main_uart0;
    		mmc0 = &sdhci0;
    		mmc1 = &sdhci1;//SD
    		mmc2 = &sdhci2;
    		spi0 = &ospi0;
    		ethernet0 = &cpsw_port1;
    		ethernet1 = &cpsw_port2;
    		usb0 = &usb0;
    		usb1 = &usb1;
    	};
    	
    	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";
    		};
    	};
    
    	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;
    		};
    	};
    
    	tas5760_mclk: clk-0 {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <12288000>;
    	};
    	
    	pcm5102a: pcm5102a {
    		#sound-dai-cells = <0>;
    		compatible = "ti,pcm5102a";
    	};
    	
    	bt_sco: bt_sco {
    		#sound-dai-cells = <0>;
    		compatible = "linux,bt-sco";
    		status = "okay";
    	};
    	
    /*
    	adau7002: pdm-to-i2s {
    		#sound-dai-cells = <0>;
    		compatible = "adi,adau7002";
    		IOVDD-supply = <&vcc_3v3_sys>;
    	};
    
    	codec_audio: sound {
    		compatible = "simple-audio-card";
    		simple-audio-card,name = "Dummy-Audio-Card";
    
    		
    		simple-audio-card,dai-link@0 {
    			//format = "dsp_a";
    			//format = "dsp_b";
    			format = "i2s";
    			//bitclock-inversion;
    			bitclock-master = <&dailink0_master>;
    			frame-master = <&dailink0_master>;
    			cpu {
    				sound-dai = <&mcasp1>;
    			};
    
    			dailink0_master:codec {
    				sound-dai = <&pcm5102a>;
    			};
    		};
    
    		simple-audio-card,dai-link@1 {
    			//format = "dsp_a";
    			//format = "dsp_b";
    			format = "i2s";
    			//bitclock-inversion;
    			bitclock-master = <&dailink1_master>;
    			frame-master = <&dailink1_master>;
    			cpu {
    				sound-dai = <&mcasp0>;
    			};
    
    			dailink1_master:codec {
    				//sound-dai = <&bt_sco>;
    				sound-dai = <&adau7002>;
    			};
    		};
    		
    	}; 
    */
    
    
    	tlv320aic3106: audio-codec@1b {
    		#sound-dai-cells = <0>;
    		compatible = "adi,adau7002";
    	};
    
    
    	codec_audio: sound {
    		compatible = "simple-audio-card";
    		simple-audio-card,name = "AM62x-SKEVMcap";
    
    		simple-audio-card,format = "i2s";
    		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 = <&mcasp0>;
    		};
    
    		sound_master: simple-audio-card,codec {
    			sound-dai = <&tlv320aic3106>;
    		};
    	};
    
    
    
    	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>;
    	};
    
    	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";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		enable-active-high;
    		vin-supply = <&vcc_3v3_sys>;
    		gpio = <&exp1 2 GPIO_ACTIVE_HIGH>;
    	};
    	
    	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;
    	};
    
    	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;
    	};
    	
    	display {
    		//compatible = "microtips,mf-101hiebcaf0";
    		compatible = "panel-lvds";
    		
    		width-mm = <1024>;
    		height-mm = <480>;
    		data-mapping = "jeida-24";
    		//data-mapping = "vesa-24";
    		//data-mapping = "jeida-18";
    		//1024x240p60 //
    		panel-timing {
    			clock-frequency = <45360000>;
    			hactive = <1024>;
    			vactive = <480>;
    			hsync-len = <60>;
    			hfront-porch = <146>;
    			hback-porch = <30>;
    			vfront-porch = <50>;
    			vback-porch = <60>;
    			vsync-len = <10>;
    
    			vsync-active = <1>;
    			hsync-active = <1>;
    			de-active = <1>;
    			pixelclk-active = <1>;
    			syncclk-active = <1>;
    			//在设备树中配置, 1为高, 0为低
    		};
    		
    		/*
    		* Note that the OLDI TX 0 transmits the odd set of pixels
    		* while the OLDI TX 1 transmits the even set. This is a
    		* fixed configuration in the IP integration and is not
    		* changeable. The properties, "dual-lvds-odd-pixels" and
    		* "dual-lvds-even-pixels" have been used to merely
    		* identify if a Dual Link configuration is required.
    		* Swapping them will not make any difference.
    		*/
    		port@0 {
    			//dual-lvds-odd-pixels;
    			lcd_in0: endpoint {
    				remote-endpoint = <&oldi_out0>;
    			};
    		};
    
    	};
    
    	panel0 {
    		//compatible = "qishenglong,gopher2b-lcd", "simple-panel";
    		//compatible = "multi-inno,mi0800ft-9";
    		//compatible = "powertip,ph800480t013-idf02";
    		compatible = "gefei,dpi-port";
    		
    		//1024x480p60 //
    		panel-timing {
    			clock-frequency = <45360000>;
    			hactive = <1024>;
    			vactive = <480>;
    			hsync-len = <60>;
    			hfront-porch = <146>;
    			hback-porch = <30>;
    			vfront-porch = <50>;
    			vback-porch = <60>;
    			vsync-len = <10>;
    
    			vsync-active = <1>;
    			hsync-active = <1>;
    			de-active = <1>;
    			pixelclk-active = <1>;
    			syncclk-active = <1>;
    			//在设备树中配置, 1为高, 0为低
    		};
    				
    		port {
    			panel_in: endpoint {
    				remote-endpoint = <&dss0_dpi1_out>;
    			};
    		};
    	};
    
    };
    
    &mcu_gpio0 {
    	pinctrl-names ="default";
    	pinctrl-0=<&mymcugpio1_pins_default>;
    	status = "okay";
    };
    
    &mcu_pmx0 {                                                                     
    	mymcugpio1_pins_default: mymcugpio1-pins-default {                      
    		pinctrl-single,pins = <
    			//按键中断                                     
    			AM62X_MCU_IOPAD(0x038, PIN_INPUT, 7) /* (B3) MCU_MCAN0_RX.MCU_GPIO0_14 */
    			AM62X_MCU_IOPAD(0x034, PIN_INPUT, 7) /* (D6) MCU_MCAN0_TX.MCU_GPIO0_13 */
    			AM62X_MCU_IOPAD(0x040, PIN_INPUT, 7) /* (D4) MCU_MCAN1_RX.MCU_GPIO0_16 */
    			AM62X_MCU_IOPAD(0x03C, PIN_INPUT, 7) /* (E5) MCU_MCAN1_TX.MCU_GPIO0_15 */
    			AM62X_MCU_IOPAD(0x008, PIN_INPUT, 7) /* (A7) MCU_SPI0_CLK.MCU_GPIO0_2 */
    			//数字旋转编码器EC12(U7)
    			AM62X_MCU_IOPAD(0x000, PIN_INPUT, 7) /* (E8) MCU_SPI0_CS0.MCU_GPIO0_0 */
    			AM62X_MCU_IOPAD(0x004, PIN_INPUT, 7) /* (B8) MCU_SPI0_CS1.MCU_GPIO0_1 */
    			AM62X_MCU_IOPAD(0x00C, PIN_INPUT, 7) /* (D9) MCU_SPI0_D0.MCU_GPIO0_3 */
    		>;                                                              
    	};                                                                      
    }; 
    
    &main_pmx0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_sys_gpio_pins_default>;
    	
    	main_sys_gpio_pins_default: main-sys-gpio-pins-default {
    		pinctrl-single,pins = <
    			//数字旋转编码器EC12(U6)
    			AM62X_IOPAD(0x10C, PIN_INPUT, 7)//(E23) GPIO0_66 MMC2 DAT2
    			AM62X_IOPAD(0x108, PIN_INPUT, 7)//(D24) GPIO0_65 MMC2 DAT3
    			AM62X_IOPAD(0x244, PIN_INPUT, 7)//(C17) GPIO1_49 MMC1 SDWP
    			//耳麦检测
    			AM62X_IOPAD(0x1C0, PIN_INPUT, 7)//(B13) GPIO1_18 SPI0_D0
    			AM62X_IOPAD(0x120, PIN_INPUT, 7)//(C24) GPIO0_70 MMC2 CMD
    			AM62X_IOPAD(0x1B8, PIN_INPUT, 7)//(C13) GPIO1_16 SPI0_CS1
    		>;
    	};
    	main_oldi0_pins_default: main-oldi0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x0260, PIN_OUTPUT, 0) /* (AA5) OLDI0_A0N */
    			AM62X_IOPAD(0x025c, PIN_OUTPUT, 0) /* (Y6) OLDI0_A0P */
    			AM62X_IOPAD(0x0268, PIN_OUTPUT, 0) /* (AD3) OLDI0_A1N */
    			AM62X_IOPAD(0x0264, PIN_OUTPUT, 0) /* (AB4) OLDI0_A1P */
    			AM62X_IOPAD(0x0270, PIN_OUTPUT, 0) /* (Y8) OLDI0_A2N */
    			AM62X_IOPAD(0x026c, PIN_OUTPUT, 0) /* (AA8) OLDI0_A2P */
    			AM62X_IOPAD(0x0278, PIN_OUTPUT, 0) /* (AB6) OLDI0_A3N */
    			AM62X_IOPAD(0x0274, PIN_OUTPUT, 0) /* (AA7) OLDI0_A3P */
    			AM62X_IOPAD(0x0280, PIN_OUTPUT, 0) /* (AC6) OLDI0_A4N */
    			AM62X_IOPAD(0x027c, PIN_OUTPUT, 0) /* (AC5) OLDI0_A4P */
    			AM62X_IOPAD(0x0288, PIN_OUTPUT, 0) /* (AE5) OLDI0_A5N */
    			AM62X_IOPAD(0x0284, PIN_OUTPUT, 0) /* (AD6) OLDI0_A5P */
    			AM62X_IOPAD(0x0290, PIN_OUTPUT, 0) /* (AE6) OLDI0_A6N */
    			AM62X_IOPAD(0x028c, PIN_OUTPUT, 0) /* (AD7) OLDI0_A6P */
    			AM62X_IOPAD(0x0298, PIN_OUTPUT, 0) /* (AD8) OLDI0_A7N */
    			AM62X_IOPAD(0x0294, PIN_OUTPUT, 0) /* (AE7) OLDI0_A7P */
    			AM62X_IOPAD(0x02a0, PIN_OUTPUT, 0) /* (AD4) OLDI0_CLK0N */
    			AM62X_IOPAD(0x029c, PIN_OUTPUT, 0) /* (AE3) OLDI0_CLK0P */
    			AM62X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (AE4) OLDI0_CLK1N */
    			AM62X_IOPAD(0x02a4, PIN_OUTPUT, 0) /* (AD5) OLDI0_CLK1P */
    		>;
    	};
    
    	/* First pad number is ALW package and second is AMC package */
    	main_uart0_pins_default: main-uart0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14/A13) UART0_RXD */
    			AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14/E11) UART0_TXD */
    		>;
    	};
    
    	main_i2c0_pins_default: main-i2c0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (B16/E12) I2C0_SCL */
    			AM62X_IOPAD(0x1e4, PIN_INPUT_PULLUP, 0) /* (A16/D14) I2C0_SDA */
    		>;
    	};
    
    	main_i2c1_pins_default: main-i2c1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17/A17) I2C1_SCL */
    			AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17/A16) I2C1_SDA */
    		>;
    	};
    
    	main_mmc0_pins_default: main-mmc0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (Y3/V3) MMC0_CMD */
    			AM62X_IOPAD(0x218, PIN_INPUT, 0) /* (AB1/Y1) MMC0_CLK */
    			AM62X_IOPAD(0x214, PIN_INPUT, 0) /* (AA2/V2) MMC0_DAT0 */
    			AM62X_IOPAD(0x210, PIN_INPUT, 0) /* (AA1/V1) MMC0_DAT1 */
    			AM62X_IOPAD(0x20c, PIN_INPUT, 0) /* (AA3/W2) MMC0_DAT2 */
    			AM62X_IOPAD(0x208, PIN_INPUT, 0) /* (Y4/W1) MMC0_DAT3 */
    			AM62X_IOPAD(0x204, PIN_INPUT, 0) /* (AB2/Y2) MMC0_DAT4 */
    			AM62X_IOPAD(0x200, PIN_INPUT, 0) /* (AC1/W3) MMC0_DAT5 */
    			AM62X_IOPAD(0x1fc, PIN_INPUT, 0) /* (AD2/W4) MMC0_DAT6 */
    			AM62X_IOPAD(0x1f8, PIN_INPUT, 0) /* (AC2/V4) 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 */
    		>;
    	};
    
    	Badlight_CTL: badlight_CTL {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x0B0, PIN_OUTPUT, 7) // (k22) GPIO0_43
    			AM62X_IOPAD(0x0B4, PIN_OUTPUT, 7) // (k24) GPIO0_44 
    			AM62X_IOPAD(0x244, PIN_OUTPUT, 7) // (C17/B15) MMC1_SDWP.GPIO1_49 
    			//测试
    			//AM62X_IOPAD(0x0A8, PIN_OUTPUT, 7) // (M21) GPIO0_41 
    
    		>;
    	};
    
    	main_mdio1_pins_default: main-mdio1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x160, PIN_OUTPUT, 0) /* (AD24/V17) MDIO0_MDC */
    			AM62X_IOPAD(0x15c, PIN_INPUT, 0) /* (AB22/U16) MDIO0_MDIO */
    		>;
    	};
    	
    	//F_SPK_SD:这个的拉高正常工作,拉低shutdown
    	tas5760_F_SPK_SD_pins_default: tas5760-F-SPK-SD-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x0A8, PIN_OUTPUT, 7) // (M21) GPMC0_CSn0.GPIO0_41 
    		>;
    	};
    	
    	main_mcasp1_pins_default: main-mcasp1-pins-default {
    		pinctrl-single,pins = <
    			//MCASP发送位时钟
    			AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
    			//AM62X_IOPAD(0x090, PIN_OUTPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
    			//MCASP发送帧同步信号或左右声道时钟
    			AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
    			//AM62X_IOPAD(0x098, PIN_OUTPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
    			//MCASP串行输入输出接口
    			AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
    			AM62X_IOPAD(0x088, PIN_OUTPUT, 2) /* (L24) GPMC0_OEN.MCASP1_AXR1 */
    			AM62X_IOPAD(0x084, PIN_OUTPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
    			AM62X_IOPAD(0x07c, PIN_OUTPUT, 2) /* (P25) GPMC0_CKL.MCASP1_AXR3 */
    		>;
    	};
    
    	main_mcasp0_pins_default: main-mcasp0-pins-default {
    		pinctrl-single,pins = <
    			//MCASP发送位时钟
    			AM62X_IOPAD(0x1B0, PIN_INPUT, 0) /* (A20) MCASPO_ACLKR*/
    			//AM62X_IOPAD(0x1A4, PIN_INPUT, 0) /* (B20) MCASPO_ACLKX*/
    			//MCASP发送帧同步信号或左右声道时钟
    			AM62X_IOPAD(0x1AC, PIN_INPUT, 0) /* (E19) MCASP0_AFSR */
    			//AM62X_IOPAD(0x1A8, PIN_INPUT, 0) /* (D20) MCASP0_AFSX */
    			//MCASP串行输入输出接口
    			AM62X_IOPAD(0x1A0, PIN_INPUT, 0) /* (E18) MCASP0_AXR0 */
    			AM62X_IOPAD(0x19C, PIN_INPUT, 0) /* (B18) MCASP0_AXR1 */
    			AM62X_IOPAD(0x198, PIN_INPUT, 0) /* (A19) MCASP0_AXR2 */
    			AM62X_IOPAD(0x194, PIN_INPUT, 0) /* (B19) MCASP0_AXR3 */
    		>;
    	};
    
    	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 */
    		>;
    	};
    
    	main_rgmii1_pins_default: main-rgmii1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x14c, PIN_INPUT, 0) /* (AB17/W15) RGMII1_RD0 */
    			AM62X_IOPAD(0x150, PIN_INPUT, 0) /* (AC17/Y16) RGMII1_RD1 */
    			AM62X_IOPAD(0x154, PIN_INPUT, 0) /* (AB16/AA17) RGMII1_RD2 */
    			AM62X_IOPAD(0x158, PIN_INPUT, 0) /* (AA15/Y15) RGMII1_RD3 */
    			AM62X_IOPAD(0x148, PIN_INPUT, 0) /* (AD17/AA16) RGMII1_RXC */
    			AM62X_IOPAD(0x144, PIN_INPUT, 0) /* (AE17/W14) RGMII1_RX_CTL */
    			AM62X_IOPAD(0x134, PIN_OUTPUT, 0) /* (AE20/U14) RGMII1_TD0 */
    			AM62X_IOPAD(0x138, PIN_OUTPUT, 0) /* (AD20/AA19) RGMII1_TD1 */
    			AM62X_IOPAD(0x13c, PIN_OUTPUT, 0) /* (AE18/Y17) RGMII1_TD2 */
    			AM62X_IOPAD(0x140, PIN_OUTPUT, 0) /* (AD18/AA18) RGMII1_TD3 */
    			AM62X_IOPAD(0x130, PIN_OUTPUT, 0) /* (AE19/W16) RGMII1_TXC */
    			AM62X_IOPAD(0x12c, PIN_OUTPUT, 0) /* (AD19/V15) RGMII1_TX_CTL */
    		>;
    	};
    
    	main_rgmii2_pins_default: main-rgmii2-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x184, PIN_INPUT, 0) /* (AE23) RGMII2_RD0 */
    			AM62X_IOPAD(0x188, PIN_INPUT, 0) /* (AB20) RGMII2_RD1 */
    			AM62X_IOPAD(0x18c, PIN_INPUT, 0) /* (AC21) RGMII2_RD2 */
    			AM62X_IOPAD(0x190, PIN_INPUT, 0) /* (AE22) RGMII2_RD3 */
    			AM62X_IOPAD(0x180, PIN_INPUT, 0) /* (AD23) RGMII2_RXC */
    			AM62X_IOPAD(0x17c, PIN_INPUT, 0) /* (AD22) RGMII2_RX_CTL */
    			AM62X_IOPAD(0x16c, PIN_OUTPUT, 0) /* (Y18) RGMII2_TD0 */
    			AM62X_IOPAD(0x170, PIN_OUTPUT, 0) /* (AA18) RGMII2_TD1 */
    			AM62X_IOPAD(0x174, PIN_OUTPUT, 0) /* (AD21) RGMII2_TD2 */
    			AM62X_IOPAD(0x178, PIN_OUTPUT, 0) /* (AC20) RGMII2_TD3 */
    			AM62X_IOPAD(0x168, PIN_OUTPUT, 0) /* (AE21) RGMII2_TXC */
    			AM62X_IOPAD(0x164, PIN_OUTPUT, 0) /* (AA19) RGMII2_TX_CTL */
    		>;
    	};
    
    	ospi0_pins_default: ospi0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x000, PIN_OUTPUT, 0) /* (H24) OSPI0_CLK */
    			AM62X_IOPAD(0x02c, PIN_OUTPUT, 0) /* (F23) OSPI0_CSn0 */
    			AM62X_IOPAD(0x00c, PIN_INPUT, 0) /* (E25) OSPI0_D0 */
    			AM62X_IOPAD(0x010, PIN_INPUT, 0) /* (G24) OSPI0_D1 */
    			AM62X_IOPAD(0x014, PIN_INPUT, 0) /* (F25) OSPI0_D2 */
    			AM62X_IOPAD(0x018, PIN_INPUT, 0) /* (F24) OSPI0_D3 */
    			AM62X_IOPAD(0x01c, PIN_INPUT, 0) /* (J23) OSPI0_D4 */
    			AM62X_IOPAD(0x020, PIN_INPUT, 0) /* (J25) OSPI0_D5 */
    			AM62X_IOPAD(0x024, PIN_INPUT, 0) /* (H25) OSPI0_D6 */
    			AM62X_IOPAD(0x028, PIN_INPUT, 0) /* (J22) OSPI0_D7 */
    			AM62X_IOPAD(0x008, PIN_INPUT, 0) /* (J24) OSPI0_DQS */
    		>;
    	};
    
    	main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */
    		>;
    	};
    	
    };
    
    &wkup_uart0 {
    	/* WKUP UART0 is used by DM firmware */
    	status = "reserved";
    };
    
    &main_uart1 {
    	/* Main UART1 is used by TIFS firmware */
    	status = "reserved";
    };
    
    &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_i2c0 {
    	status = "okay";
    	//status = "disabled";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c0_pins_default>;
    	clock-frequency = <400000>;
    	//clock-frequency = <100000>;
    
    	#address-cells = <1>;
    	#size-cells = <0>;
    
    	led-controller@28 {
    		compatible = "ti,lp5024";
    		reg = <0x28>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		//enable-gpios = <&gpio1 16>;
    
    		multi-led@1 {
    			#address-cells = <1>;
    			#size-cells = <0>;
    			reg = <0x1>;
    			color = <LED_COLOR_ID_RGB>;
    			function = LED_FUNCTION_CHARGING;
    			led@0 {
    				reg = <0x0>;
    				color = <LED_COLOR_ID_RED>;
    			};
    			led@1 {
    				reg = <0x1>;
    				color = <LED_COLOR_ID_GREEN>;
    			};
    			led@2 {
    				reg = <0x2>;
    				color = <LED_COLOR_ID_BLUE>;
    			};
    		};
    	};
    
    };
    
    &main_i2c1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c1_pins_default>;
    	clock-frequency = <100000>;
    
    	exp1: gpio@22 {
    		compatible = "ti,tca6424";
    		reg = <0x22>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
    				   "MMC1_SD_EN", "UBOOT_DIR",
    				   "GPIO_eMMC_RSTn", "GPIO_AD1_RSTn",
    				   "GPIO_AD2_RSTn", "GPIO_AD3_RSTn",
    				   "TALLY_GPIO1_Rset", "TALLY_GPIO1_Set",
    				   "TALLY_GPIO2_Set", "TALLY_GPIO2_Rset",
    				   "PSE_IOS_RESETn", "7511_UART_SEL",
    				   "WKUP_FRONT_UART_SEL", "SPK_SLEEP",
    				   "PSE_IOS_INT", "TP_EINT1",
    				   "TP_EINT2", "P23",
    				   "P24", "P25",
    				   "P26", "GPIO_AD4_RSTn";
    
    		interrupt-parent = <&main_gpio1>;
    		interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    
    		pinctrl-names = "default";
    		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
    	};
    
    };
    
    &sdhci0 {
    	//status = "disabled";
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc0_pins_default>;
    	disable-wp;
    };
    
    //板载SD卡可用
    &sdhci1 {
    	// SD/MMC 
    	//status = "disabled";
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc1_pins_default>;
    	disable-wp;
    	vmmc-supply = <&vdd_mmc1>;
    	//vqmmc-supply = <&vdd_sd_dv>;
    	no-1-8-v;
    };
    
    &sdhci2 {
    	status = "disabled";
    };
    
    &cpsw3g {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_rgmii1_pins_default
    		     &main_rgmii2_pins_default>;
    
    	cpts@3d000 {
    		/* MAP HW3_TS_PUSH to GENF1 */
    		ti,pps = <2 1>;
    	};
    };
    
    &cpsw_port1 {
    	phy-mode = "rgmii-rxid";
    	phy-handle = <&cpsw3g_phy0>;
    };
    
    &cpsw_port2 {
    	phy-mode = "rgmii-rxid";
    	phy-handle = <&cpsw3g_phy1>;
    };
    
    &cpsw3g_mdio {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mdio1_pins_default>;
    
    	cpsw3g_phy0: ethernet-phy@0 {
    		reg = <0>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    		ti,min-output-impedance;
    	};
    
    	cpsw3g_phy1: ethernet-phy@1 {
    		reg = <1>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    		ti,min-output-impedance;
    	};
    };
    
    &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>;
    	};
    };
    
    &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>;
    };
    
    &usbss0 {
    	status = "okay";
    	ti,vbus-divider;
    };
    
    &usbss1 {
    	status = "okay";
    	ti,vbus-divider;
    };
    
    &usb0 {
    	status = "disabled";
    };
    
    &usb1 {
    	status = "disabled";
    };
    
    &mcasp1 {
    	status = "okay";
    	#sound-dai-cells = <0>;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mcasp1_pins_default>;
    
    	op-mode = <0>;          /* MCASP_IIS_MODE */
    	//op-mode = <1>;          /* MCASP_DIT_MODE */
    
    	tdm-slots = <2>;
    	
    	serial-dir = <  // 0: INACTIVE, 1: TX, 2: RX 
    	       1 1 1 1
    	       0 0 0 0
    	       0 0 0 0
    	       0 0 0 0
    	>;
    
    	tx-num-evt = <0>;
    	rx-num-evt = <0>;
    };
    
    &mcasp0 {
    	status = "okay";
    	#sound-dai-cells = <0>;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mcasp0_pins_default>;
    
    	op-mode = <0>;          /* MCASP_IIS_MODE */
    	//op-mode = <1>;          /* MCASP_DIT_MODE */
    
    	tdm-slots = <2>;
    	//auxclk-fs-ratio = <2177>;
    	ext-clk-provider;//这个配置项表示MCASP将作为外部时钟的接收者(consumer),而不是提供者(provider)
    	
    	serial-dir = <  // 0: INACTIVE, 1: TX, 2: RX 
    	       2 2 2 2
    	       0 0 0 0
    	       0 0 0 0
    	       0 0 0 0
    	>;
    	
    	tx-num-evt = <0>;
    	rx-num-evt = <0>;
    };
    
    &ti_csi2rx0 {
    	//status = "okay";
    	status = "disabled";
    };
    
    &dphy0 {
    	status = "okay";
    };
    
    &dss {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_oldi0_pins_default &main_dss0_pins_default>;
    };
    
    &dss_ports {
    	#address-cells = <1>;
    	#size-cells = <0>;
    
    	// VP1: LVDS Output (OLDI TX 0) //
    	port@0 {
    		reg = <0>;
    		oldi_out0: endpoint {
    			remote-endpoint = <&lcd_in0>;
    		};
    	};
    	// VP1: LVDS Output (OLDI TX 1) //
    
    	/* VP2: DSI Output */
    	port@1 {
    		reg = <1>;
    		dss0_dpi1_out: endpoint {
    			remote-endpoint = <&panel_in>;
    		};
    	};
    
    };
    
    
    &ospi0 {
    	//status = "disabled";
    	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>;
    			};
    		};
    	};
    };
    
    #define K3_TS_OFFSET(pa, val)	(0x4+(pa)*4) (0x10000 | val)
    
    &timesync_router {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&cpsw_cpts>;
    
    	/* Use Time Sync Router to map GENF1 input to HW3_TS_PUSH output */
    	cpsw_cpts: cpsw-cpts {
    		pinctrl-single,pins = <
    			/* pps [cpsw cpts genf1] in17 -> out12 [cpsw cpts hw3_push] */
    			K3_TS_OFFSET(12, 17)
    			>;
    	};
    };

    but I used the commend:
    arecord -Dhw:0,0 -fS32_LE -c 8 -r 48000 -t wav /tmp/test.wav, the log show:
    arecord:pcm_read:2221  read:error:Input/output error

    -c 2 is the same error.

    The use 4 adc, each adc provide 2ch data, total provide 8ch data, the bck is 3.07Mhz, the fclk is 48000, provide by external clk_gen.

    Full log:

    root@am62xxsip-evm:~# dmesg
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [    0.000000] Linux version 6.1.83 (lxc@lxc-v) (aarch64-oe-linux-gcc (GCC) 11.4.0, GNU ld (GNU Binutils) 2.38.20220708) #23 SMP PREEMPT Thu Apr  3 09:53:03 CST 2025
    [    0.000000] Machine model: Texas Instruments AM625 SK
    [    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [    0.000000] printk: bootconsole [ns16550a0] enabled
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000094600000, size 128 MiB
    [    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009c800000, size 3 MiB
    [    0.000000] OF: reserved mem: initialized node ipc-memories@9c800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009cb00000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node m4f-dma-memory@9cb00000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009cc00000, size 14 MiB
    [    0.000000] OF: reserved mem: initialized node m4f-memory@9cc00000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009da00000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-dma-memory@9da00000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009db00000, size 12 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-memory@9db00000, compatible id shared-dma-pool
    [    0.000000] Zone ranges:
    [    0.000000]   DMA      [mem 0x0000000080000000-0x000000009fffffff]
    [    0.000000]   DMA32    empty
    [    0.000000]   Normal   empty
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000080000000-0x000000009c7fffff]
    [    0.000000]   node   0: [mem 0x000000009c800000-0x000000009e6fffff]
    [    0.000000]   node   0: [mem 0x000000009e700000-0x000000009e77ffff]
    [    0.000000]   node   0: [mem 0x000000009e780000-0x000000009fffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fffffff]
    [    0.000000] psci: probing for conduit method from DT.
    [    0.000000] psci: PSCIv1.1 detected in firmware.
    [    0.000000] psci: Using standard PSCI v0.2 function IDs
    [    0.000000] psci: Trusted OS migration not required
    [    0.000000] psci: SMC Calling Convention v1.4
    [    0.000000] percpu: Embedded 20 pages/cpu s41064 r8192 d32664 u81920
    [    0.000000] pcpu-alloc: s41064 r8192 d32664 u81920 alloc=20*4096
    [    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
    [    0.000000] Detected VIPT I-cache on CPU0
    [    0.000000] CPU features: detected: GIC system register CPU interface
    [    0.000000] CPU features: detected: ARM erratum 845719
    [    0.000000] alternatives: applying boot alternatives
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129024
    [    0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 mtdparts=spi-nand0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),98048k@32m(ospi.rootfs),256k@130816k(ospi.phypattern);omap2-nand.0:2m(NAND.tiboot3),2m(NAND.tispl),2m(NAND.tiboot3.backup),4m(NAND.u-boot),256k(NAND.u-boot-env),256k(NAND.u-boot-env.backup),-(NAND.file-system) root=PARTUUID=ef266516-02 rw rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] Memory: 305432K/524288K available (11712K kernel code, 1262K rwdata, 3816K rodata, 1984K init, 429K bss, 87784K reserved, 131072K cma-reserved)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu:     RCU event tracing is enabled.
    [    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
    [    0.000000]  Trampoline variant of Tasks RCU enabled.
    [    0.000000]  Tracing variant of Tasks RCU enabled.
    [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
    [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    [    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    [    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
    [    0.000000] GICv3: 256 SPIs implemented
    [    0.000000] GICv3: 0 Extended SPIs implemented
    [    0.000000] Root IRQ handler: gic_handle_irq
    [    0.000000] GICv3: GICv3 features: 16 PPIs
    [    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001880000
    [    0.000000] ITS [mem 0x01820000-0x0182ffff]
    [    0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
    [    0.000000] ITS@0x0000000001820000: Devices Table too large, reduce ids 20->19
    [    0.000000] ITS@0x0000000001820000: allocated 524288 Devices @80800000 (flat, esz 8, psz 64K, shr 0)
    [    0.000000] ITS: using cache flushing for cmd queue
    [    0.000000] GICv3: using LPI property table @0x0000000080040000
    [    0.000000] GIC: using cache flushing for LPI property table
    [    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000080050000
    [    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
    [    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0x3ffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
    [    0.000000] sched_clock: 58 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [    0.008547] Console: colour dummy device 80x25
    [    0.013142] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
    [    0.023824] pid_max: default: 32768 minimum: 301
    [    0.028593] LSM: Security Framework initializing
    [    0.033422] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
    [    0.040906] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
    [    0.050597] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.058042] cblist_init_generic: Setting shift to 2 and lim to 1.
    [    0.064342] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.071737] cblist_init_generic: Setting shift to 2 and lim to 1.
    [    0.078130] rcu: Hierarchical SRCU implementation.
    [    0.083039] rcu:     Max phase no-delay instances is 1000.
    [    0.088617] Platform MSI: msi-controller@1820000 domain created
    [    0.094915] PCI/MSI: /bus@f0000/interrupt-controller@1800000/msi-controller@1820000 domain created
    [    0.104320] EFI services will not be available.
    [    0.109248] smp: Bringing up secondary CPUs ...
    [    0.114564] Detected VIPT I-cache on CPU1
    [    0.114666] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000
    [    0.114684] GICv3: CPU1: using allocated LPI pending table @0x0000000080060000
    [    0.114739] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
    [    0.115435] Detected VIPT I-cache on CPU2
    [    0.115509] GICv3: CPU2: found redistributor 2 region 0:0x00000000018c0000
    [    0.115524] GICv3: CPU2: using allocated LPI pending table @0x0000000080070000
    [    0.115556] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
    [    0.116186] Detected VIPT I-cache on CPU3
    [    0.116255] GICv3: CPU3: found redistributor 3 region 0:0x00000000018e0000
    [    0.116268] GICv3: CPU3: using allocated LPI pending table @0x0000000080080000
    [    0.116298] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
    [    0.116363] smp: Brought up 1 node, 4 CPUs
    [    0.196106] SMP: Total of 4 processors activated.
    [    0.200918] CPU features: detected: 32-bit EL0 Support
    [    0.206189] CPU features: detected: CRC32 instructions
    [    0.211502] CPU: All CPU(s) started at EL2
    [    0.215701] alternatives: applying system-wide alternatives
    [    0.222767] devtmpfs: initialized
    [    0.233979] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [    0.244005] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
    [    0.256171] pinctrl core: initialized pinctrl subsystem
    [    0.262197] DMI not present or invalid.
    [    0.266790] NET: Registered PF_NETLINK/PF_ROUTE protocol family
    [    0.273951] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
    [    0.281452] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
    [    0.289506] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
    [    0.297691] audit: initializing netlink subsys (disabled)
    [    0.303374] audit: type=2000 audit(0.192:1): state=initialized audit_enabled=0 res=1
    [    0.303857] thermal_sys: Registered thermal governor 'step_wise'
    [    0.311304] thermal_sys: Registered thermal governor 'power_allocator'
    [    0.317483] cpuidle: using governor menu
    [    0.328327] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
    [    0.335356] ASID allocator initialised with 65536 entries
    [    0.348345] platform f4000.pinctrl: Fixed dependency cycle(s) with /bus@f0000/pinctrl@f4000/main-sys-gpio-pins-default
    [    0.361790] platform a40000.pinctrl: Fixed dependency cycle(s) with /bus@f0000/pinctrl@a40000/cpsw-cpts
    [    0.373845] platform 30200000.dss: Fixed dependency cycle(s) with /display
    [    0.380953] platform display: Fixed dependency cycle(s) with /bus@f0000/dss@30200000
    [    0.389023] platform 30200000.dss: Fixed dependency cycle(s) with /panel0
    [    0.396011] platform panel0: Fixed dependency cycle(s) with /bus@f0000/dss@30200000
    [    0.404299] KASLR disabled due to lack of seed
    [    0.415583] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
    [    0.422557] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
    [    0.428967] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
    [    0.435906] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
    [    0.442314] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
    [    0.449253] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
    [    0.455660] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
    [    0.462599] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
    [    0.470374] k3-chipinfo 43000014.chipid: Family:AM62X rev:SR1.0 JTAGID[0x0bb7e02f] Detected
    [    0.480834] iommu: Default domain type: Translated 
    [    0.485854] iommu: DMA domain TLB invalidation policy: strict mode 
    [    0.492559] SCSI subsystem initialized
    [    0.496561] libata version 3.00 loaded.
    [    0.496783] usbcore: registered new interface driver usbfs
    [    0.502426] usbcore: registered new interface driver hub
    [    0.507882] usbcore: registered new device driver usb
    [    0.513524] pps_core: LinuxPPS API ver. 1 registered
    [    0.518603] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.527953] PTP clock support registered
    [    0.532093] EDAC MC: Ver: 3.0.0
    [    0.536250] omap-mailbox 29000000.mailbox: omap mailbox rev 0x66fc9100
    [    0.543292] FPGA manager framework
    [    0.546847] Advanced Linux Sound Architecture Driver Initialized.
    [    0.554041] clocksource: Switched to clocksource arch_sys_counter
    [    0.560542] VFS: Disk quotas dquot_6.6.0
    [    0.564598] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [    0.577591] NET: Registered PF_INET protocol family
    [    0.582795] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
    [    0.590948] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
    [    0.599562] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.607496] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.615447] TCP bind hash table entries: 4096 (order: 5, 131072 bytes, linear)
    [    0.622967] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.629589] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
    [    0.636285] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
    [    0.643573] NET: Registered PF_UNIX/PF_LOCAL protocol family
    [    0.649779] RPC: Registered named UNIX socket transport module.
    [    0.655850] RPC: Registered udp transport module.
    [    0.660660] RPC: Registered tcp transport module.
    [    0.665468] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.672059] NET: Registered PF_XDP protocol family
    [    0.676971] PCI: CLS 0 bytes, default 64
    [    0.681773] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
    [    0.691865] Initialise system trusted keyrings
    [    0.696686] workingset: timestamp_bits=46 max_order=17 bucket_order=0
    [    0.707811] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.714464] NFS: Registering the id_resolver key type
    [    0.719679] Key type id_resolver registered
    [    0.723956] Key type id_legacy registered
    [    0.728123] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [    0.734979] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
    [    0.776807] Key type asymmetric registered
    [    0.781001] Asymmetric key parser 'x509' registered
    [    0.786050] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.793789] io scheduler mq-deadline registered
    [    0.798434] io scheduler kyber registered
    [    0.805872] pinctrl-single 4084000.pinctrl: 34 pins, size 136
    [    0.812480] pinctrl-single f4000.pinctrl: 171 pins, size 684
    [    0.819727] pinctrl-single a40000.pinctrl: 512 pins, size 2048
    [    0.832223] Serial: 8250/16550 driver, 12 ports, IRQ sharing enabled
    [    0.848502] loop: module loaded
    [    0.852907] megasas: 07.719.03.00-rc1
    [    0.859832] tun: Universal TUN/TAP device driver, 1.6
    [    0.865777] VFIO - User Level meta-driver version: 0.3
    [    0.871838] usbcore: registered new interface driver usb-storage
    [    0.878580] i2c_dev: i2c /dev entries driver
    [    0.884387] sdhci: Secure Digital Host Controller Interface driver
    [    0.890746] sdhci: Copyright(c) Pierre Ossman
    [    0.895413] sdhci-pltfm: SDHCI platform and OF driver helper
    [    0.901867] ledtrig-cpu: registered to indicate activity on CPUs
    [    0.908203] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
    [    0.915143] usbcore: registered new interface driver usbhid
    [    0.920846] usbhid: USB HID core driver
    [    0.925695] optee: probing for conduit method.
    [    0.930285] optee: revision 4.1 (012cdca4)
    [    0.930598] optee: dynamic shared memory is enabled
    [    0.940179] optee: initialized driver
    [    0.945930] Initializing XFRM netlink socket
    [    0.950371] NET: Registered PF_PACKET protocol family
    [    0.955619] Key type dns_resolver registered
    [    0.960423] registered taskstats version 1
    [    0.964642] Loading compiled-in X.509 certificates
    [    0.978994] ti-sci 44043000.system-controller: ABI: 3.1 (firmware rev 0x0009 '9.2.8--v09.02.08 (Kool Koala)')
    [    1.032718] ti-sci-clk 44043000.system-controller:clock-controller: recalc-rate failed for dev=81, clk=20, ret=-19
    [    1.061357] omap_i2c 20000000.i2c: bus 0 rev0.12 at 400 kHz
    [    1.068329] omap_i2c 20010000.i2c: bus 1 rev0.12 at 100 kHz
    [    1.074416] ti-sci-intr 4210000.interrupt-controller: Interrupt Router 5 domain created
    [    1.082755] ti-sci-intr bus@f0000:interrupt-controller@a00000: Interrupt Router 3 domain created
    [    1.091989] ti-sci-inta 48000000.interrupt-controller: Interrupt Aggregator domain 28 created
    [    1.104319] ti-udma 485c0100.dma-controller: Number of rings: 82
    [    1.112620] ti-udma 485c0100.dma-controller: Channels: 48 (bchan: 18, tchan: 12, rchan: 18)
    [    1.123714] ti-udma 485c0000.dma-controller: Number of rings: 150
    [    1.133831] ti-udma 485c0000.dma-controller: Channels: 35 (tchan: 20, rchan: 15)
    [    1.144082] printk: console [ttyS2] disabled
    [    1.148544] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 239, base_baud = 3000000) is a 8250
    [    1.157431] printk: console [ttyS2] enabled
    [    1.165889] printk: bootconsole [ns16550a0] disabled
    [    1.177309] davinci_mdio 8000f00.mdio: Configuring MDIO in manual mode
    [    1.222061] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [    1.232197] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
    [    1.240306] davinci_mdio 8000f00.mdio: phy[1]: device 8000f00.mdio:01, driver TI DP83867
    [    1.248431] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA01103, cpsw version 0x6BA81103 Ports: 3 quirks:00000006
    [    1.261376] am65-cpsw-nuss 8000000.ethernet: Use random MAC address
    [    1.267644] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.5
    [    1.274773] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
    [    1.281249] pps pps0: new PPS source ptp0
    [    1.285561] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:1
    [    1.296094] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
    [    1.307401] mmc0: CQHCI version 5.10
    [    1.313164] pca953x 1-0022: supply vcc not found, using dummy regulator
    [    1.319958] pca953x 1-0022: using AI
    [    1.351177] spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
    [    1.352410] mmc0: SDHCI controller on fa10000.mmc [fa10000.mmc] using ADMA 64-bit
    [    1.361674] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [    1.373225] mmc1: CQHCI version 5.10
    [    1.375072] debugfs: Directory 'pd:186' with parent 'pm_genpd' already present!
    [    1.389549] ti-sci-clk 44043000.system-controller:clock-controller: is_prepared failed for dev=81, clk=20, ret=-19
    [    1.405251] ALSA device list:
    [    1.408238]   No soundcards found.
    [    1.418253] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit
    [    1.426521] Waiting for root device PARTUUID=ef266516-02...
    [    1.459269] mmc1: new high speed SDHC card at address 0001
    [    1.466112] mmcblk1: mmc1:0001 SD 29.1 GiB 
    [    1.472797]  mmcblk1: p1 p2
    [    1.794112] EXT4-fs (mmcblk1p2): recovery complete
    [    1.800356] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Quota mode: none.
    [    1.808996] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    1.816301] devtmpfs: mounted
    [    1.820644] Freeing unused kernel memory: 1984K
    [    1.825280] Run /sbin/init as init process
    [    1.829375]   with arguments:
    [    1.829378]     /sbin/init
    [    1.829381]   with environment:
    [    1.829384]     HOME=/
    [    1.829388]     TERM=linux
    [    2.253301] systemd[1]: System time before build time, advancing clock.
    [    2.364238] NET: Registered PF_INET6 protocol family
    [    2.371522] Segment Routing with IPv6
    [    2.375288] In-situ OAM (IOAM) with IPv6
    [    2.426501] systemd[1]: systemd 250.5+ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid)
    [    2.458342] systemd[1]: Detected architecture arm64.
    [    2.519603] systemd[1]: Hostname set to <am62xxsip-evm>.
    [    2.670534] systemd-sysv-generator[155]: SysV service '/etc/init.d/thermal-zone-init' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
    [    3.010397] systemd[1]: /lib/systemd/system/bt-enable.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
    [    3.037082] systemd[1]: Configuration file /etc/systemd/system/NVIO_IKP16.service is marked executable. Please remove executable permission bits. Proceeding anyway.
    [    3.051816] systemd[1]: Configuration file /etc/systemd/system/NVIO_IKP16.service is marked world-writable. Please remove world writability permission bits. Proceeding anyway.
    [    3.068454] systemd[1]: /etc/systemd/system/NVIO_IKP16.service:8: Failed to parse output specifier, ignoring: console
    [    3.120636] systemd[1]: /etc/systemd/system/sync-clocks.service:11: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
    [    3.198423] systemd[1]: Queued start job for default target Graphical Interface.
    [    3.269405] systemd[1]: Created slice Slice /system/getty.
    [    3.293350] systemd[1]: Created slice Slice /system/modprobe.
    [    3.317758] systemd[1]: Created slice Slice /system/serial-getty.
    [    3.345479] systemd[1]: Created slice User and Session Slice.
    [    3.366822] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [    3.390668] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [    3.415252] systemd[1]: Reached target Path Units.
    [    3.430308] systemd[1]: Reached target Remote File Systems.
    [    3.450460] systemd[1]: Reached target Slice Units.
    [    3.466758] systemd[1]: Reached target Swaps.
    [    3.548048] systemd[1]: Listening on RPCbind Server Activation Socket.
    [    3.571036] systemd[1]: Reached target RPC Port Mapper.
    [    3.621408] systemd[1]: Listening on Process Core Dump Socket.
    [    3.643272] systemd[1]: Listening on initctl Compatibility Named Pipe.
    [    3.668328] systemd[1]: Listening on Journal Audit Socket.
    [    3.692070] systemd[1]: Listening on Journal Socket (/dev/log).
    [    3.715992] systemd[1]: Listening on Journal Socket.
    [    3.734307] systemd[1]: Listening on Network Service Netlink Socket.
    [    3.761535] systemd[1]: Listening on udev Control Socket.
    [    3.784336] systemd[1]: Listening on udev Kernel Socket.
    [    3.808789] systemd[1]: Listening on User Database Manager Socket.
    [    3.875123] systemd[1]: Mounting Huge Pages File System...
    [    3.923356] systemd[1]: Mounting POSIX Message Queue File System...
    [    3.971020] systemd[1]: Mounting Kernel Debug File System...
    [    3.999500] systemd[1]: Kernel Trace File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/tracing).
    [    4.050919] systemd[1]: Mounting Temporary Directory /tmp...
    [    4.075345] systemd[1]: Starting Create List of Static Device Nodes...
    [    4.106389] systemd[1]: Starting Load Kernel Module configfs...
    [    4.130475] systemd[1]: Starting Load Kernel Module drm...
    [    4.152842] systemd[1]: Starting Load Kernel Module fuse...
    [    4.194296] fuse: init (API version 7.37)
    [    4.223211] systemd[1]: Starting Start psplash boot splash screen...
    [    4.262889] systemd[1]: Starting RPC Bind...
    [    4.278572] systemd[1]: File System Check on Root Device was skipped because of a failed condition check (ConditionPathIsReadWrite=!/).
    [    4.302110] systemd[1]: Starting Journal Service...
    [    4.331991] systemd[1]: Starting Load Kernel Modules...
    [    4.357108] systemd[1]: Starting Generate network units from Kernel command line...
    [    4.388945] systemd[1]: Starting Remount Root and Kernel File Systems...
    [    4.413138] EXT4-fs (mmcblk1p2): re-mounted. Quota mode: none.
    [    4.417349] systemd[1]: Starting Coldplug All udev Devices...
    [    4.444542] systemd[1]: Started RPC Bind.
    [    4.459017] systemd[1]: Started Journal Service.
    [    4.863825] systemd-journald[173]: Received client request to flush runtime journal.
    [    5.117709] audit: type=1334 audit(1651167747.864:2): prog-id=5 op=LOAD
    [    5.124937] audit: type=1334 audit(1651167747.872:3): prog-id=6 op=LOAD
    [    5.817956] random: crng init done
    [    5.874738] lp50xx 0-0028: supply vled not found, using dummy regulator
    [    5.894294] davinci-mcasp 2b00000.audio-controller: davinci_mcasp_ch_constraint mcasp->tdm_mask[0]:0x0 
    [    5.910154] davinci-mcasp 2b00000.audio-controller: davinci_mcasp_ch_constraint mcasp->tdm_mask[1]:0x0 
    [    5.976952] davinci-mcasp 2b10000.audio-controller: davinci_mcasp_ch_constraint mcasp->tdm_mask[0]:0x0 
    [    5.980865] k3-m4-rproc 5000000.m4fss: assigned reserved memory node m4f-dma-memory@9cb00000
    [    5.987050] davinci-mcasp 2b10000.audio-controller: davinci_mcasp_ch_constraint mcasp->tdm_mask[1]:0x0 
    [    6.009009] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
    [    6.018557] k3-m4-rproc 5000000.m4fss: local reset is deasserted for device
    [    6.038383] remoteproc remoteproc0: 5000000.m4fss is available
    [    6.066129] remoteproc remoteproc0: powering up 5000000.m4fss
    [    6.072116] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 55016
    [    6.084894] rproc-virtio rproc-virtio.0.auto: assigned reserved memory node m4f-dma-memory@9cb00000
    [    6.098780] rproc-virtio rproc-virtio.0.auto: registered virtio0 (type 7)
    [    6.108009] virtio_rpmsg_bus virtio0: rpmsg host is online
    [    6.109565] remoteproc remoteproc0: remote processor 5000000.m4fss is now up
    [    6.113797] virtio_rpmsg_bus virtio0: creating channel ti.ipc4.ping-pong addr 0xd
    [    6.130697] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xe
    [    6.137272] rtc-ti-k3 2b1f0000.rtc: registered as rtc0
    [    6.150685] rtc-ti-k3 2b1f0000.rtc: setting system clock to 1970-01-01T00:00:11 UTC (11)
    [    6.175364] systemd-journald[173]: Time jumped backwards, rotating.
    [    6.211917] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
    [    6.249140] platform 78000000.r5f: configured R5F for IPC-only mode
    [    6.259036] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@9da00000
    [    6.267888] remoteproc remoteproc1: 78000000.r5f is available
    [    6.282594] remoteproc remoteproc1: attaching to 78000000.r5f
    [    6.301476] panel-simple panel0: supply power not found, using dummy regulator
    [    6.318985] platform 78000000.r5f: R5F core initialized in IPC-only mode
    [    6.319810] [drm] Initialized tidss 1.0.0 20180215 for 30200000.dss on minor 0
    [    6.325867] rproc-virtio rproc-virtio.2.auto: assigned reserved memory node r5f-dma-memory@9da00000
    [    6.344246] tidss 30200000.dss: [drm] fb0: tidssdrmfb frame buffer device
    [    6.344970] virtio_rpmsg_bus virtio1: rpmsg host is online
    [    6.345259] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0xd
    [    6.345446] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
    [    6.371663] rproc-virtio rproc-virtio.2.auto: registered virtio1 (type 7)
    [    6.379661] remoteproc remoteproc1: remote processor 78000000.r5f is now attached
    [    6.417990] zhuangy bit=1
    [    6.419107] zhuangy frame=1
    [    6.422439] adau7002 audio-codec@1b: supply IOVDD not found, using dummy regulator
    [    6.481603] davinci-mcasp 2b00000.audio-controller: davinci_mcasp_set_sysclk clk_id:0,freq:96000000,dir:0 
    [    6.506939] zhuangy core fmt0 4865
    [    6.506975] zhuangy core fmt 17153
    [    6.510773] davinci-mcasp 2b00000.audio-controller: set_dai_fmt: 0x4301 
    [    6.775557] audit: type=1334 audit(12.120:4): prog-id=7 op=LOAD
    [    6.781730] audit: type=1334 audit(12.128:5): prog-id=8 op=LOAD
    [    7.331297] remoteproc remoteproc2: 30074000.pru is available
    [    7.341870] remoteproc remoteproc3: 30078000.pru is available
    [    7.524417] cfg80211: Loading compiled-in X.509 certificates for regulatory database
    [    7.560866] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    [    7.568675] cfg80211: Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
    [    7.594423] Bluetooth: Core ver 2.22
    [    7.598256] NET: Registered PF_BLUETOOTH protocol family
    [    7.603655] Bluetooth: HCI device and connection manager initialized
    [    7.610111] Bluetooth: HCI socket layer initialized
    [    7.615104] Bluetooth: L2CAP socket layer initialized
    [    7.620261] Bluetooth: SCO socket layer initialized
    [    7.916113] am65-cpsw-nuss 8000000.ethernet eth1: PHY [8000f00.mdio:01] driver [TI DP83867] (irq=POLL)
    [    7.926814] am65-cpsw-nuss 8000000.ethernet eth1: configuring for phy/rgmii-rxid link mode
    [    7.948541] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    [    7.958610] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    [    8.214482] davinci_mcasp_hw_params(): word_length: 16 
    [    8.219864] davinci-mcasp 2b00000.audio-controller: set_dai_fmt: 0x4301 
    [    8.226624] davinci_mcasp_hw_params(): period_size: 1102 channels:2
    [    8.234264]  mcasp_common_hw_param max_active_serializers:1 stream:1
    [    8.242217] davinci-mcasp 2b00000.audio-controller: davinci_config_channel_size()  sample_width:16 
    [    8.487604] davinci_mcasp_hw_params(): word_length: 16 
    [    8.493135] davinci-mcasp 2b00000.audio-controller: set_dai_fmt: 0x4301 
    [    8.500074] davinci_mcasp_hw_params(): period_size: 14700 channels:2
    [    8.506513]  mcasp_common_hw_param max_active_serializers:1 stream:1
    [    8.512984] davinci-mcasp 2b00000.audio-controller: davinci_config_channel_size()  sample_width:16 
    [    8.723987] systemd-journald[173]: Oldest entry in /run/log/journal/a84b103e884543859a11545d9f44b0bc/system.journal is older than the configured file retention duration (1month), suggesting rotation.
    [    8.743071] systemd-journald[173]: /run/log/journal/a84b103e884543859a11545d9f44b0bc/system.journal: Journal header limits reached or header out-of-date, rotating.
    [   12.054878] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
    [   12.063479] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [   77.781332] davinci_mcasp_hw_params(): word_length: 16 
    [   77.786677] davinci-mcasp 2b00000.audio-controller: set_dai_fmt: 0x4301 
    [   77.793403] davinci_mcasp_hw_params(): period_size: 4096 channels:8
    [   77.799685]  mcasp_common_hw_param max_active_serializers:4 stream:1
    [   77.806075] davinci-mcasp 2b00000.audio-controller: davinci_config_channel_size()  sample_width:16 

    The dai_fmt is 0x4301 is correct? The log seems normally.

  • By the way, do we support 4ADC/2CH merget to 8ch tmd format? 

  • Hi Roy,

    Please explain more clearly, I didn't understand your previous query.

    Also, are you able to probe MCLK, BCLK and FSYNC on MCASP0 pins?

    Best Regards,

    Suren

  • Hi Suren,

    Our customer wants to get 8ch recording. They are using the four data lines of mcasp0 to connect to 4 ADC, with each ADC providing 2 ch of data. The ADC,BCLK,LRCK are all generated by an same external clock. The BCLK is 3.07Mhz,FCLK is 48Khz. I have configured the device tree, but it seems that I cannot record correctly, and it prompts the pcm read error 2272 mentioned earlier.

  • Our customer's chip does not have MCLK connected. Are you suggestion to use an oscilloscope to check the waveform on the pin corresponding to BCLK and FSYNC?

  • Yes Roy. 

    Please connect a logic analyzer to check the BCLK and FSYNC.

    Also if you want to record 8 channel recording, you would have to use 4 serializers in RX, which is what I see you are doing in Device tree.

    &mcasp0 {
    	status = "okay";
    	#sound-dai-cells = <0>;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mcasp0_pins_default>;
    
    	op-mode = <0>;          /* MCASP_IIS_MODE */
    	//op-mode = <1>;          /* MCASP_DIT_MODE */
    
    	tdm-slots = <2>;
    	//auxclk-fs-ratio = <2177>;
    	ext-clk-provider;//这个配置项表示MCASP将作为外部时钟的接收者(consumer),而不是提供者(provider)
    	
    	serial-dir = <  // 0: INACTIVE, 1: TX, 2: RX 
    	       2 2 2 2
    	       0 0 0 0
    	       0 0 0 0
    	       0 0 0 0
    	>;

    Also have you tried to change the mic bias and see if it helps you record?

    Best Regards,

    Suren

  • Hi Suren,

    When customer uses the command shown in the figure, the waveform displayed on the logic analyzer  is shown in the first 4 figures.

    The waveform from top to bottom are BCLK, FSYNC and data 1-4.

    If there is a problem with the mic, the arecord command should not fail, it would just record distorted or poor-quality wav file.

  • Hi Roy,

    What  Linux SDK version is the customer using?

    Best Regards,

    Suren

  • Hi Suren,

    The Linux SDK version is ti-processor-sdk-linux-am62xxsip-evm-09.02.01.10.

  • Hi Roy,

    As discussed today, please share the register dump with 2 channel recording (working) and 8 channel recording (non-working scenario) for us to analyze.

    Best Regards,

    Suren

  • Hi Suren,

    The files in the attachment are the raw data(include registers, record command and sound wav files1050.test_data.zip) from the customer test, so to make it easier for you to view the registers, I have organized the registers of several different device tree configuration modes, the abnormal registers value is mark as red color.

    Test 1:
    tdm-slot=<2>
    serial-dir =<
    2 0 0 0
    0 0 0 0
    0 0 0 0
    0 0 0 0
    >

    MCASP_RGNLCTL 0x1f
    MCASP_RMASK 0xffffffff
    MCASP_RFMT 0x180f0
    MCASP_RTDM 0x3
    MCASP_RINTCTL 0x1
    MCASP_RSTAT 0x154
    MCASP_RSLOT 0x1
    MCASO_RCLKCHK 0x0

    Test 2:
    tdm-slot=<2>
    serial-dir =<
    0 2 0 0
    0 0 0 0
    0 0 0 0
    0 0 0 0
    >

    MCASP_RGNLCTL 0x1f
    MCASP_RMASK 0xffffffff
    MCASP_RFMT 0x180f0
    MCASP_RTDM 0x3
    MCASP_RINTCTL 0x1
    MCASP_RSTAT 0x154
    MCASP_RSLOT 0x0
    MCASO_RCLKCHK 0x0

    Test 3:
    tdm-slot=<2>
    serial-dir =<
    0 0 2 0
    0 0 0 0
    0 0 0 0
    0 0 0 0
    >

    MCASP_RGNLCTL 0x1f
    MCASP_RMASK 0xffffffff
    MCASP_RFMT 0x180f0
    MCASP_RTDM 0x3
    MCASP_RINTCTL 0x1
    MCASP_RSTAT 0x154
    MCASP_RSLOT 0x0
    MCASO_RCLKCHK 0x0

    Test 4:
    tdm-slot=<2>
    serial-dir =<
    0 0 0 2
    0 0 0 0
    0 0 0 0
    0 0 0 0
    >

    MCASP_RGNLCTL 0x1f
    MCASP_RMASK 0xffffffff
    MCASP_RFMT 0x180f0
    MCASP_RTDM 0x3
    MCASP_RINTCTL 0x1
    MCASP_RSTAT 0x15c
    MCASP_RSLOT 0x0
    MCASO_RCLKCHK 0x0

    Test 5:
    tdm-slot=<8>
    serial-dir =<
    2 2 2 2
    0 0 0 0
    0 0 0 0
    0 0 0 0
    >

    MCASP_RGNLCTL 0x1f
    MCASP_RMASK 0xffffffff
    MCASP_RFMT 0x180f0
    MCASP_RTDM 0xff
    MCASP_RINTCTL 0x1
    MCASP_RSTAT 0x15e
    MCASP_RSLOT 0x5
    MCASO_RCLKCHK 0x0

  • Hi Roy,

    Since their A/D converter supports 24 bit analog input, can you try and capture in S24_LE format and see if it works correctly?

    Best Regards,

    Suren

  • MCASP_RGNLCTL 0x1f
    MCASP_RMASK 0xffffffff
    MCASP_RFMT 0x180f0
    MCASP_RTDM 0xff
    MCASP_RINTCTL 0x1
    MCASP_RSTAT 0x15e
    MCASP_RSLOT 0x5
    MCASO_RCLKCHK 0x0

    Roy,

    The RSLOT shows 0x5, is it because you have configured tdm-slots=8 instead of 2? 

    Best Regards,

    Suren

  • Hi Roy,

    Also can the customer try to capture 4 channels instead of 8 and see if it works fine? Also does capturing in 8Khz or 16Khz make any difference?

    With tdm-slots=<2> in DTS.

    Best Regards,

    Suren

  • Hi Suren,

    The customers had tested 4ch, same like 8ch, the wav file is L L R R, and the speed is abnormal. The customers also tested 8khz or 16khz, if 16K or 8K is used and recording cannot be done with the arecord command, an incorrect sampling rate is indicated.

  • Hi Suren,

    Yes, it is tdm-slot=8. If customer configures device tree like:
    tdm-slot=<2>
    serial-dir =<
    2 2 2 2
    0 0 0 0
    0 0 0 0
    0 0 0 0
    >,

    the registers:

    MCASP_RGNLCTL 0x1f
    MCASP_RMASK 0xffffffff
    MCASP_RFMT 0x180f0
    MCASP_RTDM 0xff
    MCASP_RINTCTL 0x1
    MCASP_RSTAT 0x15c
    MCASP_RSLOT 0x0
    MCASO_RCLKCHK 0x0