8-channel audio input i2s_8ch_0 slave clock

it needs to hook up with multi-dais + simple-audio-card + i2s_8ch_0, but don’t know how to write the DTS, anybody could provide a DTS demo?
I check the source of the driver, it should be finished, and up to 16 channels input link with i2s_8ch_1.

rk3308-rock-pi-s.dtb

let me answer myself… tested work @ 8 channels.

root:
i2s_8ch_0_dais: i2s-8ch-0-dais {
status = “okay”;
compatible = “rockchip,rk3308-multi-dais”, “rockchip,multi-dais”;
dais = <&i2s_8ch_0>;
capture,channel-mapping = <8>;
playback,channel-mapping = <8>;
frame-master = < 0 >; // 0 slave 1 master
bitclock-master = < 0 >; // 0 slave 1 master
};

vad-sound {
	status = "okay";
	compatible = "rockchip,multicodecs-card";
	rockchip,card-name = "rockchip,rk3308-vad";
	rockchip,cpu = <&i2s_8ch_0_dais>;
	rockchip,codec = <&vad>;
};

and others:
&i2s_8ch_0{
status = “okay”;
#sound-dai-cells = <0>;
rockchip,no-dmaengine; // without this kernel will crash
rockchip,clk-trcm = <0>; // tested 0/2 could work, 1 not work
rockchip,bclk-fs = <64>;
};

&i2s_8ch_2 {
status = “okay”;
rockchip,no-dmaengine;
#sound-dai-cells = <0>;
};

&vad {
status = “okay”;
rockchip,audio-src = <&i2s_8ch_0>;
rockchip,buffer-time-ms = <200>;
rockchip,det-channel = <0>;
rockchip,mode = <1>;
#sound-dai-cells = <0>;
};

still open for 16 channels.
in rockchip_multi_dais.c function rockchip_mdais_probe will check to link i2s0+i2s1…but never tried…
need help with the below codes, don’t know the logic, and did not find detailed descriptions in trm.
trm is not very detailed need to guess and try … a waste of time.

in TRM:
Support one I2S_16CH by gathering I2S_8CH_0 and I2S_8CH_1. When the I2S_16CH is slave mode, the I2S_8CH_0 and I2S_8CH_1 are both slave mode, they can transmit or receive respective to gather. When the I2S_16CH is master mode, one of I2S_8CH_0 and I2S_8CH_1 should be master mode and the other should be slave mode. In this case, user should enable GRF_SOC_CON2[14]. The figure below shows the topology when I2S_8CH_0 is master mode and I2S_8CH_1 is slave mode, the signal sclk/lrck_gather_tx/rx which derived by I2S_8CH_0 are input to I2S_8CH_1. User can also set I2S_8CH_1 to master mode and I2S_8CH_0 to slave mode, in this case, the signal clk/lrck_gather_tx/rx which derived by I2S_8CH_1 are input to I2S_8CH_0.

	if ((i2s0_fmt == SND_SOC_DAIFMT_CBS_CFS &&
	     i2s1_fmt == SND_SOC_DAIFMT_CBM_CFM) ||
	    (i2s0_fmt == SND_SOC_DAIFMT_CBM_CFM &&
	     i2s1_fmt == SND_SOC_DAIFMT_CBS_CFS)) {
		grf = syscon_regmap_lookup_by_phandle(np,
						      "rockchip,grf");
		if (IS_ERR(grf))
			return PTR_ERR(grf);

		dev_info(&pdev->dev, "enable i2s 16ch ctrl en\n");
		regmap_write(grf, RK3308_GRF_SOC_CON2,
			     BIT(14) << 16 | BIT(14));
	}