Message ID | 20230224105906.16540-3-manivannan.sadhasivam@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp837989wrd; Fri, 24 Feb 2023 03:03:23 -0800 (PST) X-Google-Smtp-Source: AK7set8IYLKTvPqWxicpPiqgZZwUU/sR+9Y/Epod5i0eZUcPzJI6LYAZGMJeGUeHsHXdH3eFmlJa X-Received: by 2002:a05:6402:48b:b0:4af:70a5:43ff with SMTP id k11-20020a056402048b00b004af70a543ffmr4443748edv.26.1677236603623; Fri, 24 Feb 2023 03:03:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677236603; cv=none; d=google.com; s=arc-20160816; b=ThHSL4yQIgQrzsOzKl2s0CGUafEq9CFJekxAQGEY6UofoDWHKH48cU1Nv624e2vjuP DrgJ5p1yTSCcUtdnOY9wXBLdLMnj+R5l9XHNBxnGzZPj4zbLADuMxMx0X43vbTwxDH2C gVd3YjShR79xmlRSyDY11WQrGa8RJAzQ0ZOAMcTLerCo9f7Z/5Ka4T85DXCMHkegw28e wTz4BB0jZids/gaFORFLj+5NKPrDEm37+DGvPYe5SC/bYM3tSkKnVdxjF1j+uwnuQUXk Vh1FejbPu/mBL+VPKlFza8o0McIXZPhalWrPGqo9Ms+bkIRmdk4zoTZ/2qVnUU6R/kce aQnA== 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=uGDet0K+1/m01Mue6GMZv5iNZBwdpYi4DRLEmHhKT40=; b=aoFS7O2dhbBxPgInGMqs4c/BXLSKvs/4jtdiTQLIF185rtcMGgsZ38jHgF1+i4XwCP sqxEw7IbnndXnouLvcC+KZ4QgMohW5p24gOhYxobHExC/uED+EPJgE0H7Zn8FEwZYCj+ DRbLvK0dC9DuNkgzZIiQyaDNyaiQBocNAFPNZUdP6lBOVBFC17b9kaPvUXosrNhkkfwG BRNkgqN22xmOZ8zlxIzptTqTfl5/CC7+T54OfXHMRcRCP6hf9O+YGqZ6QqAAnQAF2qnS 0F56ukksm1mAaaPWB7q2UbYmzt4ZhvCQvxb/1q6JBxIcc8KtyBY/gZWRcs+/IwQO4z0W 8hxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wzykzWTL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l8-20020a056402344800b004ad152b8f57si7569234edc.552.2023.02.24.03.02.55; Fri, 24 Feb 2023 03:03:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wzykzWTL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S230100AbjBXLAc (ORCPT <rfc822;jeff.pang.chn@gmail.com> + 99 others); Fri, 24 Feb 2023 06:00:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbjBXK7z (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 24 Feb 2023 05:59:55 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8072A244B4 for <linux-kernel@vger.kernel.org>; Fri, 24 Feb 2023 02:59:25 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id x20-20020a17090a8a9400b00233ba727724so6000867pjn.1 for <linux-kernel@vger.kernel.org>; Fri, 24 Feb 2023 02:59:25 -0800 (PST) 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 :message-id:reply-to; bh=uGDet0K+1/m01Mue6GMZv5iNZBwdpYi4DRLEmHhKT40=; b=wzykzWTLm9WRroHFoG0Wi4/XZv56thmYBqfYcTMsjRvlgFIqS7YEcL35e6oZhoDeTX 3iZRGY2Qj1zBi0n4Ds3Q9wWRoRQCHAHJtnggV4VvKboWqiHGa0a7So9m9rN5Yl8p/evu cF9l87jWQ0FHeQFwLjYeevwF+dvbUSgO/jVW1rUrmvT3qcKt5ulkUyDD/+wNzPBc9mCb kqvPxj3z4FBMBgcsSp12n1L3AnTJlNbpS+tDJWKlIHsPxSVmjmOAlNW1/TWKObSDwMhg b3SbhF7WiUVvgYLj9kIwU+AkuSMLl9PT2tneUhCIC/v0JlFH5zOHDmeaSgPtKSEKfjI3 xnBQ== 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:message-id:reply-to; bh=uGDet0K+1/m01Mue6GMZv5iNZBwdpYi4DRLEmHhKT40=; b=U9Vwx+W81rX2fd1OJOfEWKXswyErzBYsGg2wWkejekt9RB/2rYSfhaTAuBvpg518RH KAe/gVCq9om93fRwD/SbqeGA3oq/dS7b0Dn6SyHBGI6rbKMDkWj6P2JBfC+SqVZpn/Gf AnlYK6WeQB9gkKLjNjSk18io5kUFK74jvmYrgZhBsZq1j7gxD41oYz1Ui5jiRrrk4IPb wS0rELxhcEmRolaCSDG0/JHZtt1hz2ga2ZXsHoggWMXsa2DYOzuV6GbOCvjvmK57yULW rs69iKd/bxNZyKSysFPsy9rxQXZ1CYR/nJg5otGDNWmSzM6UmnPHwPpyuU+6ALA/C6cx F2sw== X-Gm-Message-State: AO0yUKVruSo7XOacjaQkNGv+G9go/tguLa4Vkzwi/GbL4u+nMTug50tj LOf0QPy7TgvfOeWi4tFzs6hX X-Received: by 2002:a17:90b:388a:b0:234:1645:5266 with SMTP id mu10-20020a17090b388a00b0023416455266mr17301662pjb.30.1677236364970; Fri, 24 Feb 2023 02:59:24 -0800 (PST) Received: from localhost.localdomain ([117.217.187.3]) by smtp.gmail.com with ESMTPSA id gd5-20020a17090b0fc500b00233cde36909sm1263853pjb.21.2023.02.24.02.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 02:59:24 -0800 (PST) From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> To: andersson@kernel.org, lpieralisi@kernel.org, robh@kernel.org, kw@linux.com, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org Cc: konrad.dybcio@linaro.org, bhelgaas@google.com, kishon@kernel.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Subject: [PATCH v2 02/13] dt-bindings: PCI: qcom: Add iommu properties Date: Fri, 24 Feb 2023 16:28:55 +0530 Message-Id: <20230224105906.16540-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230224105906.16540-1-manivannan.sadhasivam@linaro.org> References: <20230224105906.16540-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758710049167352781?= X-GMAIL-MSGID: =?utf-8?q?1758710049167352781?= |
Series |
Add PCIe RC support to Qcom SDX55 SoC
|
|
Commit Message
Manivannan Sadhasivam
Feb. 24, 2023, 10:58 a.m. UTC
Most of the PCIe controllers require iommu support to function properly.
So let's add them to the binding.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 5 +++++
1 file changed, 5 insertions(+)
Comments
On Fri, Feb 24, 2023 at 04:28:55PM +0530, Manivannan Sadhasivam wrote: > Most of the PCIe controllers require iommu support to function properly. > So let's add them to the binding. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- > Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > index a3639920fcbb..f48d0792aa57 100644 > --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > @@ -64,6 +64,11 @@ properties: > > dma-coherent: true > > + iommus: > + maxItems: 1 > + > + iommu-map: true > + I think both properties together doesn't make sense unless the PCI host itself does DMA in addition to PCI bus devices doing DMA. Rob
On Mon, Feb 27, 2023 at 01:55:35PM -0600, Rob Herring wrote: > On Fri, Feb 24, 2023 at 04:28:55PM +0530, Manivannan Sadhasivam wrote: > > Most of the PCIe controllers require iommu support to function properly. > > So let's add them to the binding. > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > --- > > Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > > index a3639920fcbb..f48d0792aa57 100644 > > --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > > +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > > @@ -64,6 +64,11 @@ properties: > > > > dma-coherent: true > > > > + iommus: > > + maxItems: 1 > > + > > + iommu-map: true > > + > > I think both properties together doesn't make sense unless the PCI host > itself does DMA in addition to PCI bus devices doing DMA. > How? With "iommus", we specify the SMR mask along with the starting SID and with iommu-map, the individual SID<->BDF mapping is specified. This has nothing to do with host DMA capabilities. Thanks, Mani > Rob
+Robin On Tue, Feb 28, 2023 at 2:20 AM Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> wrote: > > On Mon, Feb 27, 2023 at 01:55:35PM -0600, Rob Herring wrote: > > On Fri, Feb 24, 2023 at 04:28:55PM +0530, Manivannan Sadhasivam wrote: > > > Most of the PCIe controllers require iommu support to function properly. > > > So let's add them to the binding. > > > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > > --- > > > Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > > > index a3639920fcbb..f48d0792aa57 100644 > > > --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > > > +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > > > @@ -64,6 +64,11 @@ properties: > > > > > > dma-coherent: true > > > > > > + iommus: > > > + maxItems: 1 > > > + > > > + iommu-map: true > > > + > > > > I think both properties together doesn't make sense unless the PCI host > > itself does DMA in addition to PCI bus devices doing DMA. > > > > How? With "iommus", we specify the SMR mask along with the starting SID and with > iommu-map, the individual SID<->BDF mapping is specified. This has nothing to > do with host DMA capabilities. I spoke with Robin offline and he agrees that having both is broken at least in RC mode. He pointed out the issue is similar to this one on Tegra[1]. Rob [1] https://lore.kernel.org/all/AS8P193MB2095640357779A7F9B6026F8D2A19@AS8P193MB2095.EURP193.PROD.OUTLOOK.COM/
On Wed, Mar 01, 2023 at 08:58:51AM -0600, Rob Herring wrote: > +Robin > > On Tue, Feb 28, 2023 at 2:20 AM Manivannan Sadhasivam > <manivannan.sadhasivam@linaro.org> wrote: > > > > On Mon, Feb 27, 2023 at 01:55:35PM -0600, Rob Herring wrote: > > > On Fri, Feb 24, 2023 at 04:28:55PM +0530, Manivannan Sadhasivam wrote: > > > > Most of the PCIe controllers require iommu support to function properly. > > > > So let's add them to the binding. > > > > > > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > > > > --- > > > > Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 5 +++++ > > > > 1 file changed, 5 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > > > > index a3639920fcbb..f48d0792aa57 100644 > > > > --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > > > > +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml > > > > @@ -64,6 +64,11 @@ properties: > > > > > > > > dma-coherent: true > > > > > > > > + iommus: > > > > + maxItems: 1 > > > > + > > > > + iommu-map: true > > > > + > > > > > > I think both properties together doesn't make sense unless the PCI host > > > itself does DMA in addition to PCI bus devices doing DMA. > > > > > > > How? With "iommus", we specify the SMR mask along with the starting SID and with > > iommu-map, the individual SID<->BDF mapping is specified. This has nothing to > > do with host DMA capabilities. > > I spoke with Robin offline and he agrees that having both is broken at > least in RC mode. He pointed out the issue is similar to this one on > Tegra[1]. > Looked into that thread and concluded that "iommus" property should go away. Submitted a patch [1] to remove that property from PCIe nodes of all Qualcomm SoCs. Thanks for pointing out! Will update this bindings patch in next revision. - Mani [1] https://lore.kernel.org/linux-arm-msm/20230308075648.134119-1-manivannan.sadhasivam@linaro.org/ > Rob > > [1] https://lore.kernel.org/all/AS8P193MB2095640357779A7F9B6026F8D2A19@AS8P193MB2095.EURP193.PROD.OUTLOOK.COM/
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml index a3639920fcbb..f48d0792aa57 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml @@ -64,6 +64,11 @@ properties: dma-coherent: true + iommus: + maxItems: 1 + + iommu-map: true + interconnects: maxItems: 2