All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Thiery <heiko.thiery@gmail.com>
To: u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <festevam@gmail.com>, Michael Walle <michael@walle.cc>
Subject: imx: imx8mq: mxc_get_clock for MXC_I2C_CLK is missing
Date: Wed, 8 Sep 2021 15:08:43 +0200	[thread overview]
Message-ID: <CAEyMn7ZzM8__mxNEdFGw3p1AzFEqpYd0iXZR3AzYBFn-in7L=g@mail.gmail.com> (raw)

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.

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

             reply	other threads:[~2021-09-08 13:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 13:08 Heiko Thiery [this message]
2021-09-08 14:07 ` imx: imx8mq: mxc_get_clock for MXC_I2C_CLK is missing Heiko Thiery
2021-09-08 15:45   ` Heiko Thiery
2021-09-09  8:08     ` Heiko Thiery
2021-09-15  2:53 ` Peng Fan (OSS)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEyMn7ZzM8__mxNEdFGw3p1AzFEqpYd0iXZR3AzYBFn-in7L=g@mail.gmail.com' \
    --to=heiko.thiery@gmail.com \
    --cc=festevam@gmail.com \
    --cc=michael@walle.cc \
    --cc=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.