All of lore.kernel.org
 help / color / mirror / Atom feed
From: Angus Ainslie <angus@akkea.ca>
To: Heiko Thiery <heiko.thiery@gmail.com>
Cc: Angus Ainslie <angus.ainslie@puri.sm>,
	u-boot@lists.denx.de, Marek Vasut <marex@denx.de>,
	lukma@denx.de, seanga2@gmail.com, sbabic@denx.de,
	festevam@gmail.com, kernel@puri.sm, uboot-imx@nxp.com,
	peng.fan@nxp.com, Michael Walle <michael@walle.cc>
Subject: Re: [PATCH v4 2/4] clk: imx8mq: Add a clock driver for the imx8mq
Date: Wed, 16 Mar 2022 09:00:46 -0700	[thread overview]
Message-ID: <5918d6180131631dec19444e3349e9a0@akkea.ca> (raw)
In-Reply-To: <CAEyMn7aBSWUbfwxbb_W2azp0cMcR4YXEmkFXdRNpJHU7DGpe4g@mail.gmail.com>

Hi Heiko,

On 2022-03-16 08:55, Heiko Thiery wrote:
> Hi Angus,
> 
> [snip]
>> > > But then something went wrong when probing uart3 ... the baudrate
>> > > switched for the uart2 (console) and the serial output became broken.
>> > > Later when the kernel starts the output becomes correct again. So the
>> > > kernel seems to configure it correctly.
>> > >
>> > > see here: https://pastebin.com/raw/qXVShb3Q
>> > >
>> > > When I remove the "assigned-clock-parents = <&clk
>> > > IMX8MQ_SYS1_PLL_80M>;" for uart3 the output of uart2 (console) keeps
>> > > ok.
>> >
>> > If that "fixes" it then it means that the parent IMX8MQ_SYS1_PLL_80M
>> > clock rate is getting changed by the uart3 stanza.
>> >
>> > Are you using the mainline devicetree file for your board ? If not could
>> > you provide a link ?
>> 
>> I use the mainline u-boot/linux one.
> 
> We (thanks to Michael) found the issue. For the imx8mq the
> imx_get_uartclk() returns always the values for UART1_CLK_ROOT [1].
> This is wrong. Here we have to get the value dependent on the used
> UART.
> 
> [1]
> https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-imx/imx8m/clock_imx8mq.c#L381

Yeah that driver could do with an overhaul as it also does that for the 
ECSPI clocks which can also break things.

Angus

  reply	other threads:[~2022-03-16 16:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 13:08 [PATCH v4 0/4] Add a clock driver for the imx8mq Angus Ainslie
2022-03-15 13:08 ` [PATCH v4 1/4] dt-bindings: imx8mq-clock: add mainline definitions Angus Ainslie
2022-03-15 13:08 ` [PATCH v4 2/4] clk: imx8mq: Add a clock driver for the imx8mq Angus Ainslie
2022-03-15 15:12   ` Heiko Thiery
2022-03-15 15:35   ` Heiko Thiery
2022-03-15 15:46     ` Angus Ainslie
2022-03-15 16:13       ` Angus Ainslie
2022-03-16  7:14       ` Heiko Thiery
2022-03-16 12:26         ` Heiko Thiery
2022-03-16 12:35           ` Angus Ainslie
2022-03-16 14:02             ` Heiko Thiery
2022-03-16 14:15               ` Angus Ainslie
2022-03-16 14:21                 ` Heiko Thiery
2022-03-16 15:55                   ` Heiko Thiery
2022-03-16 16:00                     ` Angus Ainslie [this message]
2022-03-16 16:20                       ` Michael Walle
2022-03-21  1:38                     ` Peng Fan (OSS)
2022-03-15 19:01     ` Marek Vasut
2022-03-16  7:02       ` Heiko Thiery
2022-03-21  1:32     ` Peng Fan (OSS)
2022-03-20 23:57   ` Sean Anderson
2022-03-24  8:28   ` Heiko Thiery
2022-03-24 12:06     ` Angus Ainslie
2022-03-15 13:08 ` [PATCH v4 3/4] clk: imx8m: reduce rate table duplication Angus Ainslie
2022-03-15 13:08 ` [PATCH v4 4/4] clk: imx8m: remove code duplication Angus Ainslie
2022-03-20 23:58   ` Sean Anderson

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=5918d6180131631dec19444e3349e9a0@akkea.ca \
    --to=angus@akkea.ca \
    --cc=angus.ainslie@puri.sm \
    --cc=festevam@gmail.com \
    --cc=heiko.thiery@gmail.com \
    --cc=kernel@puri.sm \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=michael@walle.cc \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=seanga2@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /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.