[PATCH] toradex: apalis/colibri_imx6: Fix CLKO1/CLKO2 output

Fabio Estevam festevam at gmail.com
Fri Jun 24 12:30:25 CEST 2022


On Fri, Jun 24, 2022 at 6:52 AM Francesco Dolcini
<francesco.dolcini at toradex.com> wrote:
>
> Set CLK01 and CLK02 to 24MHz and enable it in CCM_CCOSR register.
>
> This clock is used by both the audio codec (CLKO1) and by the CSI camera
> (CLKO2) and is expected to be 24MHz.
>
> Despite the wrong 16.5MHz there was no real issue because of the wrong
> frequency since Linux reconfigures the clocks afterward, however this
> was triggering an issue with noise coming from the SGTL5000 audio codec.
>
> The problem is that the SGTL5000 does not have a reset pin and after it
> is configured if the input MCLK clock is disabled it produces a constant
> noise on its output, this was happening on software reboot.
>
> Forcing the clock to be enabled in U-Boot prevent the problem by making
> sure that the clock is always available, without this change as soon as
> Linux was changing the clock tree (setting clk_out_sel=1 without setting
> clko2_en=1) the noise would start till the actual clock was enabled
> (clko2_en=1) during the SGTL5000 driver probe.
>
> Signed-off-by: Francesco Dolcini <francesco.dolcini at toradex.com>

Reviewed-by: Fabio Estevam <festevam at denx.de>


More information about the U-Boot mailing list