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: 355250 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp11270863jai; Wed, 30 Dec 2020 03:56:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAW/LVuX54//GSf88h+eGNPdMkNJfIU2R5oRXHSFd6iRxATwXNn2zEodeAA749ziRDSSCR X-Received: by 2002:a17:906:eb49:: with SMTP id mc9mr47726191ejb.487.1609329378255; Wed, 30 Dec 2020 03:56:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609329378; cv=none; d=google.com; s=arc-20160816; b=mF+e8CPX+hkOBgKQbHJSIxMrLukZAEVdnd+I33Kat2yiQ2kELdiSaqcHhN93QCALnz 4huAm4bGy3qnWgrwhdlMoIXFrn/8KL38fGQivWpkq8Cl/UysFSKUdCGb+/Fpz2hBG7g8 2FbuliEdx+CNJYXfLFZDcygTzoMhg5PfYzd3gLm6b+X9546QxCKG6/a/zXqHWwmPT6pe UAL7+Ic23YUWp9WRV3JWgzXTfkW03DuxfkUFvVmNc1ZqwNYMkFEmBJ8X2cnLvxfWBRdI a7uPYKo3noozBAgtP/0wHAX8g15Zno7bZHaVOC5IZgG6N64j1UxUnQjeWgETzfkEDuiU PvwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HaBccR5ybXZm1ZGk3nqecCV5+MAmIR/4lQjnxQMdJM8=; b=QniJafdisGb4xaCLoeSOyqOngW67ZSdM4JME+FOKAFneR5rdwJBkXfR9Hh6DfDG84v SZlAM+oubrN+ZMKmq0jXHQvs/0/TbZ/PqksP7Ex0OYRWVjsXa3Rny/JzL6S0W4/xevH/ vws83s3uCCGtIIY3dQj8TCrNUsYuvpZhk8FQzMmnYJ/74kohAWrtclgyc5dNG1r7RDd5 +XVdP4kjE05diR92Rarwk/+hH0sagK/GTbY07aC8MN64SlCrqyi9hgysLl/MtO33yxFV QW8UlGFVSBqqQyxxPugaPmtuuX01AjxEQRTo744xkzHK1CMz3KTJCtNAGf3Vn0dmDMxR Urrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SBK5iVE6; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du16si19010349ejc.287.2020.12.30.03.56.18; Wed, 30 Dec 2020 03:56:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SBK5iVE6; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726422AbgL3LzC (ORCPT + 15 others); 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-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(+) -- 2.29.2 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: 355251 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp11270881jai; Wed, 30 Dec 2020 03:56:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQuIioAZk+BFogw+dKTg2KhjGHy4r6AnP7XNE0T743MeeZcffaJD7aq9y5p/Jk4tRMhEqp X-Received: by 2002:a50:a684:: with SMTP id e4mr49649143edc.148.1609329379355; Wed, 30 Dec 2020 03:56:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609329379; cv=none; d=google.com; s=arc-20160816; b=VrhrcnCccofAT9K43+MPbpADYQG6oIADwZLMJQW05JaOH5OidxR8fGK9lPAMHzY1lD GpGh+dmZole0I1qh1uAxQ3otgpQ7ByPMyAbrIZ2dxt6suXU4Xqx3HPbkRNSvg5HNbNUD w0YaLLPObCE5mwVzRgD2ll/0F1k1Fiv8vJTr2fxVefYPd7YiOuhG61EK2sRg9EwrnMXl 3PwvMVwkmzWSA6Drq+orfF28FPiMAdHaDNHtm+ZYXgqp5C8MbON5h3CQ4V2r1yjJWJHh W9S2E6ciKydkezU65GvngFiiChQct+ZCzH16CTguKwqAECSQins29uXusiVkj63Brmet yb0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0yfX279OZuzXxQVuic47RMVyz6BvZPSwD6cWzb7e40Q=; b=JopmguUAotW135+1QIiM29qLThKPh8X0BJ0NeCTvobexErBpi5oRlrJ8NNDrgmBPE+ 9op4ryRTF2BYqSCXmoodg/fGb7Fh43h7Urc0OcB0kILzWikcfPFMRLMfpw//hWOiTDGE BJy75BuQWjPBsvqieeWPN2baMPSxL6xBCsyZTZgOxOEqa9fcP1EO041HLB2xrR4w3h8r euin9uJUzy954uumquDuo2qCjMYkjXR4j+KgTu2zb9WWblsR61NbptFVLT+WZRQZi2PI r/VTn4jTC0IG9hwkreCH//v4nhFNGxqBR7x+ecUP2jMA+y1bdBsCOcJ5mah5L3Vmd4/+ ivtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Elm2G+Qc; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du16si19010349ejc.287.2020.12.30.03.56.19; Wed, 30 Dec 2020 03:56:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Elm2G+Qc; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726486AbgL3Lzl (ORCPT + 15 others); 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-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(-) -- 2.29.2 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); }