imx: imx8mq: mxc_get_clock for MXC_I2C_CLK is missing

Heiko Thiery heiko.thiery at gmail.com
Thu Sep 9 10:08:38 CEST 2021


Hi,

Am Mi., 8. Sept. 2021 um 17:45 Uhr schrieb Heiko Thiery
<heiko.thiery at gmail.com>:
>
> Hi,
>
> Am Mi., 8. Sept. 2021 um 16:07 Uhr schrieb Heiko Thiery
> <heiko.thiery at gmail.com>:
> >
> > 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.
>
> Hi. I think now I understand that the SPL configures the I2C to 100kHz
> and after that U-Boot will configure the 400kHz frequency due to the
> dts configuration. I will measure the SPL vs U-Boot frequencies
> tomorrow. I will confirm that after that.

As said before. With the proposed adding the right root clock for I2C
the configuration can properly be done. The frequency of I2C1 is
100kHz in SPL [fix_spl_startup.PNG] and will be reconfigured according
the DTS settings during u-boot init. In my case 400kHz
[fix_spl_i2c_probe.PNG]. In the attached screenshots you can see that
without the fix the value is about 1MHz [wrong_spl_startup.PNG].

--
Heiko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_spl_startup.PNG
Type: image/png
Size: 527263 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210909/4d7e14f7/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrong_spl_startup.PNG
Type: image/png
Size: 539151 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210909/4d7e14f7/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_uboot_i2c_probe.PNG
Type: image/png
Size: 621600 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210909/4d7e14f7/attachment-0005.png>


More information about the U-Boot mailing list