From patchwork Sat Sep 24 16:03:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 12987771 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3111C6FA90 for ; Sat, 24 Sep 2022 16:03:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233744AbiIXQDP (ORCPT ); Sat, 24 Sep 2022 12:03:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233834AbiIXQDL (ORCPT ); Sat, 24 Sep 2022 12:03:11 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE4CF399C8 for ; Sat, 24 Sep 2022 09:03:10 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id a8so4597323lff.13 for ; Sat, 24 Sep 2022 09:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=qNP6ThRLpHNI/EUjMpjjuQG55s6ZxCbGqJcYBGEJHG4=; b=HPew258xyvOOq0agsLcQvgFBuWGMmeXE1O/TQ2jVEgrVXvDPFCvijlXIGC9FeyJ3nn D9cRmNI1agSsPKPLL2d8ZYtQX8EXNGJi0fgg9vR9ZtJxNbU+JF4dfhOifgQ/k/cbH4tR xcrUK4x7plppO5XSYmW52xXSplayrWLoITtaCX7tpsuU31XuTgNSTvczG4897jXCAriQ RsBo9VEO4MMYgZ/pt4GXNyHuw8RYBNkOk6Nm/wDjLSb/diFcvz7mDtvAdRRi4ctgVNCR iFI/4X3gbEx6DbjwoMV+217tIa/c8d1RIi42XK9aRRz372sPhybuWVg3d7YWw/nmhr48 CiaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=qNP6ThRLpHNI/EUjMpjjuQG55s6ZxCbGqJcYBGEJHG4=; b=ULUVM0hv3arsAOtCbHzB/omLBmvaci+LxnyJXS7f/wR5ZogZVWV+RHn/yQZbgEGZUd TaOllX8aL2s/p0yHdYkecr9q3X0Gnm0qHZ2F6h9DL6NDbgJk7HfGI3BqI1cs/JqWOLyG CqgUFwDNkO/PhHw8Z0cuRc9896cztyWFcZpsDFHEmsP7sbOheO5eWvGn7VLKhmCBcDt7 w5a+nmfIaL1/KINS/ac+L35kjFLeysFOrRw+KT3IIFTDB2SUIqQh07QjGEFrGlAwcpTN /hMVoIT3ZJ6yBgf8FNzcJS8XY95l4ugZfJirhfOw1422dyAe8OP6HDObTjCT7TIsSJ/5 g45Q== X-Gm-Message-State: ACrzQf0lUGEZC4ty5Yv/Hku3Hhh/1QDpqpzg4TbKxy607WsN5XKzM+fs 9ThQRG80BC1AN5JbEp30Orl7Cw== X-Google-Smtp-Source: AMsMyM6etBjajLFZyOO5iUfHHXRd4Vm+/Y/spSTurjv1mn1NTAAxvJjmipI2eHTqA/yeakFinoOhnw== X-Received: by 2002:a05:6512:252b:b0:4a0:5642:dbc5 with SMTP id be43-20020a056512252b00b004a05642dbc5mr3293999lfb.436.1664035389284; Sat, 24 Sep 2022 09:03:09 -0700 (PDT) Received: from eriador.lumag.spb.ru ([95.161.222.31]) by smtp.gmail.com with ESMTPSA id 9-20020ac25f09000000b00499f9ba6af0sm1928015lfq.207.2022.09.24.09.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Sep 2022 09:03:08 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Bjorn Helgaas , Vinod Koul , Kishon Vijay Abraham I Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, Manivannan Sadhasivam Subject: [PATCH v4 6/6] PCI: qcom-ep: Setup PHY to work in EP mode Date: Sat, 24 Sep 2022 19:03:02 +0300 Message-Id: <20220924160302.285875-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220924160302.285875-1-dmitry.baryshkov@linaro.org> References: <20220924160302.285875-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Call phy_set_mode_ext() to notify the PHY driver that the PHY is being used in the EP mode. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Dmitry Baryshkov Reviewed-by: 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 #include #include +#include #include #include #include @@ -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;