2021-08-06 07:14 AM
Hi All,
i am using stm32mp1 with i2c on sgtl5000 codec and control lines are over carrier i2s
i am getting kernel soc sgtl5000.c error
sgtl5000 0-000a: Error reading chip id -6
<STM32_PINMUX('A', 15, AF5)>; /* I2S1_WS */
<STM32_PINMUX('Z', 0, AF5)>, /* I2S1_CK */
<STM32_PINMUX('Z', 1, AF5)>, /* I2S1_SDI */
<STM32_PINMUX('Z', 2, AF5)>, /* I2S1_SDO */
<STM32_PINMUX('Z', 6, AF5)>; /* I2S1_MCK */
Any reference dts on i2s1 would be helpful.. and suggest on kernel error .
2021-09-09 11:16 PM
The issue seams to be in the parent clocks of mclk. Can you provided the full trace of the clock summary ? Could you had some trace around mkoe enable (dynamic traces or get parent traces ?
2021-09-23 06:47 AM
clocks = <&rcc SPI1>, <&rcc SPI1_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
clock-names = "pclk", "i2sclk", "x8k", "x11k";
i am seeing i2s clk is zero rest i am getting clk info on mkoe enable
can i get any idea/patch suggestion for our board to generate always i2s_mclk on ? as the same carrier card is working in imx28 and imx6 controller as a som, all uses same signal design for sgtl5000.
2021-09-23 07:54 AM
with clock dynamic traces, you don't see any information about I2s clock. I assume the clock framework will fail to enable it ....
The driver is not targeted to support this use case, this is why it is painfull.
We are trying to find a workaround but your kernel version is not supported anymore on our side so it is not easy.
2021-09-23 08:19 AM
you can test in new kernel, 5.XX.*** as i have used new i2s driver changes , i see no clk at begin at new i2s driver changes
2021-09-23 08:24 AM
Yes for sure but this use case is not supported by the driver so we will probably have the same result.
The question is more to help you to find a workaround to unblock the situation on your side. And for this, being on an "old" Kernel version does not help.
2021-09-23 11:33 PM
Hello,
On current I2S driver the I2S clock is activated only when you want to do a playback , then the mclk will be also generated.
So the workaround in your case would be to enable the I2S clock when the I2S driver is probed. You may give a trial ...
Cf: clk_prepare_enable() dans stm32_i2s_startup().
Then you will need also to avoid to stop it when the playback is stopped.
2021-09-23 11:53 PM
IF this workaround can fit your use case, as I said you will need also to patch the stop of the clock after the playback:
cf: clk_disable_unprepare() in stm32_i2s_shutdown() callback function.
2021-09-29 01:52 AM
Bernard, Yes thanks i was deviated in other, will come back on findings,
stm32_i2s_startup() is not that straight forward. to run from probe,
2021-09-29 02:28 AM
you only need the clock prepare_enable (not the full fonction):
ret = clk_prepare_enable(i2s->i2sclk);
if (ret < 0) {
dev_err(cpu_dai->dev, "Failed to enable clock: %d\n", ret);
return ret;
}
2021-10-18 12:28 AM
any update ?