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: Request TAS2505TRGERQ1 Audio AMP SW porting support

Part Number: AM625
Other Parts Discussed in Thread: TAS2505

Tool/software:

Hello TI.

We use TAS2505TRGERQ1 autio AMP connect to our custom board (AM6252 + MCU SDK 9.0) vis SOC_I2C1_SDL/A, and SPI.

TAS2505 may need register intiialization. May you provide reference devie driver and dts for AM6252 ? And addiotnal guideline. Thanks.

  • Hello Paul,

    I am sending your thread over to the TAS2505 team to discuss the getting started resources for using that peripheral with a Linux processor. Feel free to ping the thread if you do not get a response within a couple of business days.

    Regards,

    Nick

  • Hi Paul,

    You can get Linux driver source code from https://git.ti.com/cgit/lpaa-android-drivers/tas2505-linux-driver/

    Regards

    Kevin

  • Hello Kevin

    Thanks. 

    May you have a reference of spi device tree setting for AM62x? 

  • Hi Paul,

    Unfortunately, we didn't have spi device tree, can you follow the i2c dts to write?

    Kevin

  • hello Kevin

    1. I download the driver and build; it failed. Possible to officer the latest driver code, also a portable with TI AM62x sdk 9.0 yocto based?

    2. My you check the below DTS is correct setting? (dts.txt)

     tas2505.c & tas2505.h (in tas2505-linux-driver.zip)

    tas2505-linux-driver.zip

    
    &main_pmx0 {
    
    main_mcasp1_pins_default: main-mcasp1-pins-default {
                    pinctrl-single,pins = <
                            AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
                            AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
                            AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
                            AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) 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
            >;
            tx-num-evt = <32>;
            rx-num-evt = <32>;
    };
    
    &main_i2c1 {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&main_i2c1_pins_default>;
            clock-frequency = <100000>;
    
            tas2505: tas2505@18 {
                    #sound-dai-cells = <0>;
                    compatible = "ti,tas2505";
                    reg = <0x18>;
                    reset-gpios = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
                    clock-source = <1>;/* 0: MCLK, 1: BCLK */
                    status = "ok";
            };
    };

    | /home/cheol/00_work/ti_am62x/build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/sound/soc/ti/tas2505.c:613:18: error: 'struct snd_soc_dai_driv                                                                             er' has no member named 'symmetric_rates'; did you mean 'symmetric_rate'?
    |   613 |                 .symmetric_rates = 1,
    |       |                  ^~~~~~~~~~~~~~~
    |       |                  symmetric_rate
    | /home/cheol/00_work/ti_am62x/build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/sound/soc/ti/tas2505.c:613:36: warning: initialization of 'con                                                                             st struct snd_soc_cdai_ops *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    |   613 |                 .symmetric_rates = 1,
    |       |                                    ^
    | /home/cheol/00_work/ti_am62x/build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/sound/soc/ti/tas2505.c:613:36: note: (near initialization for                                                                              'tas2505_dai_driver[0].cops')
    | /home/cheol/00_work/ti_am62x/build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/sound/soc/ti/tas2505.c:684:27: error: initialization of 'void                                                                              (*)(struct i2c_client *)' from incompatible pointer type 'int (*)(struct i2c_client *)' [-Werror=incompatible-pointer-types]
    |   684 |         .remove         = tas2505_i2c_remove,
    |       |                           ^~~~~~~~~~~~~~~~~~
    | /home/cheol/00_work/ti_am62x/build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/sound/soc/ti/tas2505.c:684:27: note: (near initialization for                                                                              'tas2505_i2c_driver.remove')
    | cc1: some warnings being treated as errors
    |   CC      lib/cpumask.o
    | make[4]: *** [/home/cheol/00_work/ti_am62x/build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/scripts/Makefile.build:250: sound/soc/ti/tas2505                                                                             .o] Error 1
    | make[3]: *** [/home/cheol/00_work/ti_am62x/build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/scripts/Makefile.build:502: sound/soc/ti] Error                                                                              2
    | make[2]: *** [/home/cheol/00_work/ti_am62x/build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/scripts/Makefile.build:502: sound/soc] Error 2
    | make[1]: *** [/home/cheol/00_work/ti_am62x/build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/scripts/Makefile.build:502: sound] Error 2
    | make[1]: *** Waiting for unfinished jobs....
    |   CC      fs/ext4/orphan.o

  • Hi Paul,

    It's a compatible issue with the Linux version. we built this driver in kernel 5.10, if yours is not, maybe you can change the code to fix it, for example, change the symmetric_rates to be symmetric_rate, change the remove function to be void type.

    Regards

    Kevin

  • Hi Kevin, 

    I fixed the compile error.

    However, i don't see the sound interface and it does not work yet.

    May you guide device tree setting for AM6254? I found dts.readme in the given driver code but i don't see this dts config reference in AM6254 SDK.

    1) My dts setting in the in previouse comment (2043.dts.txt)

    2) Below is our power on log/test log after driver is ported. (kernel_test_log.txt)

    kernel_test_log.txt

  • I also try to config dts setting as in "dts.readme" in the given driver link but the result is the same.

    Please refer to the patch and kernel log.

    try2__tas2505_readme_dts_log.txt

    diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
    index 74e34b84419a..048d96cfd1a2 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
    @@ -581,7 +581,7 @@ sdhci1: mmc@fa00000 {
     		ti,itap-del-sel-sdr12 = <0xa>;
     		ti,itap-del-sel-sdr25 = <0x1>;
     		ti,clkbuf-sel = <0x7>;
    -		bus-width = <4>;
    +		bus-width = <1>;
     		status = "disabled";
     	};
     
    diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
    index b1737978103b..e6bc1c28c481 100644
    --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
    +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
    @@ -13,15 +13,25 @@ / {
     	compatible = "ti,am625-sk", "ti,am625";
     	model = "Texas Instruments AM625 SK";
     
    -	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>;
    -		};
    +	aliases {
    +		serial4 = &main_uart4;
    +		serial6 = &main_uart6;
    +		gpio2 = &mcu_gpio0;
     	};
     
    +        transceiver2: can-phy1 {
    +                compatible = "ti,tcan1042";
    +                #phy-cells = <0>;
    +                max-bitrate = <5000000>;
    +        };
    +
    +        transceiver3: can-phy2 {
    +                compatible = "ti,tcan1042";
    +                #phy-cells = <0>;
    +                max-bitrate = <5000000>;
    +        };
    +
    +
     	memory@80000000 {
     		device_type = "memory";
     		/* 2G RAM */
    @@ -68,9 +78,10 @@ vdd_mmc1: regulator-3 {
     		regulator-min-microvolt = <3300000>;
     		regulator-max-microvolt = <3300000>;
     		regulator-boot-on;
    -		enable-active-high;
    +		/* enable-active-high; */
     		vin-supply = <&vcc_3v3_sys>;
    -		gpio = <&exp1 3 GPIO_ACTIVE_HIGH>;
    +		regulator-always-on; 
    +		/* gpio = <&exp1 3 GPIO_ACTIVE_HIGH>; */
     	};
     
     	vdd_sd_dv: regulator-4 {
    @@ -82,7 +93,8 @@ vdd_sd_dv: regulator-4 {
     		regulator-min-microvolt = <1800000>;
     		regulator-max-microvolt = <3300000>;
     		regulator-boot-on;
    -		vin-supply = <&vcc_5v0>;
    +		regulator-always-on;
    +		vin-supply = <&vcc_3v3_sys>;
     		gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
     		states = <1800000 0x0>,
     			 <3300000 0x1>;
    @@ -105,7 +117,7 @@ wlan_lten: regulator-6 {
     		regulator-min-microvolt = <3300000>;
     		regulator-max-microvolt = <3300000>;
     		vin-supply = <&vcc_3v3_sys>;
    -		regulator-always-on;
    +		/* regulator-always-on; */
     		gpios = <&exp1 11 GPIO_ACTIVE_LOW>;
     	};
     
    @@ -120,6 +132,19 @@ wlan_en: regulator-7 {
     		pinctrl-names = "default";
     		pinctrl-0 = <&wlan_en_pins_default>;
     	};
    +
    +       btwlan_en: regulator-8 {
    +               compatible = "regulator-fixed";
    +               regulator-name = "btwlan_en";
    +               regulator-min-microvolt = <3300000>;
    +               regulator-max-microvolt = <3300000>;
    +               vin-supply = <&wlan_lten>;
    +               enable-active-high;
    +               gpios = <&mcu_gpio0 1 GPIO_ACTIVE_HIGH>;
    +               pinctrl-names = "default";
    +               pinctrl-0 = <&mcu_btwlan_en_pins_default>;
    +       };
    +
     };
     
     &main_pmx0 {
    @@ -191,6 +216,95 @@ main_wlirq_pins_default: main-wlirq-pins-default {
     			AM62X_IOPAD(0x128, PIN_INPUT, 7) /* (B23) MMC2_SDWP.GPIO0_72 */
     		>;
     	};
    +
    +	/* For BT/WLAN connection interface  */
    +        main_uart4_pins_default: main-uart4-default-pins {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x00b0, PIN_INPUT, 3) /* (K22) GPMC0_CSn2.UART4_RXD */
    +                        AM62X_IOPAD(0x00b4, PIN_OUTPUT, 3) /* (K24) GPMC0_CSn3.UART4_TXD */
    +                >;
    +        };
    +
    +	/* For UART6 RS232 */
    +	main_uart6_pins_default: main-uart6-default-pins {
    +		pinctrl-single,pins = <
    +			AM62X_IOPAD(0x009c, PIN_INPUT, 3) /* (V25) GPMC0_WAIT1.UART6_RXD */
    +			AM62X_IOPAD(0x00a0, PIN_OUTPUT, 3) /* (K25) GPMC0_WPn.UART6_TXD */
    +		>;
    +	};
    +
    +	/* For CAN0 , CAN2 */
    +	main_mcan0_pins_default: main-mcan0-pins-default {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x1dc, PIN_INPUT, 0) /* (E15) MCAN0_RX */
    +                        AM62X_IOPAD(0x1d8, PIN_OUTPUT, 0) /* (C15) MCAN0_TX */
    +                >;
    +        };
    +
    +
    +};
    +
    +&mcu_gpio0 {
    +        status = "okay";
    +};
    +
    +&mcu_gpio_intr {
    +	status = "okay";
    +};
    +
    +&main_uart4 {
    +       status = "okay";
    +       pinctrl-names = "default";
    +       pinctrl-0 = <&main_uart4_pins_default &mcu_btwlan_en_pins_default>;
    +
    +	bluetooth {
    +               enable-gpios = <&mcu_gpio0 1 GPIO_ACTIVE_HIGH>;
    +       };
    +
    +};
    +
    +&main_uart6 {
    +       status = "okay";
    +       pinctrl-names = "default";
    +       pinctrl-0 = <&main_uart6_pins_default>;
    +};
    +
    +&mcu_pmx0 {
    +	/* Enable BT/WLAN Pin */
    +	mcu_btwlan_en_pins_default: mcu-btwlan-en-pins-default {
    +		pinctrl-single,pins = <
    +                       AM62X_MCU_IOPAD(0x0004, PIN_OUTPUT_PULLUP, 7) /* (B8) MCU_SPI0_CS1.MCU_GPIO0_1 */
    +               >;
    +	};
    +
    +	mcu_mcan1_pins_default: mcu-mcan1-pins-default {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x038, PIN_INPUT, 0) /* (B3) MCU_MCAN0_RX */
    +                        AM62X_IOPAD(0x034, PIN_OUTPUT, 0) /* (D6) MCU_MCAN0_TX */
    +                >;
    +        };
    +
    +        mcu_mcan2_pins_default: mcu-mcan2-pins-default {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x040, PIN_INPUT, 0) /* (D4) MCU_MCAN1_RX */
    +                        AM62X_IOPAD(0x03C, PIN_OUTPUT, 0) /* (E5) MCU_MCAN1_TX */
    +                >;
    +        };
    +
    +};
    +
    +&mcu_mcan1 {
    +        pinctrl-names = "default";
    +        pinctrl-0 = <&mcu_mcan1_pins_default>;
    +        phys = <&transceiver2>;
    +        status = "okay";
    +};
    +
    +&mcu_mcan2 {
    +        pinctrl-names = "default";
    +        pinctrl-0 = <&mcu_mcan2_pins_default>;
    +        phys = <&transceiver3>;
    +        status = "okay";
     };
     
     &main_i2c1 {
    @@ -223,6 +337,7 @@ exp1: gpio@22 {
     };
     
     &sdhci1 {
    +	status = "okay";
     	vmmc-supply = <&vdd_mmc1>;
     	vqmmc-supply = <&vdd_sd_dv>;
     };
    @@ -345,9 +460,9 @@ partition@3fc0000 {
     	};
     };
     
    -&tlv320aic3106 {
    -	DVDD-supply = <&vcc_1v8>;
    -};
    +//&tlv320aic3106 {
    +//	DVDD-supply = <&vcc_1v8>;
    +//};
     
     #define K3_TS_OFFSET(pa, val)	(0x4+(pa)*4) (0x10000 | val)
     
    diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    index 07763091ab59..691b232b41f8 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    @@ -21,6 +21,7 @@ aliases {
     		ethernet1 = &cpsw_port2;
     		usb0 = &usb0;
     		usb1 = &usb1;
    +		gpio0 = &main_gpio0;
     	};
     
     	chosen {
    @@ -105,6 +106,57 @@ framebuffer: framebuffer@ff700000 {
     		};
     	};
     
    +	lcd_bl: backlight {
    +                compatible = "pwm-backlight";
    +                pwms = <&epwm0 0 50000 0>;
    +                brightness-levels =
    +                        <0 32 64 96 128 160 192 224 255>;
    +                default-brightness-level = <8>;
    +        };
    +
    +	display {
    +		compatible = "edt,et070080dh6";
    +		backlight = <&lcd_bl>;
    +		port {
    +			lcd_in: endpoint {
    +				remote-endpoint = <&dpi1_out>;
    +			};
    +		};
    +	};
    +
    +
    +	clk_mcasp1_fixed: clk_mcasp1_fixed {
    +		#clock-cells = <0>;
    +		compatible = "fixed-clock";
    +		clock-frequency = <24576000>;
    +	};
    +
    +	clk_mcasp1: clk_mcasp1 {
    +		#clock-cells = <0>;
    +		compatible = "gpio-gate-clock";
    +		clocks = <&clk_mcasp1_fixed>;
    +		//enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
    +	};
    +
    +	sound {
    +		compatible = "simple-audio-card";
    +		simple-audio-card,name = "Audio card name";
    +		simple-audio-card,dai-link@0 {
    +			format = "i2s";
    +			bitclock-master = <&sound0_master>;
    +			frame-master = <&sound0_master>;
    +			sound0_master: cpu {
    +				sound-dai = <&mcasp1>;
    +				clocks = <&clk_mcasp1>;
    +			};
    +
    +			codec {
    +				sound-dai = <&tas2505>;
    +			};
    +		};
    +	};
    +
    +	/*
     	leds {
     		compatible = "gpio-leds";
     		pinctrl-names = "default";
    @@ -153,7 +205,7 @@ sound_master: simple-audio-card,codec {
     			clocks = <&tlv320_mclk>;
     		};
     	};
    -
    +	
     	hdmi: connector {
     		compatible = "hdmi-connector";
     		label = "hdmi";
    @@ -164,6 +216,7 @@ hdmi_connector_in: endpoint {
     			};
     		};
     	};
    +	*/
     };
     
     &main_pmx0 {
    @@ -188,14 +241,14 @@ AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17/A17) I2C1_SCL */
     			AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17/A16) I2C1_SDA */
     		>;
     	};
    -
    -	main_i2c2_pins_default: main-i2c2-pins-default {
    -		pinctrl-single,pins = <
    -			AM62X_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) /* (K22/H18) GPMC0_CSn2.I2C2_SCL */
    -			AM62X_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24/H19) GPMC0_CSn3.I2C2_SDA */
    -		>;
    -	};
    -
    +	
    +	/* main_i2c2_pins_default: main-i2c2-pins-default { */
    +	/*	pinctrl-single,pins = < */
    +	/*		AM62X_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) */ /* (K22/H18) GPMC0_CSn2.I2C2_SCL */
    +	/*		AM62X_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) */ /* (K24/H19) GPMC0_CSn3.I2C2_SDA */
    +	/*	>;*/
    +	/*};*/
    +	
     	main_mmc0_pins_default: main-mmc0-pins-default {
     		pinctrl-single,pins = <
     			AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (Y3/V3) MMC0_CMD */
    @@ -316,6 +369,30 @@ AM62X_IOPAD(0x0074, PIN_OUTPUT, 1) /* (U25) GPMC0_AD14.VOUT0_DATA22 */
     			AM62X_IOPAD(0x0078, PIN_OUTPUT, 1) /* (U24) GPMC0_AD15.VOUT0_DATA23 */
     		>;
     	};
    +
    +	epwm0bl_pins_default: epwm0bl-default-pins {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x01b4, PIN_OUTPUT_PULLUP, 2) /* (A13) SPI0_CS0.EHRPWM0_A */
    +                >;
    +        };
    +
    +};
    +
    +&mcu_pmx0 {
    +	touchscreen_pins_default: touchscreen-default-pins {
    +		pinctrl-single,pins = <
    +			AM62X_MCU_IOPAD(0x0024, PIN_OUTPUT, 0) /* (B4) WKUP_UART0_RXD */
    +			AM62X_MCU_IOPAD(0x0028, PIN_INPUT, 0) /* (C5) WKUP_UART0_TXD */
    +		>;
    +	};
    +
    +	/* AMP reset */
    +	//ampreset_pins_default: ampreset-default-pins {
    +	//	pinctrl-single,pins = <
    +	//		AM62X_MCU_IOPAD(0x000c, PIN_OUTPUT_PULLDOWN, 7) /* (D9) MCU_SPI0_D0.MCU_GPIO0_3 */
    +	//	>;
    +	//};
    +	
     };
     
     &wkup_uart0 {
    @@ -337,12 +414,41 @@ &main_uart1 {
     	status = "reserved";
     };
     
    +&epwm0 {
    +	pinctrl-names = "default";
    +	pinctrl-0 = <&epwm0bl_pins_default>;
    +	status = "okay";
    + };
    +
    +&main_gpio0 {
    +	status = "okay";
    +};
    +
     &main_i2c0 {
     	status = "okay";
     	pinctrl-names = "default";
     	pinctrl-0 = <&main_i2c0_pins_default>;
     	clock-frequency = <400000>;
     
    +        eeprom@51 {
    +                compatible = "atmel,24c512";
    +                reg = <0x51>;
    +		pagesize = <64>;
    +        };
    +
    +        touchscreen@14 {
    +                compatible = "goodix,gt911";
    +                reg = <0x14>;
    +                pinctrl-names = "default";
    +                pinctrl-0 = <&touchscreen_pins_default>;
    +                interrupt-parent = <&main_gpio0>;
    +                interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
    +                irq-gpios = <&main_gpio0 9 GPIO_ACTIVE_LOW>;
    +                reset-gpios = <&main_gpio0 10 GPIO_ACTIVE_LOW>;
    +                touchscreen-size-x = <800>;
    +                touchscreen-size-y = <480>;
    +        };
    +
     	typec_pd0: tps6598x@3f {
     		compatible = "ti,tps6598x";
     		reg = <0x3f>;
    @@ -374,18 +480,34 @@ &main_i2c1 {
     	pinctrl-0 = <&main_i2c1_pins_default>;
     	clock-frequency = <100000>;
     
    -	tlv320aic3106: audio-codec@1b {
    +        pcf8523_rtc: rtc@68 {
    +                compatible = "nxp,pcf8523";
    +                reg = <0x68>;
    +		quartz-load-femtofarads = <1250>;
    +	};
    +
    +	tas2505: tas2505@18 {
     		#sound-dai-cells = <0>;
    -		compatible = "ti,tlv320aic3106";
    -		reg = <0x1b>;
    -		ai3x-micbias-vg = <1>;	/* 2.0V */
    +		compatible = "ti,tas2505";
    +		reg = <0x18>;
    +		//reset-gpios = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
    +		gpio-reset = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
    +		clock-source = <1>;/* 0: MCLK, 1: BCLK */
    +		status = "ok";
    +	}; 
    +
    +	//tlv320aic3106: audio-codec@1b {
    +	//	#sound-dai-cells = <0>;
    +	//	compatible = "ti,tlv320aic3106";
    +	//	reg = <0x1b>;
    +	//	ai3x-micbias-vg = <1>;	/* 2.0V */
     
     		/* Regulators */
    -		AVDD-supply = <&vcc_3v3_sys>;
    -		IOVDD-supply = <&vcc_3v3_sys>;
    -		DRVDD-supply = <&vcc_3v3_sys>;
    -	};
    -
    +	//	AVDD-supply = <&vcc_3v3_sys>;
    +	//	IOVDD-supply = <&vcc_3v3_sys>;
    +	//	DRVDD-supply = <&vcc_3v3_sys>;
    +	//};
    +        /*
     	sii9022: sii9022@3b {
     		#sound-dai-cells = <0>;
     		compatible = "sil,sii9022";
    @@ -416,15 +538,17 @@ sii9022_out: endpoint {
     				};
     			};
     		};
    -	};
    +	}; */
     };
     
    +/*
     &main_i2c2 {
     	status = "okay";
     	pinctrl-names = "default";
     	pinctrl-0 = <&main_i2c2_pins_default>;
     	clock-frequency = <400000>;
     };
    +*/
     
     &sdhci0 {
     	status = "okay";
    @@ -519,22 +643,36 @@ &usb1 {
     	pinctrl-0 = <&main_usb1_pins_default>;
     };
     
    -&mcasp1 {
    -	status = "okay";
    +//&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
    +//	>;
    +//	tx-num-evt = <32>;
    +//	rx-num-evt = <32>;
    +//};
    +
    +&mcasp1	{
     	#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
    -	>;
    +	status = "okay";
    +	op-mode = <0>;	/* MCASP_IIS_MODE */
    +	tdm-slots = <8>;
    +	serial-dir = <	/* 0: INACTIVE, 1: TX, 2: RX */
    +			2 2 1 0
    +		>;
     	tx-num-evt = <32>;
     	rx-num-evt = <32>;
     };
    @@ -564,7 +702,7 @@ port@1 {
     		reg = <1>;
     
     		dpi1_out: endpoint {
    -			remote-endpoint = <&sii9022_in>;
    +			remote-endpoint = <&lcd_in>;
     		};
     	};
     };
    diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
    index e56a47228ac3..c803af7e8513 100644
    --- a/arch/arm64/configs/defconfig
    +++ b/arch/arm64/configs/defconfig
    @@ -1,6 +1,48 @@
     CONFIG_SYSVIPC=y
     CONFIG_POSIX_MQUEUE=y
     CONFIG_AUDIT=y
    +#
    +# IRQ subsystem
    +#
    +CONFIG_GENERIC_IRQ_PROBE=y
    +CONFIG_GENERIC_IRQ_SHOW=y
    +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
    +CONFIG_GENERIC_PENDING_IRQ=y
    +CONFIG_GENERIC_IRQ_MIGRATION=y
    +CONFIG_HARDIRQS_SW_RESEND=y
    +CONFIG_GENERIC_IRQ_CHIP=y
    +CONFIG_IRQ_DOMAIN=y
    +CONFIG_IRQ_SIM=y
    +CONFIG_IRQ_DOMAIN_HIERARCHY=y
    +CONFIG_GENERIC_MSI_IRQ=y
    +CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
    +CONFIG_IRQ_MSI_IOMMU=y
    +CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y
    +CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
    +CONFIG_IRQ_FORCED_THREADING=y
    +CONFIG_SPARSE_IRQ=y
    +# CONFIG_GENERIC_IRQ_DEBUGFS is not set
    +# end of IRQ subsystem
    +
    +CONFIG_CLOCKSOURCE_WATCHDOG=y
    +CONFIG_ARCH_CLOCKSOURCE_INIT=y
    +CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
    +CONFIG_GENERIC_TIME_VSYSCALL=y
    +CONFIG_GENERIC_CLOCKEVENTS=y
    +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
    +CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
    +CONFIG_GENERIC_CMOS_UPDATE=y
    +CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y
    +CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
    +CONFIG_CONTEXT_TRACKING=y
    +CONFIG_CONTEXT_TRACKING_IDLE=y
    +
    +#
    +# Timers subsystem
    +#
    +CONFIG_TICK_ONESHOT=y
    +CONFIG_NO_HZ_COMMON=y
    +# CONFIG_HZ_PERIODIC is not set
     CONFIG_NO_HZ_IDLE=y
     CONFIG_HIGH_RES_TIMERS=y
     CONFIG_BPF_SYSCALL=y
    @@ -218,9 +260,9 @@ CONFIG_CGROUP_NET_PRIO=y
     CONFIG_CAN=m
     CONFIG_BT=m
     CONFIG_BT_HIDP=m
    -# CONFIG_BT_LE is not set
    +CONFIG_BT_LE=m
     CONFIG_BT_LEDS=y
    -# CONFIG_BT_DEBUGFS is not set
    +CONFIG_BT_DEBUGFS=m
     CONFIG_BT_HCIBTUSB=m
     CONFIG_BT_HCIUART=m
     CONFIG_BT_HCIUART_LL=y
    @@ -331,7 +373,7 @@ CONFIG_QCOM_FASTRPC=m
     CONFIG_SRAM=y
     CONFIG_SRAM_DMA_HEAP=y
     CONFIG_PCI_ENDPOINT_TEST=m
    -CONFIG_EEPROM_AT24=m
    +CONFIG_EEPROM_AT24=y
     CONFIG_EEPROM_AT25=m
     CONFIG_UACCE=m
     # CONFIG_SCSI_PROC_FS is not set
    @@ -477,10 +519,13 @@ CONFIG_KEYBOARD_SNVS_PWRKEY=m
     CONFIG_KEYBOARD_IMX_SC_KEY=m
     CONFIG_KEYBOARD_CROS_EC=y
     CONFIG_INPUT_TOUCHSCREEN=y
    -CONFIG_TOUCHSCREEN_ATMEL_MXT=m
    -CONFIG_TOUCHSCREEN_GOODIX=m
    -CONFIG_TOUCHSCREEN_ILI210X=m
    -CONFIG_TOUCHSCREEN_EDT_FT5X06=m
    +CONFIG_I2C_HID_OF_GOODIX=y 
    +# CONFIG_TOUCHSCREEN_GT9XXNEW_TS=y
    +# CONFIG_TOUCHSCREEN_GT9XXNEWDUP_TS=y
    +# CONFIG_TOUCHSCREEN_ATMEL_MXT=m
    +CONFIG_TOUCHSCREEN_GOODIX=y
    +# CONFIG_TOUCHSCREEN_ILI210X=m
    +# CONFIG_TOUCHSCREEN_EDT_FT5X06=m
     CONFIG_INPUT_MISC=y
     CONFIG_INPUT_PM8941_PWRKEY=y
     CONFIG_INPUT_PM8XXX_VIBRATOR=m
    @@ -493,6 +538,7 @@ CONFIG_SERIO_AMBAKMI=y
     CONFIG_LEGACY_PTY_COUNT=16
     CONFIG_SERIAL_8250=y
     CONFIG_SERIAL_8250_CONSOLE=y
    +CONFIG_SERIAL_8250_DMA=y
     CONFIG_SERIAL_8250_EXTENDED=y
     CONFIG_SERIAL_8250_SHARE_IRQ=y
     CONFIG_SERIAL_8250_BCM2835AUX=y
    @@ -526,6 +572,8 @@ CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
     CONFIG_SERIAL_MVEBU_UART=y
     CONFIG_SERIAL_OWL=y
     CONFIG_SERIAL_DEV_BUS=y
    +CONFIG_SERIAL_8250_NR_UARTS=12
    +CONFIG_SERIAL_8250_RUNTIME_UARTS=12
     CONFIG_VIRTIO_CONSOLE=y
     CONFIG_IPMI_HANDLER=m
     CONFIG_IPMI_DEVICE_INTERFACE=m
    @@ -559,6 +607,8 @@ CONFIG_I2C_TEGRA=y
     CONFIG_I2C_UNIPHIER_F=y
     CONFIG_I2C_RCAR=y
     CONFIG_I2C_CROS_EC_TUNNEL=y
    +CONFIG_REGMAP=y
    +CONFIG_REGMAP_I2C=y
     CONFIG_SPI=y
     CONFIG_SPI_ARMADA_3700=y
     CONFIG_SPI_BCM2835=m
    @@ -644,6 +694,15 @@ CONFIG_GPIO_PCA953X_IRQ=y
     CONFIG_GPIO_BD9571MWV=m
     CONFIG_GPIO_MAX77620=y
     CONFIG_GPIO_SL28CPLD=m
    +CONFIG_GPIOLIB=y
    +CONFIG_GPIOLIB_FASTPATH_LIMIT=512
    +CONFIG_GPIO_ACPI=y
    +CONFIG_GPIOLIB_IRQCHIP=y
    +CONFIG_DEBUG_GPIO=y
    +CONFIG_GPIO_SYSFS=y
    +CONFIG_GPIO_CDEV=y
    +CONFIG_GPIO_CDEV_V1=y
    +CONFIG_GPIO_GENERIC=y
     CONFIG_POWER_RESET_MSM=y
     CONFIG_POWER_RESET_QCOM_PON=m
     CONFIG_POWER_RESET_XGENE=y
    @@ -887,64 +946,66 @@ CONFIG_SND_SOC_FSL_ASOC_CARD=m
     CONFIG_SND_SOC_IMX_AUDMIX=m
     CONFIG_SND_MESON_AXG_SOUND_CARD=m
     CONFIG_SND_MESON_GX_SOUND_CARD=m
    -CONFIG_SND_SOC_QCOM=m
    -CONFIG_SND_SOC_APQ8016_SBC=m
    -CONFIG_SND_SOC_MSM8996=m
    -CONFIG_SND_SOC_SDM845=m
    -CONFIG_SND_SOC_SM8250=m
    -CONFIG_SND_SOC_SC7180=m
    -CONFIG_SND_SOC_SC7280=m
    -CONFIG_SND_SOC_ROCKCHIP=m
    -CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
    -CONFIG_SND_SOC_ROCKCHIP_RT5645=m
    -CONFIG_SND_SOC_RK3399_GRU_SOUND=m
    -CONFIG_SND_SOC_SAMSUNG=y
    +# CONFIG_SND_SOC_QCOM=m
    +# CONFIG_SND_SOC_APQ8016_SBC=m
    +# CONFIG_SND_SOC_MSM8996=m
    +# CONFIG_SND_SOC_SDM845=m
    +# CONFIG_SND_SOC_SM8250=m
    +# CONFIG_SND_SOC_SC7180=m
    +# CONFIG_SND_SOC_SC7280=m
    +# CONFIG_SND_SOC_ROCKCHIP=m
    +# CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
    +# CONFIG_SND_SOC_ROCKCHIP_RT5645=m
    +# CONFIG_SND_SOC_RK3399_GRU_SOUND=m
    +# CONFIG_SND_SOC_SAMSUNG=y
     CONFIG_SND_SOC_RCAR=m
     CONFIG_SND_SOC_RZ=m
    -CONFIG_SND_SUN8I_CODEC=m
    -CONFIG_SND_SUN8I_CODEC_ANALOG=m
    -CONFIG_SND_SUN50I_CODEC_ANALOG=m
    -CONFIG_SND_SUN4I_I2S=m
    -CONFIG_SND_SUN4I_SPDIF=m
    -CONFIG_SND_SOC_TEGRA=m
    -CONFIG_SND_SOC_TEGRA210_AHUB=m
    -CONFIG_SND_SOC_TEGRA210_DMIC=m
    -CONFIG_SND_SOC_TEGRA210_I2S=m
    -CONFIG_SND_SOC_TEGRA210_OPE=m
    -CONFIG_SND_SOC_TEGRA186_ASRC=m
    -CONFIG_SND_SOC_TEGRA186_DSPK=m
    -CONFIG_SND_SOC_TEGRA210_ADMAIF=m
    -CONFIG_SND_SOC_TEGRA210_MVC=m
    -CONFIG_SND_SOC_TEGRA210_SFC=m
    -CONFIG_SND_SOC_TEGRA210_AMX=m
    -CONFIG_SND_SOC_TEGRA210_ADX=m
    -CONFIG_SND_SOC_TEGRA210_MIXER=m
    -CONFIG_SND_SOC_TEGRA_AUDIO_GRAPH_CARD=m
    -CONFIG_SND_SOC_J721E_EVM=m
    -CONFIG_SND_SOC_AK4613=m
    -CONFIG_SND_SOC_ES7134=m
    -CONFIG_SND_SOC_ES7241=m
    -CONFIG_SND_SOC_GTM601=m
    -CONFIG_SND_SOC_MSM8916_WCD_ANALOG=m
    -CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=m
    -CONFIG_SND_SOC_RT5659=m
    -CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
    -CONFIG_SND_SOC_SIMPLE_MUX=m
    -CONFIG_SND_SOC_TAS571X=m
    -CONFIG_SND_SOC_TLV320AIC32X4_I2C=m
    -CONFIG_SND_SOC_TLV320AIC3X_I2C=m
    -CONFIG_SND_SOC_WCD9335=m
    -CONFIG_SND_SOC_WCD934X=m
    -CONFIG_SND_SOC_WM8524=m
    -CONFIG_SND_SOC_WM8904=m
    -CONFIG_SND_SOC_WM8960=m
    -CONFIG_SND_SOC_WM8962=m
    -CONFIG_SND_SOC_WM8978=m
    -CONFIG_SND_SOC_WSA881X=m
    -CONFIG_SND_SOC_NAU8822=m
    -CONFIG_SND_SOC_LPASS_WSA_MACRO=m
    -CONFIG_SND_SOC_LPASS_VA_MACRO=m
    -CONFIG_SND_SIMPLE_CARD=m
    +# CONFIG_SND_SUN8I_CODEC=m
    +# CONFIG_SND_SUN8I_CODEC_ANALOG=m
    +# CONFIG_SND_SUN50I_CODEC_ANALOG=m
    +# CONFIG_SND_SUN4I_I2S=m
    +# CONFIG_SND_SUN4I_SPDIF=m
    +# CONFIG_SND_SOC_TEGRA=m
    +# CONFIG_SND_SOC_TEGRA210_AHUB=m
    +# CONFIG_SND_SOC_TEGRA210_DMIC=m
    +# CONFIG_SND_SOC_TEGRA210_I2S=m
    +# CONFIG_SND_SOC_TEGRA210_OPE=m
    +# CONFIG_SND_SOC_TEGRA186_ASRC=m
    +# CONFIG_SND_SOC_TEGRA186_DSPK=m
    +# CONFIG_SND_SOC_TEGRA210_ADMAIF=m
    +# CONFIG_SND_SOC_TEGRA210_MVC=m
    +# CONFIG_SND_SOC_TEGRA210_SFC=m
    +# CONFIG_SND_SOC_TEGRA210_AMX=m
    +# CONFIG_SND_SOC_TEGRA210_ADX=m
    +# CONFIG_SND_SOC_TEGRA210_MIXER=m
    +# CONFIG_SND_SOC_TEGRA_AUDIO_GRAPH_CARD=m
    +# CONFIG_SND_SOC_J721E_EVM=m
    +# CONFIG_SND_SOC_AK4613=m
    +# CONFIG_SND_SOC_ES7134=m
    +# CONFIG_SND_SOC_ES7241=m
    +# CONFIG_SND_SOC_GTM601=m
    +# CONFIG_SND_SOC_MSM8916_WCD_ANALOG=m
    +# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=m
    +# CONFIG_SND_SOC_RT5659=m
    +# CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
    +# CONFIG_SND_SOC_SIMPLE_MUX=m
    +# CONFIG_SND_SOC_TAS571X=m
    +CONFIG_SND_SOC_TAS2505=y
    +# CONFIG_SND_SOC_TLV320AIC32X4_I2C=m
    +# CONFIG_SND_SOC_TLV320AIC3X_I2C=m
    +# CONFIG_SND_SOC_WCD9335=m
    +# CONFIG_SND_SOC_WCD934X=m
    +# CONFIG_SND_SOC_WM8524=m
    +# CONFIG_SND_SOC_WM8904=m
    +# CONFIG_SND_SOC_WM8960=m
    +# CONFIG_SND_SOC_WM8962=m
    +# CONFIG_SND_SOC_WM8978=m
    +# CONFIG_SND_SOC_WSA881X=m
    +# CONFIG_SND_SOC_NAU8822=m
    +# CONFIG_SND_SOC_LPASS_WSA_MACRO=m
    +# CONFIG_SND_SOC_LPASS_VA_MACRO=m
    +CONFIG_SND_SIMPLE_CARD=y
    +CONFIG_SND_SIMPLE_CARD_UTILS=y
     CONFIG_SND_AUDIO_GRAPH_CARD=m
     CONFIG_SND_AUDIO_GRAPH_CARD2=m
     CONFIG_HID_MULTITOUCH=m
    @@ -1078,6 +1139,7 @@ CONFIG_RTC_DRV_MAX77686=y
     CONFIG_RTC_DRV_RK808=m
     CONFIG_RTC_DRV_PCF85063=m
     CONFIG_RTC_DRV_PCF85363=m
    +CONFIG_RTC_DRV_PCF8523=m
     CONFIG_RTC_DRV_M41T80=m
     CONFIG_RTC_DRV_BQ32K=m
     CONFIG_RTC_DRV_RX8581=m
    diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
    index 3192411218fb..239a6874b491 100644
    --- a/drivers/gpu/drm/panel/panel-simple.c
    +++ b/drivers/gpu/drm/panel/panel-simple.c
    @@ -1711,8 +1711,9 @@ static const struct panel_desc edt_et057090dhu = {
     	.connector_type = DRM_MODE_CONNECTOR_DPI,
     };
     
    +/* taeha 202040806 Add LCD */
     static const struct drm_display_mode edt_etm0700g0dh6_mode = {
    -	.clock = 33260,
    +	.clock = 26000,
     	.hdisplay = 800,
     	.hsync_start = 800 + 40,
     	.hsync_end = 800 + 40 + 128,
    @@ -1724,16 +1725,17 @@ static const struct drm_display_mode edt_etm0700g0dh6_mode = {
     	.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
     };
     
    +/* taeha 20240806 Add LCD */
     static const struct panel_desc edt_etm0700g0dh6 = {
     	.modes = &edt_etm0700g0dh6_mode,
     	.num_modes = 1,
    -	.bpc = 6,
    +	.bpc = 8,
     	.size = {
    -		.width = 152,
    -		.height = 91,
    +		.width = 150,
    +		.height = 94,
     	},
    -	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
    -	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
    +	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
    +	/* .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, */
     	.connector_type = DRM_MODE_CONNECTOR_DPI,
     };
     
    diff --git a/sound/soc/ti/Kconfig b/sound/soc/ti/Kconfig
    index 40110e9a9e8a..3b877c263b9f 100644
    --- a/sound/soc/ti/Kconfig
    +++ b/sound/soc/ti/Kconfig
    @@ -63,6 +63,17 @@ config SND_SOC_OMAP_MCBSP
     	  Say Y or M here if you want to have support for McBSP IP found in
     	  Texas Instruments OMAP1/2/3/4/5 SoCs.
     
    +# taeha, 20240903 tas2505 amp
    +config SND_SOC_TAS2505
    +	tristate "Texas Instruments TAS2505"
    +	select REGMAP
    +	select REGMAP_I2C
    +	select I2C
    +	help
    +	  Enable support Texas Instruments tas2505.
    +	  To compile this driver as a module, choose M here.
    +	  If unsure select "N".
    +
     config SND_SOC_OMAP_MCPDM
     	tristate "Multichannel PDM Controller (McPDM) support"
     	depends on ARCH_OMAP4 || SOC_OMAP5 || COMPILE_TEST
    diff --git a/sound/soc/ti/Makefile b/sound/soc/ti/Makefile
    index a21e5b0061de..8d475e50403c 100644
    --- a/sound/soc/ti/Makefile
    +++ b/sound/soc/ti/Makefile
    @@ -46,3 +46,6 @@ obj-$(CONFIG_SND_SOC_OMAP_AMS_DELTA) += snd-soc-ams-delta.o
     obj-$(CONFIG_SND_SOC_OMAP_HDMI) += snd-soc-omap-hdmi.o
     obj-$(CONFIG_SND_SOC_OMAP_OSK5912) += snd-soc-osk5912.o
     obj-$(CONFIG_SND_SOC_J721E_EVM) += snd-soc-j721e-evm.o
    +
    +snd-soc-tas2505-objs := tas2505.o
    +obj-$(CONFIG_SND_SOC_TAS2505) += snd-soc-tas2505.o
    diff --git a/sound/soc/ti/tas2505.c b/sound/soc/ti/tas2505.c
    new file mode 100644
    index 000000000000..d8f1460d1e0d
    --- /dev/null
    +++ b/sound/soc/ti/tas2505.c
    @@ -0,0 +1,692 @@
    +/*
    + * ALSA SoC TAS2505 codec driver
    + *
    + * Author: Hieu Tran Dang <dangtranhieu2012@gmail.com>
    + *
    + * This package is free software; you can redistribute it and/or modify
    + * it under the terms of the GNU General Public License version 2 as
    + * published by the Free Software Foundation.
    + *
    + * THIS PACKAGE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR
    + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    + */
    +#include <linux/version.h>
    +#include <linux/module.h>
    +#include <linux/i2c.h>
    +#include <linux/clk.h>
    +#include <linux/of.h>
    +#include <linux/of_gpio.h>
    +#include <sound/soc.h>
    +#include <sound/tlv.h>
    +#include <sound/pcm_params.h>
    +#include "tas2505.h"
    +
    +enum {
    +	MCLK = 0,
    +	BCLK = 1,
    +};
    +
    +struct tas2505
    +{
    +	int dac_vol;
    +	int spk_vol1;
    +}tas2505_vol;
    +
    +
    +static int tas2505_dac_getvol(struct snd_kcontrol *kcontrol,
    +	struct snd_ctl_elem_value *ucontrol)
    +{
    +	ucontrol->value.integer.value[0] = tas2505_vol.dac_vol;
    +
    +	return 0;
    +}
    +
    +static int tas2505_dac_putvol(struct snd_kcontrol *kcontrol,
    +	struct snd_ctl_elem_value *ucontrol)
    +{
    +	struct snd_soc_component *component =
    +		snd_soc_kcontrol_component(kcontrol);
    +	struct soc_mixer_control *mc =
    +		(struct soc_mixer_control *)kcontrol->private_value;
    +	u8 val;
    +
    +	val = ucontrol->value.integer.value[0];
    +	val = mc->invert ? mc->max - val : val;
    +	val = (val < 0) ? 0 : val;
    +	tas2505_vol.dac_vol = val;
    +	snd_soc_component_write(component, TAS2505_DACVOL, val);
    +
    +	return 0;
    +}
    +
    +static int tas2505_spkdrv_getvol(struct snd_kcontrol *kcontrol,
    +	struct snd_ctl_elem_value *ucontrol)
    +{
    +	struct snd_soc_component *component =
    +		snd_soc_kcontrol_component(kcontrol);
    +	struct soc_mixer_control *mc =
    +		(struct soc_mixer_control *)kcontrol->private_value;
    +	unsigned int val;
    +
    +	val = snd_soc_component_read(component, TAS2505_SPKVOL1);
    +
    +	val = (val > mc->max) ? mc->max : val;
    +	val = mc->invert ? mc->max - val : val;
    +	ucontrol->value.integer.value[0] = val;
    +	tas2505_vol.spk_vol1 = val;
    +	return 0;
    +}
    +
    +static int tas2505_spkdrv_putvol(struct snd_kcontrol *kcontrol,
    +	struct snd_ctl_elem_value *ucontrol)
    +{
    +	struct snd_soc_component *component =
    +		snd_soc_kcontrol_component(kcontrol);
    +	struct soc_mixer_control *mc =
    +		(struct soc_mixer_control *)kcontrol->private_value;
    +	u8 val;
    +
    +	val = (ucontrol->value.integer.value[0] & 0x7f);
    +	val = mc->invert ? mc->max - val : val;
    +	val = (val < 0) ? 0 : val;
    +	tas2505_vol.spk_vol1 = val;
    +	snd_soc_component_write(component, TAS2505_SPKVOL1, val);
    +
    +	return 0;
    +}
    +
    +static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -6350, 50, 0);
    +static const DECLARE_TLV_DB_LINEAR(spk_drv_vol_tlv, TLV_DB_GAIN_MUTE, 0);
    +static const DECLARE_TLV_DB_SCALE(spk_amp_vol_tlv, 0, 600, 1);
    +
    +static const struct snd_kcontrol_new tas2505_snd_controls[] = {
    +	SOC_SINGLE_RANGE_EXT_TLV("DAC Playback Volume", TAS2505_DACVOL,
    +		0, 48, 0x81, 1,
    +		tas2505_dac_getvol, tas2505_dac_putvol, dac_vol_tlv),
    +	SOC_SINGLE_RANGE_EXT_TLV("Speaker Driver Volume", TAS2505_SPKVOL1,
    +		0, 0, 117, 1,
    +		tas2505_spkdrv_getvol, tas2505_spkdrv_putvol, spk_drv_vol_tlv),
    +	SOC_SINGLE_TLV("Speaker Amplifer Volume", TAS2505_SPKVOL2,
    +		4, 5, 0, spk_amp_vol_tlv),
    +};
    +
    +static const struct snd_soc_dapm_widget tas2505_dapm_widgets[] = {
    +	SND_SOC_DAPM_DAC("DAC Channel", "Playback",
    +		TAS2505_DACSETUP1, 7, 0),
    +	SND_SOC_DAPM_OUT_DRV("Speaker Driver", TAS2505_SPKAMPCTRL1,
    +		1, 0, NULL, 0),
    +	SND_SOC_DAPM_OUTPUT("Speaker"),
    +};
    +
    +static const struct snd_soc_dapm_route tas2505_audio_map[] = {
    +	{ "Speaker Driver", NULL, "DAC Channel" },
    +	{ "Speaker", NULL, "Speaker Driver" },
    +};
    +
    +static const struct reg_default tas2505_reg_defaults[] = {
    +	{ TAS2505_CLKMUX, 0x00 },
    +	{ TAS2505_PLLPR, 0x11 },
    +	{ TAS2505_PLLJ, 0x04 },
    +	{ TAS2505_PLLDMSB, 0x00 },
    +	{ TAS2505_PLLDLSB, 0x00 },
    +	{ TAS2505_NDAC, 0x01 },
    +	{ TAS2505_MDAC, 0x01 },
    +	{ TAS2505_DOSRMSB, 0x00 },
    +	{ TAS2505_DOSRLSB, 0x80 },
    +	{ TAS2505_IFACE1, 0x00 },
    +	{ TAS2505_IFACE3, 0x00 },
    +	{ TAS2505_DACSETUP1, 0x14 },
    +	{ TAS2505_DACSETUP2, 0x0c },
    +	{ TAS2505_DACVOL, 0x00 },
    +	{ TAS2505_REF_POR_LDO_BGAP_CTRL, 0x00 },
    +	{ TAS2505_LDO_CTRL, 0x0c },
    +	{ TAS2505_SPKAMPCTRL1, 0x00 },
    +	{ TAS2505_SPKVOL1, 0x00 },
    +	{ TAS2505_SPKVOL2, 0x50 },
    +	{ TAS2505_DACFLAG1, 0x00 },
    +	{ TAS2505_DACFLAG2, 0x00 },
    +	{ TAS2505_STICKYFLAG1, 0x00 },
    +	{ TAS2505_STICKYFLAG2, 0x00 },
    +	{ TAS2505_INTFLAG1, 0x00 },
    +	{ TAS2505_INTFLAG2, 0x00 },
    +	{ TAS2505_DACINSTRSET, 0x02 },
    +	{ TAS2505_DACANLGAINFLAG, 0x00 },
    +};
    +
    +static bool tas2505_volatile(struct device *dev, unsigned int reg)
    +{
    +	switch (reg) {
    +	case TAS2505_PAGECTL:
    +	case TAS2505_RESET:
    +	case TAS2505_DACFLAG1:
    +	case TAS2505_DACFLAG2:
    +	case TAS2505_STICKYFLAG1:
    +	case TAS2505_STICKYFLAG2:
    +	case TAS2505_INTFLAG1:
    +	case TAS2505_INTFLAG2:
    +	case TAS2505_DACANLGAINFLAG:
    +		return true;
    +	}
    +	return false;
    +}
    +
    +static bool tas2505_writeable(struct device *dev, unsigned int reg)
    +{
    +	switch (reg) {
    +	case TAS2505_DACFLAG1:
    +	case TAS2505_DACFLAG2:
    +	case TAS2505_STICKYFLAG1:
    +	case TAS2505_STICKYFLAG2:
    +	case TAS2505_INTFLAG1:
    +	case TAS2505_INTFLAG2:
    +	case TAS2505_DACANLGAINFLAG:
    +		return false;
    +	}
    +	return true;
    +}
    +
    +static const struct regmap_range_cfg tas2505_ranges[] = {
    +	{
    +		.range_min = 0,
    +		.range_max = 69 * 128,
    +		.selector_reg = TAS2505_PAGECTL,
    +		.selector_mask = 0xff,
    +		.selector_shift = 0,
    +		.window_start = 0,
    +		.window_len = 128,
    +	},
    +};
    +
    +static const struct regmap_config tas2505_i2c_regmap = {
    +	.reg_bits = 8,
    +	.val_bits = 8,
    +	.writeable_reg = tas2505_writeable,
    +	.volatile_reg = tas2505_volatile,
    +	.reg_defaults = tas2505_reg_defaults,
    +	.num_reg_defaults = ARRAY_SIZE(tas2505_reg_defaults),
    +	.cache_type = REGCACHE_RBTREE,
    +	.ranges = tas2505_ranges,
    +	.num_ranges = ARRAY_SIZE(tas2505_ranges),
    +	.max_register = 69 * 128,
    +};
    +
    +struct tas2505_rate_divs {
    +	u32 mclk_p;
    +	u32 rate;
    +	u8 pll_r;
    +	u8 pll_j;
    +	u16 pll_d;
    +	u8 mdac;
    +	u8 ndac;
    +	u16 dosr;
    +};
    +
    +static const struct tas2505_rate_divs tas2505_divs_mclksrc[] = {
    +	{ 12288000, 44100, 1, 7, 35, 4, 4, 128 },
    +	{ 12288000, 48000, 1, 7, 0, 7, 2, 128 },
    +	{ 2822400, 44100, 1, 8, 4672, 3, 5, 128 },
    +	{ 11289600, 44100, 1, 8, 0, 4, 8, 64 },
    +	{ 11289600, 22050, 1, 8, 0, 4, 8, 128 },
    +	{ 2822400, 44100, 1, 8, 4672, 3, 5, 128 },
    +	{ 2822400, 22050, 1, 8, 4672, 3, 5, 256 },
    +};
    +
    +static const struct tas2505_rate_divs tas2505_divs_bclksrc[] = {
    +	{ 1536000, 48000, 1, 56, 0, 2, 7, 128 },
    +	{ 1411200, 44100, 1, 60, 0, 5, 3, 128 },
    +	{ 3072000, 48000, 1, 28, 0, 2, 7, 128 },
    +	{ 2822400, 44100, 1, 30, 0, 5, 3, 128 },
    +	{ 1024000, 32000, 2, 40, 0, 5, 4, 128 },
    +	{ 2048000, 32000, 1, 40, 0, 5, 4, 128 },
    +};
    +
    +struct tas2505_priv {
    +	void *codec;
    +	struct device *dev;
    +	struct regmap *regmap;
    +	u32 sysclk;
    +	u32 clk_src;
    +	u32 rate;
    +	int rate_div_line;
    +	int pll_clkin;
    +	int frame_size;
    +	u8 p_div;
    +};
    +
    +static int tas2505_setup_pll(struct snd_soc_component *codec)
    +{
    +	struct tas2505_priv *tas2505 = snd_soc_component_get_drvdata(codec);
    +	int mclk_p = tas2505->sysclk / tas2505->p_div;
    +	struct tas2505_rate_divs *rate_divs;
    +	int match = -1;
    +	u8 p_div;
    +	int i;
    +
    +	if (tas2505->clk_src == MCLK) {
    +		for (i = 0; i < ARRAY_SIZE(tas2505_divs_mclksrc); i++) {
    +			if (
    +				tas2505_divs_mclksrc[i].rate == tas2505->rate &&
    +				tas2505_divs_mclksrc[i].mclk_p == mclk_p
    +			) {
    +				match = i;
    +				break;
    +			}
    +		}
    +
    +		if (match == -1) {
    +			dev_err(codec->dev,
    +				"Sample rate (%u) and format not supported\n",
    +				tas2505->rate);
    +			return -EINVAL;
    +		}
    +
    +		tas2505->rate_div_line = match;
    +		rate_divs = (struct tas2505_rate_divs *)tas2505_divs_mclksrc;
    +	} else {
    +		for (i = 0; i < ARRAY_SIZE(tas2505_divs_bclksrc); i++) {
    +			if (tas2505_divs_bclksrc[i].rate ==
    +				tas2505->rate) {
    +				match = i;
    +				break;
    +			}
    +		}
    +
    +		if (match == -1) {
    +			dev_err(codec->dev,
    +				"Sample rate (%u) and format not supported\n",
    +				tas2505->rate);
    +			return -EINVAL;
    +		}
    +		rate_divs = (struct tas2505_rate_divs *)tas2505_divs_bclksrc;
    +	}
    +
    +	p_div = (tas2505->p_div == 8) ? 0 : tas2505->p_div;
    +	p_div <<= TAS2505_PLLPR_P_SHIFT;
    +	p_div |= rate_divs[match].pll_r;
    +	p_div |= TAS2505_PM_MASK;
    +
    +	snd_soc_component_write(codec, TAS2505_PLLPR, p_div);
    +	snd_soc_component_write(codec, TAS2505_PLLJ,
    +		rate_divs[match].pll_j);
    +	snd_soc_component_write(codec, TAS2505_PLLDMSB,
    +		rate_divs[match].pll_d >> 8);
    +	snd_soc_component_write(codec, TAS2505_PLLDLSB,
    +		rate_divs[match].pll_d & 0xff);
    +	mdelay(15);
    +	snd_soc_component_write(codec, TAS2505_NDAC,
    +		TAS2505_PM_MASK | rate_divs[match].ndac);
    +	snd_soc_component_write(codec, TAS2505_MDAC,
    +		TAS2505_PM_MASK | rate_divs[match].mdac);
    +	snd_soc_component_write(codec, TAS2505_DOSRMSB,
    +		rate_divs[match].dosr >> 8);
    +	snd_soc_component_write(codec, TAS2505_DOSRLSB,
    +		rate_divs[match].dosr & 0xff);
    +	if (tas2505->clk_src != MCLK)
    +		snd_soc_component_update_bits(codec, TAS2505_BCLKNDIV,
    +			TAS2505_BCLKNDIV_MASK,
    +			(rate_divs[match].dosr * rate_divs[match].mdac) /
    +			tas2505->frame_size);
    +
    +	return 0;
    +}
    +
    +static int tas2505_hw_params(struct snd_pcm_substream *substream,
    +	struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
    +{
    +	struct snd_soc_component *codec = dai->component;
    +	struct tas2505_priv *tas2505 = snd_soc_component_get_drvdata(codec);
    +	u8 data = 0;
    +
    +	switch (params_width(params)) {
    +	case 16:
    +		break;
    +
    +	case 20:
    +		data = TAS2505_WORD_LEN_20BITS;
    +		break;
    +
    +	case 24:
    +		data = TAS2505_WORD_LEN_24BITS;
    +		break;
    +
    +	case 32:
    +		data = TAS2505_WORD_LEN_32BITS;
    +		break;
    +
    +	default:
    +		dev_err(codec->dev, "Unsupported width %d\n",
    +			params_width(params));
    +		return -EINVAL;
    +	}
    +	dev_info(codec->dev, "%s: bit width = %d\n",
    +				__func__, params_width(params));
    +	data <<= TAS2505_IFACE1_DATALEN_SHIFT;
    +
    +	snd_soc_component_update_bits(codec, TAS2505_IFACE1,
    +		TAS2505_IFACE1_DATALEN_MASK, data);
    +	tas2505->rate = params_rate(params);
    +	tas2505->frame_size = snd_soc_params_to_frame_size(params);
    +
    +	return tas2505_setup_pll(codec);
    +}
    +
    +static int tas2505_dac_mute(struct snd_soc_dai *dai, int mute,
    +	int stream)
    +{
    +	struct snd_soc_component *codec = dai->component;
    +
    +	if (mute) {
    +		snd_soc_component_update_bits(codec, TAS2505_DACSETUP2,
    +			TAS2505_DACSETUP2_MUTE_MASK,
    +			TAS2505_DACSETUP2_MUTE_MASK);
    +		snd_soc_component_update_bits(codec, TAS2505_DACSETUP1,
    +			0x80, 0x00);
    +	} else {
    +		snd_soc_component_update_bits(codec, TAS2505_DACSETUP1,
    +			0x80, 0x80);
    +		snd_soc_component_update_bits(codec, TAS2505_DACSETUP2,
    +			TAS2505_DACSETUP2_MUTE_MASK, 0x0);
    +	}
    +
    +	return 0;
    +}
    +
    +static int tas2505_set_dai_fmt(struct snd_soc_dai *codec_dai,
    +	unsigned int fmt)
    +{
    +	struct snd_soc_component *codec = codec_dai->component;
    +	u8 iface_reg1 = 0;
    +	u8 iface_reg3 = 0;
    +
    +	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
    +	case SND_SOC_DAIFMT_CBS_CFS:
    +		break;
    +
    +	case SND_SOC_DAIFMT_CBM_CFM:
    +		iface_reg1 |= TAS2505_IFACE1_BCLKDIR_MASK;
    +		iface_reg1 |= TAS2505_IFACE1_WCLKDIR_MASK;
    +		break;
    +
    +	default:
    +		dev_err(codec->dev,
    +			"%s SND_SOC_DAIFMT_MASTER_MASK 0x%x \n",__FUNCTION__,fmt);
    +		return -EINVAL;
    +	}
    +
    +	switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
    +	case SND_SOC_DAIFMT_NB_NF:
    +		break;
    +
    +	case SND_SOC_DAIFMT_IB_NF:
    +		iface_reg3 |= TAS2505_IFACE3_BCLKINV_MASK;
    +		break;
    +
    +	default:
    +		dev_err(codec->dev,
    +			"tas2505_set_dai_fmt SND_SOC_DAIFMT_INV_MASK 0x%x \n",fmt);
    +		return -EINVAL;
    +	}
    +
    +	switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
    +	case SND_SOC_DAIFMT_I2S:
    +		break;
    +
    +	case SND_SOC_DAIFMT_DSP_A:
    +	case SND_SOC_DAIFMT_DSP_B:
    +		iface_reg1 |= (TAS2505_DSP_MODE <<
    +			TAS2505_IFACE1_INTERFACE_SHIFT);
    +		break;
    +
    +	case SND_SOC_DAIFMT_RIGHT_J:
    +		iface_reg1 |= (TAS2505_RJF_MODE <<
    +			TAS2505_IFACE1_INTERFACE_SHIFT);
    +		break;
    +
    +	case SND_SOC_DAIFMT_LEFT_J:
    +		iface_reg1 |= (TAS2505_LJF_MODE <<
    +			TAS2505_IFACE1_INTERFACE_SHIFT);
    +		break;
    +
    +	default:
    +		dev_err(codec->dev, "Invalid DAI interface format\n");
    +		return -EINVAL;
    +	}
    +
    +	snd_soc_component_write(codec, TAS2505_IFACE1, iface_reg1);
    +	snd_soc_component_update_bits(codec, TAS2505_IFACE3,
    +		TAS2505_IFACE3_BCLKINV_MASK | TAS2505_IFACE3_BDIVCLKIN_MASK,
    +		iface_reg3);
    +
    +	return 0;
    +}
    +
    +static int tas2505_set_dai_sysclk(struct snd_soc_dai *codec_dai,
    +	int clk_id, unsigned int freq, int dir)
    +{
    +	struct snd_soc_component *codec = codec_dai->component;
    +	struct tas2505_priv *tas2505 = snd_soc_component_get_drvdata(codec);
    +	int i, x;
    +	int ret = 0;
    +
    +	dev_info(tas2505->dev, "%s: clk_id: %d, freq: %d\n",
    +		__func__, clk_id, freq);
    +
    +	if (tas2505->clk_src == MCLK) {
    +		for (i = 0; i < ARRAY_SIZE(tas2505_divs_mclksrc); i++) {
    +			for (x = 1; x < 9; x++) {
    +				if ((freq / x) == tas2505_divs_mclksrc[i].mclk_p) {
    +					tas2505->p_div = x;
    +					break;
    +				}
    +			}
    +			if (x < 9)
    +				break;
    +		}
    +
    +		if (i != ARRAY_SIZE(tas2505_divs_mclksrc)) {
    +		} else {
    +			dev_err(tas2505->dev,
    +				"Can't produce required "
    +				"PLL_CLKIN frequency\n");
    +			ret = -EINVAL;
    +		}
    +		tas2505->pll_clkin = clk_id;
    +	} else {
    +		tas2505->pll_clkin = 1;
    +		tas2505->p_div = 1;
    +	}
    +
    +	if (!ret) {
    +		snd_soc_component_write(codec, TAS2505_CLKMUX,
    +			(tas2505->pll_clkin << TAS2505_PLL_CLKIN_SHIFT) |
    +			TAS2505_CODEC_CLKIN_PLL);
    +
    +		tas2505->sysclk = freq;
    +	}
    +	return ret;
    +
    +}
    +
    +static void tas2505_power_on(struct snd_soc_component *codec)
    +{
    +	snd_soc_component_update_bits(codec, TAS2505_LDO_CTRL,
    +		TAS2505_LDO_PLL_HP_LVL_MASK, 0);
    +	snd_soc_component_update_bits(codec, TAS2505_REF_POR_LDO_BGAP_CTRL,
    +		TAS2505_REF_POR_LDO_BGAP_MASTER_REF_MASK,
    +		TAS2505_REF_POR_LDO_BGAP_MASTER_REF_MASK);
    +}
    +
    +static void tas2505_power_off(struct snd_soc_component *codec)
    +{
    +	snd_soc_component_update_bits(codec, TAS2505_REF_POR_LDO_BGAP_CTRL,
    +		TAS2505_REF_POR_LDO_BGAP_MASTER_REF_MASK, 0);
    +	snd_soc_component_update_bits(codec, TAS2505_LDO_CTRL,
    +		TAS2505_LDO_PLL_HP_LVL_MASK,
    +		TAS2505_LDO_PLL_HP_LVL_MASK);
    +}
    +
    +static int tas2505_set_bias_level(struct snd_soc_component *codec,
    +	enum snd_soc_bias_level level)
    +{
    +	int current_lvl = snd_soc_component_get_bias_level(codec);
    +	int rc = 0;
    +
    +	switch (level) {
    +	case SND_SOC_BIAS_ON:
    +		break;
    +	case SND_SOC_BIAS_PREPARE:
    +		break;
    +	case SND_SOC_BIAS_STANDBY:
    +		if (current_lvl == SND_SOC_BIAS_OFF) {
    +			tas2505_power_on(codec);
    +			dev_info(codec->dev,
    +				"%s:power on\n", __func__);
    +		} else
    +			dev_info(codec->dev,
    +				"%s:SND_SOC_BIAS_STANDBY\n",
    +				__func__);
    +		break;
    +	case SND_SOC_BIAS_OFF:
    +		if (current_lvl == SND_SOC_BIAS_STANDBY) {
    +			tas2505_power_off(codec);
    +			dev_info(codec->dev,
    +				"%s:power off\n",
    +				__func__);
    +		} else
    +			dev_info(codec->dev,
    +				"%s:SND_SOC_BIAS_OFF\n",
    +				__func__);
    +		break;
    +	default:
    +		dev_err(codec->dev, "Invalid bias level\n");
    +		rc = -EINVAL;
    +	}
    +
    +	return rc;
    +}
    +
    +static int tas2505_codec_probe(struct snd_soc_component *codec)
    +{
    +	struct tas2505_priv *tas2505 = snd_soc_component_get_drvdata(codec);
    +
    +	tas2505->codec = codec;
    +	tas2505_vol.dac_vol = 0x00;
    +	tas2505_vol.spk_vol1 = 0x00;
    +
    +	snd_soc_component_write(codec, TAS2505_RESET, 1);
    +
    +	return 0;
    +}
    +
    +static const struct snd_soc_component_driver soc_codec_driver_tas2505 = {
    +	.probe			= tas2505_codec_probe,
    +	.set_bias_level		= tas2505_set_bias_level,
    +	.suspend_bias_off	= true,
    +
    +	.controls		= tas2505_snd_controls,
    +	.num_controls		= ARRAY_SIZE(tas2505_snd_controls),
    +	.dapm_widgets		= tas2505_dapm_widgets,
    +	.num_dapm_widgets	= ARRAY_SIZE(tas2505_dapm_widgets),
    +	.dapm_routes		= tas2505_audio_map,
    +	.num_dapm_routes	= ARRAY_SIZE(tas2505_audio_map),
    +};
    +
    +static const struct snd_soc_dai_ops tas2505_dai_ops = {
    +	.hw_params	= tas2505_hw_params,
    +	.set_sysclk	= tas2505_set_dai_sysclk,
    +	.set_fmt	= tas2505_set_dai_fmt,
    +	.mute_stream	= tas2505_dac_mute,
    +};
    +
    +static struct snd_soc_dai_driver tas2505_dai_driver[] = {
    +	{
    +		.name = "tas2505-hifi",
    +		.playback = {
    +			.stream_name	= "Playback",
    +			.channels_min	= 1,
    +			.channels_max	= 2,
    +			.rates		= TAS2505_RATES,
    +			.formats	= TAS2505_FORMATS,
    +		},
    +		.ops = &tas2505_dai_ops,
    +		.symmetric_rate = 1,
    +	},
    +};
    +
    +static int tas2505_i2c_probe(struct i2c_client *i2c,
    +	const struct i2c_device_id *id)
    +{
    +	struct tas2505_priv *tas2505;
    +	struct device_node *np = i2c->dev.of_node;
    +	const struct regmap_config *regmap_config = &tas2505_i2c_regmap;
    +	int ret;
    +
    +	tas2505 = devm_kzalloc(&i2c->dev, sizeof(*tas2505), GFP_KERNEL);
    +	if (tas2505 == NULL)
    +		return -ENOMEM;
    +
    +	tas2505->regmap = devm_regmap_init_i2c(i2c, regmap_config);
    +	if (IS_ERR(tas2505->regmap)) {
    +		ret = PTR_ERR(tas2505->regmap);
    +		dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
    +			ret);
    +		return ret;
    +	}
    +
    +	ret = of_get_named_gpio(np, "gpio-reset", 0);
    +	if ((ret > 0) && gpio_is_valid(ret)) {
    +		devm_gpio_request_one(&i2c->dev, ret, GPIOF_OUT_INIT_HIGH,
    +			"reset");
    +	}
    +
    +	ret = of_property_read_u32(np, "clock-source",
    +			&tas2505->clk_src);
    +
    +	dev_info(&i2c->dev, "%s: clock-source = %s\n", __func__,
    +		tas2505->clk_src?"BCLK":"MCLK");
    +
    +	tas2505->dev = &i2c->dev;
    +
    +	dev_set_drvdata(tas2505->dev, tas2505);
    +
    +	return snd_soc_register_component(&i2c->dev,
    +		&soc_codec_driver_tas2505, tas2505_dai_driver,
    +		ARRAY_SIZE(tas2505_dai_driver));
    +}
    +
    +static void tas2505_i2c_remove(struct i2c_client *i2c)
    +{
    +
    +	snd_soc_unregister_component(&i2c->dev);
    +
    +	//return 0;
    +}
    +
    +static const struct of_device_id tas2505_of_match[] = {
    +	{ .compatible = "ti,tas2505" },
    +	{},
    +};
    +MODULE_DEVICE_TABLE(of, tas2505_of_match);
    +
    +static const struct i2c_device_id tas2505_i2c_id[] = {
    +	{ "tas2505", 0 },
    +	{}
    +};
    +MODULE_DEVICE_TABLE(i2ic, tas2505_i2c_id);
    +
    +static struct i2c_driver tas2505_i2c_driver = {
    +	.driver = {
    +		.name		= "tas2505-codec",
    +		.of_match_table	= of_match_ptr(tas2505_of_match),
    +	},
    +	.probe		= tas2505_i2c_probe,
    +	.remove		= tas2505_i2c_remove,
    +	.id_table	= tas2505_i2c_id,
    +};
    +
    +module_i2c_driver(tas2505_i2c_driver);
    +
    +MODULE_DESCRIPTION("ASoC TAS2505 codec driver");
    +MODULE_AUTHOR("Hieu Tran Dang <dangtranhieu2012@gmail.com>");
    +MODULE_LICENSE("GPL");
    diff --git a/sound/soc/ti/tas2505.h b/sound/soc/ti/tas2505.h
    new file mode 100644
    index 000000000000..3e55df45f894
    --- /dev/null
    +++ b/sound/soc/ti/tas2505.h
    @@ -0,0 +1,104 @@
    +/*
    + * ALSA SoC TAS2505 codec driver
    + *
    + * Author: Hieu Tran Dang <dangtranhieu2012@gmail.com>
    + *
    + * This package is free software; you can redistribute it and/or modify
    + * it under the terms of the GNU General Public License version 2 as
    + * published by the Free Software Foundation.
    + *
    + * THIS PACKAGE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR
    + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    + */
    +
    +#ifndef _TAS2505_H
    +#define _TAS2505_H
    +
    +#define TAS2505_RATES	(SNDRV_PCM_RATE_8000_96000)
    +#define TAS2505_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
    +	SNDRV_PCM_FMTBIT_S24_LE | \
    +	SNDRV_PCM_FMTBIT_S32_LE)
    +
    +#define TAS2505_REG(page, reg)	((page * 128) + reg)
    +
    +#define TAS2505_PAGECTL			TAS2505_REG(0, 0)
    +#define TAS2505_RESET			TAS2505_REG(0, 1)
    +#define TAS2505_CLKMUX			TAS2505_REG(0, 4)
    +#define TAS2505_PLLPR			TAS2505_REG(0, 5)
    +#define TAS2505_PLLJ			TAS2505_REG(0, 6)
    +#define TAS2505_PLLDMSB			TAS2505_REG(0, 7)
    +#define TAS2505_PLLDLSB			TAS2505_REG(0, 8)
    +#define TAS2505_NDAC			TAS2505_REG(0, 11)
    +#define TAS2505_MDAC			TAS2505_REG(0, 12)
    +#define TAS2505_DOSRMSB			TAS2505_REG(0, 13)
    +#define TAS2505_DOSRLSB			TAS2505_REG(0, 14)
    +#define TAS2505_IFACE1			TAS2505_REG(0, 27)
    +#define TAS2505_IFACE3			TAS2505_REG(0, 29)
    +#define TAS2505_BCLKNDIV		TAS2505_REG(0, 30)
    +#define TAS2505_DACFLAG1		TAS2505_REG(0, 37)
    +#define TAS2505_DACFLAG2		TAS2505_REG(0, 38)
    +#define TAS2505_STICKYFLAG1		TAS2505_REG(0, 42)
    +#define TAS2505_INTFLAG1		TAS2505_REG(0, 43)
    +#define TAS2505_STICKYFLAG2		TAS2505_REG(0, 44)
    +#define TAS2505_INTFLAG2		TAS2505_REG(0, 46)
    +#define TAS2505_DACINSTRSET		TAS2505_REG(0, 60)
    +#define TAS2505_DACSETUP1		TAS2505_REG(0, 63)
    +#define TAS2505_DACSETUP2		TAS2505_REG(0, 64)
    +#define TAS2505_DACVOL			TAS2505_REG(0, 65)
    +#define TAS2505_REF_POR_LDO_BGAP_CTRL	TAS2505_REG(1, 1)
    +#define TAS2505_LDO_CTRL		TAS2505_REG(1, 2)
    +#define TAS2505_PLAYBACKCONF1		TAS2505_REG(1, 3)
    +#define TAS2505_SPKAMPCTRL1		TAS2505_REG(1, 45)
    +#define TAS2505_SPKVOL1			TAS2505_REG(1, 46)
    +#define TAS2505_SPKVOL2			TAS2505_REG(1, 48)
    +#define TAS2505_DACANLGAINFLAG		TAS2505_REG(1, 63)
    +
    +#define TAS2505_PLLPR_P_MASK				(0x70)
    +#define TAS2505_PLLPR_R_MASK				(0xf)
    +#define TAS2505_PLL_DAC_MASK				(0x7f)
    +#define TAS2505_BCLKNDIV_MASK				(0x7f)
    +#define TAS2505_IFACE1_DATALEN_MASK			(0x30)
    +#define TAS2505_IFACE1_WCLKDIR_MASK			(0x4)
    +#define TAS2505_IFACE1_BCLKDIR_MASK			(0x8)
    +#define TAS2505_IFACE1_INTERFACE_MASK			(0xc0)
    +#define TAS2505_IFACE3_BDIVCLKIN_MASK			(0x1)
    +#define TAS2505_IFACE3_BCLKINV_MASK			(0x8)
    +#define TAS2505_DACSETUP1_PATH_CTRL_MSK			(0x30)
    +#define TAS2505_DACSETUP2_MUTE_MASK			(0x8)
    +#define TAS2505_PM_MASK					(0x80)
    +#define TAS2505_LDO_PLL_HP_LVL_MASK			(0x8)
    +#define TAS2505_REF_POR_LDO_BGAP_MASTER_REF_MASK	(0x10)
    +#define TAS2505_SPKVOL2_MSK				(0x70)
    +#define TAS2505_CODEC_CLKIN_MSK				(0x3)
    +#define TAS2505_PLL_INPUT_CLK_MSK			(0xC)
    +#define TAS2505_SPKAMPCTRL1_SPKDRV_MSK			BIT(1)
    +
    +#define TAS2505_PLLPR_P_SHIFT			(4)
    +#define TAS2505_PLL_CLKIN_SHIFT			(2)
    +#define TAS2505_IFACE1_DATALEN_SHIFT		(4)
    +#define TAS2505_IFACE1_INTERFACE_SHIFT		(6)
    +#define TAS2505_IFACE3_BCLKINV_SHIFT		(4)
    +#define TAS2505_SPKVOL2_6DB_SHIFT		(4)
    +#define TAS2505_DACSETUP1_PATH_CTRL_SHIFT	(4)
    +
    +#define TAS2505_WORD_LEN_20BITS			(1)
    +#define TAS2505_WORD_LEN_24BITS			(2)
    +#define TAS2505_WORD_LEN_32BITS			(3)
    +
    +#define TAS2505_DSP_MODE			(1)
    +#define TAS2505_RJF_MODE			(2)
    +#define TAS2505_LJF_MODE			(3)
    +
    +#define TAS2505_PLL_CLKIN_MCLK			(0)
    +#define TAS2505_PLL_CLKIN_BCLK			(1)
    +#define TAS2505_PLL_CLKIN_GPIO			(2)
    +#define TAS2505_PLL_CLKIN_DIN			(3)
    +#define TAS2505_CODEC_CLKIN_PLL			(3)
    +#define TAS2505_SPKVOL2_MUTE			(0)
    +#define TAS2505_SPKVOL2_6DB			(1)
    +#define TAS2505_DACSETUP1_PATH_CTRL_LRDIV2	(3)
    +#define TAS2505_SPKAMPCTRL1_SPKDRV_PWD		(0)
    +#define TAS2505_SPKAMPCTRL1_SPKDRV_PWU		(1)
    +
    +#endif
    

  • Hi Paul,

    I did some modification in your DTS, looks like a mismatch name made the issue.

            tas2505: tas2505@18 {
                    #sound-dai-cells = <0>;
                    compatible = "ti,tas2505";
                    reg = <0x18>;
                    gpio-reset = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
                    clock-source = <1>;/* 0: MCLK, 1: BCLK */
                    status = "ok";
            };

    Regards

    Kevin

  • You can use below commands to check the Audio sound card

  • Hello Kevin, 

    I try two versions of DTS.

    Which DTS should I use? in "dts.readme" my latest comment ? AM62x SDk reference one; the first one?

    Yes, I will try the part you suggest.

  • Hello Kevn, 

    Based on your comment, i updated (  reset-gpios =》 gpio-reset)and below is the result.

    root@am62xx-evm:~# ls /dev/snd/
    timer
    root@am62xx-evm:/proc/asound# ls
    cards devices pcm timers version
    root@am62xx-evm:/proc/asound# cat cards
    --- no soundcards ---
    root@am62xx-evm:/proc/asound# cat pcm
    root@am62xx-evm:/proc/asound# cat devices
    33: : timer
    root@am62xx-evm:~# ls /sys/bus/i2c/devices/1-0018/
    driver modalias name of_node power subsystem uevent
    root@am62xx-evm:~# cd /sys/bus/i2c/devices/
    root@am62xx-evm:/sys/bus/i2c/devices# ls
    0-0014 0-003f 0-0051 1-0018 1-0022 1-0068 i2c-0 i2c-1
    root@am62xx-evm:/sys/bus/i2c/devices# ls /sys/bus/i2c/devices/1-0018/
    driver modalias name of_node power subsystem uevent
    root@am62xx-evm:/sys/bus/i2c/devices# cat /proc/asound/pcm
    root@am62xx-evm:/sys/bus/i2c/devices# cat /proc/asound/cards
    --- no soundcards ---
    root@am62xx-evm:/sys/bus/i2c/devices# dmesg | grep tas2505
    [ 1.175849] tas2505-codec 1-0018: tas2505_i2c_probe: clock-source = BCLK
    root@am62xx-evm:/sys/bus/i2c/devices#

  • Current DTS setting. 

  • main_mcasp1_pins_default: main-mcasp1-pins-default {
                    pinctrl-single,pins = <
                            AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
                            AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
                            AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
                            AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
                    >;
            };
    		
    
    
    main_i2c1 {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&main_i2c1_pins_default>;
            clock-frequency = <100000>;
    
    
    
            tas2505: tas2505@18 {
                    #sound-dai-cells = <0>;
                    compatible = "ti,tas2505";
                    reg = <0x18>;
                    //reset-gpios = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
                    gpio-reset = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
                    clock-source = <1>;/* 0: MCLK, 1: BCLK */
                    status = "ok";
            };		
    }; 
    
    //&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
    //      >;
    //      tx-num-evt = <32>;
    //      rx-num-evt = <32>;
    //};
    
    &mcasp1 {
            #sound-dai-cells = <0>;
            pinctrl-names = "default";
            pinctrl-0 = <&main_mcasp1_pins_default>;
            status = "okay";
            op-mode = <0>;  /* MCASP_IIS_MODE */
            tdm-slots = <8>;
            serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
                            2 2 1 0
                    >;
            tx-num-evt = <32>;
            rx-num-evt = <32>;
    };
    

  • FYI, current it seems we have issue with i2c as well. 

    This could effect the AMP device node is not shown?

    root@am62xx-evm:/sys/bus/i2c/devices# i2cdetect -y 0
    Warning: Can't use SMBus Quick Write command, will skip some addresses
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00:
    10:
    20:
    30: -- -- -- -- -- -- -- --
    40:
    50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60:
    70:
    root@am62xx-evm:/sys/bus/i2c/devices# i2cdetect -y 1
    Warning: Can't use SMBus Quick Write command, will skip some addresses
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00:
    10:
    20:
    30: -- -- -- -- -- -- -- --
    40:
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60:
    70:
    root@am62xx-evm:/sys/bus/i2c/devices#

  • Hi Paul,

    The i2cdetect doesn't rely on driver, maybe is a hardware issue or an issue with system level, pls check it first.

    Regards

    Kevin

  • Hello Kevin

    Could you suggest what to check and how to solve this issue? FYI, we used to share our HW schematic in previouse comment, 2728.SHC.pdf.

  • Below is our total patch based on SDK 9.0.

    diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
    index 74e34b84419a..048d96cfd1a2 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
    @@ -581,7 +581,7 @@ sdhci1: mmc@fa00000 {
     		ti,itap-del-sel-sdr12 = <0xa>;
     		ti,itap-del-sel-sdr25 = <0x1>;
     		ti,clkbuf-sel = <0x7>;
    -		bus-width = <4>;
    +		bus-width = <1>;
     		status = "disabled";
     	};
     
    diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
    index b1737978103b..e6bc1c28c481 100644
    --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
    +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
    @@ -13,15 +13,25 @@ / {
     	compatible = "ti,am625-sk", "ti,am625";
     	model = "Texas Instruments AM625 SK";
     
    -	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>;
    -		};
    +	aliases {
    +		serial4 = &main_uart4;
    +		serial6 = &main_uart6;
    +		gpio2 = &mcu_gpio0;
     	};
     
    +        transceiver2: can-phy1 {
    +                compatible = "ti,tcan1042";
    +                #phy-cells = <0>;
    +                max-bitrate = <5000000>;
    +        };
    +
    +        transceiver3: can-phy2 {
    +                compatible = "ti,tcan1042";
    +                #phy-cells = <0>;
    +                max-bitrate = <5000000>;
    +        };
    +
    +
     	memory@80000000 {
     		device_type = "memory";
     		/* 2G RAM */
    @@ -68,9 +78,10 @@ vdd_mmc1: regulator-3 {
     		regulator-min-microvolt = <3300000>;
     		regulator-max-microvolt = <3300000>;
     		regulator-boot-on;
    -		enable-active-high;
    +		/* enable-active-high; */
     		vin-supply = <&vcc_3v3_sys>;
    -		gpio = <&exp1 3 GPIO_ACTIVE_HIGH>;
    +		regulator-always-on; 
    +		/* gpio = <&exp1 3 GPIO_ACTIVE_HIGH>; */
     	};
     
     	vdd_sd_dv: regulator-4 {
    @@ -82,7 +93,8 @@ vdd_sd_dv: regulator-4 {
     		regulator-min-microvolt = <1800000>;
     		regulator-max-microvolt = <3300000>;
     		regulator-boot-on;
    -		vin-supply = <&vcc_5v0>;
    +		regulator-always-on;
    +		vin-supply = <&vcc_3v3_sys>;
     		gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
     		states = <1800000 0x0>,
     			 <3300000 0x1>;
    @@ -105,7 +117,7 @@ wlan_lten: regulator-6 {
     		regulator-min-microvolt = <3300000>;
     		regulator-max-microvolt = <3300000>;
     		vin-supply = <&vcc_3v3_sys>;
    -		regulator-always-on;
    +		/* regulator-always-on; */
     		gpios = <&exp1 11 GPIO_ACTIVE_LOW>;
     	};
     
    @@ -120,6 +132,19 @@ wlan_en: regulator-7 {
     		pinctrl-names = "default";
     		pinctrl-0 = <&wlan_en_pins_default>;
     	};
    +
    +       btwlan_en: regulator-8 {
    +               compatible = "regulator-fixed";
    +               regulator-name = "btwlan_en";
    +               regulator-min-microvolt = <3300000>;
    +               regulator-max-microvolt = <3300000>;
    +               vin-supply = <&wlan_lten>;
    +               enable-active-high;
    +               gpios = <&mcu_gpio0 1 GPIO_ACTIVE_HIGH>;
    +               pinctrl-names = "default";
    +               pinctrl-0 = <&mcu_btwlan_en_pins_default>;
    +       };
    +
     };
     
     &main_pmx0 {
    @@ -191,6 +216,95 @@ main_wlirq_pins_default: main-wlirq-pins-default {
     			AM62X_IOPAD(0x128, PIN_INPUT, 7) /* (B23) MMC2_SDWP.GPIO0_72 */
     		>;
     	};
    +
    +	/* For BT/WLAN connection interface  */
    +        main_uart4_pins_default: main-uart4-default-pins {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x00b0, PIN_INPUT, 3) /* (K22) GPMC0_CSn2.UART4_RXD */
    +                        AM62X_IOPAD(0x00b4, PIN_OUTPUT, 3) /* (K24) GPMC0_CSn3.UART4_TXD */
    +                >;
    +        };
    +
    +	/* For UART6 RS232 */
    +	main_uart6_pins_default: main-uart6-default-pins {
    +		pinctrl-single,pins = <
    +			AM62X_IOPAD(0x009c, PIN_INPUT, 3) /* (V25) GPMC0_WAIT1.UART6_RXD */
    +			AM62X_IOPAD(0x00a0, PIN_OUTPUT, 3) /* (K25) GPMC0_WPn.UART6_TXD */
    +		>;
    +	};
    +
    +	/* For CAN0 , CAN2 */
    +	main_mcan0_pins_default: main-mcan0-pins-default {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x1dc, PIN_INPUT, 0) /* (E15) MCAN0_RX */
    +                        AM62X_IOPAD(0x1d8, PIN_OUTPUT, 0) /* (C15) MCAN0_TX */
    +                >;
    +        };
    +
    +
    +};
    +
    +&mcu_gpio0 {
    +        status = "okay";
    +};
    +
    +&mcu_gpio_intr {
    +	status = "okay";
    +};
    +
    +&main_uart4 {
    +       status = "okay";
    +       pinctrl-names = "default";
    +       pinctrl-0 = <&main_uart4_pins_default &mcu_btwlan_en_pins_default>;
    +
    +	bluetooth {
    +               enable-gpios = <&mcu_gpio0 1 GPIO_ACTIVE_HIGH>;
    +       };
    +
    +};
    +
    +&main_uart6 {
    +       status = "okay";
    +       pinctrl-names = "default";
    +       pinctrl-0 = <&main_uart6_pins_default>;
    +};
    +
    +&mcu_pmx0 {
    +	/* Enable BT/WLAN Pin */
    +	mcu_btwlan_en_pins_default: mcu-btwlan-en-pins-default {
    +		pinctrl-single,pins = <
    +                       AM62X_MCU_IOPAD(0x0004, PIN_OUTPUT_PULLUP, 7) /* (B8) MCU_SPI0_CS1.MCU_GPIO0_1 */
    +               >;
    +	};
    +
    +	mcu_mcan1_pins_default: mcu-mcan1-pins-default {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x038, PIN_INPUT, 0) /* (B3) MCU_MCAN0_RX */
    +                        AM62X_IOPAD(0x034, PIN_OUTPUT, 0) /* (D6) MCU_MCAN0_TX */
    +                >;
    +        };
    +
    +        mcu_mcan2_pins_default: mcu-mcan2-pins-default {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x040, PIN_INPUT, 0) /* (D4) MCU_MCAN1_RX */
    +                        AM62X_IOPAD(0x03C, PIN_OUTPUT, 0) /* (E5) MCU_MCAN1_TX */
    +                >;
    +        };
    +
    +};
    +
    +&mcu_mcan1 {
    +        pinctrl-names = "default";
    +        pinctrl-0 = <&mcu_mcan1_pins_default>;
    +        phys = <&transceiver2>;
    +        status = "okay";
    +};
    +
    +&mcu_mcan2 {
    +        pinctrl-names = "default";
    +        pinctrl-0 = <&mcu_mcan2_pins_default>;
    +        phys = <&transceiver3>;
    +        status = "okay";
     };
     
     &main_i2c1 {
    @@ -223,6 +337,7 @@ exp1: gpio@22 {
     };
     
     &sdhci1 {
    +	status = "okay";
     	vmmc-supply = <&vdd_mmc1>;
     	vqmmc-supply = <&vdd_sd_dv>;
     };
    @@ -345,9 +460,9 @@ partition@3fc0000 {
     	};
     };
     
    -&tlv320aic3106 {
    -	DVDD-supply = <&vcc_1v8>;
    -};
    +//&tlv320aic3106 {
    +//	DVDD-supply = <&vcc_1v8>;
    +//};
     
     #define K3_TS_OFFSET(pa, val)	(0x4+(pa)*4) (0x10000 | val)
     
    diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    index 07763091ab59..82f4c9ad0395 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
    @@ -21,6 +21,7 @@ aliases {
     		ethernet1 = &cpsw_port2;
     		usb0 = &usb0;
     		usb1 = &usb1;
    +		gpio0 = &main_gpio0;
     	};
     
     	chosen {
    @@ -105,6 +106,57 @@ framebuffer: framebuffer@ff700000 {
     		};
     	};
     
    +	lcd_bl: backlight {
    +                compatible = "pwm-backlight";
    +                pwms = <&epwm0 0 50000 0>;
    +                brightness-levels =
    +                        <0 32 64 96 128 160 192 224 255>;
    +                default-brightness-level = <8>;
    +        };
    +
    +	display {
    +		compatible = "edt,et070080dh6";
    +		backlight = <&lcd_bl>;
    +		port {
    +			lcd_in: endpoint {
    +				remote-endpoint = <&dpi1_out>;
    +			};
    +		};
    +	};
    +
    +
    +	clk_mcasp1_fixed: clk_mcasp1_fixed {
    +		#clock-cells = <0>;
    +		compatible = "fixed-clock";
    +		clock-frequency = <24576000>;
    +	};
    +
    +	clk_mcasp1: clk_mcasp1 {
    +		#clock-cells = <0>;
    +		compatible = "gpio-gate-clock";
    +		clocks = <&clk_mcasp1_fixed>;
    +		//enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
    +	};
    +
    +	sound {
    +		compatible = "simple-audio-card";
    +		simple-audio-card,name = "Audio card name";
    +		simple-audio-card,dai-link@0 {
    +			format = "i2s";
    +			bitclock-master = <&sound0_master>;
    +			frame-master = <&sound0_master>;
    +			sound0_master: cpu {
    +				sound-dai = <&mcasp1>;
    +				clocks = <&clk_mcasp1>;
    +			};
    +
    +			codec {
    +				sound-dai = <&tas2505>;
    +			};
    +		};
    +	};
    +
    +	/*
     	leds {
     		compatible = "gpio-leds";
     		pinctrl-names = "default";
    @@ -153,7 +205,7 @@ sound_master: simple-audio-card,codec {
     			clocks = <&tlv320_mclk>;
     		};
     	};
    -
    +	
     	hdmi: connector {
     		compatible = "hdmi-connector";
     		label = "hdmi";
    @@ -164,6 +216,7 @@ hdmi_connector_in: endpoint {
     			};
     		};
     	};
    +	*/
     };
     
     &main_pmx0 {
    @@ -188,14 +241,14 @@ AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17/A17) I2C1_SCL */
     			AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17/A16) I2C1_SDA */
     		>;
     	};
    -
    -	main_i2c2_pins_default: main-i2c2-pins-default {
    -		pinctrl-single,pins = <
    -			AM62X_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) /* (K22/H18) GPMC0_CSn2.I2C2_SCL */
    -			AM62X_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24/H19) GPMC0_CSn3.I2C2_SDA */
    -		>;
    -	};
    -
    +	
    +	/* main_i2c2_pins_default: main-i2c2-pins-default { */
    +	/*	pinctrl-single,pins = < */
    +	/*		AM62X_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) */ /* (K22/H18) GPMC0_CSn2.I2C2_SCL */
    +	/*		AM62X_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) */ /* (K24/H19) GPMC0_CSn3.I2C2_SDA */
    +	/*	>;*/
    +	/*};*/
    +	
     	main_mmc0_pins_default: main-mmc0-pins-default {
     		pinctrl-single,pins = <
     			AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (Y3/V3) MMC0_CMD */
    @@ -316,6 +369,30 @@ AM62X_IOPAD(0x0074, PIN_OUTPUT, 1) /* (U25) GPMC0_AD14.VOUT0_DATA22 */
     			AM62X_IOPAD(0x0078, PIN_OUTPUT, 1) /* (U24) GPMC0_AD15.VOUT0_DATA23 */
     		>;
     	};
    +
    +	epwm0bl_pins_default: epwm0bl-default-pins {
    +                pinctrl-single,pins = <
    +                        AM62X_IOPAD(0x01b4, PIN_OUTPUT_PULLUP, 2) /* (A13) SPI0_CS0.EHRPWM0_A */
    +                >;
    +        };
    +
    +};
    +
    +&mcu_pmx0 {
    +	touchscreen_pins_default: touchscreen-default-pins {
    +		pinctrl-single,pins = <
    +			AM62X_MCU_IOPAD(0x0024, PIN_OUTPUT, 0) /* (B4) WKUP_UART0_RXD */
    +			AM62X_MCU_IOPAD(0x0028, PIN_INPUT, 0) /* (C5) WKUP_UART0_TXD */
    +		>;
    +	};
    +
    +	/* AMP reset */
    +	//ampreset_pins_default: ampreset-default-pins {
    +	//	pinctrl-single,pins = <
    +	//		AM62X_MCU_IOPAD(0x000c, PIN_OUTPUT_PULLDOWN, 7) /* (D9) MCU_SPI0_D0.MCU_GPIO0_3 */
    +	//	>;
    +	//};
    +	
     };
     
     &wkup_uart0 {
    @@ -337,12 +414,41 @@ &main_uart1 {
     	status = "reserved";
     };
     
    +&epwm0 {
    +	pinctrl-names = "default";
    +	pinctrl-0 = <&epwm0bl_pins_default>;
    +	status = "okay";
    + };
    +
    +&main_gpio0 {
    +	status = "okay";
    +};
    +
     &main_i2c0 {
     	status = "okay";
     	pinctrl-names = "default";
     	pinctrl-0 = <&main_i2c0_pins_default>;
     	clock-frequency = <400000>;
     
    +        eeprom@51 {
    +                compatible = "atmel,24c512";
    +                reg = <0x51>;
    +		pagesize = <64>;
    +        };
    +
    +        touchscreen@14 {
    +                compatible = "goodix,gt911";
    +                reg = <0x14>;
    +                pinctrl-names = "default";
    +                pinctrl-0 = <&touchscreen_pins_default>;
    +                interrupt-parent = <&main_gpio0>;
    +                interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
    +                irq-gpios = <&main_gpio0 9 GPIO_ACTIVE_LOW>;
    +                reset-gpios = <&main_gpio0 10 GPIO_ACTIVE_LOW>;
    +                touchscreen-size-x = <800>;
    +                touchscreen-size-y = <480>;
    +        };
    +
     	typec_pd0: tps6598x@3f {
     		compatible = "ti,tps6598x";
     		reg = <0x3f>;
    @@ -374,18 +480,34 @@ &main_i2c1 {
     	pinctrl-0 = <&main_i2c1_pins_default>;
     	clock-frequency = <100000>;
     
    -	tlv320aic3106: audio-codec@1b {
    +        pcf8523_rtc: rtc@68 {
    +                compatible = "nxp,pcf8523";
    +                reg = <0x68>;
    +		quartz-load-femtofarads = <1250>;
    +	};
    +
    +	tas2505: tas2505@18 {
     		#sound-dai-cells = <0>;
    -		compatible = "ti,tlv320aic3106";
    -		reg = <0x1b>;
    -		ai3x-micbias-vg = <1>;	/* 2.0V */
    +		compatible = "ti,tas2505";
    +		reg = <0x18>;
    +		//reset-gpios = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
    +		gpio-reset = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
    +		clock-source = <1>;/* 0: MCLK, 1: BCLK */
    +		status = "ok";
    +	}; 
    +
    +	//tlv320aic3106: audio-codec@1b {
    +	//	#sound-dai-cells = <0>;
    +	//	compatible = "ti,tlv320aic3106";
    +	//	reg = <0x1b>;
    +	//	ai3x-micbias-vg = <1>;	/* 2.0V */
     
     		/* Regulators */
    -		AVDD-supply = <&vcc_3v3_sys>;
    -		IOVDD-supply = <&vcc_3v3_sys>;
    -		DRVDD-supply = <&vcc_3v3_sys>;
    -	};
    -
    +	//	AVDD-supply = <&vcc_3v3_sys>;
    +	//	IOVDD-supply = <&vcc_3v3_sys>;
    +	//	DRVDD-supply = <&vcc_3v3_sys>;
    +	//};
    +        /*
     	sii9022: sii9022@3b {
     		#sound-dai-cells = <0>;
     		compatible = "sil,sii9022";
    @@ -416,15 +538,17 @@ sii9022_out: endpoint {
     				};
     			};
     		};
    -	};
    +	}; */
     };
     
    +/*
     &main_i2c2 {
     	status = "okay";
     	pinctrl-names = "default";
     	pinctrl-0 = <&main_i2c2_pins_default>;
     	clock-frequency = <400000>;
     };
    +*/
     
     &sdhci0 {
     	status = "okay";
    @@ -539,6 +663,20 @@ &mcasp1 {
     	rx-num-evt = <32>;
     };
     
    +//&mcasp1	{
    +//	#sound-dai-cells = <0>;
    +//	pinctrl-names = "default";
    +//	pinctrl-0 = <&main_mcasp1_pins_default>;
    +//	status = "okay";
    +//	op-mode = <0>;	/* MCASP_IIS_MODE */
    +//	tdm-slots = <8>;
    +//	serial-dir = <	/* 0: INACTIVE, 1: TX, 2: RX */
    +//			2 2 1 0
    +//		>;
    +//	tx-num-evt = <32>;
    +//	rx-num-evt = <32>;
    +//};
    +
     &ospi0 {
     	status = "okay";
     	pinctrl-names = "default";
    @@ -564,7 +702,7 @@ port@1 {
     		reg = <1>;
     
     		dpi1_out: endpoint {
    -			remote-endpoint = <&sii9022_in>;
    +			remote-endpoint = <&lcd_in>;
     		};
     	};
     };
    diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
    index e56a47228ac3..c803af7e8513 100644
    --- a/arch/arm64/configs/defconfig
    +++ b/arch/arm64/configs/defconfig
    @@ -1,6 +1,48 @@
     CONFIG_SYSVIPC=y
     CONFIG_POSIX_MQUEUE=y
     CONFIG_AUDIT=y
    +#
    +# IRQ subsystem
    +#
    +CONFIG_GENERIC_IRQ_PROBE=y
    +CONFIG_GENERIC_IRQ_SHOW=y
    +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
    +CONFIG_GENERIC_PENDING_IRQ=y
    +CONFIG_GENERIC_IRQ_MIGRATION=y
    +CONFIG_HARDIRQS_SW_RESEND=y
    +CONFIG_GENERIC_IRQ_CHIP=y
    +CONFIG_IRQ_DOMAIN=y
    +CONFIG_IRQ_SIM=y
    +CONFIG_IRQ_DOMAIN_HIERARCHY=y
    +CONFIG_GENERIC_MSI_IRQ=y
    +CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
    +CONFIG_IRQ_MSI_IOMMU=y
    +CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y
    +CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
    +CONFIG_IRQ_FORCED_THREADING=y
    +CONFIG_SPARSE_IRQ=y
    +# CONFIG_GENERIC_IRQ_DEBUGFS is not set
    +# end of IRQ subsystem
    +
    +CONFIG_CLOCKSOURCE_WATCHDOG=y
    +CONFIG_ARCH_CLOCKSOURCE_INIT=y
    +CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
    +CONFIG_GENERIC_TIME_VSYSCALL=y
    +CONFIG_GENERIC_CLOCKEVENTS=y
    +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
    +CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
    +CONFIG_GENERIC_CMOS_UPDATE=y
    +CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y
    +CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
    +CONFIG_CONTEXT_TRACKING=y
    +CONFIG_CONTEXT_TRACKING_IDLE=y
    +
    +#
    +# Timers subsystem
    +#
    +CONFIG_TICK_ONESHOT=y
    +CONFIG_NO_HZ_COMMON=y
    +# CONFIG_HZ_PERIODIC is not set
     CONFIG_NO_HZ_IDLE=y
     CONFIG_HIGH_RES_TIMERS=y
     CONFIG_BPF_SYSCALL=y
    @@ -218,9 +260,9 @@ CONFIG_CGROUP_NET_PRIO=y
     CONFIG_CAN=m
     CONFIG_BT=m
     CONFIG_BT_HIDP=m
    -# CONFIG_BT_LE is not set
    +CONFIG_BT_LE=m
     CONFIG_BT_LEDS=y
    -# CONFIG_BT_DEBUGFS is not set
    +CONFIG_BT_DEBUGFS=m
     CONFIG_BT_HCIBTUSB=m
     CONFIG_BT_HCIUART=m
     CONFIG_BT_HCIUART_LL=y
    @@ -331,7 +373,7 @@ CONFIG_QCOM_FASTRPC=m
     CONFIG_SRAM=y
     CONFIG_SRAM_DMA_HEAP=y
     CONFIG_PCI_ENDPOINT_TEST=m
    -CONFIG_EEPROM_AT24=m
    +CONFIG_EEPROM_AT24=y
     CONFIG_EEPROM_AT25=m
     CONFIG_UACCE=m
     # CONFIG_SCSI_PROC_FS is not set
    @@ -477,10 +519,13 @@ CONFIG_KEYBOARD_SNVS_PWRKEY=m
     CONFIG_KEYBOARD_IMX_SC_KEY=m
     CONFIG_KEYBOARD_CROS_EC=y
     CONFIG_INPUT_TOUCHSCREEN=y
    -CONFIG_TOUCHSCREEN_ATMEL_MXT=m
    -CONFIG_TOUCHSCREEN_GOODIX=m
    -CONFIG_TOUCHSCREEN_ILI210X=m
    -CONFIG_TOUCHSCREEN_EDT_FT5X06=m
    +CONFIG_I2C_HID_OF_GOODIX=y 
    +# CONFIG_TOUCHSCREEN_GT9XXNEW_TS=y
    +# CONFIG_TOUCHSCREEN_GT9XXNEWDUP_TS=y
    +# CONFIG_TOUCHSCREEN_ATMEL_MXT=m
    +CONFIG_TOUCHSCREEN_GOODIX=y
    +# CONFIG_TOUCHSCREEN_ILI210X=m
    +# CONFIG_TOUCHSCREEN_EDT_FT5X06=m
     CONFIG_INPUT_MISC=y
     CONFIG_INPUT_PM8941_PWRKEY=y
     CONFIG_INPUT_PM8XXX_VIBRATOR=m
    @@ -493,6 +538,7 @@ CONFIG_SERIO_AMBAKMI=y
     CONFIG_LEGACY_PTY_COUNT=16
     CONFIG_SERIAL_8250=y
     CONFIG_SERIAL_8250_CONSOLE=y
    +CONFIG_SERIAL_8250_DMA=y
     CONFIG_SERIAL_8250_EXTENDED=y
     CONFIG_SERIAL_8250_SHARE_IRQ=y
     CONFIG_SERIAL_8250_BCM2835AUX=y
    @@ -526,6 +572,8 @@ CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
     CONFIG_SERIAL_MVEBU_UART=y
     CONFIG_SERIAL_OWL=y
     CONFIG_SERIAL_DEV_BUS=y
    +CONFIG_SERIAL_8250_NR_UARTS=12
    +CONFIG_SERIAL_8250_RUNTIME_UARTS=12
     CONFIG_VIRTIO_CONSOLE=y
     CONFIG_IPMI_HANDLER=m
     CONFIG_IPMI_DEVICE_INTERFACE=m
    @@ -559,6 +607,8 @@ CONFIG_I2C_TEGRA=y
     CONFIG_I2C_UNIPHIER_F=y
     CONFIG_I2C_RCAR=y
     CONFIG_I2C_CROS_EC_TUNNEL=y
    +CONFIG_REGMAP=y
    +CONFIG_REGMAP_I2C=y
     CONFIG_SPI=y
     CONFIG_SPI_ARMADA_3700=y
     CONFIG_SPI_BCM2835=m
    @@ -644,6 +694,15 @@ CONFIG_GPIO_PCA953X_IRQ=y
     CONFIG_GPIO_BD9571MWV=m
     CONFIG_GPIO_MAX77620=y
     CONFIG_GPIO_SL28CPLD=m
    +CONFIG_GPIOLIB=y
    +CONFIG_GPIOLIB_FASTPATH_LIMIT=512
    +CONFIG_GPIO_ACPI=y
    +CONFIG_GPIOLIB_IRQCHIP=y
    +CONFIG_DEBUG_GPIO=y
    +CONFIG_GPIO_SYSFS=y
    +CONFIG_GPIO_CDEV=y
    +CONFIG_GPIO_CDEV_V1=y
    +CONFIG_GPIO_GENERIC=y
     CONFIG_POWER_RESET_MSM=y
     CONFIG_POWER_RESET_QCOM_PON=m
     CONFIG_POWER_RESET_XGENE=y
    @@ -887,64 +946,66 @@ CONFIG_SND_SOC_FSL_ASOC_CARD=m
     CONFIG_SND_SOC_IMX_AUDMIX=m
     CONFIG_SND_MESON_AXG_SOUND_CARD=m
     CONFIG_SND_MESON_GX_SOUND_CARD=m
    -CONFIG_SND_SOC_QCOM=m
    -CONFIG_SND_SOC_APQ8016_SBC=m
    -CONFIG_SND_SOC_MSM8996=m
    -CONFIG_SND_SOC_SDM845=m
    -CONFIG_SND_SOC_SM8250=m
    -CONFIG_SND_SOC_SC7180=m
    -CONFIG_SND_SOC_SC7280=m
    -CONFIG_SND_SOC_ROCKCHIP=m
    -CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
    -CONFIG_SND_SOC_ROCKCHIP_RT5645=m
    -CONFIG_SND_SOC_RK3399_GRU_SOUND=m
    -CONFIG_SND_SOC_SAMSUNG=y
    +# CONFIG_SND_SOC_QCOM=m
    +# CONFIG_SND_SOC_APQ8016_SBC=m
    +# CONFIG_SND_SOC_MSM8996=m
    +# CONFIG_SND_SOC_SDM845=m
    +# CONFIG_SND_SOC_SM8250=m
    +# CONFIG_SND_SOC_SC7180=m
    +# CONFIG_SND_SOC_SC7280=m
    +# CONFIG_SND_SOC_ROCKCHIP=m
    +# CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
    +# CONFIG_SND_SOC_ROCKCHIP_RT5645=m
    +# CONFIG_SND_SOC_RK3399_GRU_SOUND=m
    +# CONFIG_SND_SOC_SAMSUNG=y
     CONFIG_SND_SOC_RCAR=m
     CONFIG_SND_SOC_RZ=m
    -CONFIG_SND_SUN8I_CODEC=m
    -CONFIG_SND_SUN8I_CODEC_ANALOG=m
    -CONFIG_SND_SUN50I_CODEC_ANALOG=m
    -CONFIG_SND_SUN4I_I2S=m
    -CONFIG_SND_SUN4I_SPDIF=m
    -CONFIG_SND_SOC_TEGRA=m
    -CONFIG_SND_SOC_TEGRA210_AHUB=m
    -CONFIG_SND_SOC_TEGRA210_DMIC=m
    -CONFIG_SND_SOC_TEGRA210_I2S=m
    -CONFIG_SND_SOC_TEGRA210_OPE=m
    -CONFIG_SND_SOC_TEGRA186_ASRC=m
    -CONFIG_SND_SOC_TEGRA186_DSPK=m
    -CONFIG_SND_SOC_TEGRA210_ADMAIF=m
    -CONFIG_SND_SOC_TEGRA210_MVC=m
    -CONFIG_SND_SOC_TEGRA210_SFC=m
    -CONFIG_SND_SOC_TEGRA210_AMX=m
    -CONFIG_SND_SOC_TEGRA210_ADX=m
    -CONFIG_SND_SOC_TEGRA210_MIXER=m
    -CONFIG_SND_SOC_TEGRA_AUDIO_GRAPH_CARD=m
    -CONFIG_SND_SOC_J721E_EVM=m
    -CONFIG_SND_SOC_AK4613=m
    -CONFIG_SND_SOC_ES7134=m
    -CONFIG_SND_SOC_ES7241=m
    -CONFIG_SND_SOC_GTM601=m
    -CONFIG_SND_SOC_MSM8916_WCD_ANALOG=m
    -CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=m
    -CONFIG_SND_SOC_RT5659=m
    -CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
    -CONFIG_SND_SOC_SIMPLE_MUX=m
    -CONFIG_SND_SOC_TAS571X=m
    -CONFIG_SND_SOC_TLV320AIC32X4_I2C=m
    -CONFIG_SND_SOC_TLV320AIC3X_I2C=m
    -CONFIG_SND_SOC_WCD9335=m
    -CONFIG_SND_SOC_WCD934X=m
    -CONFIG_SND_SOC_WM8524=m
    -CONFIG_SND_SOC_WM8904=m
    -CONFIG_SND_SOC_WM8960=m
    -CONFIG_SND_SOC_WM8962=m
    -CONFIG_SND_SOC_WM8978=m
    -CONFIG_SND_SOC_WSA881X=m
    -CONFIG_SND_SOC_NAU8822=m
    -CONFIG_SND_SOC_LPASS_WSA_MACRO=m
    -CONFIG_SND_SOC_LPASS_VA_MACRO=m
    -CONFIG_SND_SIMPLE_CARD=m
    +# CONFIG_SND_SUN8I_CODEC=m
    +# CONFIG_SND_SUN8I_CODEC_ANALOG=m
    +# CONFIG_SND_SUN50I_CODEC_ANALOG=m
    +# CONFIG_SND_SUN4I_I2S=m
    +# CONFIG_SND_SUN4I_SPDIF=m
    +# CONFIG_SND_SOC_TEGRA=m
    +# CONFIG_SND_SOC_TEGRA210_AHUB=m
    +# CONFIG_SND_SOC_TEGRA210_DMIC=m
    +# CONFIG_SND_SOC_TEGRA210_I2S=m
    +# CONFIG_SND_SOC_TEGRA210_OPE=m
    +# CONFIG_SND_SOC_TEGRA186_ASRC=m
    +# CONFIG_SND_SOC_TEGRA186_DSPK=m
    +# CONFIG_SND_SOC_TEGRA210_ADMAIF=m
    +# CONFIG_SND_SOC_TEGRA210_MVC=m
    +# CONFIG_SND_SOC_TEGRA210_SFC=m
    +# CONFIG_SND_SOC_TEGRA210_AMX=m
    +# CONFIG_SND_SOC_TEGRA210_ADX=m
    +# CONFIG_SND_SOC_TEGRA210_MIXER=m
    +# CONFIG_SND_SOC_TEGRA_AUDIO_GRAPH_CARD=m
    +# CONFIG_SND_SOC_J721E_EVM=m
    +# CONFIG_SND_SOC_AK4613=m
    +# CONFIG_SND_SOC_ES7134=m
    +# CONFIG_SND_SOC_ES7241=m
    +# CONFIG_SND_SOC_GTM601=m
    +# CONFIG_SND_SOC_MSM8916_WCD_ANALOG=m
    +# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=m
    +# CONFIG_SND_SOC_RT5659=m
    +# CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
    +# CONFIG_SND_SOC_SIMPLE_MUX=m
    +# CONFIG_SND_SOC_TAS571X=m
    +CONFIG_SND_SOC_TAS2505=y
    +# CONFIG_SND_SOC_TLV320AIC32X4_I2C=m
    +# CONFIG_SND_SOC_TLV320AIC3X_I2C=m
    +# CONFIG_SND_SOC_WCD9335=m
    +# CONFIG_SND_SOC_WCD934X=m
    +# CONFIG_SND_SOC_WM8524=m
    +# CONFIG_SND_SOC_WM8904=m
    +# CONFIG_SND_SOC_WM8960=m
    +# CONFIG_SND_SOC_WM8962=m
    +# CONFIG_SND_SOC_WM8978=m
    +# CONFIG_SND_SOC_WSA881X=m
    +# CONFIG_SND_SOC_NAU8822=m
    +# CONFIG_SND_SOC_LPASS_WSA_MACRO=m
    +# CONFIG_SND_SOC_LPASS_VA_MACRO=m
    +CONFIG_SND_SIMPLE_CARD=y
    +CONFIG_SND_SIMPLE_CARD_UTILS=y
     CONFIG_SND_AUDIO_GRAPH_CARD=m
     CONFIG_SND_AUDIO_GRAPH_CARD2=m
     CONFIG_HID_MULTITOUCH=m
    @@ -1078,6 +1139,7 @@ CONFIG_RTC_DRV_MAX77686=y
     CONFIG_RTC_DRV_RK808=m
     CONFIG_RTC_DRV_PCF85063=m
     CONFIG_RTC_DRV_PCF85363=m
    +CONFIG_RTC_DRV_PCF8523=m
     CONFIG_RTC_DRV_M41T80=m
     CONFIG_RTC_DRV_BQ32K=m
     CONFIG_RTC_DRV_RX8581=m
    diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
    index 3192411218fb..239a6874b491 100644
    --- a/drivers/gpu/drm/panel/panel-simple.c
    +++ b/drivers/gpu/drm/panel/panel-simple.c
    @@ -1711,8 +1711,9 @@ static const struct panel_desc edt_et057090dhu = {
     	.connector_type = DRM_MODE_CONNECTOR_DPI,
     };
     
    +/* taeha 202040806 Add LCD */
     static const struct drm_display_mode edt_etm0700g0dh6_mode = {
    -	.clock = 33260,
    +	.clock = 26000,
     	.hdisplay = 800,
     	.hsync_start = 800 + 40,
     	.hsync_end = 800 + 40 + 128,
    @@ -1724,16 +1725,17 @@ static const struct drm_display_mode edt_etm0700g0dh6_mode = {
     	.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
     };
     
    +/* taeha 20240806 Add LCD */
     static const struct panel_desc edt_etm0700g0dh6 = {
     	.modes = &edt_etm0700g0dh6_mode,
     	.num_modes = 1,
    -	.bpc = 6,
    +	.bpc = 8,
     	.size = {
    -		.width = 152,
    -		.height = 91,
    +		.width = 150,
    +		.height = 94,
     	},
    -	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
    -	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
    +	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
    +	/* .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, */
     	.connector_type = DRM_MODE_CONNECTOR_DPI,
     };
     
    diff --git a/sound/soc/ti/Kconfig b/sound/soc/ti/Kconfig
    index 40110e9a9e8a..3b877c263b9f 100644
    --- a/sound/soc/ti/Kconfig
    +++ b/sound/soc/ti/Kconfig
    @@ -63,6 +63,17 @@ config SND_SOC_OMAP_MCBSP
     	  Say Y or M here if you want to have support for McBSP IP found in
     	  Texas Instruments OMAP1/2/3/4/5 SoCs.
     
    +# taeha, 20240903 tas2505 amp
    +config SND_SOC_TAS2505
    +	tristate "Texas Instruments TAS2505"
    +	select REGMAP
    +	select REGMAP_I2C
    +	select I2C
    +	help
    +	  Enable support Texas Instruments tas2505.
    +	  To compile this driver as a module, choose M here.
    +	  If unsure select "N".
    +
     config SND_SOC_OMAP_MCPDM
     	tristate "Multichannel PDM Controller (McPDM) support"
     	depends on ARCH_OMAP4 || SOC_OMAP5 || COMPILE_TEST
    diff --git a/sound/soc/ti/Makefile b/sound/soc/ti/Makefile
    index a21e5b0061de..8d475e50403c 100644
    --- a/sound/soc/ti/Makefile
    +++ b/sound/soc/ti/Makefile
    @@ -46,3 +46,6 @@ obj-$(CONFIG_SND_SOC_OMAP_AMS_DELTA) += snd-soc-ams-delta.o
     obj-$(CONFIG_SND_SOC_OMAP_HDMI) += snd-soc-omap-hdmi.o
     obj-$(CONFIG_SND_SOC_OMAP_OSK5912) += snd-soc-osk5912.o
     obj-$(CONFIG_SND_SOC_J721E_EVM) += snd-soc-j721e-evm.o
    +
    +snd-soc-tas2505-objs := tas2505.o
    +obj-$(CONFIG_SND_SOC_TAS2505) += snd-soc-tas2505.o
    diff --git a/sound/soc/ti/tas2505.c b/sound/soc/ti/tas2505.c
    new file mode 100644
    index 000000000000..d8f1460d1e0d
    --- /dev/null
    +++ b/sound/soc/ti/tas2505.c
    @@ -0,0 +1,692 @@
    +/*
    + * ALSA SoC TAS2505 codec driver
    + *
    + * Author: Hieu Tran Dang <dangtranhieu2012@gmail.com>
    + *
    + * This package is free software; you can redistribute it and/or modify
    + * it under the terms of the GNU General Public License version 2 as
    + * published by the Free Software Foundation.
    + *
    + * THIS PACKAGE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR
    + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    + */
    +#include <linux/version.h>
    +#include <linux/module.h>
    +#include <linux/i2c.h>
    +#include <linux/clk.h>
    +#include <linux/of.h>
    +#include <linux/of_gpio.h>
    +#include <sound/soc.h>
    +#include <sound/tlv.h>
    +#include <sound/pcm_params.h>
    +#include "tas2505.h"
    +
    +enum {
    +	MCLK = 0,
    +	BCLK = 1,
    +};
    +
    +struct tas2505
    +{
    +	int dac_vol;
    +	int spk_vol1;
    +}tas2505_vol;
    +
    +
    +static int tas2505_dac_getvol(struct snd_kcontrol *kcontrol,
    +	struct snd_ctl_elem_value *ucontrol)
    +{
    +	ucontrol->value.integer.value[0] = tas2505_vol.dac_vol;
    +
    +	return 0;
    +}
    +
    +static int tas2505_dac_putvol(struct snd_kcontrol *kcontrol,
    +	struct snd_ctl_elem_value *ucontrol)
    +{
    +	struct snd_soc_component *component =
    +		snd_soc_kcontrol_component(kcontrol);
    +	struct soc_mixer_control *mc =
    +		(struct soc_mixer_control *)kcontrol->private_value;
    +	u8 val;
    +
    +	val = ucontrol->value.integer.value[0];
    +	val = mc->invert ? mc->max - val : val;
    +	val = (val < 0) ? 0 : val;
    +	tas2505_vol.dac_vol = val;
    +	snd_soc_component_write(component, TAS2505_DACVOL, val);
    +
    +	return 0;
    +}
    +
    +static int tas2505_spkdrv_getvol(struct snd_kcontrol *kcontrol,
    +	struct snd_ctl_elem_value *ucontrol)
    +{
    +	struct snd_soc_component *component =
    +		snd_soc_kcontrol_component(kcontrol);
    +	struct soc_mixer_control *mc =
    +		(struct soc_mixer_control *)kcontrol->private_value;
    +	unsigned int val;
    +
    +	val = snd_soc_component_read(component, TAS2505_SPKVOL1);
    +
    +	val = (val > mc->max) ? mc->max : val;
    +	val = mc->invert ? mc->max - val : val;
    +	ucontrol->value.integer.value[0] = val;
    +	tas2505_vol.spk_vol1 = val;
    +	return 0;
    +}
    +
    +static int tas2505_spkdrv_putvol(struct snd_kcontrol *kcontrol,
    +	struct snd_ctl_elem_value *ucontrol)
    +{
    +	struct snd_soc_component *component =
    +		snd_soc_kcontrol_component(kcontrol);
    +	struct soc_mixer_control *mc =
    +		(struct soc_mixer_control *)kcontrol->private_value;
    +	u8 val;
    +
    +	val = (ucontrol->value.integer.value[0] & 0x7f);
    +	val = mc->invert ? mc->max - val : val;
    +	val = (val < 0) ? 0 : val;
    +	tas2505_vol.spk_vol1 = val;
    +	snd_soc_component_write(component, TAS2505_SPKVOL1, val);
    +
    +	return 0;
    +}
    +
    +static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -6350, 50, 0);
    +static const DECLARE_TLV_DB_LINEAR(spk_drv_vol_tlv, TLV_DB_GAIN_MUTE, 0);
    +static const DECLARE_TLV_DB_SCALE(spk_amp_vol_tlv, 0, 600, 1);
    +
    +static const struct snd_kcontrol_new tas2505_snd_controls[] = {
    +	SOC_SINGLE_RANGE_EXT_TLV("DAC Playback Volume", TAS2505_DACVOL,
    +		0, 48, 0x81, 1,
    +		tas2505_dac_getvol, tas2505_dac_putvol, dac_vol_tlv),
    +	SOC_SINGLE_RANGE_EXT_TLV("Speaker Driver Volume", TAS2505_SPKVOL1,
    +		0, 0, 117, 1,
    +		tas2505_spkdrv_getvol, tas2505_spkdrv_putvol, spk_drv_vol_tlv),
    +	SOC_SINGLE_TLV("Speaker Amplifer Volume", TAS2505_SPKVOL2,
    +		4, 5, 0, spk_amp_vol_tlv),
    +};
    +
    +static const struct snd_soc_dapm_widget tas2505_dapm_widgets[] = {
    +	SND_SOC_DAPM_DAC("DAC Channel", "Playback",
    +		TAS2505_DACSETUP1, 7, 0),
    +	SND_SOC_DAPM_OUT_DRV("Speaker Driver", TAS2505_SPKAMPCTRL1,
    +		1, 0, NULL, 0),
    +	SND_SOC_DAPM_OUTPUT("Speaker"),
    +};
    +
    +static const struct snd_soc_dapm_route tas2505_audio_map[] = {
    +	{ "Speaker Driver", NULL, "DAC Channel" },
    +	{ "Speaker", NULL, "Speaker Driver" },
    +};
    +
    +static const struct reg_default tas2505_reg_defaults[] = {
    +	{ TAS2505_CLKMUX, 0x00 },
    +	{ TAS2505_PLLPR, 0x11 },
    +	{ TAS2505_PLLJ, 0x04 },
    +	{ TAS2505_PLLDMSB, 0x00 },
    +	{ TAS2505_PLLDLSB, 0x00 },
    +	{ TAS2505_NDAC, 0x01 },
    +	{ TAS2505_MDAC, 0x01 },
    +	{ TAS2505_DOSRMSB, 0x00 },
    +	{ TAS2505_DOSRLSB, 0x80 },
    +	{ TAS2505_IFACE1, 0x00 },
    +	{ TAS2505_IFACE3, 0x00 },
    +	{ TAS2505_DACSETUP1, 0x14 },
    +	{ TAS2505_DACSETUP2, 0x0c },
    +	{ TAS2505_DACVOL, 0x00 },
    +	{ TAS2505_REF_POR_LDO_BGAP_CTRL, 0x00 },
    +	{ TAS2505_LDO_CTRL, 0x0c },
    +	{ TAS2505_SPKAMPCTRL1, 0x00 },
    +	{ TAS2505_SPKVOL1, 0x00 },
    +	{ TAS2505_SPKVOL2, 0x50 },
    +	{ TAS2505_DACFLAG1, 0x00 },
    +	{ TAS2505_DACFLAG2, 0x00 },
    +	{ TAS2505_STICKYFLAG1, 0x00 },
    +	{ TAS2505_STICKYFLAG2, 0x00 },
    +	{ TAS2505_INTFLAG1, 0x00 },
    +	{ TAS2505_INTFLAG2, 0x00 },
    +	{ TAS2505_DACINSTRSET, 0x02 },
    +	{ TAS2505_DACANLGAINFLAG, 0x00 },
    +};
    +
    +static bool tas2505_volatile(struct device *dev, unsigned int reg)
    +{
    +	switch (reg) {
    +	case TAS2505_PAGECTL:
    +	case TAS2505_RESET:
    +	case TAS2505_DACFLAG1:
    +	case TAS2505_DACFLAG2:
    +	case TAS2505_STICKYFLAG1:
    +	case TAS2505_STICKYFLAG2:
    +	case TAS2505_INTFLAG1:
    +	case TAS2505_INTFLAG2:
    +	case TAS2505_DACANLGAINFLAG:
    +		return true;
    +	}
    +	return false;
    +}
    +
    +static bool tas2505_writeable(struct device *dev, unsigned int reg)
    +{
    +	switch (reg) {
    +	case TAS2505_DACFLAG1:
    +	case TAS2505_DACFLAG2:
    +	case TAS2505_STICKYFLAG1:
    +	case TAS2505_STICKYFLAG2:
    +	case TAS2505_INTFLAG1:
    +	case TAS2505_INTFLAG2:
    +	case TAS2505_DACANLGAINFLAG:
    +		return false;
    +	}
    +	return true;
    +}
    +
    +static const struct regmap_range_cfg tas2505_ranges[] = {
    +	{
    +		.range_min = 0,
    +		.range_max = 69 * 128,
    +		.selector_reg = TAS2505_PAGECTL,
    +		.selector_mask = 0xff,
    +		.selector_shift = 0,
    +		.window_start = 0,
    +		.window_len = 128,
    +	},
    +};
    +
    +static const struct regmap_config tas2505_i2c_regmap = {
    +	.reg_bits = 8,
    +	.val_bits = 8,
    +	.writeable_reg = tas2505_writeable,
    +	.volatile_reg = tas2505_volatile,
    +	.reg_defaults = tas2505_reg_defaults,
    +	.num_reg_defaults = ARRAY_SIZE(tas2505_reg_defaults),
    +	.cache_type = REGCACHE_RBTREE,
    +	.ranges = tas2505_ranges,
    +	.num_ranges = ARRAY_SIZE(tas2505_ranges),
    +	.max_register = 69 * 128,
    +};
    +
    +struct tas2505_rate_divs {
    +	u32 mclk_p;
    +	u32 rate;
    +	u8 pll_r;
    +	u8 pll_j;
    +	u16 pll_d;
    +	u8 mdac;
    +	u8 ndac;
    +	u16 dosr;
    +};
    +
    +static const struct tas2505_rate_divs tas2505_divs_mclksrc[] = {
    +	{ 12288000, 44100, 1, 7, 35, 4, 4, 128 },
    +	{ 12288000, 48000, 1, 7, 0, 7, 2, 128 },
    +	{ 2822400, 44100, 1, 8, 4672, 3, 5, 128 },
    +	{ 11289600, 44100, 1, 8, 0, 4, 8, 64 },
    +	{ 11289600, 22050, 1, 8, 0, 4, 8, 128 },
    +	{ 2822400, 44100, 1, 8, 4672, 3, 5, 128 },
    +	{ 2822400, 22050, 1, 8, 4672, 3, 5, 256 },
    +};
    +
    +static const struct tas2505_rate_divs tas2505_divs_bclksrc[] = {
    +	{ 1536000, 48000, 1, 56, 0, 2, 7, 128 },
    +	{ 1411200, 44100, 1, 60, 0, 5, 3, 128 },
    +	{ 3072000, 48000, 1, 28, 0, 2, 7, 128 },
    +	{ 2822400, 44100, 1, 30, 0, 5, 3, 128 },
    +	{ 1024000, 32000, 2, 40, 0, 5, 4, 128 },
    +	{ 2048000, 32000, 1, 40, 0, 5, 4, 128 },
    +};
    +
    +struct tas2505_priv {
    +	void *codec;
    +	struct device *dev;
    +	struct regmap *regmap;
    +	u32 sysclk;
    +	u32 clk_src;
    +	u32 rate;
    +	int rate_div_line;
    +	int pll_clkin;
    +	int frame_size;
    +	u8 p_div;
    +};
    +
    +static int tas2505_setup_pll(struct snd_soc_component *codec)
    +{
    +	struct tas2505_priv *tas2505 = snd_soc_component_get_drvdata(codec);
    +	int mclk_p = tas2505->sysclk / tas2505->p_div;
    +	struct tas2505_rate_divs *rate_divs;
    +	int match = -1;
    +	u8 p_div;
    +	int i;
    +
    +	if (tas2505->clk_src == MCLK) {
    +		for (i = 0; i < ARRAY_SIZE(tas2505_divs_mclksrc); i++) {
    +			if (
    +				tas2505_divs_mclksrc[i].rate == tas2505->rate &&
    +				tas2505_divs_mclksrc[i].mclk_p == mclk_p
    +			) {
    +				match = i;
    +				break;
    +			}
    +		}
    +
    +		if (match == -1) {
    +			dev_err(codec->dev,
    +				"Sample rate (%u) and format not supported\n",
    +				tas2505->rate);
    +			return -EINVAL;
    +		}
    +
    +		tas2505->rate_div_line = match;
    +		rate_divs = (struct tas2505_rate_divs *)tas2505_divs_mclksrc;
    +	} else {
    +		for (i = 0; i < ARRAY_SIZE(tas2505_divs_bclksrc); i++) {
    +			if (tas2505_divs_bclksrc[i].rate ==
    +				tas2505->rate) {
    +				match = i;
    +				break;
    +			}
    +		}
    +
    +		if (match == -1) {
    +			dev_err(codec->dev,
    +				"Sample rate (%u) and format not supported\n",
    +				tas2505->rate);
    +			return -EINVAL;
    +		}
    +		rate_divs = (struct tas2505_rate_divs *)tas2505_divs_bclksrc;
    +	}
    +
    +	p_div = (tas2505->p_div == 8) ? 0 : tas2505->p_div;
    +	p_div <<= TAS2505_PLLPR_P_SHIFT;
    +	p_div |= rate_divs[match].pll_r;
    +	p_div |= TAS2505_PM_MASK;
    +
    +	snd_soc_component_write(codec, TAS2505_PLLPR, p_div);
    +	snd_soc_component_write(codec, TAS2505_PLLJ,
    +		rate_divs[match].pll_j);
    +	snd_soc_component_write(codec, TAS2505_PLLDMSB,
    +		rate_divs[match].pll_d >> 8);
    +	snd_soc_component_write(codec, TAS2505_PLLDLSB,
    +		rate_divs[match].pll_d & 0xff);
    +	mdelay(15);
    +	snd_soc_component_write(codec, TAS2505_NDAC,
    +		TAS2505_PM_MASK | rate_divs[match].ndac);
    +	snd_soc_component_write(codec, TAS2505_MDAC,
    +		TAS2505_PM_MASK | rate_divs[match].mdac);
    +	snd_soc_component_write(codec, TAS2505_DOSRMSB,
    +		rate_divs[match].dosr >> 8);
    +	snd_soc_component_write(codec, TAS2505_DOSRLSB,
    +		rate_divs[match].dosr & 0xff);
    +	if (tas2505->clk_src != MCLK)
    +		snd_soc_component_update_bits(codec, TAS2505_BCLKNDIV,
    +			TAS2505_BCLKNDIV_MASK,
    +			(rate_divs[match].dosr * rate_divs[match].mdac) /
    +			tas2505->frame_size);
    +
    +	return 0;
    +}
    +
    +static int tas2505_hw_params(struct snd_pcm_substream *substream,
    +	struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
    +{
    +	struct snd_soc_component *codec = dai->component;
    +	struct tas2505_priv *tas2505 = snd_soc_component_get_drvdata(codec);
    +	u8 data = 0;
    +
    +	switch (params_width(params)) {
    +	case 16:
    +		break;
    +
    +	case 20:
    +		data = TAS2505_WORD_LEN_20BITS;
    +		break;
    +
    +	case 24:
    +		data = TAS2505_WORD_LEN_24BITS;
    +		break;
    +
    +	case 32:
    +		data = TAS2505_WORD_LEN_32BITS;
    +		break;
    +
    +	default:
    +		dev_err(codec->dev, "Unsupported width %d\n",
    +			params_width(params));
    +		return -EINVAL;
    +	}
    +	dev_info(codec->dev, "%s: bit width = %d\n",
    +				__func__, params_width(params));
    +	data <<= TAS2505_IFACE1_DATALEN_SHIFT;
    +
    +	snd_soc_component_update_bits(codec, TAS2505_IFACE1,
    +		TAS2505_IFACE1_DATALEN_MASK, data);
    +	tas2505->rate = params_rate(params);
    +	tas2505->frame_size = snd_soc_params_to_frame_size(params);
    +
    +	return tas2505_setup_pll(codec);
    +}
    +
    +static int tas2505_dac_mute(struct snd_soc_dai *dai, int mute,
    +	int stream)
    +{
    +	struct snd_soc_component *codec = dai->component;
    +
    +	if (mute) {
    +		snd_soc_component_update_bits(codec, TAS2505_DACSETUP2,
    +			TAS2505_DACSETUP2_MUTE_MASK,
    +			TAS2505_DACSETUP2_MUTE_MASK);
    +		snd_soc_component_update_bits(codec, TAS2505_DACSETUP1,
    +			0x80, 0x00);
    +	} else {
    +		snd_soc_component_update_bits(codec, TAS2505_DACSETUP1,
    +			0x80, 0x80);
    +		snd_soc_component_update_bits(codec, TAS2505_DACSETUP2,
    +			TAS2505_DACSETUP2_MUTE_MASK, 0x0);
    +	}
    +
    +	return 0;
    +}
    +
    +static int tas2505_set_dai_fmt(struct snd_soc_dai *codec_dai,
    +	unsigned int fmt)
    +{
    +	struct snd_soc_component *codec = codec_dai->component;
    +	u8 iface_reg1 = 0;
    +	u8 iface_reg3 = 0;
    +
    +	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
    +	case SND_SOC_DAIFMT_CBS_CFS:
    +		break;
    +
    +	case SND_SOC_DAIFMT_CBM_CFM:
    +		iface_reg1 |= TAS2505_IFACE1_BCLKDIR_MASK;
    +		iface_reg1 |= TAS2505_IFACE1_WCLKDIR_MASK;
    +		break;
    +
    +	default:
    +		dev_err(codec->dev,
    +			"%s SND_SOC_DAIFMT_MASTER_MASK 0x%x \n",__FUNCTION__,fmt);
    +		return -EINVAL;
    +	}
    +
    +	switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
    +	case SND_SOC_DAIFMT_NB_NF:
    +		break;
    +
    +	case SND_SOC_DAIFMT_IB_NF:
    +		iface_reg3 |= TAS2505_IFACE3_BCLKINV_MASK;
    +		break;
    +
    +	default:
    +		dev_err(codec->dev,
    +			"tas2505_set_dai_fmt SND_SOC_DAIFMT_INV_MASK 0x%x \n",fmt);
    +		return -EINVAL;
    +	}
    +
    +	switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
    +	case SND_SOC_DAIFMT_I2S:
    +		break;
    +
    +	case SND_SOC_DAIFMT_DSP_A:
    +	case SND_SOC_DAIFMT_DSP_B:
    +		iface_reg1 |= (TAS2505_DSP_MODE <<
    +			TAS2505_IFACE1_INTERFACE_SHIFT);
    +		break;
    +
    +	case SND_SOC_DAIFMT_RIGHT_J:
    +		iface_reg1 |= (TAS2505_RJF_MODE <<
    +			TAS2505_IFACE1_INTERFACE_SHIFT);
    +		break;
    +
    +	case SND_SOC_DAIFMT_LEFT_J:
    +		iface_reg1 |= (TAS2505_LJF_MODE <<
    +			TAS2505_IFACE1_INTERFACE_SHIFT);
    +		break;
    +
    +	default:
    +		dev_err(codec->dev, "Invalid DAI interface format\n");
    +		return -EINVAL;
    +	}
    +
    +	snd_soc_component_write(codec, TAS2505_IFACE1, iface_reg1);
    +	snd_soc_component_update_bits(codec, TAS2505_IFACE3,
    +		TAS2505_IFACE3_BCLKINV_MASK | TAS2505_IFACE3_BDIVCLKIN_MASK,
    +		iface_reg3);
    +
    +	return 0;
    +}
    +
    +static int tas2505_set_dai_sysclk(struct snd_soc_dai *codec_dai,
    +	int clk_id, unsigned int freq, int dir)
    +{
    +	struct snd_soc_component *codec = codec_dai->component;
    +	struct tas2505_priv *tas2505 = snd_soc_component_get_drvdata(codec);
    +	int i, x;
    +	int ret = 0;
    +
    +	dev_info(tas2505->dev, "%s: clk_id: %d, freq: %d\n",
    +		__func__, clk_id, freq);
    +
    +	if (tas2505->clk_src == MCLK) {
    +		for (i = 0; i < ARRAY_SIZE(tas2505_divs_mclksrc); i++) {
    +			for (x = 1; x < 9; x++) {
    +				if ((freq / x) == tas2505_divs_mclksrc[i].mclk_p) {
    +					tas2505->p_div = x;
    +					break;
    +				}
    +			}
    +			if (x < 9)
    +				break;
    +		}
    +
    +		if (i != ARRAY_SIZE(tas2505_divs_mclksrc)) {
    +		} else {
    +			dev_err(tas2505->dev,
    +				"Can't produce required "
    +				"PLL_CLKIN frequency\n");
    +			ret = -EINVAL;
    +		}
    +		tas2505->pll_clkin = clk_id;
    +	} else {
    +		tas2505->pll_clkin = 1;
    +		tas2505->p_div = 1;
    +	}
    +
    +	if (!ret) {
    +		snd_soc_component_write(codec, TAS2505_CLKMUX,
    +			(tas2505->pll_clkin << TAS2505_PLL_CLKIN_SHIFT) |
    +			TAS2505_CODEC_CLKIN_PLL);
    +
    +		tas2505->sysclk = freq;
    +	}
    +	return ret;
    +
    +}
    +
    +static void tas2505_power_on(struct snd_soc_component *codec)
    +{
    +	snd_soc_component_update_bits(codec, TAS2505_LDO_CTRL,
    +		TAS2505_LDO_PLL_HP_LVL_MASK, 0);
    +	snd_soc_component_update_bits(codec, TAS2505_REF_POR_LDO_BGAP_CTRL,
    +		TAS2505_REF_POR_LDO_BGAP_MASTER_REF_MASK,
    +		TAS2505_REF_POR_LDO_BGAP_MASTER_REF_MASK);
    +}
    +
    +static void tas2505_power_off(struct snd_soc_component *codec)
    +{
    +	snd_soc_component_update_bits(codec, TAS2505_REF_POR_LDO_BGAP_CTRL,
    +		TAS2505_REF_POR_LDO_BGAP_MASTER_REF_MASK, 0);
    +	snd_soc_component_update_bits(codec, TAS2505_LDO_CTRL,
    +		TAS2505_LDO_PLL_HP_LVL_MASK,
    +		TAS2505_LDO_PLL_HP_LVL_MASK);
    +}
    +
    +static int tas2505_set_bias_level(struct snd_soc_component *codec,
    +	enum snd_soc_bias_level level)
    +{
    +	int current_lvl = snd_soc_component_get_bias_level(codec);
    +	int rc = 0;
    +
    +	switch (level) {
    +	case SND_SOC_BIAS_ON:
    +		break;
    +	case SND_SOC_BIAS_PREPARE:
    +		break;
    +	case SND_SOC_BIAS_STANDBY:
    +		if (current_lvl == SND_SOC_BIAS_OFF) {
    +			tas2505_power_on(codec);
    +			dev_info(codec->dev,
    +				"%s:power on\n", __func__);
    +		} else
    +			dev_info(codec->dev,
    +				"%s:SND_SOC_BIAS_STANDBY\n",
    +				__func__);
    +		break;
    +	case SND_SOC_BIAS_OFF:
    +		if (current_lvl == SND_SOC_BIAS_STANDBY) {
    +			tas2505_power_off(codec);
    +			dev_info(codec->dev,
    +				"%s:power off\n",
    +				__func__);
    +		} else
    +			dev_info(codec->dev,
    +				"%s:SND_SOC_BIAS_OFF\n",
    +				__func__);
    +		break;
    +	default:
    +		dev_err(codec->dev, "Invalid bias level\n");
    +		rc = -EINVAL;
    +	}
    +
    +	return rc;
    +}
    +
    +static int tas2505_codec_probe(struct snd_soc_component *codec)
    +{
    +	struct tas2505_priv *tas2505 = snd_soc_component_get_drvdata(codec);
    +
    +	tas2505->codec = codec;
    +	tas2505_vol.dac_vol = 0x00;
    +	tas2505_vol.spk_vol1 = 0x00;
    +
    +	snd_soc_component_write(codec, TAS2505_RESET, 1);
    +
    +	return 0;
    +}
    +
    +static const struct snd_soc_component_driver soc_codec_driver_tas2505 = {
    +	.probe			= tas2505_codec_probe,
    +	.set_bias_level		= tas2505_set_bias_level,
    +	.suspend_bias_off	= true,
    +
    +	.controls		= tas2505_snd_controls,
    +	.num_controls		= ARRAY_SIZE(tas2505_snd_controls),
    +	.dapm_widgets		= tas2505_dapm_widgets,
    +	.num_dapm_widgets	= ARRAY_SIZE(tas2505_dapm_widgets),
    +	.dapm_routes		= tas2505_audio_map,
    +	.num_dapm_routes	= ARRAY_SIZE(tas2505_audio_map),
    +};
    +
    +static const struct snd_soc_dai_ops tas2505_dai_ops = {
    +	.hw_params	= tas2505_hw_params,
    +	.set_sysclk	= tas2505_set_dai_sysclk,
    +	.set_fmt	= tas2505_set_dai_fmt,
    +	.mute_stream	= tas2505_dac_mute,
    +};
    +
    +static struct snd_soc_dai_driver tas2505_dai_driver[] = {
    +	{
    +		.name = "tas2505-hifi",
    +		.playback = {
    +			.stream_name	= "Playback",
    +			.channels_min	= 1,
    +			.channels_max	= 2,
    +			.rates		= TAS2505_RATES,
    +			.formats	= TAS2505_FORMATS,
    +		},
    +		.ops = &tas2505_dai_ops,
    +		.symmetric_rate = 1,
    +	},
    +};
    +
    +static int tas2505_i2c_probe(struct i2c_client *i2c,
    +	const struct i2c_device_id *id)
    +{
    +	struct tas2505_priv *tas2505;
    +	struct device_node *np = i2c->dev.of_node;
    +	const struct regmap_config *regmap_config = &tas2505_i2c_regmap;
    +	int ret;
    +
    +	tas2505 = devm_kzalloc(&i2c->dev, sizeof(*tas2505), GFP_KERNEL);
    +	if (tas2505 == NULL)
    +		return -ENOMEM;
    +
    +	tas2505->regmap = devm_regmap_init_i2c(i2c, regmap_config);
    +	if (IS_ERR(tas2505->regmap)) {
    +		ret = PTR_ERR(tas2505->regmap);
    +		dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
    +			ret);
    +		return ret;
    +	}
    +
    +	ret = of_get_named_gpio(np, "gpio-reset", 0);
    +	if ((ret > 0) && gpio_is_valid(ret)) {
    +		devm_gpio_request_one(&i2c->dev, ret, GPIOF_OUT_INIT_HIGH,
    +			"reset");
    +	}
    +
    +	ret = of_property_read_u32(np, "clock-source",
    +			&tas2505->clk_src);
    +
    +	dev_info(&i2c->dev, "%s: clock-source = %s\n", __func__,
    +		tas2505->clk_src?"BCLK":"MCLK");
    +
    +	tas2505->dev = &i2c->dev;
    +
    +	dev_set_drvdata(tas2505->dev, tas2505);
    +
    +	return snd_soc_register_component(&i2c->dev,
    +		&soc_codec_driver_tas2505, tas2505_dai_driver,
    +		ARRAY_SIZE(tas2505_dai_driver));
    +}
    +
    +static void tas2505_i2c_remove(struct i2c_client *i2c)
    +{
    +
    +	snd_soc_unregister_component(&i2c->dev);
    +
    +	//return 0;
    +}
    +
    +static const struct of_device_id tas2505_of_match[] = {
    +	{ .compatible = "ti,tas2505" },
    +	{},
    +};
    +MODULE_DEVICE_TABLE(of, tas2505_of_match);
    +
    +static const struct i2c_device_id tas2505_i2c_id[] = {
    +	{ "tas2505", 0 },
    +	{}
    +};
    +MODULE_DEVICE_TABLE(i2ic, tas2505_i2c_id);
    +
    +static struct i2c_driver tas2505_i2c_driver = {
    +	.driver = {
    +		.name		= "tas2505-codec",
    +		.of_match_table	= of_match_ptr(tas2505_of_match),
    +	},
    +	.probe		= tas2505_i2c_probe,
    +	.remove		= tas2505_i2c_remove,
    +	.id_table	= tas2505_i2c_id,
    +};
    +
    +module_i2c_driver(tas2505_i2c_driver);
    +
    +MODULE_DESCRIPTION("ASoC TAS2505 codec driver");
    +MODULE_AUTHOR("Hieu Tran Dang <dangtranhieu2012@gmail.com>");
    +MODULE_LICENSE("GPL");
    diff --git a/sound/soc/ti/tas2505.h b/sound/soc/ti/tas2505.h
    new file mode 100644
    index 000000000000..3e55df45f894
    --- /dev/null
    +++ b/sound/soc/ti/tas2505.h
    @@ -0,0 +1,104 @@
    +/*
    + * ALSA SoC TAS2505 codec driver
    + *
    + * Author: Hieu Tran Dang <dangtranhieu2012@gmail.com>
    + *
    + * This package is free software; you can redistribute it and/or modify
    + * it under the terms of the GNU General Public License version 2 as
    + * published by the Free Software Foundation.
    + *
    + * THIS PACKAGE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR
    + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    + */
    +
    +#ifndef _TAS2505_H
    +#define _TAS2505_H
    +
    +#define TAS2505_RATES	(SNDRV_PCM_RATE_8000_96000)
    +#define TAS2505_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
    +	SNDRV_PCM_FMTBIT_S24_LE | \
    +	SNDRV_PCM_FMTBIT_S32_LE)
    +
    +#define TAS2505_REG(page, reg)	((page * 128) + reg)
    +
    +#define TAS2505_PAGECTL			TAS2505_REG(0, 0)
    +#define TAS2505_RESET			TAS2505_REG(0, 1)
    +#define TAS2505_CLKMUX			TAS2505_REG(0, 4)
    +#define TAS2505_PLLPR			TAS2505_REG(0, 5)
    +#define TAS2505_PLLJ			TAS2505_REG(0, 6)
    +#define TAS2505_PLLDMSB			TAS2505_REG(0, 7)
    +#define TAS2505_PLLDLSB			TAS2505_REG(0, 8)
    +#define TAS2505_NDAC			TAS2505_REG(0, 11)
    +#define TAS2505_MDAC			TAS2505_REG(0, 12)
    +#define TAS2505_DOSRMSB			TAS2505_REG(0, 13)
    +#define TAS2505_DOSRLSB			TAS2505_REG(0, 14)
    +#define TAS2505_IFACE1			TAS2505_REG(0, 27)
    +#define TAS2505_IFACE3			TAS2505_REG(0, 29)
    +#define TAS2505_BCLKNDIV		TAS2505_REG(0, 30)
    +#define TAS2505_DACFLAG1		TAS2505_REG(0, 37)
    +#define TAS2505_DACFLAG2		TAS2505_REG(0, 38)
    +#define TAS2505_STICKYFLAG1		TAS2505_REG(0, 42)
    +#define TAS2505_INTFLAG1		TAS2505_REG(0, 43)
    +#define TAS2505_STICKYFLAG2		TAS2505_REG(0, 44)
    +#define TAS2505_INTFLAG2		TAS2505_REG(0, 46)
    +#define TAS2505_DACINSTRSET		TAS2505_REG(0, 60)
    +#define TAS2505_DACSETUP1		TAS2505_REG(0, 63)
    +#define TAS2505_DACSETUP2		TAS2505_REG(0, 64)
    +#define TAS2505_DACVOL			TAS2505_REG(0, 65)
    +#define TAS2505_REF_POR_LDO_BGAP_CTRL	TAS2505_REG(1, 1)
    +#define TAS2505_LDO_CTRL		TAS2505_REG(1, 2)
    +#define TAS2505_PLAYBACKCONF1		TAS2505_REG(1, 3)
    +#define TAS2505_SPKAMPCTRL1		TAS2505_REG(1, 45)
    +#define TAS2505_SPKVOL1			TAS2505_REG(1, 46)
    +#define TAS2505_SPKVOL2			TAS2505_REG(1, 48)
    +#define TAS2505_DACANLGAINFLAG		TAS2505_REG(1, 63)
    +
    +#define TAS2505_PLLPR_P_MASK				(0x70)
    +#define TAS2505_PLLPR_R_MASK				(0xf)
    +#define TAS2505_PLL_DAC_MASK				(0x7f)
    +#define TAS2505_BCLKNDIV_MASK				(0x7f)
    +#define TAS2505_IFACE1_DATALEN_MASK			(0x30)
    +#define TAS2505_IFACE1_WCLKDIR_MASK			(0x4)
    +#define TAS2505_IFACE1_BCLKDIR_MASK			(0x8)
    +#define TAS2505_IFACE1_INTERFACE_MASK			(0xc0)
    +#define TAS2505_IFACE3_BDIVCLKIN_MASK			(0x1)
    +#define TAS2505_IFACE3_BCLKINV_MASK			(0x8)
    +#define TAS2505_DACSETUP1_PATH_CTRL_MSK			(0x30)
    +#define TAS2505_DACSETUP2_MUTE_MASK			(0x8)
    +#define TAS2505_PM_MASK					(0x80)
    +#define TAS2505_LDO_PLL_HP_LVL_MASK			(0x8)
    +#define TAS2505_REF_POR_LDO_BGAP_MASTER_REF_MASK	(0x10)
    +#define TAS2505_SPKVOL2_MSK				(0x70)
    +#define TAS2505_CODEC_CLKIN_MSK				(0x3)
    +#define TAS2505_PLL_INPUT_CLK_MSK			(0xC)
    +#define TAS2505_SPKAMPCTRL1_SPKDRV_MSK			BIT(1)
    +
    +#define TAS2505_PLLPR_P_SHIFT			(4)
    +#define TAS2505_PLL_CLKIN_SHIFT			(2)
    +#define TAS2505_IFACE1_DATALEN_SHIFT		(4)
    +#define TAS2505_IFACE1_INTERFACE_SHIFT		(6)
    +#define TAS2505_IFACE3_BCLKINV_SHIFT		(4)
    +#define TAS2505_SPKVOL2_6DB_SHIFT		(4)
    +#define TAS2505_DACSETUP1_PATH_CTRL_SHIFT	(4)
    +
    +#define TAS2505_WORD_LEN_20BITS			(1)
    +#define TAS2505_WORD_LEN_24BITS			(2)
    +#define TAS2505_WORD_LEN_32BITS			(3)
    +
    +#define TAS2505_DSP_MODE			(1)
    +#define TAS2505_RJF_MODE			(2)
    +#define TAS2505_LJF_MODE			(3)
    +
    +#define TAS2505_PLL_CLKIN_MCLK			(0)
    +#define TAS2505_PLL_CLKIN_BCLK			(1)
    +#define TAS2505_PLL_CLKIN_GPIO			(2)
    +#define TAS2505_PLL_CLKIN_DIN			(3)
    +#define TAS2505_CODEC_CLKIN_PLL			(3)
    +#define TAS2505_SPKVOL2_MUTE			(0)
    +#define TAS2505_SPKVOL2_6DB			(1)
    +#define TAS2505_DACSETUP1_PATH_CTRL_LRDIV2	(3)
    +#define TAS2505_SPKAMPCTRL1_SPKDRV_PWD		(0)
    +#define TAS2505_SPKAMPCTRL1_SPKDRV_PWU		(1)
    +
    +#endif
    

  • Hi Paul, 

    I didn't see SCL & SDA connect with 3.3V pull up, the device doesn't have internal pull up, also AVDD&DVDD should be 1.8V

    Regards

    Kevin

  • Hell Kevin, 

    Thank for your hint; we will check. 

    Two things need to confirm:

    1) we need this sound driver [ compatible = "simple-audio-card";] to work with TAS2505, right?

    2) this pin muxing is correct?

    main_mcasp1_pins_default: main-mcasp1-pins-default {
    pinctrl-single,pins = <
    AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
    AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
    AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
    AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
    >;
    };

    Thanks.

  • Hi Paul,

    1) Yes, this is sound card compatible, you can follow with https://git.ti.com/cgit/lpaa-android-drivers/tas2505-linux-driver/tree/dts.readme

    2) This is related to the platform, I'm not responsible for this part, pls confirm it in guideline or our EP team.

    Regards

    Kevin

  • Hello Kevin, 

    We have pull up registers and AVDD&DVDD  1.8V (we tested and confirmed 1.8v). 

    Now, i will test new pin muxing below; if not work, i may reach EP team. If you have any other suggestion, please me know. Thanks.

    main_mcasp1_pins_default: main-mcasp1-pins-default {
    pinctrl-single,pins = <
    AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
    AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
    AM62X_IOPAD(0x08c, PIN_INPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
    AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
    >;
    };

  • You can connect device with i2ctool first, then continue to register sound card.

  • Hello Kevin

    May you detail how to proceed? 

    Below is the status of source card.

  • We have some experience on BBB Board(AM335x), so you can refer to this document (The DTS part): https://git.ti.com/cgit/lpaa-android-drivers/pcmdevice-linux-driver/tree/doc/Guideline%20for%20PCMDEVICE%20driver%20on%20Linux.pdf

    Pls make sure put codec{ sound-dai = <&tas2505>;} in sound dai-link.

                            codec {

                                    sound-dai = <&tas2505>;
                            };
  • Hello Kevin, 

    I cannot open the given pdf link; file error.

    yes, we defined that part of dts as below, we followed dts.readme as you suggsted.

    Something else we miss config? Thanks.

    tas2505: tas2505@18 {
    #sound-dai-cells = <0>;
    compatible = "ti,tas2505";
    reg = <0x18>;
    //reset-gpios = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
    gpio-reset = <&mcu_gpio0 3 GPIO_ACTIVE_LOW>;
    clock-source = <1>;/* 0: MCLK, 1: BCLK */
    status = "ok";
    };

    /* follow tas2505 */
    clk_mcasp1_fixed: clk_mcasp1_fixed {
    #clock-cells = <0>;
    compatible = "fixed-clock";
    //clock-frequency = <24576000>;
    clock-frequency = <12288000>;
    };

    clk_mcasp1: clk_mcasp1 {
    #clock-cells = <0>;
    compatible = "gpio-gate-clock";
    clocks = <&clk_mcasp1_fixed>;
    //enable-gpios = <&gpio1 27 0>; // BeagleBone Black Clk enable on GPIO1_27
    };

    sound {
    compatible = "simple-audio-card";
    simple-audio-card,name = "tas2505";
    simple-audio-card,dai-link@0 {
    format = "i2s";
    bitclock-master = <&sound0_master>;
    frame-master = <&sound0_master>;
    sound0_master: cpu {
    sound-dai = <&mcasp1>;
    clocks = <&clk_mcasp1>;
    };

    codec {
    sound-dai = <&tas2505>;
    };
    };
    };

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

  • Hi Pual,

    You need to download the pdf file, https://git.ti.com/cgit/lpaa-android-drivers/pcmdevice-linux-driver/tree/doc

    Sorry, I think there's nothing more I can do for you, pls debug it in driver and system.

    Thanks

    Kevin

  • Hello Kevin

    We found after tas2505 driver is loaded (0x18), i2c is busy. 
    Is it normal? If not, may you suggest? Thanks.

    ===============Check Log====================

    root@am62xx-evm:/sys/bus/i2c# ls devices/
    1-0018 1-0022 1-0068 i2c-0 i2c-1
    root@am62xx-evm:/sys/bus/i2c# i2cget -y 1 0x18 0x00
    Error: Could not set address to 0x18: Device or resource busy
    root@am62xx-evm:/sys/bus/i2c# i2cget -y 1 0x22 0x00
    Error: Read failed
    root@am62xx-evm:/sys/bus/i2c# i2cget -y 1 0x68 0x00
    Error: Read failed
    root@am62xx-evm:/sys/bus/i2c# dmesg | grep -i tas2505
    [ 1.140585] tas2505-codec 1-0018: tas2505_i2c_probe: clock-source = MCLK
    root@am62xx-evm:/sys/bus/i2c# 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^HY^H^H
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    root@am62xx-evm:/sys/bus/i2c# i2cdetect -r 0
    WARNING! This program can confuse your I2C bus, cause data loss and worse!
    I will probe file /dev/i2c-0 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: -- -- -- -- 14 -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    root@am62xx-evm:/sys/bus/i2c#

  • I think from the i2cdetect result, the i2c of tas2505 is not working, please check with Oscilloscope, maybe not an issue from SW side.

  • Hello Kevin, 

    The wave form below is genreated after we issued a i2cdetect command.

    However, when we  issued  i2cget  to address of 0x18, it shows below as below, also on Oscilloscope we don't see any wave form is shown. 

    # i2cget -y 1 0x18 0x00
    Error: Could not set address to 0x18: Device or resource busy

    Could you let us know how to solve this issue?

    (we concern about i2c, so we removed all attached i2c nodes (both software and hardware) on i2c bus, except 0x18, but the result is the same)

  • That means NO ACK from i2c bus, what's the level of RST pin? it's active low, so it should be high, also, did you try another chip?, this chip seems no ACK at all

  • Hello Kevin

     1) I have two custom-boards, they are the same symptrom.

     2)  The RST Pin of TAS2505 is always HIGH (we measure its voltage) after power on; unable to control to low. 

         This is our dts setting for the  reset poin:     gpio-reset = <&main_gpio0 3 GPIO_ACTIVE_LOW>;

    3) We try to control the gpoi-reset pint but 

       # gpioset gpiochip0 3=0
       # gpioset gpiochip0 3=1

    Please provide additonal guideline. Thanks.

  • Not relate to dts

    Looks strange in waveform, it doesn't look like 0x18, maybe the write address is incorrect.

    Kevin

  • Hello Kevin

    The waveform is the output of i2cdetect -y 1 command.

    # i2cget -y 1 0x18 0x00 => no waveform is generated/shown

  • Hello Kevin

    I try to debug my dts, and i found the snd interface is created.

    However, i could not use aplay. 

    root@am62xx-evm:/tmp/myusb# aplay BabyElephantWalk60_Signed16bit_44100Hz.wav
    Playing WAVE 'BabyElephantWalk60_Signed16bit_44100Hz.wav' : [10272.732223] tas2505-codec 0-0018: tas2505_hw_params: bit width = 16
    Signed 16 bit Little Endian, Rate 44100 Hz, Mono
    [10272.741928] tas2505-codec 0-0018: Sample rate (44100) and format not supported
    [10272.753353] tas2505-codec 0-0018: ASoC: error at snd_soc_dai_hw_params on tas2505-hifi: -22
    [10272.761764] davinci-mcasp.0-tas2505-hifi: ASoC: error at __soc_pcm_hw_params on davinci-mcasp.0-tas2505-hifi: -22
    aplay: set_params:1416: Unable to install hw params:
    ACCESS: RW_INTERLEAVED
    FORMAT: S16_LE
    SUBFORMAT: STD
    SAMPLE_BITS: 16
    FRAME_BITS: 16
    CHANNELS: 1
    RATE: 44100
    PERIOD_TIME: (125011 125012)
    PERIOD_SIZE: 5513
    PERIOD_BYTES: 11026
    PERIODS: 4
    BUFFER_TIME: (500045 500046)
    BUFFER_SIZE: 22052
    BUFFER_BYTES: 44104
    TICK_TIME: 0

  • Below is kernel log. thanks.

    U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    SPL initial stack usage: 13376 bytes
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE:  BL31: Built : 00:42:57, Jan 13 2023
    
    U-Boot SPL 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    SPL initial stack usage: 1856 bytes
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    
    
    U-Boot 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    
    SoC:   AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 80, trying to read at 81
    Reading on-board EEPROM at 0x51 failed -1
    DRAM:  2 GiB
    Core:  70 devices, 31 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial
    Out:   serial
    Err:   serial
    EEPROM not available at 80, trying to read at 81
    Reading on-board EEPROM at 0x51 failed -1
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    Failed to load 'boot.scr'
    574 bytes read in 14 ms (40 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    20578816 bytes read in 839 ms (23.4 MiB/s)
    57469 bytes read in 20 ms (2.7 MiB/s)
    Working FDT set to 88000000
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
    Working FDT set to 88000000
    ERROR: reserving fdt memory region failed (addr=ff700000 size=8ca000 flags=4)
       Loading Device Tree to 000000008feee000, end 000000008fffffff ... OK
    Working FDT set to 8feee000
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [    0.000000] Linux version 6.1.33-g40c32565ca (oe-user@oe-host) (aarch64-oe-linux-gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT Thu Jul  6 14:17:24 UTC 2023
    [    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 0x00000000f7600000, 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-0x00000000ffffffff]
    [    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]   node   0: [mem 0x00000000a0000000-0x00000000ff6fffff]
    [    0.000000]   node   0: [mem 0x00000000ff700000-0x00000000fffc9fff]
    [    0.000000]   node   0: [mem 0x00000000fffca000-0x00000000ffffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff]
    [    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.2
    [    0.000000] percpu: Embedded 19 pages/cpu s38376 r8192 d31256 u77824
    [    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: 516096
    [    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=94574a01-02 rw rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] Memory: 1838092K/2097152K available (12416K kernel code, 1280K rwdata, 4068K rodata, 2176K init, 493K bss, 127988K 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.000001] sched_clock: 58 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [    0.008573] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
    [    0.019265] pid_max: default: 32768 minimum: 301
    [    0.024047] LSM: Security Framework initializing
    [    0.028907] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.036492] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.046551] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.054030] cblist_init_generic: Setting shift to 2 and lim to 1.
    [    0.060340] cblist_init_generic: Setting shift to 2 and lim to 1.
    [    0.066761] rcu: Hierarchical SRCU implementation.
    [    0.071668] rcu:     Max phase no-delay instances is 1000.
    [    0.077330] Platform MSI: msi-controller@1820000 domain created
    [    0.083699] PCI/MSI: /bus@f0000/interrupt-controller@1800000/msi-controller@1820000 domain created
    [    0.093555] EFI services will not be available.
    [    0.098529] smp: Bringing up secondary CPUs ...
    [    0.103937] Detected VIPT I-cache on CPU1
    [    0.104079] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000
    [    0.104104] GICv3: CPU1: using allocated LPI pending table @0x0000000080060000
    [    0.104172] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
    [    0.105007] Detected VIPT I-cache on CPU2
    [    0.105100] GICv3: CPU2: found redistributor 2 region 0:0x00000000018c0000
    [    0.105121] GICv3: CPU2: using allocated LPI pending table @0x0000000080070000
    [    0.105161] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
    [    0.105867] Detected VIPT I-cache on CPU3
    [    0.105974] GICv3: CPU3: found redistributor 3 region 0:0x00000000018e0000
    [    0.105987] GICv3: CPU3: using allocated LPI pending table @0x0000000080080000
    [    0.106024] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
    [    0.106114] smp: Brought up 1 node, 4 CPUs
    [    0.185867] SMP: Total of 4 processors activated.
    [    0.190679] CPU features: detected: 32-bit EL0 Support
    [    0.195951] CPU features: detected: CRC32 instructions
    [    0.201286] CPU: All CPU(s) started at EL2
    [    0.205484] alternatives: applying system-wide alternatives
    [    0.213401] devtmpfs: initialized
    [    0.226301] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [    0.236340] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
    [    0.248862] pinctrl core: initialized pinctrl subsystem
    [    0.254997] DMI not present or invalid.
    [    0.259670] NET: Registered PF_NETLINK/PF_ROUTE protocol family
    [    0.267136] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
    [    0.274771] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
    [    0.282896] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
    [    0.291109] audit: initializing netlink subsys (disabled)
    [    0.296850] audit: type=2000 audit(0.188:1): state=initialized audit_enabled=0 res=1
    [    0.297355] thermal_sys: Registered thermal governor 'step_wise'
    [    0.304780] thermal_sys: Registered thermal governor 'power_allocator'
    [    0.310970] cpuidle: using governor menu
    [    0.321871] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
    [    0.328925] ASID allocator initialised with 65536 entries
    [    0.348570] platform 30200000.dss: Fixed dependency cycle(s) with /display
    [    0.358429] KASLR disabled due to lack of seed
    [    0.370537] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
    [    0.377519] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
    [    0.383929] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
    [    0.390875] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
    [    0.397283] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
    [    0.404222] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
    [    0.410630] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
    [    0.417569] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
    [    0.426071] k3-chipinfo 43000014.chipid: Family:AM62X rev:SR1.0 JTAGID[0x0bb7e02f] Detected
    [    0.437272] iommu: Default domain type: Translated
    [    0.442334] iommu: DMA domain TLB invalidation policy: strict mode
    [    0.449078] SCSI subsystem initialized
    [    0.453350] usbcore: registered new interface driver usbfs
    [    0.459014] usbcore: registered new interface driver hub
    [    0.464498] usbcore: registered new device driver usb
    [    0.470360] pps_core: LinuxPPS API ver. 1 registered
    [    0.475439] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.484791] PTP clock support registered
    [    0.488939] EDAC MC: Ver: 3.0.0
    [    0.493273] omap-mailbox 29000000.mailbox: omap mailbox rev 0x66fc9100
    [    0.500510] FPGA manager framework
    [    0.504109] Advanced Linux Sound Architecture Driver Initialized.
    [    0.511502] clocksource: Switched to clocksource arch_sys_counter
    [    0.518066] VFS: Disk quotas dquot_6.6.0
    [    0.522130] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [    0.530414] NET: Registered PF_INET protocol family
    [    0.535742] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
    [    0.545104] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
    [    0.553935] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.561878] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
    [    0.570100] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
    [    0.578213] TCP: Hash tables configured (established 16384 bind 16384)
    [    0.585182] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [    0.592123] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [    0.599719] NET: Registered PF_UNIX/PF_LOCAL protocol family
    [    0.606119] RPC: Registered named UNIX socket transport module.
    [    0.612205] RPC: Registered udp transport module.
    [    0.617017] RPC: Registered tcp transport module.
    [    0.621825] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.628418] NET: Registered PF_XDP protocol family
    [    0.633333] PCI: CLS 0 bytes, default 64
    [    0.638312] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
    [    0.648749] Initialise system trusted keyrings
    [    0.653675] workingset: timestamp_bits=46 max_order=19 bucket_order=0
    [    0.666430] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.673241] NFS: Registering the id_resolver key type
    [    0.678476] Key type id_resolver registered
    [    0.682754] Key type id_legacy registered
    [    0.686927] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [    0.693786] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
    [    0.701580] 9p: Installing v9fs 9p2000 file system support
    [    0.741976] Key type asymmetric registered
    [    0.746169] Asymmetric key parser 'x509' registered
    [    0.751217] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.758992] io scheduler mq-deadline registered
    [    0.763631] io scheduler kyber registered
    [    0.771570] pinctrl-single 4084000.pinctrl: 34 pins, size 136
    [    0.778256] pinctrl-single f4000.pinctrl: 171 pins, size 684
    [    0.785244] pinctrl-single a40000.pinctrl: 512 pins, size 2048
    [    0.793831] clk_mcasp1: gpio_clk_driver_probe: Can't get 'enable' named GPIO property
    [    0.801872] gpio-clk: probe of clk_mcasp1 failed with error -2
    [    0.814068] Serial: 8250/16550 driver, 12 ports, IRQ sharing enabled
    [    0.831845] loop: module loaded
    [    0.836705] megasas: 07.719.03.00-rc1
    [    0.845294] tun: Universal TUN/TAP device driver, 1.6
    [    0.851340] thunder_xcv, ver 1.0
    [    0.854694] thunder_bgx, ver 1.0
    [    0.858029] nicpf, ver 1.0
    [    0.861257] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
    [    0.868647] hns3: Copyright (c) 2017 Huawei Corporation.
    [    0.874146] hclge is initializing
    [    0.877554] e1000: Intel(R) PRO/1000 Network Driver
    [    0.882542] e1000: Copyright (c) 1999-2006 Intel Corporation.
    [    0.888457] e1000e: Intel(R) PRO/1000 Network Driver
    [    0.893538] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
    [    0.899626] igb: Intel(R) Gigabit Ethernet Network Driver
    [    0.905145] igb: Copyright (c) 2007-2014 Intel Corporation.
    [    0.910867] igbvf: Intel(R) Gigabit Virtual Function Network Driver
    [    0.917283] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
    [    0.923503] sky2: driver version 1.30
    [    0.928089] VFIO - User Level meta-driver version: 0.3
    [    0.934303] usbcore: registered new interface driver usb-storage
    [    0.941215] i2c_dev: i2c /dev entries driver
    [    0.948139] sdhci: Secure Digital Host Controller Interface driver
    [    0.954496] sdhci: Copyright(c) Pierre Ossman
    [    0.959517] Synopsys Designware Multimedia Card Interface Driver
    [    0.966165] sdhci-pltfm: SDHCI platform and OF driver helper
    [    0.972979] ledtrig-cpu: registered to indicate activity on CPUs
    [    0.979376] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
    [    0.986419] usbcore: registered new interface driver usbhid
    [    0.992126] usbhid: USB HID core driver
    [    0.997523] optee: probing for conduit method.
    [    1.002145] optee: revision 3.20 (8e74d476)
    [    1.002536] optee: dynamic shared memory is enabled
    [    1.012119] optee: initialized driver
    [    1.019417] Initializing XFRM netlink socket
    [    1.023892] NET: Registered PF_PACKET protocol family
    [    1.029242] 9pnet: Installing 9P2000 support
    [    1.033692] Key type dns_resolver registered
    [    1.038589] registered taskstats version 1
    [    1.042838] Loading compiled-in X.509 certificates
    [    1.057692] ti-sci 44043000.system-controller: ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    [    1.132812] tas2505-codec 0-0018: tas2505_i2c_probe: clock-source = MCLK
    [    1.139783] omap_i2c 20010000.i2c: bus 0 rev0.12 at 100 kHz
    [    1.145803] ti-sci-intr 4210000.interrupt-controller: Interrupt Router 5 domain created
    [    1.154179] ti-sci-intr bus@f0000:interrupt-controller@a00000: Interrupt Router 3 domain created
    [    1.163463] ti-sci-inta 48000000.interrupt-controller: Interrupt Aggregator domain 28 created
    [    1.173650] ti-udma 485c0100.dma-controller: Number of rings: 82
    [    1.182001] ti-udma 485c0100.dma-controller: Channels: 48 (bchan: 18, tchan: 12, rchan: 18)
    [    1.193542] ti-udma 485c0000.dma-controller: Number of rings: 150
    [    1.204108] ti-udma 485c0000.dma-controller: Channels: 35 (tchan: 20, rchan: 15)
    [    1.214628] printk: console [ttyS2] disabled
    [    1.219154] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 239, base_baud = 3000000) is a 8250
    [    1.228067] printk: console [ttyS2] enabled
    [    1.228067] printk: console [ttyS2] enabled
    [    1.236528] printk: bootconsole [ns16550a0] disabled
    [    1.236528] printk: bootconsole [ns16550a0] disabled
    [    1.247663] omap8250 2840000.serial: PM domain pd:155 will not be powered off
    [    1.255143] 2840000.serial: ttyS4 at MMIO 0x2840000 (irq = 241, base_baud = 3000000) is a 8250
    [    1.265101] 2860000.serial: ttyS6 at MMIO 0x2860000 (irq = 242, base_baud = 3000000) is a 8250
    [    1.276896] spi-nor spi0.0: s28hs512t (65536 Kbytes)
    [    1.282010] 7 fixed-partitions partitions found on MTD device fc40000.spi.0
    [    1.288980] Creating 7 MTD partitions on "fc40000.spi.0":
    [    1.294374] 0x000000000000-0x000000080000 : "ospi.tiboot3"
    [    1.301343] 0x000000080000-0x000000280000 : "ospi.tispl"
    [    1.307905] 0x000000280000-0x000000680000 : "ospi.u-boot"
    [    1.314513] 0x000000680000-0x0000006c0000 : "ospi.env"
    [    1.320865] 0x0000006c0000-0x000000700000 : "ospi.env.backup"
    [    1.327895] 0x000000800000-0x000003fc0000 : "ospi.rootfs"
    [    1.334628] 0x000003fc0000-0x000004000000 : "ospi.phypattern"
    [    1.343477] davinci_mdio 8000f00.mdio: Configuring MDIO in manual mode
    [    1.387523] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [    1.396953] mdio_bus 8000f00.mdio: MDIO device at address 1 is missing.
    [    1.403583] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
    [    1.411716] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA01103, cpsw version 0x6BA81103 Ports: 3 quirks:00000006
    [    1.424740] am65-cpsw-nuss 8000000.ethernet: Use random MAC address
    [    1.431015] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.5
    [    1.438140] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
    [    1.444754] pps pps0: new PPS source ptp0
    [    1.449095] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:1
    [    1.459764] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
    [    1.472456] mmc0: CQHCI version 5.10
    [    1.480718] omap8250 2840000.serial: Failed to create device link (0x180) with 4201000.gpio
    [    1.498696] mmc2: CQHCI version 5.10
    [    1.498707] mmc1: CQHCI version 5.10
    [    1.513158] mmc0: SDHCI controller on fa10000.mmc [fa10000.mmc] using ADMA 64-bit
    [    1.520337] tas2505-codec 0-0018: tas2505_codec_probe: Probe finished
    [    1.530430] debugfs: Directory 'pd:182' with parent 'pm_genpd' already present!
    [    1.546169] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit
    [    1.548259] mmc2: SDHCI controller on fa20000.mmc [fa20000.mmc] using ADMA 64-bit
    [    1.565763] ALSA device list:
    [    1.568777]   #0: tas2505
    [    1.572107] Waiting for root device PARTUUID=94574a01-02...
    [    1.582964] mmc0: Command Queue Engine enabled
    [    1.587449] mmc0: new HS200 MMC card at address 0001
    [    1.591927] mmc1: new high speed SDXC card at address aaaa
    [    1.593526] mmcblk0: mmc0:0001 0IM20E 29.6 GiB
    [    1.598831] mmcblk1: mmc1:aaaa SH64G 59.5 GiB
    [    1.605351] mmcblk0boot0: mmc0:0001 0IM20E 31.5 MiB
    [    1.610119]  mmcblk1: p1 p2
    [    1.613372] mmcblk0boot1: mmc0:0001 0IM20E 31.5 MiB
    [    1.620810] mmcblk0rpmb: mmc0:0001 0IM20E 4.00 MiB, chardev (240:0)
    [    1.684798] EXT4-fs (mmcblk1p2): recovery complete
    [    1.689744] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Quota mode: none.
    [    1.698425] VFS: Mounted root (ext4 filesystem) on device 179:34.
    [    1.706076] devtmpfs: mounted
    [    1.710730] Freeing unused kernel memory: 2176K
    [    1.715453] Run /sbin/init as init process
    [    3.184788] systemd[1]: System time before build time, advancing clock.
    [    3.462697] NET: Registered PF_INET6 protocol family
    [    3.470537] Segment Routing with IPv6
    [    3.474430] In-situ OAM (IOAM) with IPv6
    [    3.627828] 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)
    [    3.660775] systemd[1]: Detected architecture arm64.
    
    Welcome to Arago 2023.04!
    
    [    3.795067] systemd[1]: Hostname set to <am62xx-evm>.
    [    4.093500] systemd-sysv-generator[157]: SysV service '/etc/init.d/dropbear' 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.
    [    4.169646] systemd-sysv-generator[157]: 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.
    [    4.194890] systemd-sysv-generator[157]: SysV service '/etc/init.d/resize_rootfs.sh' 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.
    [    4.220218] systemd-sysv-generator[157]: SysV service '/etc/init.d/single' 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.
    [    4.246651] systemd-sysv-generator[157]: SysV service '/etc/init.d/docker.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.
    [    4.271346] systemd-sysv-generator[157]: SysV service '/etc/init.d/sysrepo' 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.
    [    4.295224] systemd-sysv-generator[157]: SysV service '/etc/init.d/umountfs' 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.
    [    4.320920] systemd-sysv-generator[157]: SysV service '/etc/init.d/halt' 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.
    [    4.344518] systemd-sysv-generator[157]: SysV service '/etc/init.d/save-rtc.sh' 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.
    [    4.370023] systemd-sysv-generator[157]: SysV service '/etc/init.d/telnetd' 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.
    [    4.393877] systemd-sysv-generator[157]: SysV service '/etc/init.d/inetd.busybox' 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.
    [    4.420618] systemd-sysv-generator[157]: SysV service '/etc/init.d/netperf' 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.
    [    4.445351] systemd-sysv-generator[157]: SysV service '/etc/init.d/netopeer2-server' 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.
    [    4.472422] systemd-sysv-generator[157]: SysV service '/etc/init.d/sendsigs' 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.
    [    4.496930] systemd-sysv-generator[157]: SysV service '/etc/init.d/psplash.sh' 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.
    [    4.521090] systemd-sysv-generator[157]: SysV service '/etc/init.d/reboot' 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.
    [    4.545650] systemd-sysv-generator[157]: SysV service '/etc/init.d/umountnfs.sh' 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.
    [    5.023234] systemd[1]: Configuration file /etc/systemd/system/ti-apps-launcher.service is marked executable. Please remove executable permission bits. Proceeding anyway.
    [    5.124972] systemd[1]: /lib/systemd/system/startwlansta.service:7: Unknown key name 'After' in section 'Service', ignoring.
    [    5.138475] systemd[1]: /lib/systemd/system/startwlanap.service:7: Unknown key name 'After' in section 'Service', ignoring.
    [    5.202428] 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.
    [    5.309629] 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.
    [    5.435909] systemd[1]: Queued start job for default target Graphical Interface.
    [    5.538349] systemd[1]: Created slice Slice /system/getty.
    [  OK  ] Created slice Slice /system/getty.
    [    5.564752] systemd[1]: Created slice Slice /system/modprobe.
    [  OK  ] Created slice Slice /system/modprobe.
    [    5.593038] systemd[1]: Created slice Slice /system/serial-getty.
    [  OK  ] Created slice Slice /system/serial-getty.
    [    5.618854] systemd[1]: Created slice User and Session Slice.
    [  OK  ] Created slice User and Session Slice.
    [    5.640287] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Started Dispatch Password …ts to Console Directory Watch.
    [    5.664154] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Started Forward Password R…uests to Wall Directory Watch.
    [    5.688479] systemd[1]: Reached target Path Units.
    [  OK  ] Reached target Path Units.
    [    5.703968] systemd[1]: Reached target Remote File Systems.
    [  OK  ] Reached target Remote File Systems.
    [    5.723801] systemd[1]: Reached target Slice Units.
    [  OK  ] Reached target Slice Units.
    [    5.740000] systemd[1]: Reached target Swaps.
    [  OK  ] Reached target Swaps.
    [    5.839082] systemd[1]: Listening on RPCbind Server Activation Socket.
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [    5.864194] systemd[1]: Reached target RPC Port Mapper.
    [  OK  ] Reached target RPC Port Mapper.
    [    5.904285] systemd[1]: Listening on Process Core Dump Socket.
    [  OK  ] Listening on Process Core Dump Socket.
    [    5.928832] systemd[1]: Listening on initctl Compatibility Named Pipe.
    [  OK  ] Listening on initctl Compatibility Named Pipe.
    [    5.955869] systemd[1]: Listening on Journal Audit Socket.
    [  OK  ] Listening on Journal Audit Socket.
    [    5.982800] systemd[1]: Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket (/dev/log).
    [    6.006608] systemd[1]: Listening on Journal Socket.
    [  OK  ] Listening on Journal Socket.
    [    6.028006] systemd[1]: Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    [    6.055071] systemd[1]: Listening on udev Control Socket.
    [  OK  ] Listening on udev Control Socket.
    [    6.078116] systemd[1]: Listening on udev Kernel Socket.
    [  OK  ] Listening on udev Kernel Socket.
    [    6.102313] systemd[1]: Listening on User Database Manager Socket.
    [  OK  ] Listening on User Database Manager Socket.
    [    6.168449] systemd[1]: Mounting Huge Pages File System...
             Mounting Huge Pages File System...
    [    6.192933] systemd[1]: Mounting POSIX Message Queue File System...
             Mounting POSIX Message Queue File System...
    [    6.260410] systemd[1]: Mounting Kernel Debug File System...
             Mounting Kernel Debug File System...
    [    6.276818] systemd[1]: Kernel Trace File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/tracing).
    [    6.305341] systemd[1]: Mounting Temporary Directory /tmp...
             Mounting Temporary Directory /tmp...
    [    6.334807] systemd[1]: Starting Create List of Static Device Nodes...
             Starting Create List of Static Device Nodes...
    [    6.392979] systemd[1]: Starting Load Kernel Module configfs...
             Starting Load Kernel Module configfs...
    [    6.421504] systemd[1]: Starting Load Kernel Module drm...
             Starting Load Kernel Module drm...
    [    6.464976] systemd[1]: Starting Load Kernel Module fuse...
             Starting Load Kernel Module fuse...
    [    6.637401] fuse: init (API version 7.37)
    [    6.681017] systemd[1]: Starting Start psplash boot splash screen...
             Starting Start psplash boot splash screen...
    [    6.749113] systemd[1]: Starting RPC Bind...
             Starting RPC Bind...
    [    6.764582] systemd[1]: File System Check on Root Device was skipped because of a failed condition check (ConditionPathIsReadWrite=!/).
    [    6.817211] systemd[1]: Starting Journal Service...
             Starting Journal Service...
    [    6.851463] systemd[1]: Starting Load Kernel Modules...
             Starting Load Kernel Modules...
    [    6.876422] systemd[1]: Starting Generate network units from Kernel command line...
             Starting Generate network …ts from Kernel command line...
    [    6.912038] systemd[1]: Starting Remount Root and Kernel File Systems...
             Starting Remount Root and Kernel File Systems...
    [    6.944671] systemd[1]: Starting Coldplug All udev Devices...
             Starting Coldplug All udev Devices...
    [    6.965560] cryptodev: loading out-of-tree module taints kernel.
    [    6.968264] EXT4-fs (mmcblk1p2): re-mounted. Quota mode: none.
    [    6.980019] cryptodev: driver 1.12 loaded.
    [    6.992198] systemd[1]: Started RPC Bind.
    [  OK  ] Started RPC Bind.
    [    7.016884] systemd[1]: Mounted Huge Pages File System.
    [  OK  ] Mounted Huge Pages File System.
    [    7.044894] systemd[1]: Mounted POSIX Message Queue File System.
    [  OK  ] Mounted POSIX Message Queue File System.
    [    7.068709] systemd[1]: Mounted Kernel Debug File System.
    [  OK  ] Mounted Kernel Debug File System.
    [    7.092595] systemd[1]: Mounted Temporary Directory /tmp.
    [  OK  ] Mounted Temporary Directory /tmp.
    [    7.118194] systemd[1]: Finished Create List of Static Device Nodes.
    [  OK  ] Finished Create List of Static Device Nodes.
    [    7.144526] systemd[1]: Started Journal Service.
    [  OK  ] Started Journal Service.
    [  OK  ] Finished Load Kernel Module configfs.
    [  OK  ] Finished Load Kernel Module drm.
    [  OK  ] Finished Load Kernel Module fuse.
    [FAILED] Failed to start Start psplash boot splash screen.
    See 'systemctl status psplash-start.service' for details.
    [DEPEND] Dependency failed for Star…progress communication helper.
    [  OK  ] Finished Load Kernel Modules.
    [  OK  ] Finished Generate network units from Kernel command line.
    [  OK  ] Finished Remount Root and Kernel File Systems.
             Mounting FUSE Control File System...
             Mounting Kernel Configuration File System...
             Starting Flush Journal to Persistent Storage...
             Starting Apply Kernel Variables...
    [    7.472201] systemd-journald[173]: Received client request to flush runtime journal.
             Starting Create Static Device Nodes in /dev...
    [  OK  ] Mounted FUSE Control File System.
    [  OK  ] Mounted Kernel Configuration File System.
    [  OK  ] Finished Flush Journal to Persistent Storage.
    [  OK  ] Finished Apply Kernel Variables.
    [  OK  ] Finished Create Static Device Nodes in /dev.
    [  OK  ] Reached target Preparation for Local File Systems.
             Mounting /media/ram...
             Mounting /var/volatile...
    [    7.713975] audit: type=1334 audit(1651167749.540:2): prog-id=5 op=LOAD
    [    7.720808] audit: type=1334 audit(1651167749.548:3): prog-id=6 op=LOAD
             Starting Rule-based Manage…for Device Events and Files...
    [  OK  ] Mounted /media/ram.
    [  OK  ] Mounted /var/volatile.
             Starting Load/Save Random Seed...
    [  OK  ] Reached target Local File Systems.
             Starting Create Volatile Files and Directories...
    [  OK  ] Finished Coldplug All udev Devices.
    [  OK  ] Finished Create Volatile Files and Directories.
             Starting Network Time Synchronization...
             Starting Record System Boot/Shutdown in UTMP...
    [  OK  ] Started Rule-based Manager for Device Events and Files.
    [  OK  ] Finished Record System Boot/Shutdown in UTMP.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target System Time Set.
    [  OK  ] Started Daily rotation of log files.
    [  OK  ] Reached target Timer Units.
    [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
             Starting Docker Socket for the API...
    [    8.667629] rtc rtc0: Unknown quartz-load-femtofarads value: 1250. Assuming 12500
    [    8.675907] rtc-pcf8523 0-0068: failed to set xtal load capacitance: -121
    [    8.683330] rtc-pcf8523: probe of 0-0068 failed with error -121
    [    8.689531] pwm-backlight backlight: supply power not found, using dummy regulator
    [    8.734787] panel-simple display: supply power not found, using dummy regulator
    [  OK  ] Listening on dropbear.socket.
    [    8.749306] panel-simple display: Specify missing bus_flags
    [    8.760570] mc: Linux media interface: v0.10
    [    8.767558] random: crng init done
             Starting Weston socket...
             Starting D-Bus System Message Bus...
             Starting Reboot and dump vmcore via kexec...
    [  OK  ] Finished Load/Save Random Seed.
    [  OK  ] Listening on Docker Socket for the API.
    [  OK  ] Listening on Weston socket.
    [  OK  ] Found device /dev/ttyS2.
    [    8.949579] videodev: Linux video capture interface: v2.00
    [  OK  ] Reached target Socket Units.
    [    9.006471] k3-m4-rproc 5000000.m4fss: assigned reserved memory node m4f-dma-memory@9cb00000
    [    9.017109] CAN device driver interface
    [    9.017750] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
    [    9.029142] k3-m4-rproc 5000000.m4fss: local reset is deasserted for device
    [    9.084480] remoteproc remoteproc0: 5000000.m4fss is available
    [    9.124070] m_can_platform 4e00000.can: m_can device registered (irq=0, version=32)
    [    9.134715] m_can_platform 4e10000.can: m_can device registered (irq=0, version=32)
    [    9.175579] rtc-ti-k3 2b1f0000.rtc: registered as rtc0
    [    9.180837] rtc-ti-k3 2b1f0000.rtc: setting system clock to 1970-01-01T00:00:15 UTC (15)
    [    9.190327] systemd-journald[173]: Time jumped backwards, rotating.
    [    9.700870] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
    [    9.712883] platform 78000000.r5f: configured R5F for IPC-only mode
    [    9.716726] remoteproc remoteproc0: powering up 5000000.m4fss
    [    9.719548] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@9da00000
    [    9.725067] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 54860
    [    9.733904] remoteproc remoteproc1: 78000000.r5f is available
    [    9.746938] remoteproc remoteproc1: attaching to 78000000.r5f
    [    9.753980] platform 78000000.r5f: R5F core initialized in IPC-only mode
    [    9.754701] rproc-virtio rproc-virtio.1.auto: assigned reserved memory node m4f-dma-memory@9cb00000
    [    9.758895] PVR_K:  214: Device: fd00000.gpu
    [    9.759844] PVR_K:  214: Read BVNC 33.15.11.3 from HW device registers
    [    9.760752] PVR_K:  214: RGX Device registered with BVNC 33.15.11.3
    [    9.760795] rproc-virtio rproc-virtio.2.auto: assigned reserved memory node r5f-dma-memory@9da00000
    [    9.763078] virtio_rpmsg_bus virtio0: rpmsg host is online
    [    9.770384] [drm] Initialized tidss 1.0.0 20180215 for 30200000.dss on minor 0
    [    9.770436] [drm] Initialized pvr 23.1.6404501 20170530 for fd00000.gpu on minor 1
    [    9.770795] virtio_rpmsg_bus virtio1: rpmsg host is online
    [    9.770836] rproc-virtio rproc-virtio.1.auto: registered virtio1 (type 7)
    [    9.770848] remoteproc remoteproc0: remote processor 5000000.m4fss is now up
    [    9.774385] virtio_rpmsg_bus virtio0: creating channel ti.ipc4.ping-pong addr 0xd
    [    9.775292] rproc-virtio rproc-virtio.2.auto: registered virtio0 (type 7)
    [    9.775308] remoteproc remoteproc1: remote processor 78000000.r5f is now attached
    [    9.858781] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xe
    [    9.866547] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0xd
    [    9.874502] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
    [    9.884015] tidss 30200000.dss: [drm] fb0: tidssdrmfb frame buffer device
    [  OK  ] Finished Reboot and dump vmcore via kexec.
    [  OK  ] Started D-Bus System Message Bus.
    [  OK  ] Reached target Basic System.
             Starting Save/Restore Sound Card State...
    [  OK  ] Started Job spooling tools.
    [  OK  ] Started Periodic Command Scheduler.
             Starting Print notice about GPLv3 packages...
             Starting IPv6 Packet Filtering Framework...
             Starting IPv4 Packet Filtering Framework...
    [  OK  ] Started irqbalance daemon.
             Starting startwlanap...
             Starting startwlansta...
    [   10.769985] audit: type=1334 audit(17.084:4): prog-id=7 op=LOAD
    [   10.776091] audit: type=1334 audit(17.092:5): prog-id=8 op=LOAD
             Starting User Login Management...
    [  OK  ] Started TEE Supplicant.
             Starting telnetd.service...
    [  OK  ] Started ti-apps-launcher service.
    [  OK  ] Finished Save/Restore Sound Card State.
    [  OK  ] Started startwlanap.
    [  OK  ] Started telnetd.service.
    [  OK  ] Started startwlansta.
    [   11.073028] remoteproc remoteproc2: 30074000.pru is available
    [   11.073698] dwc3 31000000.usb: Configuration mismatch. dr_mode forced to gadget
    [  OK  ] Finished IPv6 Packet Filtering Fram[   11.091131] remoteproc remoteproc3: 30078000.pru is available
    ework.
    [  OK  ] Finished IPv4 Packet Filtering Framework.
    [   11.188773] cdns-csi2rx: probe of 30101000.csi-bridge failed with error -22
    [   11.351279] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
    [   11.356927] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 1
    [   11.364912] xhci-hcd xhci-hcd.3.auto: USB3 root hub has no ports
    [   11.371016] xhci-hcd xhci-hcd.3.auto: hcc params 0x0258fe6d hci version 0x110 quirks 0x0000000000010010
    [   11.380583] xhci-hcd xhci-hcd.3.auto: irq 458, io mem 0x31100000
    [   11.388250] hub 1-0:1.0: USB hub found
    [   11.392139] hub 1-0:1.0: 1 port detected
    [  OK  ] Created slice Slice /system/systemd-backlight.
    [  OK  ] Reached target Preparation for Network.
    [  OK  ] Reached target Sound Card.
    [  OK  ] Reached target Hardware activated USB gadget.
             Starting LSB: Expand Rootfs of boot device...
             Starting Load/Save Screen …ness of backlight:backlight...
             Starting Network Configuration...
    [   11.651635] usb 1-1: new high-speed USB device number 2 using xhci-hcd
    [  OK  ] Started User Login Management.
    [  OK  ] Finished Load/Save Screen …htness of backlight:backlight.
    [   11.805692] usb-storage 1-1:1.0: USB Mass Storage device detected
    [   11.812922] scsi host0: usb-storage 1-1:1.0
    [  OK  ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
    [   12.371409] cfg80211: Loading compiled-in X.509 certificates for regulatory database
    [   12.402929] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    [   12.485832] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [   12.825467] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.00 PQ: 0 ANSI: 6
    [   12.839955] sd 0:0:0:0: [sda] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
    [   12.848822] sd 0:0:0:0: [sda] Write Protect is off
    [   12.854631] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [   12.883231]  sda: sda1
    [   12.886508] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [  OK  ] Started LSB: Expand Rootfs of boot device.
    [  OK  ] Started Network Configuration.
             Starting Wait for Network to be Configured...
             Starting Network Name Resolution...
    [   13.389115] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    [   13.399106] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Reached target Network.
    [  OK  ] Reached target Host and Network Name Lookups.
             Starting Avahi mDNS/DNS-SD Stack...
             Starting Enable and configure wl18xx bluetooth stack...
             Starting containerd container runtime...
    [  OK  ] Started Netperf Benchmark Server.
    [  OK  ] Started NFS status monitor for NFSv2/3 locking..
             Starting Simple Network Ma…ent Protocol (SNMP) Daemon....
             Starting Permit User Sessions...
    [  OK  ] Finished Enable and configure wl18xx bluetooth stack.
    [  OK  ] Finished Permit User Sessions.
    [  OK  ] Created slice Slice /system/systemd-fsck.
    [  OK  ] Started Serial Getty on ttyS2.
    [  OK  ] Reached target Login Prompts.
             Starting Synchronize System and HW clocks...
             Starting File System Check on /dev/mmcblk1p1...
    [  OK  ] Finished Synchronize System and HW clocks.
    [  OK  ] Found device Cruzer_Blade MYUSB.
             Starting File System Check on /dev/sda1...
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
    [  OK  ] Finished File System Check on /dev/mmcblk1p1.
             Mounting /run/media/boot-mmcblk1p1...
    [  OK  ] Mounted /run/media/boot-mmcblk1p1.
    [  OK  ] Finished File System Check on /dev/sda1.
             Mounting /run/media/MYUSB-sda1...
    [  OK  ] Mounted /run/media/MYUSB-sda1.
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project am62xx-evm -
    
    Arago 2023.04 am62xx-evm -
    
    am62xx-evm login: root
    [   51.378489] audit: type=1701 audit(57.692:6): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=443 comm="ti-apps-launche" exe="/usr/bin/ti-apps-launcher" sig=11 res=1
    [   51.492935] audit: type=1334 audit(57.808:7): prog-id=9 op=LOAD
    [   51.499208] audit: type=1334 audit(57.816:8): prog-id=10 op=LOAD
    [   51.728829] audit: type=1334 audit(58.044:9): prog-id=11 op=LOAD
    [   51.735021] audit: type=1334 audit(58.048:10): prog-id=12 op=LOAD
    [   52.378125] audit: type=1006 audit(58.692:11): pid=754 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1
    [   52.389960] audit: type=1300 audit(58.692:11): arch=c00000b7 syscall=64 success=yes exit=1 a0=8 a1=ffffdcaaf0d8 a2=1 a3=ffffa0ff8020 items=0 ppid=1 pid=754 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="(systemd)" exe="/lib/systemd/systemd" key=(null)
    [   52.416316] audit: type=1327 audit(58.692:11): proctitle="(systemd)"
    [   52.463773] audit: type=1334 audit(58.776:12): prog-id=13 op=LOAD
    [   52.470097] audit: type=1300 audit(58.776:12): arch=c00000b7 syscall=280 success=yes exit=8 a0=5 a1=ffffc0237840 a2=78 a3=0 items=0 ppid=1 pid=754 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="systemd" exe="/lib/systemd/systemd" key=(null)
    root@am62xx-evm:~# cat /sys/bus/i2c/devices/
    cat: /sys/bus/i2c/devices/: Is a directory
    root@am62xx-evm:~# ls /sys/bus/i2c/devices/
    0-0018  0-0068  i2c-0
    root@am62xx-evm:~# cat /proc/asound/
    card0/   cards    devices  pcm      tas2505/ timers   version
    root@am62xx-evm:~# cat /proc/asound/tas2505/
    cat: /proc/asound/tas2505/: Is a directory
    root@am62xx-evm:~# cd /proc/asound/tas2505/
    root@am62xx-evm:/proc/asound/tas2505# ls
    id  pcm0p
    root@am62xx-evm:/proc/asound/tas2505# cd ..
    root@am62xx-evm:/proc/asound# ls
    card0  cards  devices  pcm  tas2505  timers  version
    root@am62xx-evm:/proc/asound# cd card0/
    root@am62xx-evm:/proc/asound/card0# ls
    id  pcm0p
    root@am62xx-evm:/proc/asound/card0# i2cdump -y -f 0 0x18
    No size specified (using byte-data access)
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 01 00 0d 00 00 00 00 00 00 00 00 10 00 00 00 00    ?.?........?....
    10: 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    @...............
    20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    root@am62xx-evm:/proc/asound/card0# [  144.940324] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
    [  144.962518] Bridge firewalling registered
    [  145.099841] kauditd_printk_skb: 8 callbacks suppressed
    [  145.099868] audit: type=1325 audit(151.340:18): table=nat family=2 entries=0 op=xt_register pid=842 comm="iptables"
    [  145.115702] audit: type=1300 audit(151.340:18): arch=c00000b7 syscall=209 success=yes exit=0 a0=4 a1=0 a2=40 a3=ffffc3eb63f8 items=0 ppid=803 pid=842 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null)
    [  145.143205] audit: type=1327 audit(151.340:18): proctitle=2F7573722F7362696E2F69707461626C6573002D2D77616974002D74006E6174002D4C002D6E
    [  145.155388] audit: type=1325 audit(151.432:19): table=filter family=2 entries=0 op=xt_register pid=845 comm="iptables"
    [  145.166169] audit: type=1300 audit(151.432:19): arch=c00000b7 syscall=209 success=yes exit=0 a0=4 a1=0 a2=40 a3=fffff203b6d8 items=0 ppid=803 pid=845 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null)
    [  145.193678] audit: type=1327 audit(151.432:19): proctitle=2F7573722F7362696E2F69707461626C6573002D2D77616974002D4C002D6E
    [  145.301667] audit: type=1325 audit(151.616:20): table=nat family=2 entries=5 op=xt_replace pid=866 comm="iptables"
    [  145.313944] audit: type=1300 audit(151.616:20): arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=10698a60 items=0 ppid=803 pid=866 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null)
    [  145.341611] audit: type=1327 audit(151.616:20): proctitle=2F7573722F7362696E2F69707461626C6573002D2D77616974002D74006E6174002D4E00444F434B4552
    [  145.354512] audit: type=1325 audit(151.636:21): table=filter family=2 entries=4 op=xt_replace pid=868 comm="iptables"
    
    root@am62xx-evm:/proc/asound/card0# aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: tas2505 [tas2505], device 0: davinci-mcasp.0-tas2505-hifi tas2505-hifi-0 [davinci-mcasp.0-tas2505-hifi tas2505-hifi-0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    root@am62xx-evm:/proc/asound/card0# dmesg | grep -i codec
    [    1.132812] tas2505-codec 0-0018: tas2505_i2c_probe: clock-source = MCLK
    [    1.520337] tas2505-codec 0-0018: tas2505_codec_probe: Probe finished
    root@am62xx-evm:/proc/asound/card0# dmesg | grep -i sound
    [    0.504109] Advanced Linux Sound Architecture Driver Initialized.
    [    1.498115] asoc-simple-card sound: GPIO lookup for consumer simple-audio-card,hp-det
    [    1.498124] asoc-simple-card sound: using device tree for GPIO lookup
    [    1.498134] of_get_named_gpiod_flags: can't parse 'simple-audio-card,hp-det-gpios' property of node '/sound[0]'
    [    1.498149] of_get_named_gpiod_flags: can't parse 'simple-audio-card,hp-det-gpio' property of node '/sound[0]'
    [    1.498160] asoc-simple-card sound: using lookup tables for GPIO lookup
    [    1.498166] asoc-simple-card sound: No GPIO consumer simple-audio-card,hp-det found
    [    1.498174] asoc-simple-card sound: GPIO lookup for consumer simple-audio-card,mic-det
    [    1.498180] asoc-simple-card sound: using device tree for GPIO lookup
    [    1.498189] of_get_named_gpiod_flags: can't parse 'simple-audio-card,mic-det-gpios' property of node '/sound[0]'
    [    1.498203] of_get_named_gpiod_flags: can't parse 'simple-audio-card,mic-det-gpio' property of node '/sound[0]'
    [    1.498214] asoc-simple-card sound: using lookup tables for GPIO lookup
    [    1.498219] asoc-simple-card sound: No GPIO consumer simple-audio-card,mic-det found
    root@am62xx-evm:/proc/asound/card0# cd /tmp/
    root@am62xx-evm:/tmp# mkdir myusb
    root@am62xx-evm:/tmp# mound /dev/sda1 /tmp/myusb
    -sh: mound: command not found
    root@am62xx-evm:/tmp# mount /dev/sda1 /tmp/myusb
    root@am62xx-evm:/tmp# cd myusb/
    root@am62xx-evm:/tmp/myusb# ls
     20Hzto20kHz.wav                    20Hzto20kHz_mono_48000hz_32bF.wav   BabyElephantWalk60_32bitPCM_44100Hz.wav     BabyElephantWalk60_Signed16bit_44100Hz.wav   Ouch-6.wav                             SineWaveMinusSinged16bPCM_48khz.wav
     20Hzto20kHz_mono_44100hz_24b.wav   BabyElephantWalk60.mp3              BabyElephantWalk60_44100.mp3                CantinaBand3.wav                             SineWaveMinus16.wav                   'System Volume Information'
     20Hzto20kHz_mono_44100hz_32b.wav   BabyElephantWalk60.wav              BabyElephantWalk60_44100Hz_32bitFloat.wav   ImperialMarch60.wav                          SineWaveMinusSined16bPCM_44100Hz.wav
    root@am62xx-evm:/tmp/myusb# aplay 20Hzto20kHz.wav
    Playing WAVE '20Hzto20kHz.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
    [  209.523679] tas2505-codec 0-0018: tas2505_hw_params: bit width = 16
    [  209.532861] tas2505-codec 0-0018: Sample rate (44100) and format not supported
    [  209.540172] tas2505-codec 0-0018: ASoC: error at snd_soc_dai_hw_params on tas2505-hifi: -22
    [  209.548617]  davinci-mcasp.0-tas2505-hifi: ASoC: error at __soc_pcm_hw_params on davinci-mcasp.0-tas2505-hifi: -22
    aplay: set_params:1416: Unable to install hw params:
    ACCESS:  RW_INTERLEAVED
    FORMAT:  S16_LE
    SUBFORMAT:  STD
    SAMPLE_BITS: 16
    FRAME_BITS: 32
    CHANNELS: 2
    RATE: 44100
    PERIOD_TIME: (125011 125012)
    PERIOD_SIZE: 5513
    PERIOD_BYTES: 22052
    PERIODS: 4
    BUFFER_TIME: (500045 500046)
    BUFFER_SIZE: 22052
    BUFFER_BYTES: 88208
    TICK_TIME: 0
    root@am62xx-evm:/tmp/myusb# aplay -Dplughw:0,0 -r 44100 -d 5 20Hzto20kHz.wav
    Playing WAVE '20Hzto20kHz.wav' : [  249.524467] tas2505-codec 0-0018: tas2505_hw_params: bit width = 16
    Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
    [  249.531786] tas2505-codec 0-0018: Sample rate (44100) and format not supported
    [  249.543411] tas2505-codec 0-0018: ASoC: error at snd_soc_dai_hw_params on tas2505-hifi: -22
    [  249.551819]  davinci-mcasp.0-tas2505-hifi: ASoC: error at __soc_pcm_hw_params on davinci-mcasp.0-tas2505-hifi: -22
    aplay: set_params:1416: Unable to install hw params:
    ACCESS:  RW_INTERLEAVED
    FORMAT:  S16_LE
    SUBFORMAT:  STD
    SAMPLE_BITS: 16
    FRAME_BITS: 32
    CHANNELS: 2
    RATE: 44100
    PERIOD_TIME: (125011 125012)
    PERIOD_SIZE: 5513
    PERIOD_BYTES: 22052
    PERIODS: 4
    BUFFER_TIME: (500045 500046)
    BUFFER_SIZE: 22052
    BUFFER_BYTES: 88208
    TICK_TIME: 0
    root@am62xx-evm:/tmp/myusb#  speaker-test -c 2 -r 44100 -D hw:0,0
    
    speaker-test 1.2.6
    
    Playback device is hw:0,0
    Stream paramete[  333.339605] tas2505-codec 0-0018: tas2505_hw_params: bit width = 16
    rs are 44100Hz, S16_LE, 2 channels
    Using 16 octaves of pink noi[  333.346661] tas2505-codec 0-0018: Sample rate (44100) and format not supported
    se
    Rate set to 44100Hz (requested 44100Hz)
    Buffer size range f[  333.359319] tas2505-codec 0-0018: ASoC: error at snd_soc_dai_hw_params on tas2505-hifi: -22
    rom 128 to 131072
    Period size range from 64 to 16384
    Using max[  333.373259]  davinci-mcasp.0-tas2505-hifi: ASoC: error at __soc_pcm_hw_params on davinci-mcasp.0-tas2505-hifi: -22
     buffer size 131072
    Periods = 4
    Unable to set hw params for playback: Invalid argument
    Setting of hwparams failed: Invalid argument
    root@am62xx-evm:/tmp/myusb# ls
     20Hzto20kHz.wav                    20Hzto20kHz_mono_48000hz_32bF.wav   BabyElephantWalk60_32bitPCM_44100Hz.wav     BabyElephantWalk60_Signed16bit_44100Hz.wav   Ouch-6.wav                             SineWaveMinusSinged16bPCM_48khz.wav
     20Hzto20kHz_mono_44100hz_24b.wav   BabyElephantWalk60.mp3              BabyElephantWalk60_44100.mp3                CantinaBand3.wav                             SineWaveMinus16.wav                   'System Volume Information'
     20Hzto20kHz_mono_44100hz_32b.wav   BabyElephantWalk60.wav              BabyElephantWalk60_44100Hz_32bitFloat.wav   ImperialMarch60.wav                          SineWaveMinusSined16bPCM_44100Hz.wav
    root@am62xx-evm:/tmp/myusb#  sudo aplay -D sysdefault:CARD=AM62xSKEVM 20Hzto20kHz.wav
    ALSA lib ../../alsa-lib-1.2.6.1/src/confmisc.c:855:(parse_card) cannot find card 'AM62xSKEVM'
    ALSA lib ../../alsa-lib-1.2.6.1/src/conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such device
    ALSA lib ../../alsa-lib-1.2.6.1/src/confmisc.c:422:(snd_func_concat) error evaluating strings
    ALSA lib ../../alsa-lib-1.2.6.1/src/conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such device
    ALSA lib ../../alsa-lib-1.2.6.1/src/confmisc.c:1334:(snd_func_refer) error evaluating name
    ALSA lib ../../alsa-lib-1.2.6.1/src/conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such device
    ALSA lib ../../alsa-lib-1.2.6.1/src/conf.c:5701:(snd_config_expand) Evaluate error: No such device
    ALSA lib ../../../alsa-lib-1.2.6.1/src/pcm/pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM sysdefault:CARD=AM62xSKEVM
    aplay: main:831: audio open error: No such device
    root@am62xx-evm:/tmp/myusb# lsmod | grep snd
    root@am62xx-evm:/tmp/myusb# lsmod | grep sound
    root@am62xx-evm:/tmp/myusb# lsmod
    Module                  Size  Used by
    xt_conntrack           16384  1
    xt_MASQUERADE          16384  1
    xt_addrtype            16384  2
    iptable_filter         16384  1
    iptable_nat            16384  1
    nf_nat                 49152  2 iptable_nat,xt_MASQUERADE
    nf_conntrack          126976  3 xt_conntrack,nf_nat,xt_MASQUERADE
    nf_defrag_ipv6         20480  1 nf_conntrack
    nf_defrag_ipv4         16384  1 nf_conntrack
    libcrc32c              16384  2 nf_conntrack,nf_nat
    ip_tables              32768  2 iptable_filter,iptable_nat
    x_tables               40960  6 xt_conntrack,iptable_filter,xt_addrtype,ip_tables,iptable_nat,xt_MASQUERADE
    br_netfilter           32768  0
    bridge                253952  1 br_netfilter
    stp                    16384  1 bridge
    llc                    16384  2 bridge,stp
    overlay               122880  0
    wlcore_sdio            16384  0
    wl18xx                114688  0
    wlcore                217088  1 wl18xx
    mac80211              548864  2 wl18xx,wlcore
    libarc4                16384  1 mac80211
    cfg80211              380928  3 wl18xx,wlcore,mac80211
    rfkill                 24576  2 cfg80211
    xhci_plat_hcd          16384  0
    cdns_csi2rx            20480  0
    v4l2_fwnode            20480  1 cdns_csi2rx
    dwc3                   98304  0
    rpmsg_ctrl             16384  0
    rpmsg_char             16384  1 rpmsg_ctrl
    pru_rproc              24576  0
    irq_pruss_intc         16384  0
    crct10dif_ce           16384  1
    j721e_csi2rx           24576  0
    videobuf2_dma_contig    20480  1 j721e_csi2rx
    tidss                  53248  0
    pvrsrvkm             1216512  0
    ti_k3_r5_remoteproc    28672  0
    videobuf2_memops       16384  1 videobuf2_dma_contig
    virtio_rpmsg_bus       20480  0
    videobuf2_v4l2         32768  1 j721e_csi2rx
    dwc3_am62              16384  0
    drm_dma_helper         20480  1 tidss
    rtc_ti_k3              16384  1
    rpmsg_ns               16384  1 virtio_rpmsg_bus
    m_can_platform         16384  0
    videobuf2_common       57344  4 j721e_csi2rx,videobuf2_dma_contig,videobuf2_v4l2,videobuf2_memops
    drm_kms_helper        184320  3 drm_dma_helper,tidss
    m_can                  24576  1 m_can_platform
    can_dev                36864  1 m_can
    cfbfillrect            16384  1 drm_kms_helper
    v4l2_async             24576  3 v4l2_fwnode,j721e_csi2rx,cdns_csi2rx
    syscopyarea            16384  1 drm_kms_helper
    ti_k3_m4_remoteproc    16384  0
    cfbimgblt              16384  1 drm_kms_helper
    ti_k3_common           16384  1 ti_k3_m4_remoteproc
    sysfillrect            16384  1 drm_kms_helper
    sysimgblt              16384  1 drm_kms_helper
    videodev              245760  5 v4l2_async,j721e_csi2rx,videobuf2_v4l2,cdns_csi2rx,videobuf2_common
    fb_sys_fops            16384  1 drm_kms_helper
    sa2ul                  36864  0
    cfbcopyarea            16384  1 drm_kms_helper
    mcrc                   16384  0
    cdns_dphy_rx           16384  0
    pruss                  16384  0
    mc                     57344  6 v4l2_async,videodev,j721e_csi2rx,videobuf2_v4l2,cdns_csi2rx,videobuf2_common
    panel_simple           86016  0
    rtc_pcf8523            16384  0
    pwm_tiehrpwm           16384  1
    phy_can_transceiver    16384  2
    pwm_bl                 16384  0
    cryptodev              53248  0
    fuse                  131072  1
    drm                   557056  6 drm_kms_helper,panel_simple,drm_dma_helper,pvrsrvkm,tidss
    drm_panel_orientation_quirks    28672  1 drm
    ipv6                  475136  44 bridge,br_netfilter
    root@am62xx-evm:/tmp/myusb# lsmod | grep tas
    root@am62xx-evm:/tmp/myusb#
    

  • Hello Kevin

    May you help?

    We try to use difference audio sampling rates (.wav) but fail to run the aplay command.

    Note, MCLK works fine with 12.288MHz but there is no other clock output yet including the WCLK.

  • Hi Paul,

    I think the driver can't support generating BCLK & WCLK inside tas2505, I think you should continue to change the dts (sound part). you should ask from EP team.

    Otherwise the driver is not suitable for you.

    Kevin

  • Hi Paul,

    I think the driver can't support generating BCLK & WCLK inside tas2505, you should continue to change the dts (sound part). you should ask from EP team.

    Otherwise the driver is not suitable for you.

    Kevin

  • Hello Kevin,

    Yes,  my understanding is that the BCLK & WCLK should be genreated as input from SoC to tas2505 if we can issue aplay or speaker-test successfully first. 

    From our aplay result, this error, "[10272.741928] tas2505-codec 0-0018: Sample rate (44100) and format not supported", it is about mismatching of the comparision below in the AMP tas2505 drvier code.

    Where is the input of  freq ?    (tas2505->sysclk = freq ; // in tas2505_set_dai_sysclk())

    Please guide how to fix this issue. 

    I tested with speak-test command as well. FYI.

    #speaker-test -t sine -f 1000 -c 2 -l 1

     

    speaker-test 1.2.6

     

    Playback device is default

    Stream parameters are 48000Hz, S16_LE, 2 channels

    Sine wave rate is 1000.0000[ 2330.732002] tas2505-codec 1-0018: tas2505_hw_params: bit width = 16

    Hz

    Rate set to 48000Hz (requested 48000Hz)

    Buffer size range f[ 2330.739573] tas2505-codec 1-0018: Sample rate (48000) and format not supported

    rom 128 to 131072

    Period size range from 64 to 16384

    Using max[ 2330.752210] tas2505-codec 1-0018: ASoC: error at snd_soc_dai_hw_params on tas2505-hifi: -22

     buffer size 131072

    Periods = 4

    [ 2330.766102]  davinci-mcasp.0-tas2505-hifi: ASoC: error at __soc_pcm_hw_params on davinci-mcasp.0-tas2505-hifi: -22

    Unable to set hw params for playback: Invalid argument

    Setting of hwparams failed: Invalid argument

  • Hi Paul,

    You should see the logs in this function, right ?

    Kevin
  • Hi Paul,

    Kindly email me for accelerating: kevin-lu@ti.com 

    Kevin

  • Hello Kevin

    No, we canot see that part of log. it seems this function is called by external? It seems clocks setting the driver has issue. 

    I traced the code, and 

    static const struct snd_soc_dai_ops tas2505_dai_ops = {
    ...
    .set_sysclk = tas2505_set_dai_sysclk, <===

    ..

    }

    static struct snd_soc_dai_driver tas2505_dai_driver[] = {
    {
    .name = "tas2505-hifi",
    .playback = {
    .stream_name = "Playback",
    .rates = TAS2505_RATES,
    .formats = TAS2505_FORMATS,
    },

    .ops = &tas2505_dai_ops, <===
    },

    static int tas2505_i2c_probe(struct i2c_client *i2c,
    const struct i2c_device_id *id)
    {....

    return snd_soc_register_component(&i2c->dev,
    &soc_codec_driver_tas2505, tas2505_dai_driver, <== "registered here"
    ARRAY_SIZE(tas2505_dai_driver));
    }