Audio codec rt5639 on TX2NX

How can I modify the devicetree and other files to make the device recognize the rt5639 chip and enable it

Please refer the Development Guide : https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/asoc_driver.19.2.html#wwpID0E03V0HA

After I modify the devicetree, displayed:rt5640 2-001c: Device with ID register 0xffffff80 is not rt5640/39.

Where should I modify?

Please attach dmesg logs and code modification done in your tree to enable RT5639.

Thanks,
Sharad

Hi:
dmesg.txt (63.7 KB)
tegra186-p3636-0001-p3509-0000-a01.dts (6.2 KB)

Thanks,

I use the i2cdetect tool to view my hardware device rt5639, but I don’t see the corresponding device. Why? I can see the device from NX.

How are you interfacing RT5639 with TX2NX? Can you share schematics?

Looks like using wrong I2C address : Jetson TX2 series : 40pin Header I2C Bus address is 0x0c240000 and not 0x31e0000.

Please refer the Development Guide : https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/asoc_driver.19.2.html#wwpID0E03V0HA

Please follow above section to set pinmux and fix DAPM routes after ensuring codec I2C probe.

Thanks,
Sharad

I use pin-232 and pin-234;5639 not mounted to I2C


This doesn’t makes sense at all. The print in dmesg.txt has a different I2C address than what is mentioned in tegra186-p3636-0001-p3509-0000-a01.dts for RT5639.

[ 1.463278] tegra-i2c 3180000.i2c: no acknowledge from address 0x1c
[ 1.463310] rt5640 2-001c: Device with ID register 0xffffff80 is not rt5640/39


	i2c@31e0000 {
		status = "okay";
		rt5640: rt5640@1c {

Providing info. based on the schematics : Pins 232 and 234 correspond to I2C with address 0xc250000. Place codec entry only under corresponding i2c node in the DT.

i2c@c250000 {
	status = "okay";
	rt5640: rt5640@1c {

and ensure pinmux is set for the i2c using below cmd :

cat /sys/kernel/debug/tegra_pinctrl_reg | grep -iE "0x0c302030|0x0c302028"

Both registers should have value of 0x440. If the value is not correct, please set correct pinmux for I2C - https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/adaptation_and_bringup_tx2.html#wwpID0E0LP0HA

Thanks,
Sharad

1 Like

The sound card chip has been solved! Thank you! I found a problem when I used tx2nx. The keyboard can’t work when I unplug it from the USB port and plug it into another USB port.

Thanks,

I suggest to open separate topic for USB keyboard issue.