From: Adam Ford <aford173@gmail.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: Abel Vesa <abelvesa@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>, Jacky Bai <ping.bai@nxp.com>,
Ye Li <ye.li@nxp.com>, Dong Aisheng <aisheng.dong@nxp.com>,
linux-clk@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Abel Vesa <abel.vesa@linaro.org>,
Peng Fan <peng.fan@nxp.com>,
Shengjiu Wang <shengjiu.wang@nxp.com>
Subject: Re: [PATCH 06/18] clk: imx: pll14xx: use rate_table for audio plls
Date: Thu, 16 May 2024 07:18:45 -0500 [thread overview]
Message-ID: <CAHCN7x+Sv6_QQStEacjQP8UAVntyWHdvHrErQO0j=n_pe9zqmA@mail.gmail.com> (raw)
In-Reply-To: <20240504-imx-clk-v1-6-f7915489d58d@nxp.com>
On Fri, May 3, 2024 at 7:42 PM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>
> From: Shengjiu Wang <shengjiu.wang@nxp.com>
>
> The generated clock frequency may not accurate, for example
> the expected rate is 361267200U, but result is 361267199U.
> Add rate_table for audio clocks to avoid such issue.
Wouldn't it be better to fix the clock calculator and eliminate the
look-up table completely?
The LUT seems like a work-around for a bug.
adam
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> Reviewed-by: Jacky Bai <ping.bai@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/clk/imx/clk-pll14xx.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
> index 55812bfb9ec2..6b2c849f8b71 100644
> --- a/drivers/clk/imx/clk-pll14xx.c
> +++ b/drivers/clk/imx/clk-pll14xx.c
> @@ -64,6 +64,17 @@ static const struct imx_pll14xx_rate_table imx_pll1443x_tbl[] = {
> PLL_1443X_RATE(650000000U, 325, 3, 2, 0),
> PLL_1443X_RATE(594000000U, 198, 2, 2, 0),
> PLL_1443X_RATE(519750000U, 173, 2, 2, 16384),
> + PLL_1443X_RATE(393216000U, 262, 2, 3, 9437),
> + PLL_1443X_RATE(361267200U, 361, 3, 3, 17511),
> + PLL_1443X_RATE(245760000U, 328, 4, 3, 0xae15),
> + PLL_1443X_RATE(225792000U, 226, 3, 3, 0xcac1),
> + PLL_1443X_RATE(122880000U, 328, 4, 4, 0xae15),
> + PLL_1443X_RATE(112896000U, 226, 3, 4, 0xcac1),
> + PLL_1443X_RATE(61440000U, 328, 4, 5, 0xae15),
> + PLL_1443X_RATE(56448000U, 226, 3, 5, 0xcac1),
> + PLL_1443X_RATE(49152000U, 393, 3, 6, 0x374c),
> + PLL_1443X_RATE(45158400U, 241, 2, 6, 0xd845),
> + PLL_1443X_RATE(40960000U, 109, 1, 6, 0x3a07),
> };
>
> struct imx_pll14xx_clk imx_1443x_pll = {
>
> --
> 2.37.1
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-05-16 12:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-04 0:48 [PATCH 00/18] clk: imx: misc update/fix Peng Fan (OSS)
2024-05-04 0:48 ` [PATCH 01/18] clk: imx: composite-8m: Enable gate clk with mcore_booted Peng Fan (OSS)
2024-05-04 0:48 ` [PATCH 02/18] clk: imx: composite-93: keep root clock on when mcore enabled Peng Fan (OSS)
2024-05-04 0:48 ` [PATCH 03/18] clk: imx: composite-7ulp: Check the PCC present bit Peng Fan (OSS)
2024-05-04 0:48 ` [PATCH 04/18] clk: imx: fracn-gppll: fix fractional part of PLL getting lost Peng Fan (OSS)
2024-05-04 0:48 ` [PATCH 05/18] clk: imx: pll14xx: Add constraint for fvco frequency Peng Fan (OSS)
2024-05-04 0:48 ` [PATCH 06/18] clk: imx: pll14xx: use rate_table for audio plls Peng Fan (OSS)
2024-05-16 12:18 ` Adam Ford [this message]
2024-05-04 0:49 ` [PATCH 07/18] clk: imx: pll14xx: potential integer overflow eliminated by casting to u64 Peng Fan (OSS)
2024-05-04 11:58 ` Francesco Dolcini
2024-05-04 13:13 ` Peng Fan
2024-05-04 0:49 ` [PATCH 08/18] clk: imx: imx8mp-audiomix: remove sdma root clock Peng Fan (OSS)
2024-05-04 11:59 ` Francesco Dolcini
2024-05-04 13:15 ` Peng Fan
2024-05-04 0:49 ` [PATCH 09/18] clk: imx: imx8mp: fix clock tree update of TF-A managed clocks Peng Fan (OSS)
2024-05-04 0:49 ` [PATCH 10/18] clk: imx: Remove CLK_SET_PARENT_GATE for DRAM mux for i.MX7D Peng Fan (OSS)
2024-05-04 12:01 ` Francesco Dolcini
2024-05-04 13:15 ` Peng Fan
2024-05-04 0:49 ` [PATCH 11/18] clk: imx: add CLK_SET_RATE_PARENT for lcdif_pixel_src " Peng Fan (OSS)
2024-05-04 0:49 ` [PATCH 12/18] clk: imx: imx8mn: add sai7_ipg_clk clock settings Peng Fan (OSS)
2024-05-04 0:49 ` [PATCH 13/18] clk: imx: imx8mm: Change the 'nand_usdhc_bus' clock to non-critical one Peng Fan (OSS)
2024-05-04 0:49 ` [PATCH 14/18] clk: imx: imx8qxp: Add LVDS bypass clocks Peng Fan (OSS)
2024-05-04 0:49 ` [PATCH 15/18] clk: imx: imx8qxp: Add clock muxes for MIPI and PHY ref clocks Peng Fan (OSS)
2024-05-04 0:49 ` [PATCH 16/18] clk: imx: imx8qxp: Register dc0_bypass0_clk before disp clk Peng Fan (OSS)
2024-05-04 0:49 ` [PATCH 17/18] clk: imx: imx8qxp: Parent should be initialized earlier than the clock Peng Fan (OSS)
2024-05-04 0:49 ` [PATCH 18/18] clk: imx: fracn-gppll: update rate table Peng Fan (OSS)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHCN7x+Sv6_QQStEacjQP8UAVntyWHdvHrErQO0j=n_pe9zqmA@mail.gmail.com' \
--to=aford173@gmail.com \
--cc=abel.vesa@linaro.org \
--cc=abelvesa@kernel.org \
--cc=aisheng.dong@nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=peng.fan@oss.nxp.com \
--cc=ping.bai@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=shawnguo@kernel.org \
--cc=shengjiu.wang@nxp.com \
--cc=ye.li@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).