* [RESEND v1] clk: imx95-blk-ctl: Fix REFCLK rise-fall mismatch on i.MX95
@ 2026-07-30 9:04 hongxing.zhu
2026-07-30 14:44 ` Frank Li
2026-07-30 15:11 ` Abel Vesa
0 siblings, 2 replies; 3+ messages in thread
From: hongxing.zhu @ 2026-07-30 9:04 UTC (permalink / raw)
To: abelvesa, peng.fan, mturquette, sboyd, bmasney, Frank.Li, s.hauer,
festevam
Cc: kernel, linux-clk, imx, linux-arm-kernel, linux-kernel,
Richard Zhu
From: Richard Zhu <hongxing.zhu@nxp.com>
When the internal PLL is used as the PCIe reference clock source on i.MX95,
a REFCLK rise-fall time mismatch is observed during PCIe Gen1 compliance
testing with the Lfast IO analyzer.
Fix this issue by configuring the IREF_TX field to 0xF (15), which adjusts
the transmitter current reference to meet the PCIe specification timing
requirements.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
---
drivers/clk/imx/clk-imx95-blk-ctl.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/clk/imx/clk-imx95-blk-ctl.c b/drivers/clk/imx/clk-imx95-blk-ctl.c
index 1f9259f456079..bc6957299ceca 100644
--- a/drivers/clk/imx/clk-imx95-blk-ctl.c
+++ b/drivers/clk/imx/clk-imx95-blk-ctl.c
@@ -44,6 +44,8 @@ struct imx95_blk_ctl_clk_dev_data {
const char * const *parent_names;
u32 num_parents;
u32 reg;
+ u32 reg_init_msk;
+ u32 reg_init_val;
u32 bit_idx;
u32 bit_width;
u32 clk_type;
@@ -289,6 +291,8 @@ static const struct imx95_blk_ctl_clk_dev_data hsio_blk_ctl_clk_dev_data[] = {
.parent_names = (const char *[]){ "func_out_en", },
.num_parents = 1,
.reg = 0,
+ .reg_init_msk = GENMASK(10, 7),
+ .reg_init_val = GENMASK(10, 7),
.bit_idx = 6,
.bit_width = 1,
.type = CLK_GATE,
@@ -410,6 +414,9 @@ static int imx95_bc_probe(struct platform_device *pdev)
const struct imx95_blk_ctl_clk_dev_data *data = &bc->pdata->clk_dev_data[i];
void __iomem *reg = base + data->reg;
+ if (data->reg_init_msk)
+ writel((readl(reg) & ~data->reg_init_msk) | data->reg_init_val, reg);
+
if (data->type == CLK_MUX) {
hws[i] = clk_hw_register_mux(dev, data->name, data->parent_names,
data->num_parents, data->flags, reg,
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [RESEND v1] clk: imx95-blk-ctl: Fix REFCLK rise-fall mismatch on i.MX95
2026-07-30 9:04 [RESEND v1] clk: imx95-blk-ctl: Fix REFCLK rise-fall mismatch on i.MX95 hongxing.zhu
@ 2026-07-30 14:44 ` Frank Li
2026-07-30 15:11 ` Abel Vesa
1 sibling, 0 replies; 3+ messages in thread
From: Frank Li @ 2026-07-30 14:44 UTC (permalink / raw)
To: hongxing.zhu
Cc: abelvesa, peng.fan, mturquette, sboyd, bmasney, Frank.Li, s.hauer,
festevam, kernel, linux-clk, imx, linux-arm-kernel, linux-kernel,
Richard Zhu
On Thu, Jul 30, 2026 at 05:04:47PM +0800, hongxing.zhu@oss.nxp.com wrote:
> From: Richard Zhu <hongxing.zhu@nxp.com>
>
> When the internal PLL is used as the PCIe reference clock source on i.MX95,
> a REFCLK rise-fall time mismatch is observed during PCIe Gen1 compliance
> testing with the Lfast IO analyzer.
>
> Fix this issue by configuring the IREF_TX field to 0xF (15), which adjusts
> the transmitter current reference to meet the PCIe specification timing
> requirements.
>
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/clk/imx/clk-imx95-blk-ctl.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/clk/imx/clk-imx95-blk-ctl.c b/drivers/clk/imx/clk-imx95-blk-ctl.c
> index 1f9259f456079..bc6957299ceca 100644
> --- a/drivers/clk/imx/clk-imx95-blk-ctl.c
> +++ b/drivers/clk/imx/clk-imx95-blk-ctl.c
> @@ -44,6 +44,8 @@ struct imx95_blk_ctl_clk_dev_data {
> const char * const *parent_names;
> u32 num_parents;
> u32 reg;
> + u32 reg_init_msk;
> + u32 reg_init_val;
> u32 bit_idx;
> u32 bit_width;
> u32 clk_type;
> @@ -289,6 +291,8 @@ static const struct imx95_blk_ctl_clk_dev_data hsio_blk_ctl_clk_dev_data[] = {
> .parent_names = (const char *[]){ "func_out_en", },
> .num_parents = 1,
> .reg = 0,
> + .reg_init_msk = GENMASK(10, 7),
> + .reg_init_val = GENMASK(10, 7),
> .bit_idx = 6,
> .bit_width = 1,
> .type = CLK_GATE,
> @@ -410,6 +414,9 @@ static int imx95_bc_probe(struct platform_device *pdev)
> const struct imx95_blk_ctl_clk_dev_data *data = &bc->pdata->clk_dev_data[i];
> void __iomem *reg = base + data->reg;
>
> + if (data->reg_init_msk)
> + writel((readl(reg) & ~data->reg_init_msk) | data->reg_init_val, reg);
> +
> if (data->type == CLK_MUX) {
> hws[i] = clk_hw_register_mux(dev, data->name, data->parent_names,
> data->num_parents, data->flags, reg,
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RESEND v1] clk: imx95-blk-ctl: Fix REFCLK rise-fall mismatch on i.MX95
2026-07-30 9:04 [RESEND v1] clk: imx95-blk-ctl: Fix REFCLK rise-fall mismatch on i.MX95 hongxing.zhu
2026-07-30 14:44 ` Frank Li
@ 2026-07-30 15:11 ` Abel Vesa
1 sibling, 0 replies; 3+ messages in thread
From: Abel Vesa @ 2026-07-30 15:11 UTC (permalink / raw)
To: abelvesa, peng.fan, mturquette, sboyd, bmasney, Frank.Li, s.hauer,
festevam, hongxing.zhu
Cc: kernel, linux-clk, imx, linux-arm-kernel, linux-kernel
On Thu, 30 Jul 2026 17:04:47 +0800, hongxing.zhu@oss.nxp.com wrote:
> When the internal PLL is used as the PCIe reference clock source on i.MX95,
> a REFCLK rise-fall time mismatch is observed during PCIe Gen1 compliance
> testing with the Lfast IO analyzer.
>
> Fix this issue by configuring the IREF_TX field to 0xF (15), which adjusts
> the transmitter current reference to meet the PCIe specification timing
> requirements.
>
> [...]
Applied, thanks!
[1/1] clk: imx95-blk-ctl: Fix REFCLK rise-fall mismatch on i.MX95
commit: 39ec460b56b26319d1f31b459e8be7ea34ae9c67
Best regards,
--
Abel Vesa <abel.vesa@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-30 15:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30 9:04 [RESEND v1] clk: imx95-blk-ctl: Fix REFCLK rise-fall mismatch on i.MX95 hongxing.zhu
2026-07-30 14:44 ` Frank Li
2026-07-30 15:11 ` Abel Vesa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox