Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: qcom-ep: Setup PHY to work in EP mode

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@linaro.org>
Reviewed-by: Jingoo Han <jingoohan1@gmail.com>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Link: https://lore.kernel.org/r/20220927092207.161501-6-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Dmitry Baryshkov and committed by
Vinod Koul
a84ed191 f90747d1

+5
+5
drivers/pci/controller/dwc/pcie-qcom-ep.c
··· 14 14 #include <linux/delay.h> 15 15 #include <linux/gpio/consumer.h> 16 16 #include <linux/mfd/syscon.h> 17 + #include <linux/phy/pcie.h> 17 18 #include <linux/phy/phy.h> 18 19 #include <linux/platform_device.h> 19 20 #include <linux/pm_domain.h> ··· 268 267 ret = phy_init(pcie_ep->phy); 269 268 if (ret) 270 269 goto err_disable_clk; 270 + 271 + ret = phy_set_mode_ext(pcie_ep->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_EP); 272 + if (ret) 273 + goto err_phy_exit; 271 274 272 275 ret = phy_power_on(pcie_ep->phy); 273 276 if (ret)