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.

AM5718: IDK codec interface

Part Number: AM5718
Other Parts Discussed in Thread: TLV320AIC3104, TMDSEVM437X, TLV320AIC3106

Hi

I have to interface TLV320AIC3106 audio codec with AM5718 IDK for exploring audio functionality before our custom board arrived. For that, I have selected clockout2(10MHz),I2c1 and McASP3 as interface. I have configured kernel (menu config )as mentioned in SDK documentation. Will this configuration works?. Can you suggest suitable audio node configuration in DTS file(AM571x).

Regards

Satheesh Kumar S

  • Hi Satheesh,

    Yes, your setup is possible. You can refer to AM572x TI EVM for reference. This EVM is using McASP3, TLV320AIC3104 audio codec, I2C1 and clkout2 D18 pin as master clock for AIC3104 codec.

    6.6 Audio

    linux-4.19.38/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi


    We have similar configuration also for TMDSSK3358 board, pin clkout is used to supply 24MHz clock to AIC3x MCLK input.

    linux-4.19.38/arch/arm/boot/dts/am335x-evmsk.dts

    We also have thee same for TMDSEVM437X, where 12MHz are used.

    linux-4.19.38/arch/arm/boot/dts/am437x-gp-evm.dts

     

    Regards,
    Pavel

  • Hi Pavel 

    We have taken the reference from AM572x General-Purpose EVM . I have verified the I2c read and write from user space application. Since master clock (clockout2) is 10 MHz,I expect some sampling error. Our aim is  to explore the functionality. As from your suggestion, I configured the clockout2 by writing register directly(last.c) . The snippet of modified the DTS file is depicted below

    &i2c1 {
    status = "okay";
    clock-frequency = <400000>;
    tlv320aic3106: tlv320aic3106@18 {
    #sound-dai-cells = <0>;
    compatible = "ti,tlv320aic3106";
    reg = <0x18>;
    assigned-clocks = <&clkoutmux2_clk_mux>;
    assigned-clock-parents = <&sys_clk1_dclk_div>;

    status = "okay";
    adc-settle-ms = <40>;

    AVDD-supply = <&vdd_3v3>;
    IOVDD-supply = <&vdd_3v3>;
    DRVDD-supply = <&vdd_3v3>;
    DVDD-supply = <&aic_dvdd>;
    };


    };

    &mcasp3 {
    #sound-dai-cells = <0>;
    assigned-clocks = <&mcasp3_ahclkx_mux>;
    assigned-clock-parents = <&sys_clkin1>;
    status = "okay";

    op-mode = <0>; /* MCASP_IIS_MODE */
    tdm-slots = <2>;
    /* 4 serializers */
    serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
    1 2 0 0
    >;
    tx-num-evt = <32>;
    rx-num-evt = <32>;
    };
    vdd_3v3: fixedregulator-vdd_3v3 {
    compatible = "regulator-fixed";
    regulator-name = "vdd_3v3";
    vin-supply = <&regen1>;
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    };

    aic_dvdd: fixedregulator-aic_dvdd {
    compatible = "regulator-fixed";
    regulator-name = "aic_dvdd_fixed";
    vin-supply = <&vdd_3v3>;
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    };

    following error is showing,while compilation

    Error: arch/arm/boot/dts/am571x-idk.dts:122.1-11 syntax error
    FATAL ERROR: Unable to parse input tree
    scripts/Makefile.lib:317: recipe for target 'arch/arm/boot/dts/am571x-idk.dtb' failed
    make[1]: *** [arch/arm/boot/dts/am571x-idk.dtb] Error 1
    arch/arm/Makefile:353: recipe for target 'dtbs' failed
    make: *** [dtbs] Error 2

    Regards

    Satheesh Kumar S

  • Satheesh Kumar,

    I tried on my side and this is building fine. I put tlv320aic3106 node in am57xx-idk-common.dtsi, as we already have i2c1 node there.

    I am using PSDK Linux v6.00 (kernel 4.19.38), and I made below update to mcasp3 node:

    assigned-clocks = <&l4per_clkctrl DRA7_MCASP3_CLKCTRL 24>;
     /*assigned-clocks = <&mcasp3_ahclkx_mux>;*/

    Please refer to below DTS files for reference:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/3730.am57xx_2D00_idk_2D00_common.dtsi

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/am571x_2D00_idk.dts

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/am571x_5F00_idk_5F00_built


    I would also comment that you create two new nodes for 3.3V and 1.8V, vdd_3v3 and aic_dvdd. While we already have v3_3d and ldo2_reg. You can refer to below DTS files for AIC3106 node reference:

    linux-kernel/arch/arm/boot/dts/dra7-evm.dts

    linux-kernel/arch/arm/boot/dts/am437x-gp-evm.dts

    Regards,
    Pavel