weiwei
June 16, 2017, 9:13am
1
I used i2s1 for mic input,when I change to pin D13,C14,D14,C15, it correspond i2s5b , when I operate the for pin as gpio pk0,pk1,pk2,pk3, it could be set to high and low, so the hardware connection is well.
but when I set to SFIO, the i2s could not work.
what is i2s5b? though it in pinmap and pin control,but it can not find in other module,
Does i2s5b respond to i2s5, i2s5 can not work.
I2S5B is I2S1 as below picture showing:
External Media
External Media
weiwei
June 20, 2017, 2:51am
3
hi,trumany,
I have set to the correct i2s,but it still can not work.
gpio: gpio@6000d000 {
gpio-init-names = “default”;
gpio-init-0 = <&gpio_default>;
gpio_default: default {
/* Transfer pins from GPIO to I2S for audio. */
gpio-to-sfio = < /* GPIO# TX1-PIN TX1-FUNC/ERA-FUNC CODEC-PIN */
TEGRA_GPIO(B, 0) /* 8 H1 I2S0_LRCLK/SFSYNC R335/3 */
TEGRA_GPIO(B, 1) /* 9 G1 I2S0_SDIN R339/5 */
TEGRA_GPIO(B, 2) /* 10 H2 I2S0_SDOUT R337/4 */
TEGRA_GPIO(B, 3) /* 11 G2 I2S0_CLK/SRCLK R334/2 */
TEGRA_GPIO(K, 0) /* 80 D13 I2S1_LRCLK/SFSYNC */
TEGRA_GPIO(K, 1) /* 81 C14 I2S1_SDIN */
TEGRA_GPIO(K, 2) /* 82 D14 I2S1_SDOUT */
TEGRA_GPIO(K, 3) /* 83 C15 I2S1_CLK/SRCLK */
TEGRA_GPIO(BB, 0) /* 216 F1 AUDIO_MCLK */
>;
};
};
nvidia,dai-link-1 {
link-name = "rt565x-playback";
cpu-dai = <&tegra_i2s2>;
codec-dai = <&spdif_dit4>;
cpu-dai-name = "I2S2";
codec-dai-name = "dit-hifi";
format = "i2s";
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s32_le";
bclk_ratio = <1>;
srate = <96000>;
num-channel = <2>;
ignore_suspend;
name-prefix = "x";
};
tegra_i2s2: i2s@702d1100 {
compatible = "nvidia,tegra210-i2s";
reg = <0x702d1100 0x100>;
nvidia,ahub-i2s-id = <1>;
status = "okay";
};
weiwei
June 20, 2017, 5:36am
5
hi, shaneCCC,
I am afraid that you do not catch my mean, I only focus the signal on i2s, do not care which codec.
Wei
If the codec is working that means the i2s is working well, right.
You may need to check the declare of gpio-to-sfio is compile to you DTB
weiwei
June 20, 2017, 7:12am
7
Hi, shaneCCC,
I have gaven my sfio config.below is my tegra gpio table.
root@tegra-ubuntu:/sys/kernel/debug# cat tegra_gpio
Name: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 00 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 0b 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 d0 00 00 000000
L: 2:3 02 00 00 02 00 02 000202
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 f0 80 00 00 00 000000
T: 4:3 03 03 01 00 00 00 000000
U: 5:0 0c 00 00 08 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 fc 00 70 606000
Y: 6:0 03 00 00 03 00 01 010100
Z: 6:1 1f 08 00 17 00 07 030704
AA: 6:2 00 00 00 00 00 00 000000
BB: 6:3 0c 04 00 08 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
@weiwei
The dump file looks good.
Can you share the detail how you verify the i2s is not working?
weiwei
June 29, 2017, 5:34am
10
hi, nvidia:
this is not correct, please check:
cat /sys/kernel/debug/pinctrl/700008d4.pinmux/pinmux-functions | grep -i i2s2
function: i2s2, groups = [ dap2_fs_paa0 dap2_sclk_paa1 dap2_din_paa2 dap2_dout_paa3 ]
weiwei
June 29, 2017, 5:40am
11
hi shaneccc,
we use I2c connect fpga, not a codec chip, It have been worked on I2S1(pb0,pb1,pb2,pb3),but it can not work on i2s2(pk0, pk1, pk2, pk3)
I watch the i2s signal by oscillograph
weiwei
June 29, 2017, 5:47am
12
function: i2s1, groups = [ dap1_fs_pb0 dap1_din_pb1 dap1_dout_pb2 dap1_sclk_pb3 ]
function: i2s2, groups = [ dap2_fs_paa0 dap2_sclk_paa1 dap2_din_paa2 dap2_dout_paa3 ]
function: i2s3, groups = [ dmic1_clk_pe0 dmic1_dat_pe1 dmic2_clk_pe2 dmic2_dat_pe3 ]
function: i2s4a, groups = [ uart2_tx_pg0 uart2_rx_pg1 uart2_rts_pg2 uart2_cts_pg3 ]
function: i2s4b, groups = [ dap4_fs_pj4 dap4_din_pj5 dap4_dout_pj6 dap4_sclk_pj7 ]
function: i2s5a, groups = [ dmic3_clk_pe4 dmic3_dat_pe5 pe6 pe7 ]
function: i2s5b, groups = [ pk0 pk1 pk2 pk3 ]
weiwei
June 29, 2017, 6:11am
13
hi, nvidia,
How to make I2S5B and I2S1 coreespond.
weiwei
Could you help to dump below reg by devmem2. You can install devmem2 by apt-get.
0x70003254: PINMUX_AUX_GPIO_PK0_0
0x70003258: PINMUX_AUX_GPIO_PK1_0
0x7000325c: PINMUX_AUX_GPIO_PK2_0
0x70003260: PINMUX_AUX_GPIO_PK3_0
@weiwei
Could you share your experience to help others user?
Hi, weiwei
Can you help me?
Hi weiwei
Which version is your kernel?
@weiwei
Could you share your experience to help others user?
How to enable I2S5B?