[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR04MB7023C1017F60BF132B6A3F8CEEA50@VI1PR04MB7023.eurprd04.prod.outlook.com>
Date: Thu, 22 Aug 2019 08:20:53 +0000
From: Leonard Crestez <leonard.crestez@....com>
To: Peng Fan <peng.fan@....com>, "sboyd@...nel.org" <sboyd@...nel.org>,
Jacky Bai <ping.bai@....com>
CC: "mturquette@...libre.com" <mturquette@...libre.com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
"festevam@...il.com" <festevam@...il.com>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
dl-linux-imx <linux-imx@....com>,
Anson Huang <anson.huang@....com>,
Abel Vesa <abel.vesa@....com>,
"linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] clk: imx: pll14xx: avoid glitch when set rate
On 20.08.2019 05:17, Peng Fan wrote:
> According to PLL1443XA and PLL1416X spec,
> "When BYPASS is 0 and RESETB is changed from 0 to 1, FOUT starts to
> output unstable clock until lock time passes. PLL1416X/PLL1443XA may
> generate a glitch at FOUT."
>
> So set BYPASS when RESETB is changed from 0 to 1 to avoid glitch.
> In the end of set rate, BYPASS will be cleared.
>
> @@ -191,6 +191,10 @@ static int clk_pll1416x_set_rate(struct clk_hw *hw, unsigned long drate,
> tmp &= ~RST_MASK;
> writel_relaxed(tmp, pll->base);
>
> + /* Enable BYPASS */
> + tmp |= BYPASS_MASK;
> + writel(tmp, pll->base);
> +
Shouldn't BYPASS be set before reset?
Also, isn't a similar bypass/unbypass dance also needed in
clk_pll14xx_prepare? As far as I understand that could also output
glitches until the PLL is locked. It could be a separate patch.
It's strange that this BYPASS bit is also handled by muxes like
audio_pll1_bypass in clk-imx8mm.c but that's a separate issue not
strictly related to the glitches you're trying to fix here.
--
Regards,
Leonard
Powered by blists - more mailing lists