Using I2S2 for receiving audio on TX1

I’ve been using I2S1 on J21 to receive audio on the TX1 without any problems. I now need to change the system to receive audio on I2S2 on J26, but I cannot get it to work. Looking through the developer forum indicates that the interface is actually called i2s5, so I changed the dts file to use I2S5 instead of I2S1 for cpu-dai-name and tegra_i2s5 instead of tegra_i2s1 for cpu-dai, but it doesn’t work. Any suggestions?

@cdb83
Did you connect like this topic https://devtalk.nvidia.com/default/topic/1014405
Could you help to check the pin status.

I did similar things that are shown in the topic you linked to get I2S1 to work. That topic is talking about the same I2S interface that I was using (which I’m calling I2S1). I don’t have any problems with that. The problem I’m encountering is using I2S2 on J26 to receive audio. One thing I’m doing is setting the interface to frame-master and bitclock-master so that it can receive LRCLK and SCLK. Doing this works fine with I2S1.

Pin status follows:

sudo devmem2 0x70003254 h
/dev/mem opened.
Memory mapped at address 0x7faefa6000.
Value at address 0x70003254 (0x7faefa6254): 0x6041

sudo devmem2 0x70003258 h
/dev/mem opened.
Memory mapped at address 0x7f879b2000.
Value at address 0x70003258 (0x7f879b2258): 0x6041

sudo devmem2 0x7000325c h
/dev/mem opened.
Memory mapped at address 0x7fb0488000.
Value at address 0x7000325C (0x7fb048825c): 0x6041

sudo devmem2 0x70003260 h
/dev/mem opened.
Memory mapped at address 0x7f7ba4a000.
Value at address 0x70003260 (0x7f7ba4a260): 0x6041

sudo cat /sys/kernel/debug/tegra_gpioName:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
A: 0:0 24 00 00 24 00 00 000000
B: 0:1 00 00 00 00 00 00 000000
C: 0:2 1f 00 00 18 00 00 000000
D: 0:3 10 10 00 10 00 00 000000
E: 1:0 70 00 00 00 00 00 000000
F: 1:1 00 00 00 00 00 00 000000
G: 1:2 00 00 00 00 00 00 000000
H: 1:3 ff 1b 1b 40 00 24 002024
I: 2:0 0f 0d 01 02 00 00 000000
J: 2:1 00 00 00 00 00 00 000000
K: 2:2 f0 20 00 50 00 00 008080
L: 2:3 02 00 00 02 00 02 000000
M: 3:0 00 00 00 00 00 00 000000
N: 3:1 00 00 00 00 00 00 000000
O: 3:2 00 00 00 00 00 00 000000
P: 3:3 00 00 00 00 00 00 000000
Q: 4:0 00 00 00 00 00 00 000000
R: 4:1 00 00 00 00 00 00 000000
S: 4:2 f0 d0 90 a0 00 00 000000
T: 4:3 03 02 00 00 00 01 000101
U: 5:0 0c 00 00 00 00 00 000000
V: 5:1 6e 66 00 00 00 00 000000
W: 5:2 00 00 00 00 00 00 000000
X: 5:3 ff 00 00 fe 00 74 606000
Y: 6:0 03 00 00 03 00 01 010100
Z: 6:1 1f 08 00 17 00 07 030300
AA: 6:2 00 00 00 00 00 00 000000
BB: 6:3 0c 04 00 00 00 00 000000
CC: 7:0 32 30 20 20 00 02 020200
DD: 7:1 00 00 00 00 00 00 000000
EE: 7:2 00 00 00 00 00 00 000000
FF: 7:3 00 00 00 00 00 00 000000

@cdb83
Could you post the DTB that you were modified.

Here is the dtb.

It’s configured to use I2S5 for dai-link-1 instead of I2S1. It also has bitclock-master and frame-master set since I’m trying to receive audio. If I use I2S1, I’m able to receive audio.

https://www.dropbox.com/s/v1m38s7dhhyn42y/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb?dl=0

Sorry to confuse you. I would like you post the device tree what you were modified.

I don’t understand. That dropbox link is to my modified device tree dtb file that I use for my kernel. Isn’t that what you want? Please explain.

I would like to know what modified. Can you post the source code what you modify here?

I modified the tegra210-jetson-cv-base-p2597-2180-a00.dts file replacing references to i2s1 with i2s5:

nvidia,dai-link-1 {
			link-name = "rt565x-playback";
//			cpu-dai = <&tegra_i2s1>;
			cpu-dai = <&tegra_i2s5>;
			codec-dai = <&spdif_dit4>;
//			cpu-dai-name = "I2S1";
			cpu-dai-name = "I2S5";
			codec-dai-name = "dit-hifi";
			format = "i2s";
// use bitclock-master and frame-master when using sclk and lrclk
// from toshiba chip.  bitclock-slave and frame-slave causes the
// TX1 to output clocks on those signals
//			bitclock-slave;
			bitclock-master;
//			frame-slave;
			frame-master;
			bitclock-noninversion;
			frame-noninversion;
//			bit-format = "s16_le";
			bit-format = "s32_le";
			bclk_ratio = <0>;
//			bclk_ratio = <4>;
			srate = <48000>;
			num-channel = <2>;
			ignore_suspend;
			name-prefix = "x";
		};

@cdb83
Please apply this patch for i2s5 in kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts

Adding enable-cya as shown in your patch made no difference. I still cannot receive audio over I2S5.