From patchwork Tue Sep 27 09:22:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 609677 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 EA106C6FA90 for ; Tue, 27 Sep 2022 09:24:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231862AbiI0JYh (ORCPT ); Tue, 27 Sep 2022 05:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231856AbiI0JYS (ORCPT ); Tue, 27 Sep 2022 05:24:18 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D0AF1162F0 for ; Tue, 27 Sep 2022 02:22:13 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id i26so14752299lfp.11 for ; Tue, 27 Sep 2022 02:22:12 -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=+cRD+CYxxlYh0TtwkYsk8VGD+YRN12siaZ7YI1JRdBU=; b=C+ikIGiHKrX2JWV6Ywhc5I8pRpcwLG1KuPK9+Gg9V+ciLX0Dip4q7RgKbBUirPd7dJ riaaUEyoi5mNaSPNfyMqWeCoue1QdN8UlvotASSsbjwjvrR2wAilVhfWX2z45ZrQJ/4p FCAgbaKe1t8q4D/GbnD6BlBEiw5XcDzviIJSeQlZHh/9ijSMUnOg/4RFrO6PZQF72Wxo haebmx3l+i+QUzNsm/isbYmaY/wza8HOwVX44vzjCKFSTNM6v7llYwCH92/qVE4Jg6ty KOZSkuNx/ULlCESmJ5y/+iWFc1S3NQmvydfH24pdL0Y3P10KW/mp45Di5i7NcKilFSRA 0ylA== 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=+cRD+CYxxlYh0TtwkYsk8VGD+YRN12siaZ7YI1JRdBU=; b=OCMHsm5OqfkoyYLRXVzvoIOxQOMSZYPtxNGuD42tITsVs8Qu/wg6klyHlD7l4DUyn5 IIYriLPvh8FVDE2IWBI/9pqG84iC60tgfkO68pDHk+16pcmijFy6B5bc7CE3wjKvq2q6 LRnjApVfEgytCdJ30kb7peExJE0ku6yFq/0LfbI06K8baoSzXiRErAX1QuUbpSDukFoX W6OUS8tIgR1BQWvsp9C1sDs38FLSne7gz8w/8B1n/ZjnAA+z/AV4P296Cx+6iCaZ4j4m B4DBJHpVHpEcugRkRC5e49QXSCruoUrG3aGIYIlqWCFQBWKpzQzlA74WHgV97SPLFsZO 2rYA== X-Gm-Message-State: ACrzQf0FPa6zWAmluALLmlA+B6WnkkhGIcjmyJck1CVwETtT7gvCnLwr Cr4ZFKTwStABEoSuHy5MfFatzg== X-Google-Smtp-Source: AMsMyM7dzWp7+3RxnEEZRbvsOsxHgCe3YxG7c2tkgPLG9OrgwrJ7+K09IWXwKsgU/E745SVrDqEhhA== X-Received: by 2002:a05:6512:3ca2:b0:497:9db7:ec10 with SMTP id h34-20020a0565123ca200b004979db7ec10mr11480446lfv.350.1664270531318; Tue, 27 Sep 2022 02:22:11 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id r28-20020a2e8e3c000000b0026c15d60ad1sm104584ljk.132.2022.09.27.02.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 02:22:10 -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, Johan Hovold Subject: [PATCH v6 4/5] PCI: qcom: Setup PHY to work in RC mode Date: Tue, 27 Sep 2022 12:22:05 +0300 Message-Id: <20220927092207.161501-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220927092207.161501-1-dmitry.baryshkov@linaro.org> References: <20220927092207.161501-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Call phy_set_mode_ext() to notify the PHY driver that the PHY is being used in the RC mode. Reviewed-by: Jingoo Han Reviewed-by: Johan Hovold Signed-off-by: Dmitry Baryshkov --- drivers/pci/controller/dwc/pcie-qcom.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 66886dc6e777..1027281bd6ff 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -1494,6 +1495,10 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp) if (ret) return ret; + ret = phy_set_mode_ext(pcie->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC); + if (ret) + goto err_deinit; + ret = phy_power_on(pcie->phy); if (ret) goto err_deinit;