[PATCH 2/3] mx7: clock: Use 60MHz for the I2C clocks
Fabio Estevam
festevam at denx.de
Tue Jan 3 14:19:39 CET 2023
When an I2C clock is enabled inside enable_i2c_clk() the clock rate is
configured as PLL_SYS_MAIN_120M_CLK / 2 = 60MHz.
Currently, the I2C clock is retrieved from I2C1_CLK_ROOT, which
may not be the one that was enabled.
As there is no clock driver for the imx7d, it is better to return 60MHz
for the I2C clock.
This provides a workaround for the imx7d-pico board, where I2C4 is
connected to the PMIC.
With this change, it is possible to convert the imx7d-pico board
to DM_I2C and DM_PMIC.
Signed-off-by: Fabio Estevam <festevam at denx.de>
---
arch/arm/mach-imx/mx7/clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c
index 88f6fe0274..4e232385af 100644
--- a/arch/arm/mach-imx/mx7/clock.c
+++ b/arch/arm/mach-imx/mx7/clock.c
@@ -502,7 +502,7 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
case MXC_IPG_CLK:
return get_ipg_clk();
case MXC_I2C_CLK:
- return get_root_clk(I2C1_CLK_ROOT);
+ return 60000000;
case MXC_UART_CLK:
return get_root_clk(UART1_CLK_ROOT);
case MXC_CSPI_CLK:
--
2.25.1
More information about the U-Boot
mailing list