imx: imx8mq: mxc_get_clock for MXC_I2C_CLK is missing

Heiko Thiery heiko.thiery at gmail.com
Wed Sep 8 16:07:18 CEST 2021


Hi,

Am Mi., 8. Sept. 2021 um 15:08 Uhr schrieb Heiko Thiery
<heiko.thiery at gmail.com>:
>
> Hi Peng,
>
> I faced an issue with the I2C bus speed in SPL for the imx8mq. I
> figured out that the bus frequency is set to about 1MHz. While digging
> into that I found that the clk ID for the I2C is not returned for the
> imx8mq correctly.
>
> Can you confirm that this is missing here.
>
> This is what I added and now it looks better.

Just measured the frequency and it is still not ok. It changed from
1MHz to 400kHZ. But expected is 100KHz.

>
> diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> index 60e2218a3c..9e45ffd66b 100644
> --- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> +++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> @@ -363,6 +363,12 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
>                 return get_root_clk(USDHC1_CLK_ROOT);
>         case MXC_ESDHC2_CLK:
>                 return get_root_clk(USDHC2_CLK_ROOT);
> +       case MXC_I2C_CLK:
> +               return get_root_clk(I2C1_CLK_ROOT);
> +       case MXC_UART_CLK:
> +               return get_root_clk(UART1_CLK_ROOT);
> +       case MXC_QSPI_CLK:
> +               return get_root_clk(QSPI_CLK_ROOT);
>         default:
>                 return get_root_clk(clk);
>         }
>
>


--
Heiko


More information about the U-Boot mailing list