Drive the audio codec chip RT5616 on Orin Nano

Hi, all:
I tried driving RT5616 to Orin Nano and modified it to tegra234-soc-i2c.dts and tegra234-p3767-common-audio.dtsi. Now the i2c is ok, but did not found the sound card. Additionally, my RT5616 uses i2S0, but is it not included in DTS?

Hi 2639376969,

Are you using the devkit or custom board for Orin Nano?
What’s your Jetpack version in use?

Please share the full dmesg for further check.

I am using a Custom Board, Jetpack version is 5.1.3(sdk35.5),
dmesg.log (62.7 KB)

These are my modifications, Do I need to modify other files besides this, such as tegra_machine-drive.c?
D3M5HFR9{VVTXU~S1N64_NN
T($5$GR}V5@2FUXK0S6}D

The i2S0 interface used by RT5616,So which node should be modified under tegra186-audio-dai-links.dtsi
D53VL8IGOR5U%LLVW4UXZM1

[   12.985027] rt5616 0-001b: ASoC: error at snd_soc_dai_set_fmt on rt5616-aif1: -22
[   12.992732] rt5616 0-001b: ASoC: Failed to set DAI format: -22
[   13.004853] tegra-asoc: sound: snd_soc_register_card failed (-22)
[   13.011464] tegra-asoc:: probe of sound failed with error -22

It seems probe failed in your driver.

Have you referred to Audio Setup and Development — NVIDIA Jetson Linux Developer Guide 1 documentation to port Audio driver?

Yes, I have read this document, but I think there is i2s0 in the document, but there are only i2s1 to i2s6 in tegra234-soc-audio.dtsi. How can I use i2s0?

I think it is caused from the naming different in the document and the device tree.
It should be I2S2.

Please modify tegra_i2s2: i2s@2901100 { node in device tree.

Thanks, can this be found from which document?Then I don’t need to modify tegra_machine-drive.c, I just need to modify dtsi?

You have to check the device tree and also document for this.
From the link I shared, you would know that the I2S on 40-pins expansion header is I2S2 as following.

It seems you don’t need to modify the driver during porting.
Please modify the device tree first and check if there’s the error in dmesg.