mic driver via i2s

Dear nvidia guys,
I want driver a mic via i2s. Tx1 as master and The mic which would send data if master send i2s clock(bclk and lrclk).
Now, I can get audio_mclk, but can’get i2s clk signal.

The driver I modify ad193x and tegra_t210ref_alt, and I use tegra_i2s1
The work I have done:
1.IO config
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(BB, 0)    /* 216 F1 AUDIO_MCLK     R1/R332/1 */
                            >;
            };

    };
  2.driver name
        I saw some friend can`t get i2s singal, I check the driver name, make sure it is correct.

  3.make sure no hardware connect problem.

The problem:
1.can`t get i2s singal
2.I think there is some problem in clock, clock tree info as bellow:
pll_a on 1 x9.5… 368639844
pll_a_out0 on 1 15.0 24575990
extern1 on 3 1.0 24575990
clk_out_1 on 2 1.0 24575990
d_audio off 0 1.0 24575990 vdd_core 0 mV d_audio_slcg_ovr off 0 24575990
dmic3 off 0 11.0 2234181
dmic2 off 0 11.0 2234181
dmic1 off 0 11.0 2234181
spdif_out $ off 0 21.0 1170286
vdd_core 0 mV
i2s4 off 0 5.50 4468362
i2s3 off 0 5.50 4468362
i2s1 off 0 5.50 4468362
i2s0 off 0 10.50 2340571
3.The function tegra210_i2s_hw_params not be called.
4.some doubt in DT, what difference between them:
about I2s have two config:
ahub {
i2s@702d1000 {
pinctrl-names = “dap_active”, “dap_inactive”;
pinctrl-0 = <>;
pinctrl-1 = <>;
regulator-supplies = “vdd-1v8-audio-hv”, “vdd-1v8-audio-hv-bias”;
vdd-1v8-audio-hv-supply = <&max77620_sd3>;
vdd-1v8-audio-hv-bias-supply = <&max77620_sd3>;
fsync-width = <0>;
};
the other is
tegra_i2s1: i2s@702d1000 {
compatible = “nvidia,tegra210-i2s”;
reg = <0x702d1000 0x100>;
nvidia,ahub-i2s-id = <0>;
fsync-width = <31>;
prod-name = “i2s0_prod”;
status = “okay”;
};

   5.any audio config is need in board_xxx.c

another problem, I found the dai called not I what I wanted:
[ 1695.881790] tegra_t210ref_ad1937_hw_params, 647 i2s dai driver name:ADMAIF1
[ 1695.881797] tegra_t210ref_ad1937_hw_params, 648 codec dai driver name:ADMAIF1
The dai which I want to call is DAP and ad193x-hifi.
Audio path I set is:
amixer -c 1 sset ‘ADX1 Mux’ ‘I2S1’
amixer -c 1 sset ‘ADMAIF1 Mux’ ‘ADX1-1’

Hi weiwei
Could you check the pinmux by
cat /sys/kernel/debug/pinctrl/700008d4.pimux/ pinmux-pin | grep -i dap1_
cat /sys/kernel/debug/pinctrl/700008d4.pimux/ pinmux-functions | grep -i i2s1

Hi, ShaneCCC,
The information which I get is bellow:
pin 8 (DAP1_FS_PB0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 9 (DAP1_DIN_PB1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 10 (DAP1_DOUT_PB2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 11 (DAP1_SCLK_PB3): (MUX UNCLAIMED) (GPIO UNCLAIMED)

function: i2s1, groups = [ dap1_fs_pb0 dap1_din_pb1 dap1_dout_pb2 dap1_sclk_pb3 ]

Hi Wei
There’s no any problem with the pinmux. Could you post the result from below command.

cat /sys/kernel/debug/tegra_gpio

Hi Wei,

Have you clarified and resolved the problem?
Please share the status then we can provide the further suggestion.

Thanks