I think, that I found source of problem.
ECSPI2 is using clock IMX7D_SAI1_ROOT_CLK and audio card is using clock IMX7D_AUDIO_MCLK_ROOT_CLK for MCLK signal.
When I look into clk-imx7d.c there is
hws[IMX7D_ECSPI2_ROOT_CLK] = imx_clk_hw_gate4("ecspi2_root_clk", "ecspi2_post_div", base + 0x4790, 0);
hws[IMX7D_AUDIO_MCLK_ROOT_CLK] = imx_clk_hw_gate4("audio_mclk_root_clk", "audio_mclk_post_div", base + 0x4790, 0);
As you can see, both are using offset 0x4790 without setting common count, as it is e.g. for
hws[IMX7D_SAI1_ROOT_CLK] = imx_clk_hw_gate2_shared2("sai1_root_clk", "sai1_post_div", base + 0x48c0, 0, &share_count_sai1);
hws[IMX7D_SAI1_IPG_CLK] = imx_clk_hw_gate2_shared2("sai1_ipg_clk", "ipg_root_clk", base + 0x48c0, 0, &share_count_sai1);
I don't know, if IMX7D_AUDIO_MCLK_ROOT_CLK even should be at that address, there is no CCGR register defined for it in Clock tree in Refrence manual (see attached picture). CCGR121 has offset 0x4790, which is defined in clock file.
Problem is, that even from quick look, I can see same unhandled conflict for
hws[IMX7D_ECSPI3_ROOT_CLK] = imx_clk_hw_gate4("ecspi3_root_clk", "ecspi3_post_div", base + 0x47a0, 0);
hws[IMX7D_WRCLK_ROOT_CLK] = imx_clk_hw_gate4("wrclk_root_clk", "wrclk_post_div", base + 0x47a0, 0);
I can't find any usage of IMX7D_WRCLK_ROOT_CLK, but whole file needs to be definitely checked by somebody competent !!!
Is there any place to report bugs like this?
Thanks in advance,
Michal