* [PATCH] arm: imx: imx8mq: add support to get values for more clocks
@ 2021-09-09 12:59 Heiko Thiery
2021-09-15 2:53 ` Peng Fan (OSS)
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Heiko Thiery @ 2021-09-09 12:59 UTC (permalink / raw)
To: u-boot
Cc: Stefano Babic, Fabio Estevam, NXP i . MX U-Boot Team, Peng Fan,
Ye Li, Patrick Wildt, Heiko Thiery, Michael Walle
Return the root clock values for MXC_CSPI_CLK, MXC_I2C_CLK,
MXC_UART_CLK and MXC_QSPI_CLK.
At least for the I2C clock the missing support leads to a wrong
configured I2C frequency. The expected value is 100kHz but the resulting
value is about 1MHz.
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
More information and measurements about the wrong configure I2C
frequency can be found here:
https://lists.denx.de/pipermail/u-boot/2021-September/460176.html
arch/arm/mach-imx/imx8m/clock_imx8mq.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
index 60e2218a3c..9db62b944e 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
@@ -359,10 +359,18 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
clock_get_target_val(IPG_CLK_ROOT, &val);
val = val & 0x3;
return get_root_clk(AHB_CLK_ROOT) / (val + 1);
+ case MXC_CSPI_CLK:
+ return get_root_clk(ECSPI1_CLK_ROOT);
case MXC_ESDHC_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);
}
--
2.30.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] arm: imx: imx8mq: add support to get values for more clocks
2021-09-09 12:59 [PATCH] arm: imx: imx8mq: add support to get values for more clocks Heiko Thiery
@ 2021-09-15 2:53 ` Peng Fan (OSS)
2021-11-10 11:07 ` Heiko Thiery
2022-01-15 13:45 ` Fabio Estevam
2022-02-05 16:39 ` sbabic
2 siblings, 1 reply; 5+ messages in thread
From: Peng Fan (OSS) @ 2021-09-15 2:53 UTC (permalink / raw)
To: Heiko Thiery, u-boot
Cc: Stefano Babic, Fabio Estevam, dl-uboot-imx, Peng Fan, Ye Li,
Patrick Wildt, Michael Walle
On 2021/9/9 20:59, Heiko Thiery wrote:
> Return the root clock values for MXC_CSPI_CLK, MXC_I2C_CLK,
> MXC_UART_CLK and MXC_QSPI_CLK.
>
> At least for the I2C clock the missing support leads to a wrong
> configured I2C frequency. The expected value is 100kHz but the resulting
> value is about 1MHz.
>
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> ---
>
> More information and measurements about the wrong configure I2C
> frequency can be found here:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.denx.de%2Fpipermail%2Fu-boot%2F2021-September%2F460176.html&data=04%7C01%7Cpeng.fan%40nxp.com%7C3fd04432d40141466d4208d97391b927%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637667891977601595%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BYXFWRvw3LG%2FhqKU0uxxrvCXiqfKD3qL80DISvG6PQA%3D&reserved=0
>
>
> arch/arm/mach-imx/imx8m/clock_imx8mq.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> index 60e2218a3c..9db62b944e 100644
> --- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> +++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> @@ -359,10 +359,18 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
> clock_get_target_val(IPG_CLK_ROOT, &val);
> val = val & 0x3;
> return get_root_clk(AHB_CLK_ROOT) / (val + 1);
> + case MXC_CSPI_CLK:
> + return get_root_clk(ECSPI1_CLK_ROOT);
> case MXC_ESDHC_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);
> }
>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm: imx: imx8mq: add support to get values for more clocks
2021-09-15 2:53 ` Peng Fan (OSS)
@ 2021-11-10 11:07 ` Heiko Thiery
0 siblings, 0 replies; 5+ messages in thread
From: Heiko Thiery @ 2021-11-10 11:07 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: u-boot, Stefano Babic, Fabio Estevam, dl-uboot-imx, Peng Fan,
Ye Li, Patrick Wildt, Michael Walle
Hi,
Am Mi., 15. Sept. 2021 um 04:54 Uhr schrieb Peng Fan (OSS)
<peng.fan@oss.nxp.com>:
>
>
>
> On 2021/9/9 20:59, Heiko Thiery wrote:
> > Return the root clock values for MXC_CSPI_CLK, MXC_I2C_CLK,
> > MXC_UART_CLK and MXC_QSPI_CLK.
> >
> > At least for the I2C clock the missing support leads to a wrong
> > configured I2C frequency. The expected value is 100kHz but the resulting
> > value is about 1MHz.
> >
> > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> > ---
> >
> > More information and measurements about the wrong configure I2C
> > frequency can be found here:
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.denx.de%2Fpipermail%2Fu-boot%2F2021-September%2F460176.html&data=04%7C01%7Cpeng.fan%40nxp.com%7C3fd04432d40141466d4208d97391b927%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637667891977601595%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BYXFWRvw3LG%2FhqKU0uxxrvCXiqfKD3qL80DISvG6PQA%3D&reserved=0
> >
> >
> > arch/arm/mach-imx/imx8m/clock_imx8mq.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> > index 60e2218a3c..9db62b944e 100644
> > --- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> > +++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
> > @@ -359,10 +359,18 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
> > clock_get_target_val(IPG_CLK_ROOT, &val);
> > val = val & 0x3;
> > return get_root_clk(AHB_CLK_ROOT) / (val + 1);
> > + case MXC_CSPI_CLK:
> > + return get_root_clk(ECSPI1_CLK_ROOT);
> > case MXC_ESDHC_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);
> > }
> >
>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Any news on that?
--
Heiko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm: imx: imx8mq: add support to get values for more clocks
2021-09-09 12:59 [PATCH] arm: imx: imx8mq: add support to get values for more clocks Heiko Thiery
2021-09-15 2:53 ` Peng Fan (OSS)
@ 2022-01-15 13:45 ` Fabio Estevam
2022-02-05 16:39 ` sbabic
2 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2022-01-15 13:45 UTC (permalink / raw)
To: Heiko Thiery
Cc: U-Boot-Denx, Stefano Babic, NXP i . MX U-Boot Team, Peng Fan,
Ye Li, Patrick Wildt, Michael Walle
Hi Heiko,
On Thu, Sep 9, 2021 at 9:59 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> Return the root clock values for MXC_CSPI_CLK, MXC_I2C_CLK,
> MXC_UART_CLK and MXC_QSPI_CLK.
>
> At least for the I2C clock the missing support leads to a wrong
> configured I2C frequency. The expected value is 100kHz but the resulting
> value is about 1MHz.
>
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] arm: imx: imx8mq: add support to get values for more clocks
2021-09-09 12:59 [PATCH] arm: imx: imx8mq: add support to get values for more clocks Heiko Thiery
2021-09-15 2:53 ` Peng Fan (OSS)
2022-01-15 13:45 ` Fabio Estevam
@ 2022-02-05 16:39 ` sbabic
2 siblings, 0 replies; 5+ messages in thread
From: sbabic @ 2022-02-05 16:39 UTC (permalink / raw)
To: Heiko Thiery, u-boot
> Return the root clock values for MXC_CSPI_CLK, MXC_I2C_CLK,
> MXC_UART_CLK and MXC_QSPI_CLK.
> At least for the I2C clock the missing support leads to a wrong
> configured I2C frequency. The expected value is 100kHz but the resulting
> value is about 1MHz.
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-02-05 16:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 12:59 [PATCH] arm: imx: imx8mq: add support to get values for more clocks Heiko Thiery
2021-09-15 2:53 ` Peng Fan (OSS)
2021-11-10 11:07 ` Heiko Thiery
2022-01-15 13:45 ` Fabio Estevam
2022-02-05 16:39 ` sbabic
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.