mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hongxing Zhu <hongxing.zhu@nxp.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Frank Li <frank.li@nxp.com>,
	"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
	"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
	"kw@linux.com" <kw@linux.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"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>
Subject: RE: [PATCH v3 2/6] PCI: imx6: Toggle the cold reset for i.MX95 PCIe
Date: Wed, 2 Apr 2025 07:40:06 +0000	[thread overview]
Message-ID: <AS8PR04MB8676D14C8DB1FBE6B034CEE28CAF2@AS8PR04MB8676.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <fatfobrf53l3ngps3rl67gayhnlsqncgd2tabgcspac3n3o4xt@a4yrmtvaitai>

> -----Original Message-----
> From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Sent: 2025年4月2日 14:36
> To: Hongxing Zhu <hongxing.zhu@nxp.com>
> Cc: Frank Li <frank.li@nxp.com>; l.stach@pengutronix.de; lpieralisi@kernel.org;
> kw@linux.com; robh@kernel.org; bhelgaas@google.com;
> shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de;
> festevam@gmail.com; linux-pci@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; imx@lists.linux.dev;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v3 2/6] PCI: imx6: Toggle the cold reset for i.MX95 PCIe
> 
> On Fri, Mar 28, 2025 at 11:02:09AM +0800, Richard Zhu wrote:
> > Add the cold reset toggle for i.MX95 PCIe to align PHY's power up sequency.
> 
> What do you mean by 'cold' reset? Is it 'core' reset? I see both terminologies
> used in the code.
> 
Regarding my understands, the cold reset is one reset category of the core reset.
> >
> > Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> > ---
> >  drivers/pci/controller/dwc/pci-imx6.c | 42
> > +++++++++++++++++++++++++++
> >  1 file changed, 42 insertions(+)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> > b/drivers/pci/controller/dwc/pci-imx6.c
> > index 57aa777231ae..6051b3b5928f 100644
> > --- a/drivers/pci/controller/dwc/pci-imx6.c
> > +++ b/drivers/pci/controller/dwc/pci-imx6.c
> > @@ -71,6 +71,9 @@
> >  #define IMX95_SID_MASK				GENMASK(5, 0)
> >  #define IMX95_MAX_LUT				32
> >
> > +#define IMX95_PCIE_RST_CTRL			0x3010
> > +#define IMX95_PCIE_COLD_RST			BIT(0)
> > +
> >  #define to_imx_pcie(x)	dev_get_drvdata((x)->dev)
> >
> >  enum imx_pcie_variants {
> > @@ -773,6 +776,43 @@ static int imx7d_pcie_core_reset(struct imx_pcie
> *imx_pcie, bool assert)
> >  	return 0;
> >  }
> >
> > +static int imx95_pcie_core_reset(struct imx_pcie *imx_pcie, bool
> > +assert) {
> > +	u32 val;
> > +
> > +	if (assert) {
> > +		/*
> > +		 * From i.MX95 PCIe PHY perspective, the COLD reset toggle
> > +		 * should be complete after power-up by the following sequence.
> > +		 *                 > 10us(at power-up)
> > +		 *                 > 10ns(warm reset)
> > +		 *               |<------------>|
> > +		 *                ______________
> > +		 * phy_reset ____/              \________________
> > +		 *                                   ____________
> > +		 * ref_clk_en_______________________/
> > +		 * Toggle COLD reset aligned with this sequence for i.MX95 PCIe.
> > +		 */
> > +		regmap_set_bits(imx_pcie->iomuxc_gpr, IMX95_PCIE_RST_CTRL,
> > +				IMX95_PCIE_COLD_RST);
> 
> Is this really COLD reset? Or CORE reset?
Cold reset is one reset type of core reset refer to my understand.
> 
> > +		/*
> > +		 * To make sure delay enough time, do regmap_read_bypassed
> > +		 * before udelay(). Since udelay() might not use MMIO, and cause
> > +		 * delay time less than setting value.
> > +		 */
> 
> This comment could be rephrased:
> 
> 		/*
> 		 * Make sure the write to IMX95_PCIE_RST_CTRL is flushed to the
> 		 * hardware by doing a read. Otherwise, there is no guarantee
> 		 * that the write has reached the hardware before udelay().
> 		 */
> 
Okay

Best Regards
Richard Zhu

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

  reply	other threads:[~2025-04-02  7:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  3:02 [PATCH v3 0/6] Add some enhancements " Richard Zhu
2025-03-28  3:02 ` [PATCH v3 1/6] PCI: imx6: Start link directly when workaround is not required Richard Zhu
2025-03-28 14:47   ` Frank Li
2025-04-02  6:27   ` Manivannan Sadhasivam
2025-04-02  7:39     ` Hongxing Zhu
2025-03-28  3:02 ` [PATCH v3 2/6] PCI: imx6: Toggle the cold reset for i.MX95 PCIe Richard Zhu
2025-03-28 14:53   ` Frank Li
2025-04-02  6:36   ` Manivannan Sadhasivam
2025-04-02  7:40     ` Hongxing Zhu [this message]
2025-03-28  3:02 ` [PATCH v3 3/6] PCI: imx6: Workaround i.MX95 PCIe may not exit L23 ready Richard Zhu
2025-04-02  7:07   ` Manivannan Sadhasivam
2025-04-02  7:59     ` Hongxing Zhu
2025-04-02 15:17       ` Manivannan Sadhasivam
2025-04-03  3:22         ` Hongxing Zhu
2025-04-08  3:02           ` Hongxing Zhu
2025-04-09 16:43             ` Manivannan Sadhasivam
2025-04-10  2:45               ` Hongxing Zhu
2025-04-13 15:38                 ` Manivannan Sadhasivam
2025-04-14  3:15                   ` Hongxing Zhu
2025-04-15  7:17                     ` Manivannan Sadhasivam
2025-03-28  3:02 ` [PATCH v3 4/6] PCI: imx6: Let i.MX95 PCIe compliance with 8GT/s Receiver Impedance ECN Richard Zhu
2025-03-28 14:55   ` Frank Li
2025-04-02  7:08   ` Manivannan Sadhasivam
2025-03-28  3:02 ` [PATCH v3 5/6] PCI: imx6: Add PLL clock lock check for i.MX95 PCIe Richard Zhu
2025-04-02  7:10   ` Manivannan Sadhasivam
2025-04-02  7:40     ` Hongxing Zhu
2025-03-28  3:02 ` [PATCH v3 6/6] PCI: imx6: Save and restore the LUT setting " Richard Zhu
2025-03-28 14:56   ` Frank Li
2025-04-02  7:12   ` Manivannan Sadhasivam
2025-04-02  7:40     ` Hongxing Zhu

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=AS8PR04MB8676D14C8DB1FBE6B034CEE28CAF2@AS8PR04MB8676.eurprd04.prod.outlook.com \
    --to=hongxing.zhu@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=festevam@gmail.com \
    --cc=frank.li@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=kw@linux.com \
    --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=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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

all inboxes | Powered by JetHome®