From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jorge Ramirez-Ortiz, Foundries Date: Thu, 22 Oct 2020 23:24:44 +0200 Subject: [PATCH] mx6: peripheral clock from oscillator In-Reply-To: References: <20201019142329.2103-1-jorge@foundries.io> Message-ID: <20201022212444.GA4707@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 22/10/20, Fabio Estevam wrote: > On Mon, Oct 19, 2020 at 11:23 AM 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. > > I would suggest adding the optee related motivation that you explained > earlier here in the commit log too. sure, will do. > > > [1] Rev 2, 10/2019, ERR007805 > > Not clear what document this refers to. um, weird, I just googled "imx Rev 2, 10/2019, ERR007805" and it showed the document and a link to the errata. how do you tipically do this otherwise? I didnt want to depend on links that migh break in the future. > > > /* Set perclk to source from OSC 24MHz */ > > - if (is_mx6sl()) > > + if (is_mx6sl() || ERRATA_ERR007805) > > This gives the impression that imx6sl is not affected by the erratum, > but in fact it is: > https://www.nxp.com/docs/en/errata/IMX6SLCE.pdf > > You could define it like this: > > #define has_err007805() (is_mx6sl() || is_mx6dl() || is_mx6solo() || > is_mx6ull()) sounds good. will do (I didnt know the reason for the mx6sl configuring the clock was that same errata)