RT5639 on TX2

Do you mean the p2180? Yes there’s no different.

The EVB I had is P2597

@Tonie
It’s my mistake it’s P2597. P2180 is TX1 module.

Hi, ShaneCCC,

I put TX2 module on P2597, all I2C looks fine.
(For example, I used ‘i2cdetect -r -y 0’ and it shows something. (No any error be shown)
It really confused me because I didn’t use other OS on that. (TX2 module has OS installed)

I would like to know if there is any ‘board id’ that OS will detect ?

Please advise.

Regards,

Tonie

Hi, ShaneCCC,

here are the testing result I had :

  1. My Carrier board + TX2 module (same OS) : failed in accessing all I2C.
  2. My Carrier board + TX1 module : success in accessing all I2Cs.
  3. P2597 carrier board + TX2 module (same OS) : success in accessing I2Cs.

Compare the log between item 1 and 3, I list some :

  1. node /plugin-manager/fragment-e3326@0 match with board 3326-*
    This line only be shown in P2597
  2. GPIO line 461 (cam0-rst) hogged as output/high
    This line only be shown in my carrier board.

Please advise.

Regards,

Tonie

@Tonie
Could you confirm all the i2c failed on your carrier board? Could you check with your HW developer all of the i2c device and check all of them are failed, not just use the i2c-tools to tell all of them are failed, because some of device need power on by the device driver then can access it.

ShaneCCC,

I would like to know if there is no device located on the path of any I2C, does it have problem in ‘i2cdetect’ ?

As we know, even P2597, some I2C has no device be located on its path.
And it doesn’t shown any fail if I use ‘i2cdetect’ command.

I don’t understand why the same OS shows ‘no ack’ on my carrier board even it has no device be located on its path.

P.S.: I tested all I2Cs via i2cdetect but fail.

Regards,

Tonie

“no ack” means host send identify command to devices and devices have no response. Please define what you mean have problem in i2cdetect?

Hi, ShaneCCC,

Similar error messages like :

0 1 2 3 4 5 6 7 8 9 a b [ 381.089237] tegra-i2c c240000.i2c: no acknowledge from address 0x3
c d e f
00: – [ 381.099327] tegra-i2c c240000.i2c: no acknowledge from address 0x4
– [ 381.107974] tegra-i2c c240000.i2c: no acknowledge from address 0x5
– [ 381.114833] tegra-i2c c240000.i2c: no acknowledge from address 0x6
– [ 381.121685] tegra-i2c c240000.i2c: no acknowledge from address 0x7
– [ 381.128488] tegra-i2c c240000.i2c: no acknowledge from address 0x8
– [ 381.135361] tegra-i2c c240000.i2c: no acknowledge from address 0x9
– [ 381.142195] tegra-i2c c240000.i2c: no acknowledge from address 0xa
– [ 381.149024] tegra-i2c c240000.i2c: no acknowledge from address 0xb
– [ 381.155881] tegra-i2c c240000.i2c: no acknowledge from address 0xc
– [ 381.162716] tegra-i2c c240000.i2c: no acknowledge from address 0xd
– [ 381.169542] tegra-i2c c240000.i2c: no acknowledge from address 0xe
– [ 381.176349] tegra-i2c c240000.i2c: no acknowledge from address 0xf

I tried 3160000, c240000 and others. All of them got same error.

Regards,

Tonie

As I said this message tell the 0x4,0x5 … slave device have no response doesn’t mean all i2c bus not working. You should get the same message form the P2597 too.

Hi, ShaneCCC,

I feel apology that I make a big mistake.
I gave you wrong information because the result of using ‘i2ctools’ are different between uses terminal on desktop and console. It confuses me.

Let me re-report the current status :

  1. TX2 on my carrier board :
    i2c@C240000 is working but the waveform is wrong.
    The pulse from oscilloscopeare wrong.
    Each pulse is far from the other one.
  2. TX1 on my carreir board :
    i2c is working and the waveform is correct.

Am I set wrong speed ?
In tegra186-soc-i2c.dtsi, the clock frequency of the gen2_i2c is 100000.
Which one is correct ?

Please advise.

Regards,

Tonie

Did you measure the frequency of them? Can you please post waveform picture here?

Hi, Trumany,

I cannot post image here. Could you please tell me how ?

I measure the time different between each pulse, it is around 7 ms.
It’s too big to be read/write by rt5639. That’s the reason my system always show ‘no ack’.

I also tried to set clock-frequency to be 400000 but it is still fail.

No idea of why.
May I have your advise for further step ?

Regards,

Tonie

@Tonie
You just need to click the Image button in the toolbar and choose the picture to upload.

When I click that, it shows

@Tonie
Have no idea why you can attached image here. Please upload the image somewhere else and provide the link here.

https://upload.cc/i/Fq60TZ.bmp

Tonie cannot upload the img. So I’m helping him to upload here:
https://upload.cc/i/Fq60TZ.bmp

From the waveform, device is not ‘ACKing’ to slave address 0x1C.

Tonie,
You need check device side power/reset signal at first.

Hi, ShaneCCC and Alex,

Now I2C is working for rt5639.
The root cause is ldo1-en pin.

I added :
realtek,ldo1-en-gpios = <&tegra_main_gpio TEGRA_MAIN_GPIO(J,6) GPIO_ACTIVE_HIGH>;
Then the driver is probed successfully.

Now the next issue is

[ 13.515857] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no source widget found for x HPOL
[ 13.515860] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x HPOL -> direct -> x Headphone Jack
[ 13.515888] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no source widget found for x HPOR
[ 13.515890] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x HPOR -> direct -> x Headphone Jack
[ 13.515909] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no source widget found for x SPORP
[ 13.515911] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x SPORP -> direct -> x Int Spk
[ 13.515928] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no source widget found for x SPORN
[ 13.515930] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x SPORN -> direct -> x Int Spk
[ 13.515947] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no source widget found for x SPOLP
[ 13.515948] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x SPOLP -> direct -> x Int Spk
[ 13.515966] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no source widget found for x SPOLN
[ 13.515968] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x SPOLN -> direct -> x Int Spk
[ 13.515985] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no sink widget found for x micbias1
[ 13.515987] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x Mic Jack -> direct -> x micbias1
[ 13.516004] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no sink widget found for x IN2P
[ 13.516006] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x Mic Jack -> direct -> x IN2P
[ 13.516023] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no sink widget found for x IN2P
[ 13.516025] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x Mic Jack -> direct -> x IN2P
[ 13.516042] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no sink widget found for x DMIC L1
[ 13.516044] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x Int Mic -> direct -> x DMIC L1
[ 13.516060] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no sink widget found for x DMIC L2
[ 13.516062] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x Int Mic -> direct -> x DMIC L2
[ 13.516079] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no sink widget found for x DMIC R1
[ 13.516080] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x Int Mic -> direct -> x DMIC R1
[ 13.516097] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no sink widget found for x DMIC R2
[ 13.516099] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route x Int Mic -> direct -> x DMIC R2
[ 13.516188] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no source widget found for l OUT
[ 13.516190] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route l OUT -> direct -> l IN
[ 13.516206] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no source widget found for s OUT
[ 13.516208] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route s OUT -> direct -> s Headphone
[ 13.516224] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: no sink widget found for s IN
[ 13.516226] tegra-snd-t186ref-mobile-rt5639/40 sound: ASoC: Failed to add route s Mic -> direct -> s IN
[ 13.526095] input: tegra-snd-t186ref-mobile-rt5639 Headphone Jack as /devices/sound/sound/card1/input2
[ 13.526477] tegra-snd-t186ref-mobile-rt5639/40 sound: codec-dai “dit-hifi” registered
[ 13.526479] tegra-snd-t186ref-mobile-rt5639/40 sound: This is a dummy codec

I will check those wedgets from now on.

Regards,

Tonie

Hi, ShaneCCC,

Now I’ve ported rt5639 related drivers on TX2 and in Settings, you can see rt5639 be shown.
But it has no sound now.
here are the aplay -l :

nvidia@tegra-ubuntu:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: tegrahda [tegra-hda], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: tegrahda [tegra-hda], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 0: ADMAIF1 CIF ADMAIF1-0
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 1: ADMAIF2 CIF ADMAIF2-1
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 2: ADMAIF3 CIF ADMAIF3-2
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 3: ADMAIF4 CIF ADMAIF4-3
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 4: ADMAIF5 CIF ADMAIF5-4
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 5: ADMAIF6 CIF ADMAIF6-5
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 6: ADMAIF7 CIF ADMAIF7-6
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 7: ADMAIF8 CIF ADMAIF8-7
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 8: ADMAIF9 CIF ADMAIF9-8
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 9: ADMAIF10 CIF ADMAIF10-9
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 10: ADMAIF11 CIF ADMAIF11-10
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 11: ADMAIF12 CIF ADMAIF12-11
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 12: ADMAIF13 CIF ADMAIF13-12
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 13: ADMAIF14 CIF ADMAIF14-13
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 14: ADMAIF15 CIF ADMAIF15-14
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 15: ADMAIF16 CIF ADMAIF16-15
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 16: ADMAIF17 CIF ADMAIF17-16
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 17: ADMAIF18 CIF ADMAIF18-17
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 18: ADMAIF19 CIF ADMAIF19-18
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 19: ADMAIF20 CIF ADMAIF20-19
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 60: ADSP PCM1 ADSP-FE1-60
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: tegrasndt186ref [tegra-snd-t186ref-mobile-rt5639], device 61: ADSP PCM2 ADSP-FE2-61
Subdevices: 1/1
Subdevice #0: subdevice #0

I don’t know if there is other thing I have to set ?

For example, on TX1 , we need to configure I2S via

  1. gpio@6000d000 {
  2.  gpio_default: default {
    
  3.      gpio-to-sfio = <8 9 10 11 216 219>;
    
  4.  };
    
  5. };

Is this needed by TX2 ?
Please advise.

Regards,

Tonie