]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PCI: imx6: Enable the Vaux supply if available
authorRichard Zhu <hongxing.zhu@nxp.com>
Wed, 20 Aug 2025 02:23:28 +0000 (10:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:34:19 +0000 (15:34 -0500)
[ Upstream commit c221cbf8dc547eb8489152ac62ef103fede99545 ]

When the 3.3Vaux supply is present, fetch it at the probe time and keep it
enabled for the entire PCIe controller lifecycle so that the link can enter
L2 state and the devices can signal wakeup using either Beacon or WAKE#
mechanisms.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
[mani: reworded the subject, description and error message]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250820022328.2143374-1-hongxing.zhu@nxp.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pci-imx6.c

index c5254241942d342e7ec384b81826b3992ca290fd..8877d327867ee2d6896b3bed568ff2c9f6a80016 100644 (file)
@@ -1487,6 +1487,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 Vaux supply\n");
+
        imx_pcie->vpcie = devm_regulator_get_optional(&pdev->dev, "vpcie");
        if (IS_ERR(imx_pcie->vpcie)) {
                if (PTR_ERR(imx_pcie->vpcie) != -ENODEV)