Re: [PATCH 2/3] PCI: imx6: Use the external clock as REF_CLK when needed for i.MX8MQ

From: Manivannan Sadhasivam

Date: Thu Sep 10 2026 - 04:30:54 EST


On Wed, Aug 12, 2026 at 02:49:08AM +0000, Hongxing Zhu wrote:
> > -----Original Message-----
> > From: Rudi Heitbaum <rudi@xxxxxxxxxxxx>
> > Sent: Sunday, August 2, 2026 7:32 PM
> > To: Hongxing Zhu <hongxing.zhu@xxxxxxx>; Lucas Stach
> > <l.stach@xxxxxxxxxxxxxx>; Frank Li <frank.li@xxxxxxx>; Sascha Hauer
> > <s.hauer@xxxxxxxxxxxxxx>
> > Cc: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>; Krzysztof Wilczyński
> > <kwilczynski@xxxxxxxxxx>; Manivannan Sadhasivam <mani@xxxxxxxxxx>; Rob
> > Herring <robh@xxxxxxxxxx>; Bjorn Helgaas <bhelgaas@xxxxxxxxxx>;
> > Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>; Conor Dooley
> > <conor+dt@xxxxxxxxxx>; Fabio Estevam <festevam@xxxxxxxxx>; linux-
> > pci@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx; linux-
> > arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> > rudi@xxxxxxxxxxxx
> > Subject: [PATCH 2/3] PCI: imx6: Use the external clock as REF_CLK when
> > needed for i.MX8MQ
> >
> > i.MX8MQ has two PCIe REF_CLK sources: an off-chip oscillator and the
> > internal PLL. The driver unconditionally selected the oscillator, which is what
> > the
> >
> > /* TODO: This code assumes external oscillator is being used */
> >
> > comment refers to. Boards wiring an oscillator to the pad describe it as the
> > "pcie_bus" clock, but nothing in the driver looks that clock up by name, so it
> > does not select anything.
> >
> > Reuse the generic enable_ext_refclk flag, set when an "extref" clock is
> > supplied, to select between the two, as is already done for i.MX95 in commit
> > d8574ce57d76 ("PCI: imx6: Add external reference clock input mode
> > support").
> >
> > Signed-off-by: Rudi Heitbaum <rudi@xxxxxxxxxxxx>
> Sorry for the late reply.
>
> The code changes look good to me.
>
> However, I'm concerned about backward compatibility. This patch changes the
> default REF_CLK source from external oscillator to internal PLL when no
> "extref" clock is specified, which could break existing i.MX8MQ boards.
>

This clocks is marked as 'optional' in the binding. So the driver should
continue to work with older DTs that don't specify this clock.

If this clock is truly required, then it should not be defined as optional in
the binding and the ABI break should be justified in both binding and driver
commit messages.

- Mani

--
மணிவண்ணன் சதாசிவம்