L4T R28.2 TX2 audio codec sound less with tas5751

Hi

  1. I want to port tas5751 from tx1 L4T R28.2 to tx2 L4T R28.2 use the same Carrier board
  2. From hardware engineer, The I2S0 become I2S0, The I2S5 become I2S2 when from TX1 to be TX2.

I will attach my dts. Now the speaker is sound less. clk status seemed incorrect after & during play music

root@tegra-ubuntu:/home/nvidia# cat /sys/kernel/debug/clk/clk_summary | grep i2s
 i2s6_sync_input                                            0            0           0           0          0 0  
 i2s5_sync_input                                            0            0           0           0          0 0  
 i2s4_sync_input                                            0            0           0           0          0 0  
 i2s3_sync_input                                            0            0           0           0          0 0  
 i2s2_sync_input                                            0            0           0           0          0 0  
 i2s1_sync_input                                            0            0           0           0          0 0  
    i2s6_sync_clk                                           0            0           0           0          0 0  
    i2s5_sync_clk                                           0            0           0           0          0 0  
    i2s4_sync_clk                                           0            0           0           0          0 0  
    i2s3_sync_clk                                           0            0           0           0          0 0  
    i2s2_sync_clk                                           0            0           0           0          0 0  
    i2s1_sync_clk                                           0            0           0           0          0 0  
    i2s6                                                    0            0    19200000    19200000          0 0  
    i2s5                                                    0            0    19200000    19200000          0 0  
    i2s4                                                    0            0    19200000    19200000          0 0  
    i2s3                                                    0            0    19200000    19200000          0 0  
    i2s2                                                    0            0    19200000    19200000          0 0  
    i2s1                                                    0            0    19200000    19200000          0 0

my question is :

  1. How to config pinmux in dts for tx2
  2. How to config clk in dts for tx2

tegra186-quill-common.dtsi.txt (36.2 KB)
tegra_t186ref_mobile_rt565x.c (35.2 KB)
decompile_tx2_full.dts.txt (291 KB)

Anybody of Nvidia can help me?

Hello!

If your TAS5751 is connected to J26 expansion header, then yes it is I2S2 on TX2 versus I2S5 on TX1.

Looking at your tegra186-quill-common-dtsi, you have two dai-links that are referencing ‘tegra_i2s5’. You should ensure that you only have one. So you should change this as follows …

@@ -882,7 +882,7 @@
 		};
 		nvidia,dai-link-2 {
                         link-name = "tas5751-playback";
-                        cpu-dai = <&tegra_i2s5>;
+                        cpu-dai = <&tegra_i2s2>;
                         codec-dai = <&tas5751>;
                         cpu-dai-name = "I2S2";
                         codec-dai-name = "tas5751-speaker";

To check the pinmux for I2S2 …

$ sudo grep dap2 /sys/kernel/debug/tegra_pinctrl_reg
Bank: 0 Reg: 0x02434000 Val: 0x00000458 -> dap2_din_pc3
Bank: 0 Reg: 0x02434008 Val: 0x00000400 -> dap2_dout_pc2
Bank: 0 Reg: 0x02434010 Val: 0x00000400 -> dap2_fs_pc4
Bank: 0 Reg: 0x02434018 Val: 0x00000400 -> dap2_sclk_pc1

In the above registers we want to ensure that bit 10 is set (to disable GPIO on the DAP2 pins) and bits [1:0] are not set to select I2S2. So if you have the same as the above you should be good.

What clocks do you need to configure in dts? Looking at your clock dump it appears that the clock for I2S2 is not being enabled. However, that could be because the DT cpu-dai node is not correct.

Regards,
Jon

Hi jonathanh

Thanks for your reply.
Now it play sound, root cause is above.

Thnaks again