* [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it
@ 2025-08-20 2:23 Richard Zhu
2025-08-20 15:04 ` Frank Li
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Richard Zhu @ 2025-08-20 2:23 UTC (permalink / raw)
To: frank.li, l.stach, lpieralisi, kwilczynski, mani, robh, krzk+dt,
conor+dt, bhelgaas, shawnguo, s.hauer, kernel, festevam
Cc: linux-pci, linux-arm-kernel, devicetree, imx, linux-kernel,
Richard Zhu
Refer to PCIe CEM r6.0, sec 2.3 WAKE# Signal, WAKE# signal is only
asserted by the Add-in Card when all its functions are in D3Cold state
and at least one of its functions is enabled for wakeup generation. The
3.3V auxiliary power (+3.3Vaux) must be present and used for wakeup
process.
When the 3.3V auxiliary power is present, fetch this auxiliary regulator
at probe time and keep it enabled for the entire PCIe controller
lifecycle. This ensures support for outbound wake-up mechanism such as
WAKE# signaling.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
---
v5 changes:
- Use the vpcie3v3aux property instead of adding a duplicated one.
- Move the comments from the code changes into the description of
commit.
v4 changes:
Move the dt-binding to snps,dw-pcie-common.yaml.
v3 changes:
Add a new vaux power supply used to specify the regulator powered up the
WAKE# circuit on the connector when WAKE# is supported.
v2 changes:
Update the commit message, and add reviewed-by from Frank.
https://patchwork.kernel.org/project/linux-pci/patch/20250619072438.125921-1-hongxing.zhu@nxp.com/
---
drivers/pci/controller/dwc/pci-imx6.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 5a38cfaf989b1..5067da14bc053 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1739,6 +1739,10 @@ static int imx_pcie_probe(struct platform_device *pdev)
pci->max_link_speed = 1;
of_property_read_u32(node, "fsl,max-link-speed", &pci->max_link_speed);
+ ret = devm_regulator_get_enable_optional(&pdev->dev, "vpcie3v3aux");
+ if (ret < 0 && ret != -ENODEV)
+ return dev_err_probe(dev, ret, "failed to enable pcie3v3vaux");
+
imx_pcie->vpcie = devm_regulator_get_optional(&pdev->dev, "vpcie");
if (IS_ERR(imx_pcie->vpcie)) {
if (PTR_ERR(imx_pcie->vpcie) != -ENODEV)
--
2.37.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it
2025-08-20 2:23 [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it Richard Zhu
@ 2025-08-20 15:04 ` Frank Li
2025-09-04 17:09 ` Manivannan Sadhasivam
2025-09-05 4:50 ` Manivannan Sadhasivam
2 siblings, 0 replies; 5+ messages in thread
From: Frank Li @ 2025-08-20 15:04 UTC (permalink / raw)
To: Richard Zhu
Cc: l.stach, lpieralisi, kwilczynski, mani, robh, krzk+dt, conor+dt,
bhelgaas, shawnguo, s.hauer, kernel, festevam, linux-pci,
linux-arm-kernel, devicetree, imx, linux-kernel
On Wed, Aug 20, 2025 at 10:23:28AM +0800, Richard Zhu wrote:
> Refer to PCIe CEM r6.0, sec 2.3 WAKE# Signal, WAKE# signal is only
> asserted by the Add-in Card when all its functions are in D3Cold state
> and at least one of its functions is enabled for wakeup generation. The
> 3.3V auxiliary power (+3.3Vaux) must be present and used for wakeup
> process.
>
> When the 3.3V auxiliary power is present, fetch this auxiliary regulator
> at probe time and keep it enabled for the entire PCIe controller
> lifecycle. This ensures support for outbound wake-up mechanism such as
> WAKE# signaling.
>
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
> v5 changes:
> - Use the vpcie3v3aux property instead of adding a duplicated one.
> - Move the comments from the code changes into the description of
> commit.
>
> v4 changes:
> Move the dt-binding to snps,dw-pcie-common.yaml.
>
> v3 changes:
> Add a new vaux power supply used to specify the regulator powered up the
> WAKE# circuit on the connector when WAKE# is supported.
>
> v2 changes:
> Update the commit message, and add reviewed-by from Frank.
> https://patchwork.kernel.org/project/linux-pci/patch/20250619072438.125921-1-hongxing.zhu@nxp.com/
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 5a38cfaf989b1..5067da14bc053 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1739,6 +1739,10 @@ static int imx_pcie_probe(struct platform_device *pdev)
> pci->max_link_speed = 1;
> of_property_read_u32(node, "fsl,max-link-speed", &pci->max_link_speed);
>
> + ret = devm_regulator_get_enable_optional(&pdev->dev, "vpcie3v3aux");
> + if (ret < 0 && ret != -ENODEV)
> + return dev_err_probe(dev, ret, "failed to enable pcie3v3vaux");
> +
> imx_pcie->vpcie = devm_regulator_get_optional(&pdev->dev, "vpcie");
> if (IS_ERR(imx_pcie->vpcie)) {
> if (PTR_ERR(imx_pcie->vpcie) != -ENODEV)
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it
2025-08-20 2:23 [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it Richard Zhu
2025-08-20 15:04 ` Frank Li
@ 2025-09-04 17:09 ` Manivannan Sadhasivam
2025-09-05 1:40 ` Hongxing Zhu
2025-09-05 4:50 ` Manivannan Sadhasivam
2 siblings, 1 reply; 5+ messages in thread
From: Manivannan Sadhasivam @ 2025-09-04 17:09 UTC (permalink / raw)
To: Richard Zhu
Cc: frank.li, l.stach, lpieralisi, kwilczynski, robh, krzk+dt,
conor+dt, bhelgaas, shawnguo, s.hauer, kernel, festevam,
linux-pci, linux-arm-kernel, devicetree, imx, linux-kernel
On Wed, Aug 20, 2025 at 10:23:28AM GMT, Richard Zhu wrote:
> Refer to PCIe CEM r6.0, sec 2.3 WAKE# Signal, WAKE# signal is only
> asserted by the Add-in Card when all its functions are in D3Cold state
> and at least one of its functions is enabled for wakeup generation. The
> 3.3V auxiliary power (+3.3Vaux) must be present and used for wakeup
> process.
>
> When the 3.3V auxiliary power is present, fetch this auxiliary regulator
> at probe time and keep it enabled for the entire PCIe controller
> lifecycle. This ensures support for outbound wake-up mechanism such as
> WAKE# signaling.
>
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> ---
> v5 changes:
> - Use the vpcie3v3aux property instead of adding a duplicated one.
> - Move the comments from the code changes into the description of
> commit.
>
> v4 changes:
> Move the dt-binding to snps,dw-pcie-common.yaml.
>
> v3 changes:
> Add a new vaux power supply used to specify the regulator powered up the
> WAKE# circuit on the connector when WAKE# is supported.
>
> v2 changes:
> Update the commit message, and add reviewed-by from Frank.
> https://patchwork.kernel.org/project/linux-pci/patch/20250619072438.125921-1-hongxing.zhu@nxp.com/
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 5a38cfaf989b1..5067da14bc053 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1739,6 +1739,10 @@ static int imx_pcie_probe(struct platform_device *pdev)
> pci->max_link_speed = 1;
> of_property_read_u32(node, "fsl,max-link-speed", &pci->max_link_speed);
>
> + ret = devm_regulator_get_enable_optional(&pdev->dev, "vpcie3v3aux");
> + if (ret < 0 && ret != -ENODEV)
> + return dev_err_probe(dev, ret, "failed to enable pcie3v3vaux");
> +
So if Vaux is available, do we still need the IMX95_PCIE_SYS_AUX_PWR_DET setting
in imx95_pcie_init_phy()?
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it
2025-09-04 17:09 ` Manivannan Sadhasivam
@ 2025-09-05 1:40 ` Hongxing Zhu
0 siblings, 0 replies; 5+ messages in thread
From: Hongxing Zhu @ 2025-09-05 1:40 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: Frank Li, l.stach@pengutronix.de, lpieralisi@kernel.org,
kwilczynski@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@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,
devicetree@vger.kernel.org, imx@lists.linux.dev,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Manivannan Sadhasivam <mani@kernel.org>
> Sent: 2025年9月5日 1:10
> To: Hongxing Zhu <hongxing.zhu@nxp.com>
> Cc: Frank Li <frank.li@nxp.com>; l.stach@pengutronix.de;
> lpieralisi@kernel.org; kwilczynski@kernel.org; robh@kernel.org;
> krzk+dt@kernel.org; conor+dt@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; devicetree@vger.kernel.org;
> imx@lists.linux.dev; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when
> fetch it
>
> On Wed, Aug 20, 2025 at 10:23:28AM GMT, Richard Zhu wrote:
> > Refer to PCIe CEM r6.0, sec 2.3 WAKE# Signal, WAKE# signal is only
> > asserted by the Add-in Card when all its functions are in D3Cold state
> > and at least one of its functions is enabled for wakeup generation.
> > The 3.3V auxiliary power (+3.3Vaux) must be present and used for
> > wakeup process.
> >
> > When the 3.3V auxiliary power is present, fetch this auxiliary
> > regulator at probe time and keep it enabled for the entire PCIe
> > controller lifecycle. This ensures support for outbound wake-up
> > mechanism such as WAKE# signaling.
> >
> > Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> > ---
> > v5 changes:
> > - Use the vpcie3v3aux property instead of adding a duplicated one.
> > - Move the comments from the code changes into the description of
> > commit.
> >
> > v4 changes:
> > Move the dt-binding to snps,dw-pcie-common.yaml.
> >
> > v3 changes:
> > Add a new vaux power supply used to specify the regulator powered up
> > the WAKE# circuit on the connector when WAKE# is supported.
> >
> > v2 changes:
> > Update the commit message, and add reviewed-by from Frank.
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> >
> hwork.kernel.org%2Fproject%2Flinux-pci%2Fpatch%2F20250619072438.12592
> 1
> >
> -1-hongxing.zhu%40nxp.com%2F&data=05%7C02%7Chongxing.zhu%40nxp.co
> m%7C3
> >
> 19a7d203805468577cb08ddebd5dad5%7C686ea1d3bc2b4c6fa92cd99c5c3016
> 35%7C0
> > %7C0%7C638926025929715326%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0e
> U1hcGkiOnRy
> >
> dWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3
> D%
> >
> 3D%7C0%7C%7C%7C&sdata=3Arx%2F%2FsvN05%2FopB8IL3C4b%2FvLc1dinf1
> ylJQkjfs
> > 670%3D&reserved=0
> > ---
> > drivers/pci/controller/dwc/pci-imx6.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> > b/drivers/pci/controller/dwc/pci-imx6.c
> > index 5a38cfaf989b1..5067da14bc053 100644
> > --- a/drivers/pci/controller/dwc/pci-imx6.c
> > +++ b/drivers/pci/controller/dwc/pci-imx6.c
> > @@ -1739,6 +1739,10 @@ static int imx_pcie_probe(struct
> platform_device *pdev)
> > pci->max_link_speed = 1;
> > of_property_read_u32(node, "fsl,max-link-speed",
> > &pci->max_link_speed);
> >
> > + ret = devm_regulator_get_enable_optional(&pdev->dev, "vpcie3v3aux");
> > + if (ret < 0 && ret != -ENODEV)
> > + return dev_err_probe(dev, ret, "failed to enable pcie3v3vaux");
> > +
>
> So if Vaux is available, do we still need the IMX95_PCIE_SYS_AUX_PWR_DET
> setting in imx95_pcie_init_phy()?[Richard Zhu]
Hi Mani:
Thanks for your comments.
Yes, it's still required. Regarding my understands, the Vaux here is one chip
inside power rail, used to power up some design logic mandatory required in
the L2 mode. The vpcie3v3aux is the regulator used to power up signals on
the connector. They are different.
Best Regards
Richard Zhu
>
> - Mani
>
> --
> மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it
2025-08-20 2:23 [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it Richard Zhu
2025-08-20 15:04 ` Frank Li
2025-09-04 17:09 ` Manivannan Sadhasivam
@ 2025-09-05 4:50 ` Manivannan Sadhasivam
2 siblings, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2025-09-05 4:50 UTC (permalink / raw)
To: frank.li, l.stach, lpieralisi, kwilczynski, robh, krzk+dt,
conor+dt, bhelgaas, shawnguo, s.hauer, kernel, festevam,
Richard Zhu
Cc: linux-pci, linux-arm-kernel, devicetree, imx, linux-kernel
On Wed, 20 Aug 2025 10:23:28 +0800, Richard Zhu wrote:
> Refer to PCIe CEM r6.0, sec 2.3 WAKE# Signal, WAKE# signal is only
> asserted by the Add-in Card when all its functions are in D3Cold state
> and at least one of its functions is enabled for wakeup generation. The
> 3.3V auxiliary power (+3.3Vaux) must be present and used for wakeup
> process.
>
> When the 3.3V auxiliary power is present, fetch this auxiliary regulator
> at probe time and keep it enabled for the entire PCIe controller
> lifecycle. This ensures support for outbound wake-up mechanism such as
> WAKE# signaling.
>
> [...]
Applied, thanks!
[1/1] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it
commit: c221cbf8dc547eb8489152ac62ef103fede99545
Best regards,
--
Manivannan Sadhasivam <mani@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-05 4:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 2:23 [PATCH v5] PCI: imx6: Enable the vpcie3v3aux regulator when fetch it Richard Zhu
2025-08-20 15:04 ` Frank Li
2025-09-04 17:09 ` Manivannan Sadhasivam
2025-09-05 1:40 ` Hongxing Zhu
2025-09-05 4:50 ` Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).