From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jorge Ramirez-Ortiz, Foundries Date: Thu, 22 Oct 2020 17:18:08 +0200 Subject: [PATCH] mx6: peripheral clock from oscillator In-Reply-To: <20201019142329.2103-1-jorge@foundries.io> References: <20201019142329.2103-1-jorge@foundries.io> Message-ID: <20201022151808.GA6145@trex> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 19/10/20, Jorge Ramirez-Ortiz wrote: > In order to be able to run the I2C bus at 400Khz, the chip errata[1] > recommends that the peripheral clock runs out of the 24MHz oscillator. > > [1] Rev 2, 10/2019, ERR007805 > > Signed-off-by: Jorge Ramirez-Ortiz > --- > arch/arm/mach-imx/mx6/soc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c > index e129286065..f498c93b00 100644 > --- a/arch/arm/mach-imx/mx6/soc.c > +++ b/arch/arm/mach-imx/mx6/soc.c > @@ -26,6 +26,8 @@ > #include > #include > > +#define ERRATA_ERR007805 (is_mx6dl() || is_mx6solo() || is_mx6ull()) > + > struct scu_regs { > u32 ctrl; > u32 config; > @@ -469,7 +471,7 @@ int arch_cpu_init(void) > } > > /* Set perclk to source from OSC 24MHz */ > - if (is_mx6sl()) > + if (is_mx6sl() || ERRATA_ERR007805) > setbits_le32(&ccm->cscmr1, MXC_CCM_CSCMR1_PER_CLK_SEL_MASK); > > imx_wdog_disable_powerdown(); /* Disable PDE bit of WMCR register */ > -- all ok with this ? > 2.17.1 >