Re: [PATCH v4] PCI: imx6: Fix i.MX6Q/DL boot hang caused by improper PHY power sequencing

From: Bjorn Helgaas

Date: Mon Jul 27 2026 - 17:42:32 EST


On Wed, Jul 22, 2026 at 03:10:30PM +0800, hongxing.zhu@xxxxxxxxxxx wrote:
> From: Richard Zhu <hongxing.zhu@xxxxxxx>
>
> Commit 610fa91d9863 ("PCI: imx6: Assert PERST# before enabling regulators")
> introduced a boot hang on i.MX6Q/DL variants by reordering the
> initialization sequence, which exposed a critical PHY power control issue.
>
> Root cause:
> Before commit 610fa91d9863 ("PCI: imx6: Assert PERST# before enabling regulators"),
> the sequence was:
> 1. imx_pcie_assert_core_reset() - asserts TEST_PD, asserts REF_CLK_EN
> 2. imx_pcie_clk_enable() - clears TEST_PD, asserts REF_CLK_EN
> 3. Link training starts with TEST_PD properly cleared ✓
>
> After commit 610fa91d9863 ("PCI: imx6: Assert PERST# before enabling regulators"),
> the sequence became:
> 1. imx_pcie_clk_enable() - clears TEST_PD, asserts REF_CLK_EN
> 2. imx_pcie_assert_core_reset() - re-asserts TEST_PD, asserts REF_CLK_EN
> 3. imx_pcie_deassert_core_reset() - does NOT clear TEST_PD
> 4. Link training starts with TEST_PD still asserted ✗
>
> The reordering caused TEST_PD to be cleared prematurely in clk_enable(),
> then re-asserted by assert_core_reset(), and never cleared again before
> link training, resulting in the boot hang.

I intend to apply this patch for v7.2, but I have a separate question
about why the link training failure causes a boot *hang*, not just a
boot where we couldn't enumerate any PCIe devices. It seems like the
link training should time out, and we could emit a message (if
desired) and continue without the PCIe controller.