[PATCH v4 6/6] PCI: qcom-ep: Setup PHY to work in EP mode
Han Jingoo
jingoohan1 at gmail.com
Sat Sep 24 16:53:55 PDT 2022
On Sat, Sep 24, 2022 Dmitry Baryshkov <dmitry.baryshkov at linaro.org> wrote:
>
> Call phy_set_mode_ext() to notify the PHY driver that the PHY is being
> used in the EP mode.
>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
Reviewed-by: Jingoo Han <jingoohan1 at gmail.com>
Best regards,
Jingoo Han
> ---
> drivers/pci/controller/dwc/pcie-qcom-ep.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> index ec99116ad05c..8dcfeed24424 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> @@ -13,6 +13,7 @@
> #include <linux/delay.h>
> #include <linux/gpio/consumer.h>
> #include <linux/mfd/syscon.h>
> +#include <linux/phy/pcie.h>
> #include <linux/phy/phy.h>
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> @@ -240,6 +241,10 @@ static int qcom_pcie_enable_resources(struct qcom_pcie_ep *pcie_ep)
> if (ret)
> goto err_disable_clk;
>
> + ret = phy_set_mode_ext(pcie_ep->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_EP);
> + if (ret)
> + goto err_phy_exit;
> +
> ret = phy_power_on(pcie_ep->phy);
> if (ret)
> goto err_phy_exit;
> --
> 2.35.1
>
More information about the linux-phy
mailing list