From patchwork Wed Dec 30 11:54:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11993179 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F26D2C433E6 for ; Wed, 30 Dec 2020 11:55:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B035222225 for ; Wed, 30 Dec 2020 11:55:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726422AbgL3LzC (ORCPT ); Wed, 30 Dec 2020 06:55:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbgL3LzB (ORCPT ); Wed, 30 Dec 2020 06:55:01 -0500 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 3C53AC06179C for ; Wed, 30 Dec 2020 03:54:21 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id l11so37176499lfg.0 for ; Wed, 30 Dec 2020 03:54:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HaBccR5ybXZm1ZGk3nqecCV5+MAmIR/4lQjnxQMdJM8=; b=SBK5iVE67Nalk6ZLr+Pis73kf+jH6CqYLNsRHK5Wo5tRfHTfLPz/S9JquiIMIGUyhb nIh3GEWjeL2ZylKshSCCe+oLdIETwxdO9zcTu5B42AfZ/BOrowoCThcNyM616tjdw+oM nP0l+z/C3tWKSqc/xnLH9tzfWUYtHcAHOYpCOXbejIPscwLXUG8WGn/tpCEoNamScYlD Qmfa8jOC/+6xsVCXLmsdIShuGXRpQLOpcTHo0flKaogZJxgc6vXpfmwc2weunSJWSJfh VrGHpzZMk0tgfFwD1Xq7UXh7Uy3Md8/2O0OouL1CfqYJgTGNAlewuBy5tofkyvCZCjkC +MtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HaBccR5ybXZm1ZGk3nqecCV5+MAmIR/4lQjnxQMdJM8=; b=Jo13uGBAbsDRBI8w3frN1J8Dg9wYiFYWHRzRubgzie+ukWpBc3z56648kH0N5RfECk bgfm2Ys6kmNMc95TJ4QB5DOEgSnpPIjeun3zvgWhLpU7SmHiElxM04paxE0wrb2wTrtb rWPgZwLsqGD1wJTfwlXmIrRk4/T7QnYGCLeFdc/r+Br72rYArJqd5ZEO50kK7y7BNxA5 jaTRDiSkCNtRsqxKxSvcpsONzWthKibpWa5XRFjn3IIbclvtr4CrPztVYM9KQheAAOkd gEeVgOH//bKmuP9uJcVJC4SWcTi2LBmt4LEj2BC5V6QtJHmIGuCXO7OGvjntNoCaZh0v 0yuw== X-Gm-Message-State: AOAM5322Ju+eiEXIJ3MqO0B5d8mlNybdjjV97HCENWP1hiGFPobRdswm rZAvLOwY2Kehjt6lNDpl0w/DHA== X-Google-Smtp-Source: ABdhPJwYVB/HQllDCUVNbSy6DeVCOtVK/GJWkCopdFnd92pw6sC+c+WsYr9X0wodjPhNNmhXf+egpg== X-Received: by 2002:a19:2d5a:: with SMTP id t26mr24132861lft.241.1609329259725; Wed, 30 Dec 2020 03:54:19 -0800 (PST) Received: from eriador.lumag.spb.ru ([94.25.228.115]) by smtp.gmail.com with ESMTPSA id a8sm5931484lfo.206.2020.12.30.03.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Dec 2020 03:54:19 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Lorenzo Pieralisi Cc: linux-arm-msm@vger.kernel.org, Manivannan Sadhasivam , linux-pci@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: pci: qcom: Document ddrss_sf_tbu clock for sm8250 Date: Wed, 30 Dec 2020 14:54:07 +0300 Message-Id: <20201230115408.492565-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201230115408.492565-1-dmitry.baryshkov@linaro.org> References: <20201230115408.492565-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On SM8250 additional clock is required for PCIe devices to access NOC. Document this clock in devicetree bindings. Signed-off-by: Dmitry Baryshkov Fixes: 458168247ccc ("dt-bindings: pci: qcom: Document PCIe bindings for SM8250 SoC") --- Documentation/devicetree/bindings/pci/qcom,pcie.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.txt b/Documentation/devicetree/bindings/pci/qcom,pcie.txt index 3b55310390a0..c87806f76a43 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.txt +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.txt @@ -142,6 +142,7 @@ - "bus_slave" Slave AXI clock - "slave_q2a" Slave Q2A clock - "tbu" PCIe TBU clock + - "ddrss_sf_tbu" PCIe SF TBU clock, required on sm8250 - "pipe" PIPE clock - resets: From patchwork Wed Dec 30 11:54:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11993181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FBF7C433E0 for ; Wed, 30 Dec 2020 11:55:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EFB63207B2 for ; Wed, 30 Dec 2020 11:55:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726486AbgL3Lzl (ORCPT ); Wed, 30 Dec 2020 06:55:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbgL3Lzl (ORCPT ); Wed, 30 Dec 2020 06:55:41 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AAFEC0617A0 for ; Wed, 30 Dec 2020 03:54:22 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id h22so37178259lfu.2 for ; Wed, 30 Dec 2020 03:54:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0yfX279OZuzXxQVuic47RMVyz6BvZPSwD6cWzb7e40Q=; b=Elm2G+Qc7tvWtPKiXfS0up+j5Qf+Y6sAmNGjsmbQbDCMV4PSshvEGABrpt/VYIB6c8 2zZGKwVwEXt29o7KNSV6m86mPigw43+CgcBJQ+mRQAghcRo2VtRmO46OCYUYoTYCWm8z dthGtkrcCmkDobmFo8zZX7Lw7ewULYYA3OAA18OY1Xd16ZZoBADkaBaInPsc+n9042FZ /PskxrawIg8I9AZpKDntky9MkCWH6gSUsjyWJsusOw+pJZDgE+LAw3eAzXBG1nUq/FJl Jc6kSq+Ga3qjiLuk+GSKozpvIZp2aj6Tr0CK29vsmarpQ58fip9p2/u7mRJ+4oOJj0Mm D5jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0yfX279OZuzXxQVuic47RMVyz6BvZPSwD6cWzb7e40Q=; b=LcloEMl336fyCvep2lnU9pLJfs4VJF5EqGjab2z+oxkKGBs7c4e4tK12i61ed/LPff dG23kyU6uNs9TI2sHvElrSf5k2KCydg6VmsTbGPlz0+EW6t8RhNsDm+ocfqCeZzjgRC9 eYMzQlw8vE8MUOphbmFfX3w1KN1Ro00zI/Rz72sOq/E5Zgsvw7oZoO1XYdcMdiW5k9oE Dsbj674CjJR++Uy5YSuK1bAji09/ATEK/1CwQEKVLnQGtMx9NndTcutTQeCx4ZITT5AC nmnV4ytp/dcWADoSUpeiLlI3nPeckpqRvX4vRpd65rpDfBgPzeBGQaid0AnZdVEJGT93 PaCA== X-Gm-Message-State: AOAM533lIi3rPFfwnhdmg3YbCplANZ4QumDQYWdHzYVm2khnpEhqsEpI PGGZppZEoUmTfqqADKjU6RMwPw== X-Google-Smtp-Source: ABdhPJyanAgqPG5+ohgUBfm+HvqGe/2uXjUXdvhLry6GamZB+JKQnuW944rARjo3vDMhOMdpAfBABA== X-Received: by 2002:a2e:9b47:: with SMTP id o7mr25430139ljj.99.1609329261019; Wed, 30 Dec 2020 03:54:21 -0800 (PST) Received: from eriador.lumag.spb.ru ([94.25.228.115]) by smtp.gmail.com with ESMTPSA id a8sm5931484lfo.206.2020.12.30.03.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Dec 2020 03:54:20 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring , Lorenzo Pieralisi Cc: linux-arm-msm@vger.kernel.org, Manivannan Sadhasivam , linux-pci@vger.kernel.org Subject: [PATCH v2 2/2] PCI: qcom: add support for ddrss_sf_tbu clock Date: Wed, 30 Dec 2020 14:54:08 +0300 Message-Id: <20201230115408.492565-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201230115408.492565-1-dmitry.baryshkov@linaro.org> References: <20201230115408.492565-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On SM8250 additional clock is required for PCIe devices to access NOC. Update PCIe controller driver to control this clock. Signed-off-by: Dmitry Baryshkov Fixes: e1dd639e374a ("PCI: qcom: Add SM8250 SoC support") --- drivers/pci/controller/dwc/pcie-qcom.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index affa2713bf80..658d007a764c 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -159,8 +159,9 @@ struct qcom_pcie_resources_2_3_3 { struct reset_control *rst[7]; }; +#define QCOM_PCIE_2_7_0_MAX_CLOCKS 6 struct qcom_pcie_resources_2_7_0 { - struct clk_bulk_data clks[6]; + struct clk_bulk_data clks[QCOM_PCIE_2_7_0_MAX_CLOCKS + 1]; /* + 1 for sf_tbu */ struct regulator_bulk_data supplies[2]; struct reset_control *pci_reset; struct clk *pipe_clk; @@ -1153,10 +1154,15 @@ static int qcom_pcie_get_resources_2_7_0(struct qcom_pcie *pcie) res->clks[4].id = "slave_q2a"; res->clks[5].id = "tbu"; - ret = devm_clk_bulk_get(dev, ARRAY_SIZE(res->clks), res->clks); + ret = devm_clk_bulk_get(dev, QCOM_PCIE_2_7_0_MAX_CLOCKS, res->clks); if (ret < 0) return ret; + /* Optional clock for SM8250 */ + res->clks[6].clk = devm_clk_get_optional(dev, "ddrss_sf_tbu"); + if (IS_ERR(res->clks[6].clk)) + return PTR_ERR(res->clks[6].clk); + res->pipe_clk = devm_clk_get(dev, "pipe"); return PTR_ERR_OR_ZERO(res->pipe_clk); }