summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorTiberiu Breana <andrei-tiberiu.breana@nxp.com>2017-07-06 18:28:11 +0300
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:28:31 +0800
commitf3b703fcdab74f963dc2469226284c0d6e3fc47b (patch)
treed710808aaf33ce954d873f2e409e2a43abd196de /drivers/pci
parent1ff79a2e4d388ecd36166d4606797a63358e4732 (diff)
MLK-15141-1: PCI: imx: Add epdev_on regulator for 8QM WiFi
Add the epdev_on regulator to power up the WiFi module on the iMX8QM board. This regulator needs to be powered up before the pcie link, in order for the WiFi module to work. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/dwc/pci-imx6.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pci/dwc/pci-imx6.c b/drivers/pci/dwc/pci-imx6.c
index 91bf4b65f447..2ed6a313a5c4 100644
--- a/drivers/pci/dwc/pci-imx6.c
+++ b/drivers/pci/dwc/pci-imx6.c
@@ -92,6 +92,7 @@ struct imx6_pcie {
void __iomem *phy_base;
struct regulator *pcie_phy_regulator;
struct regulator *pcie_bus_regulator;
+ struct regulator *epdev_on;
};
/* Parameters for the waiting for PCIe PHY PLL to lock on i.MX7 */
@@ -1996,6 +1997,15 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)
"pcie clock source missing or invalid\n");
return PTR_ERR(imx6_pcie->pcie_inbound_axi);
}
+
+ imx6_pcie->epdev_on = devm_regulator_get(&pdev->dev,
+ "epdev_on");
+ if (IS_ERR(imx6_pcie->epdev_on))
+ return -EPROBE_DEFER;
+
+ ret = regulator_enable(imx6_pcie->epdev_on);
+ if (ret)
+ dev_err(dev, "failed to enable the epdev_on regulator\n");
} else {
imx6_pcie->iomuxc_gpr =
syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");