From: Soeren Moch <smoch@web.de>
To: "Hongxing Zhu (OSS)" <hongxing.zhu@oss.nxp.com>,
Frank Li <frank.li@nxp.com>,
"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
"kwilczynski@kernel.org" <kwilczynski@kernel.org>,
"mani@kernel.org" <mani@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"festevam@gmail.com" <festevam@gmail.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Hongxing Zhu <hongxing.zhu@nxp.com>
Subject: Re: [PATCH v1] PCI: imx6: Fix i.MX6Q/DL boot hang by separating PHY power and reference clock control
Date: Wed, 8 Jul 2026 12:43:08 +0200 [thread overview]
Message-ID: <04ff27d2-2b9e-4ca5-918d-8c4211685eae@web.de> (raw)
In-Reply-To: <GV2PR04MB12019244AC0F11642FA466DE78CFF2@GV2PR04MB12019.eurprd04.prod.outlook.com>
On 08.07.26 11:50, Hongxing Zhu (OSS) wrote:
>> -----Original Message-----
>> From: Soeren Moch <smoch@web.de>
>> Sent: Tuesday, July 7, 2026 7:04 PM
>> To: Hongxing Zhu (OSS) <hongxing.zhu@oss.nxp.com>; Frank Li
>> <frank.li@nxp.com>; l.stach@pengutronix.de; lpieralisi@kernel.org;
>> kwilczynski@kernel.org; mani@kernel.org; robh@kernel.org;
>> bhelgaas@google.com; s.hauer@pengutronix.de; kernel@pengutronix.de;
>> festevam@gmail.com
>> Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
>> imx@lists.linux.dev; linux-kernel@vger.kernel.org; Hongxing Zhu
>> <hongxing.zhu@nxp.com>
>> Subject: Re: [PATCH v1] PCI: imx6: Fix i.MX6Q/DL boot hang by separating PHY
>> power and reference clock control
>>
>> On 07.07.26 10:55, Soeren Moch wrote:
>>> On 07.07.26 05:03, Hongxing Zhu (OSS) wrote:
>>>>> -----Original Message-----
>>>>> From: Soeren Moch <smoch@web.de>
>>>>> Sent: Monday, July 6, 2026 10:09 PM
>>>>> To: Hongxing Zhu (OSS) <hongxing.zhu@oss.nxp.com>; Frank Li
>>>>> <frank.li@nxp.com>; l.stach@pengutronix.de; lpieralisi@kernel.org;
>>>>> kwilczynski@kernel.org; mani@kernel.org; robh@kernel.org;
>>>>> bhelgaas@google.com; s.hauer@pengutronix.de; kernel@pengutronix.de;
>>>>> festevam@gmail.com
>>>>> Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
>>>>> imx@lists.linux.dev; linux-kernel@vger.kernel.org; Hongxing Zhu
>>>>> <hongxing.zhu@nxp.com>
>>>>> Subject: Re: [PATCH v1] PCI: imx6: Fix i.MX6Q/DL boot hang by
>>>>> separating PHY power and reference clock control
>>>>>
>>>>>
>>>>>
>>>>> On 06.07.26 05:06, hongxing.zhu@oss.nxp.com wrote:
>>>>>> From: Richard Zhu <hongxing.zhu@nxp.com>
>>>>>>
>>>>>> Commit 610fa91d9863 ("PCI: imx6: Assert PERST# before enabling
>>>>>> regulators") introduced a boot hang on i.MX6Q/DL variants by
>>>>>> changing the initialization sequence.
>>>>>>
>>>>>> The issue stems from coupling PHY power (TEST_PD) and reference
>>>>>> clock
>>>>>> (REF_CLK_EN) control in imx6q_pcie_enable_ref_clk(). When these are
>>>>>> managed together, the timing between PHY power-up and reference
>>>>>> clock enablement cannot be properly controlled, leading to
>>>>>> initialization failures.
>>>>>>
>>>>>> Fix this by separating the two concerns:
>>>>>>
>>>>>> - Move PHY power control (TEST_PD) to imx6q_pcie_core_reset() where
>>>>>> it
>>>>>> logically belongs with reset operations. This ensures PHY power
>>>>>> state
>>>>>> is managed as part of the core reset sequence.
>>>>>>
>>>>>> - Update imx6qp_pcie_core_reset() to call imx6q_pcie_core_reset()
>>>>>> for
>>>>>> shared PHY power management, avoiding code duplication.
>>>>>>
>>>>>> - Make imx6q_pcie_enable_ref_clk() responsible only for reference
>>>>>> clock
>>>>>> (REF_CLK_EN) control, simplifying its purpose.
>>>>>>
>>>>>> - Remove the 10us delay workaround from imx6q_pcie_enable_ref_clk()
>>>>>> as
>>>>>> proper sequencing is now handled by the core_reset functions.
>>>>>>
>>>>>> This refactoring ensures PHY power is controlled during reset
>>>>>> operations, fixing the boot hang while improving code maintainability.
>>>>>>
>>>>>> Fixes: 610fa91d9863 ("PCI: imx6: Assert PERST# before enabling
>>>>>> regulators")
>>>>>> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
>>>>> With this patch on top of v7.2-rc2 I see everything booting, lspci
>>>>> shows the root complex, but no PCIe device behind it.
>>>>> Tested on a i.MX6Q based tbs2910 board.
>>>>>
>>>>> For me it is not clear whether this fail to detect PCIe devices is
>>>>> related to the patches in question, the reset timing, or something
>>>>> else. Needs further investigation.
>>>> Thanks for your kindly help to tests.
>>>> Did you ever encounter the boot failure without this patch based on
>>>> v7.2-rc1
>>>> or later?
>>> Have not tested this. Unfortunately currently I have no access to my
>>> tbs2910 test board.
>>> I used a production system for this test here, but this is very
>>> difficult to recover from boot hangs.
>>>> After applied this patch, my i.MX6Q Sabresd board can boot up
>>>> successfully.
>>>> And the endpoint device can be detected as well.
>>>>
>>>> My Local commits:
>>>> ad5939d49b268 (HEAD -> v7.2-rc2_pcie) PCI: imx6: Add runtime PM
>>>> support for i.MX95
>>>> db7b15f198125 PCI: imx6: Update MPLLB bandwidth for i.MX95 PCIe Gen3
>>>> stability
>>>> a26735515c076 PCI: imx6: Fix i.MX6Q/DL boot hang by separating PHY
>>>> power and reference clock control
>>>> d617eadf52a46 PCI: dwc: Add force_l2 flag for platforms requiring L2
>>>> entry without D3cold 8cdeaa50eae8d (tag: v7.2-rc2) Linux 7.2-rc2
>>> My commits (v7.2-rc2 plus my patch to enable MSIs for the endpoint
>>> plus this patch discussed here):
>>> 8cdeaa50eae8 Linux 7.2-rc2
>>> b62414d07e24 PCI: imx6: Keep Root Port MSI capability also for i.MX6Q
>>> e8176c6a27ed PCI: imx6: Fix i.MX6Q/DL boot hang by separating PHY
>>> power and reference clock control
>>>
>>> I'm not sure what your other mentioned patches are.
>>>> Kernel logs:
>>>> Starting kernel ...
>>>>
>>>> [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux
>>>> version 7.2.0-rc2-00004-gad5939d49b26
>>>> (nxa08258@shlinux89) (arm-poky-linux-gnueabi-gcc (GCC) 15.2.0, GNU ld
>>>> (GNU Binutils) 2.45.0.20250908) #38 SMP Tue Jul 7 02:36:46 UTC 2026
>>>> ...
>>>> root@imx6qpdlsolox:~# lspci
>>>> 00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
>>>> 01:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network
>>>> Connection
>>> on linux-7.2-rc2 plus patches (see above):
>>> root@matrix2:~# lspci
>>> 00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
>>>
>>> on linux-7.0 (not tested on 7.1):
>>> root@matrix2:~# lspci
>>> 00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
>>> 01:00.0 Multimedia controller: Philips Semiconductors SAA7160 (rev 02)
>>>
>>> I guess the new power-on/reset timing is not sufficient to init the
>>> endpoint in time.
>>> Did you reduce the time from powering up the PCIe slot to release of
>>> PERST#?
>>> There is a power switch on the tbs2910 board for the PCIe slot, not
>>> sure if this is available also on SabreSD.
> No, i.MX6Q Sabresd board doesn't have a power switch.
Sorry, I was wrong here. On tbs2910 there is no separate 3V3 regulator
for the
PCIe slot, on sabresd there is (reg_pcie, gpio3 19).
At least there still is a difference, which could be a reason for the
different
PCIe endpoint detection behavior on cold boot.
Best Regards,
Soeren
>> I found out that the endpoint device is (often?) detected after reboot, it is not
>> (never) on cold boot. (linux-7.2-rc2 plus patches) Could also point to timing
>> problems of the slot power supply (or reset duration).
>> Unfortunately I have only very limited time for testing.
> Understand, thanks for your kindly help.
>
> Best Regards
> Richard Zhu
>>> Best regards,
>>> Soeren
>>>> Best Regards
>>>> Richard Zhu
>>>>> Regards,
>>>>> Soeren
next prev parent reply other threads:[~2026-07-08 10:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 3:06 [PATCH v1] PCI: imx6: Fix i.MX6Q/DL boot hang by separating PHY power and reference clock control hongxing.zhu
2026-07-06 14:08 ` Soeren Moch
2026-07-07 3:03 ` Hongxing Zhu (OSS)
2026-07-07 8:55 ` Soeren Moch
2026-07-07 11:04 ` Soeren Moch
2026-07-08 9:50 ` Hongxing Zhu (OSS)
2026-07-08 10:43 ` Soeren Moch [this message]
2026-07-07 6:22 ` Francesco Dolcini
2026-07-07 6:31 ` Hongxing Zhu (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=04ff27d2-2b9e-4ca5-918d-8c4211685eae@web.de \
--to=smoch@web.de \
--cc=bhelgaas@google.com \
--cc=festevam@gmail.com \
--cc=frank.li@nxp.com \
--cc=hongxing.zhu@nxp.com \
--cc=hongxing.zhu@oss.nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=kwilczynski@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
/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