From patchwork Tue Mar 5 08:10:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581818 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7249A80BFE; Tue, 5 Mar 2024 08:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=bFO9sqPikphub27YoD1a/o990TBZpUeH8X+dnpDblC8IvL6AqELPJVTbdw/TtiVrH30kcK12TrunSvz71wKjMp6rTTrTQlafrxs0zSpxYmTc+c0uyF8kAxQG3FwBoBI8ANkI8tPa+aO7N+qTNxACA4fmhjGXYtf6kxCmSBVaO+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=DQk9lCKuHSluKcrPQ1v0+lTVtvnpI7fwkC/si6tMhYo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aa5FqH2HxnoWtRl4/qN7xVW8QT3SYVE5jjzvOJw/LlFmBjP2+RkVLKRde6YUCdcAzxbfaxWKLvE8oJcZnXifyX2rb0rSAKiCrTIXazbXDy33XMFDlWLtsHtVjc+HQr6nFFwaw/VsYApLjU+aIQ9jq+bSJumI1rlAnPnD1Qn3V00= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=S2EQX+Wm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="S2EQX+Wm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAF83C43601; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=DQk9lCKuHSluKcrPQ1v0+lTVtvnpI7fwkC/si6tMhYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S2EQX+WmdUT7kERI1AuoPc5sQiTWG9h1kybHRySR06cxllxxIBAxndYRgXj12B5Mk pJiZwNVbK3xuE5v20ER+5tn1WnCaJ+qEv4FXssHSdxZFw6a5KwkikDmPPpP2ILiJYT LpWmpCj6/h1Uf6wjgWouLEAJWcHutLP5oZW4jmYpjjEf05RhB3dwq3ooZG3BU4C7Fq 7sly7H8U5LbWudfCSAZiyeZnMznwQ16KjKBj7fG0O5Coek/MoWbqKWrLgkdbWrgff3 Af7DS7vk3JKZSL56iEKoQ4s6OJv9L/9fcOq7q90FM/AMWR4j5ghnll+zj5ChzxwHiE asz11h/BE7YJw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwp-0000000037p-3Gna; Tue, 05 Mar 2024 09:14:51 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , Krzysztof Kozlowski Subject: [PATCH v3 01/10] dt-bindings: PCI: qcom: Allow 'required-opps' Date: Tue, 5 Mar 2024 09:10:56 +0100 Message-ID: <20240305081105.11912-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Some Qualcomm SoCs require a minimum performance level for the power domain so add 'required-opps' to the binding. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml | 3 +++ Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml index 125136176f93..8d570669650a 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml @@ -59,6 +59,9 @@ properties: power-domains: maxItems: 1 + required-opps: + maxItems: 1 + resets: minItems: 1 maxItems: 12 diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml index c8f36978a94c..1d7a6a520fef 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml @@ -111,6 +111,9 @@ properties: description: GPIO controlled connection to PERST# signal maxItems: 1 + required-opps: + maxItems: 1 + wake-gpios: description: GPIO controlled connection to WAKE# signal maxItems: 1 From patchwork Tue Mar 5 08:10:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581817 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F51F80630; Tue, 5 Mar 2024 08:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=EGJUB9ZP/Y1xt/U1YSm/WTBSSLVtO8KD9kAjPwcD/WqHmQ3EE4pZbBuozaYIHyZ05FzFAnl4XMhA1IeFe7feABP0F37neQFIY0Gw0umPm75DyP64saGazIGIKZ+nvBkXPZSh/13P8Dy0kon9mG8X+8Nn3PkKwn9LE/iitZu81NM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=LG9qzAt51k9B0led/p2cn23iSKOm/jB6p41538MCRnk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AMDGSUWyCm6JJ1nRWn4UnFfglsSLLO4+jwtdbx+x6giOBGu7TFmd1z+GtVmKKfKUxKH2iYk2TBbJvPTnDLQ6goX1BiQzb4uLids3SR1JJznsk2Vxhipfqh6+0pwvzEj7pLFTxqjItjyAFsTN3LVN8YtFK1tl6DBLXviGDGHMo8c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ip7Bo1GS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ip7Bo1GS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0C76C433A6; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=LG9qzAt51k9B0led/p2cn23iSKOm/jB6p41538MCRnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ip7Bo1GSWMZvafG6V1OdRzhkxJTO2CP8BJKyz6JVNyzfGMNeKYfbrbuCIUVGAZFsr dgxPlS54HHE9ISyY0StS1xLNNke6mlB0MK8yPLMxtJ96rj5vO/8Ua9kzr5Sy1J5Fo1 nGlyMeCAMeeiAhbWjrsoaA8dH0qRIsA0I6FLyjLEIcw/KNfhk3cBmcx3HbvoY2pC3B /STfXbfUy0GmBIU4N2uAV+Hy3l8O9TvQHx5ikxfqST685KVV7mPhTqNtT2xtFdtnsB zf1yXvwWqnR7OP8UXrydYaaINA/2at7C18nqeA6KwlVul/JKLwE6xBmSiVYeHZ/ABx bIGLcamm2ghbw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwp-0000000037r-3e5U; Tue, 05 Mar 2024 09:14:51 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , Krzysztof Kozlowski Subject: [PATCH v3 02/10] dt-bindings: PCI: qcom: Do not require 'msi-map-mask' Date: Tue, 5 Mar 2024 09:10:57 +0100 Message-ID: <20240305081105.11912-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Whether the 'msi-map-mask' property is needed or not depends on how the MSI interrupts are mapped and it should therefore not be described as required. Note that the current schema fails to detect omissions of the mask property if the internal MSI controller properties are also present. Acked-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml | 1 - Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml index 8d570669650a..0d1b23523f62 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml @@ -93,7 +93,6 @@ anyOf: - "#interrupt-cells" - required: - msi-map - - msi-map-mask allOf: - $ref: /schemas/pci/pci-bus.yaml# diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml index 1d7a6a520fef..efaab5f82b47 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml @@ -134,7 +134,6 @@ anyOf: - "#interrupt-cells" - required: - msi-map - - msi-map-mask allOf: - $ref: /schemas/pci/pci-bus.yaml# From patchwork Tue Mar 5 08:10:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581808 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DF808061D; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=fVhe42DVXLxcaiMwTK0RHoNOOw+vCX9M5I3Ev5/VPiewUrBkiDyPFAHGNj4QLUH1gAAA7xnuQskAJ9IVwGKbMoENHMJoXFo47vyFWcENWcyd8GrKNi6XAh81wnuuAP917EMUjwCP8tbVJpt9Y5RPI4TLrLq7t3+PhoIa3QaXLYA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=CwZ0j6uvyi76UV840KbcFaKTKHb147IOIeSH2KfyiDc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cJj7LymdUZVA256NNgmZ8hsP4PEmhRKoiN9giEotGm486ZHcEbqgUqzckX4dKX/yX05geMpXooVvRZxYZDj0oB9bnVkefeQxqm333ZSINYCV5FzqGnVqiB53TCE+LaO7TXQNf72pIc0gnqEa4JuvDFH48YEgiQnaQvO3WJL5HRI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d8zFR9G9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d8zFR9G9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1ADEC433B2; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=CwZ0j6uvyi76UV840KbcFaKTKHb147IOIeSH2KfyiDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d8zFR9G9r9p0yXlch7TtAJ69ZM1SutM/kUiiJYtGlzULe89xv20W11jyoqlpP9aXh GbXw5/AkcD4FaZuxmckxTg5At+zPstzt6RZaM54oFG/SeTWNPfZvu4pwYDrb9p39s5 47VdyIx/8wW6dIbcs/u3UYSUZU+odhlzORd4OpvDOpuNSNggPpUSRf/LBiIr/asGBV ZQd/2+T8fvtLHf2850dXSll75oQNq4D8li9Fbx4EpFeVbIAHIvygZYMCAeidKYOGCY x4glPKmFmJEHh5sNH20WH1GhuJvCh678M+I0HLGIsZ96j473k3Axpc5eDVWPakL4+Q 1ZX9U+MvFIE2g== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwp-0000000037t-41Fy; Tue, 05 Mar 2024 09:14:51 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 03/10] dt-bindings: PCI: qcom: Allow 'aspm-no-l0s' Date: Tue, 5 Mar 2024 09:10:58 +0100 Message-ID: <20240305081105.11912-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add 'aspm-no-l0s', which can be used to indicate that ASPM L0s is not supported, to the binding. Acked-by: Rob Herring Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml | 2 ++ Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml index 0d1b23523f62..40ac5ba81233 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml @@ -78,6 +78,8 @@ properties: description: GPIO controlled connection to WAKE# signal maxItems: 1 + aspm-no-l0s: true + required: - reg - reg-names diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml index efaab5f82b47..a23d2cfb86c4 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml @@ -118,6 +118,8 @@ properties: description: GPIO controlled connection to WAKE# signal maxItems: 1 + aspm-no-l0s: true + required: - compatible - reg From patchwork Tue Mar 5 08:10:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581810 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DFBE8061E; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=tC5PiE+ED8Ym+y3pvrXqTZOhZHbHITH+QPwlymBLcA+YC1XnHc04+p9FJlgtUPc2gM7BK6MiyAdVmtlFufmkTUqWZX7Vm6S0Vn8LnVsGrfu3POORj0sWOpQ07Jw95lNkitQ4nNnHlcBqIIYI/vL3LJdtLslFWWLDHr7v9dgnR3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=SZw49HDPW+I9QK3XYA80NnOgMYXXl4SLIPsCVKDM8ec=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bYyL3CR508oego/lNPOMqcITnQCZxlv0tOH7r3kffeaUTiKnbyjm9FfR42yfqhLEbrIwSLwk2HpPYc0pQc60fQQy/iBBtzbVeF/uk32PW2tOHTdga0cHVTVPNGzxEO2mED09BVpa3s/Hvqyo//0cFEuSDtY/GpFHxD5iPjQF3sA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LqKr58BB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LqKr58BB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D97BC43394; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=SZw49HDPW+I9QK3XYA80NnOgMYXXl4SLIPsCVKDM8ec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LqKr58BB/iYxh02k23Ur3P9fLCPFNjcO6N9217KiQ8oegficJ6en3fvX1T1N9Kjmh MH8jDXtFSNmxhxsQtDBLhpj1wVTtLTQCPW88UT2nJnUn3x6jrQTa944a6Z/vFX1FDW OOkiVyQf7r0l9CA/WdyPJ9kK3JTnrpkcWT8/YTvAwCiWcaWmBjmAnw48E8PbKvE4Ye fyKjbIzV42v4Z8ApuOC9LthatKBT/S5dymfkvsKvWhAU3AsKyPiv5ipir4Y1qpCptS 9ZL1+3GDxW0wcJ+bOcJq+PV6a7OqN8yLukrxZOEldY4ygRWUkzhoy/BbQ9iMf4q+ry Tl5XaaQI119Cw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwq-0000000037v-0FO1; Tue, 05 Mar 2024 09:14:52 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH v3 04/10] PCI: qcom: Add support for disabling ASPM L0s in devicetree Date: Tue, 5 Mar 2024 09:10:59 +0100 Message-ID: <20240305081105.11912-5-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Commit 9f4f3dfad8cf ("PCI: qcom: Enable ASPM for platforms supporting 1.9.0 ops") started enabling ASPM unconditionally when the hardware claims to support it. This triggers Correctable Errors for some PCIe devices on machines like the Lenovo ThinkPad X13s, which could indicate an incomplete driver ASPM implementation or that the hardware does in fact not support L0s. Add support for disabling ASPM L0s in the devicetree when it is not supported on a particular machine and controller. Note that only the 1.9.0 ops enable ASPM currently. Fixes: 9f4f3dfad8cf ("PCI: qcom: Enable ASPM for platforms supporting 1.9.0 ops") Cc: stable@vger.kernel.org # 6.7 Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- drivers/pci/controller/dwc/pcie-qcom.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 09d485df34b9..0fb5dc06d2ef 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -273,6 +273,25 @@ static int qcom_pcie_start_link(struct dw_pcie *pci) return 0; } +static void qcom_pcie_clear_aspm_l0s(struct dw_pcie *pci) +{ + u16 offset; + u32 val; + + if (!of_property_read_bool(pci->dev->of_node, "aspm-no-l0s")) + return; + + offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP); + + dw_pcie_dbi_ro_wr_en(pci); + + val = readl(pci->dbi_base + offset + PCI_EXP_LNKCAP); + val &= ~PCI_EXP_LNKCAP_ASPM_L0S; + writel(val, pci->dbi_base + offset + PCI_EXP_LNKCAP); + + dw_pcie_dbi_ro_wr_dis(pci); +} + static void qcom_pcie_clear_hpc(struct dw_pcie *pci) { u16 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP); @@ -962,6 +981,7 @@ static int qcom_pcie_init_2_7_0(struct qcom_pcie *pcie) static int qcom_pcie_post_init_2_7_0(struct qcom_pcie *pcie) { + qcom_pcie_clear_aspm_l0s(pcie->pci); qcom_pcie_clear_hpc(pcie->pci); return 0; From patchwork Tue Mar 5 08:11:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581813 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F4C98062F; Tue, 5 Mar 2024 08:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=WDAm+gYgGhO3oKVlhTaKnxiWLsmU9exnZSHfvX0YzWMqJxJqD80TrDlLNdrvMl7htmBESLFOrLyh/mCQrdbjyMhANUOQW5zPdffjs1CltkyJsivgVV3IjoUCNZLKzDKTSlDuJ1Xspn5aRg74W3KfSBnue7nvgYqKEbmd2eeNnFw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=OJHWjk4Xm5Pt54cy7lIhhGCkWvJvBeW3Z7MBRZ4L81c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gye7EEl17zx1SmocmNAz0Jq382Yah8qDbPBBZwuzHPk8bD8fEIMhpVZm7/ql+4nI53ifcjGpMjIW/+R9yK4JRq3vpDCch1oGo+1dcmSNIbLudX3lXpqT3eUszciwbPEkR3p5HBV93PqxCKW+i9zae5ZNjfP6/NYfoldX1b/T+SU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dcoOjbjL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dcoOjbjL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8996C43330; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=OJHWjk4Xm5Pt54cy7lIhhGCkWvJvBeW3Z7MBRZ4L81c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dcoOjbjLKivx6csYxxcB0bZY3VDVvpXOc9+Im43l9NbUZvfjBPD5lymo+2o+sdRTZ jYM5QOdZ8HWEs9MDWk9R0VfYYMnVXFA9K/62D/aguz0SYUi4vALumoqXe3YC+2EqGV gwG0XQGLmTkwim3B4hERpo74J4I/l8XTV9AX6M8KY3vyTt3+IJivk3L9NyODu0KIYK 9ztuEowuGulqzmyEWv4ESf1k+O2zeKW+H/4wAgZm0VfPTFEllAsKCWKHPjNkM3dBV9 S+fkP86UY5mLtVdVyavKmSHLX+ejEwCdBDa05VCNBFVQvoSoRAEffLlQ2w4K1+31yZ DWPjXat1PyTCA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwq-0000000037x-0gOM; Tue, 05 Mar 2024 09:14:52 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH v3 05/10] arm64: dts: qcom: sc8280xp: add missing PCIe minimum OPP Date: Tue, 5 Mar 2024 09:11:00 +0100 Message-ID: <20240305081105.11912-6-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add the missing PCIe CX performance level votes to avoid relying on other drivers (e.g. USB or UFS) to maintain the nominal performance level required for Gen3 speeds. Fixes: 813e83157001 ("arm64: dts: qcom: sc8280xp/sa8540p: add PCIe2-4 nodes") Cc: stable@vger.kernel.org # 6.2 Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index c8e84c53935c..424d143ee26a 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -1780,6 +1780,7 @@ pcie4: pcie@1c00000 { reset-names = "pci"; power-domains = <&gcc PCIE_4_GDSC>; + required-opps = <&rpmhpd_opp_nom>; phys = <&pcie4_phy>; phy-names = "pciephy"; @@ -1878,6 +1879,7 @@ pcie3b: pcie@1c08000 { reset-names = "pci"; power-domains = <&gcc PCIE_3B_GDSC>; + required-opps = <&rpmhpd_opp_nom>; phys = <&pcie3b_phy>; phy-names = "pciephy"; @@ -1976,6 +1978,7 @@ pcie3a: pcie@1c10000 { reset-names = "pci"; power-domains = <&gcc PCIE_3A_GDSC>; + required-opps = <&rpmhpd_opp_nom>; phys = <&pcie3a_phy>; phy-names = "pciephy"; @@ -2077,6 +2080,7 @@ pcie2b: pcie@1c18000 { reset-names = "pci"; power-domains = <&gcc PCIE_2B_GDSC>; + required-opps = <&rpmhpd_opp_nom>; phys = <&pcie2b_phy>; phy-names = "pciephy"; @@ -2175,6 +2179,7 @@ pcie2a: pcie@1c20000 { reset-names = "pci"; power-domains = <&gcc PCIE_2A_GDSC>; + required-opps = <&rpmhpd_opp_nom>; phys = <&pcie2a_phy>; phy-names = "pciephy"; From patchwork Tue Mar 5 08:11:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581811 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E04480621; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=jCzPYTkKThh51pxa6/1VM6cJlnIzhHJxxXMYNUy8VvzDlPEkUYzdwVPKC5LBxzWpWYU+WkLC6P3fzMBuih+nyvs1wn69CDUAQchfDzG8EsrSixHhMw53APD0ZhwrwzveYOA+QY+HOUkp4deebv4N/ynB1qol98pHp+AO7EuoQBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=SeN5s38iyxyuP3h2YLzK9sPl4gFza+BIG/u7YnOtYgA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=caDbMCPdZaTaVwD3y/nnfvuSX8oTKNAt63Auc+aix2Zh5JSF/px5pAUaoRZH4WLmvqoQm6+i3dihelwjE1km1qgrQ0FuyEsno/sFrYi5ENZBcCJ3X1cdAtIMJ4RrAedALbNnm8i0wxk7JJ0D5092d529HF5MzeZWD2M/+E6aWAc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X/IjcnCa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X/IjcnCa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D138C43390; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=SeN5s38iyxyuP3h2YLzK9sPl4gFza+BIG/u7YnOtYgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X/IjcnCatz2PFJcczjWwH7v5EC3Z2QudrSXRO03CUSwFflCEaoWqBDhJJVf5la8iN SPLdb0NIe2FoYSEBVd8+4jsJdf696L+J8jF/cAgZI6DVWnvbFBGtROL6HaxU0abZOj jzqAk65U7QrPrXSYV36rmRrUy4JW3oPkkT9M0YF6xEfBHu+saLLq+OOgIAXQHu1wAl kMOtbr0KPu1QAF6m823lWxcGcE6Ofk40RkqfSfpWKxG2UZaNsCWs19nAX7FDUte+WS PLz1LjscB6KGmlN/AdmU3xdL1i86lg306CCqhOnl+mDK9pt1uHXWJWsU5hSDFKqzXL 98hJCNXEVl4eg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwq-0000000037z-159h; Tue, 05 Mar 2024 09:14:52 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH v3 06/10] arm64: dts: qcom: sc8280xp-crd: disable ASPM L0s for NVMe Date: Tue, 5 Mar 2024 09:11:01 +0100 Message-ID: <20240305081105.11912-7-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Enabling ASPM L0s on the CRD results in a large amount of Correctable Errors (Timeout) when accessing the NVMe controller so disable it for now. Fixes: 9f4f3dfad8cf ("PCI: qcom: Enable ASPM for platforms supporting 1.9.0 ops") Cc: stable@vger.kernel.org # 6.7 Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 41215567b3ae..7e94a68d5d9f 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -525,6 +525,8 @@ keyboard@68 { }; &pcie2a { + aspm-no-l0s; + perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; From patchwork Tue Mar 5 08:11:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581812 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DF418061C; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=o92VDLvOv5HlvZvKx4ajygt0NZzNrFYIrxDrSWi2jP7vDu1pTj0EfgaxLCwXC48DfhBB9KYJBEmfOC4B16ItdLSckr7EmXA0PpoD0g9QCEmzqYd1WG3LAqR7o5Yb8u/jFb9cpNKgcC8oaIC+v3QCdIX0gtoDkOPbxOQT4CuQs2E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=bOVj1Ue9wqeTtzMb+s7vTNCeX2o2j+nx0MuyiNDYpUQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TUISrI2rR/LtM/rZ4V+aOpUWyg9FPD/rgf3eUUv0JJwNyhF+HQmeC5m+QHhewn5zbCcNDwD3nIh5BG/xrFc3yULMdUVBRwgz3PgHE/+c7+ytllZQAwIKffGQ5UDhQ1muRGNqa+wJrGc4uEXvNIMLktvxlHFzs/Ay7pvjwMAB2fI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kQFSb6y3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kQFSb6y3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5B7DC433B1; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=bOVj1Ue9wqeTtzMb+s7vTNCeX2o2j+nx0MuyiNDYpUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kQFSb6y3+Fud40abRadoZrB3xNQf4Ju9tXvkf3ziAPnXcSM2gyHRcJ9/n9QnuYJAq WKRlIAtRlNVTBxYBltyP5XJVR4HO7icMEeJ/GaKT0KiKpIKp4Vcys9PDXciXc8HkGh j8TR1r/NVDufD2QTRRGTXDNklwHUZRPoToZ3hkRiH6pVrioovfTO2pgLQSTnkNhNA/ UcP6P5y47eaonS+BiDwmKlZljSVMl9t2Exi3Op/QTlIM/vk6gVHq2g4nl23dz4yj70 fZci/Frys8PL6lVe4q9QxXvcNwQAAnjt3cWVOI/Oz3WYRD3G71HXXxfC5bPT8rxcaR ofjtcm7m7KUyA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwq-00000000381-1QPR; Tue, 05 Mar 2024 09:14:52 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH v3 07/10] arm64: dts: qcom: sc8280xp-crd: disable ASPM L0s for modem and Wi-Fi Date: Tue, 5 Mar 2024 09:11:02 +0100 Message-ID: <20240305081105.11912-8-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There are indications that ASPM L0s is not working very well on this machine so disable it also for the modem and Wi-Fi controllers for now. This specifically avoids having the modem and Wi-Fi controllers bounce in an out of L0s when not used (the modem still bounces in and out of L1) as well as intermittent Correctable errors on the Wi-Fi link when not used. Fixes: 9f4f3dfad8cf ("PCI: qcom: Enable ASPM for platforms supporting 1.9.0 ops") Cc: stable@vger.kernel.org # 6.7 Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 7e94a68d5d9f..8fc0380f65a0 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -546,6 +546,8 @@ &pcie2a_phy { }; &pcie3a { + aspm-no-l0s; + perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; @@ -566,6 +568,7 @@ &pcie3a_phy { &pcie4 { max-link-speed = <2>; + aspm-no-l0s; perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; From patchwork Tue Mar 5 08:11:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581815 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 726DC80BFF; Tue, 5 Mar 2024 08:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=Z4QBPp8nMsB/tEEjUgOyGZsnTfpHYYoS5ixqzUYefOPUZT7c3CNUOYvtGY0WjJEDkMq81Gz6KBU02KgqU4tFId+HuUe6iUPXaTqBR6CgNDbseh4fLLiAQ7AN67APHOl3EaZ1pRQI0LtMFqh4J7jMVvLd2wsg6ad4+NUZAJTKkAw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=d/l7BsFbkWwQfmOrlB4DTD4deaGWaxJirdYb7/cpxMQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fTkjl5bcMK/KKw5lAhYLlH5QsudBxlD+31zDZnS8vXznGXTLRhg8BRvsrSf0EAzIJaP/uztCLwUoZzqtPyyRhyWxgo0DJ8/2FQ04n8/+BGutmV0nfgEKPtdxnsfVzaCBmPZyVcIaRe0/nSjo13HEqNSaJbh1GkCIOdmK7gj1IVo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Yi1I/LRv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Yi1I/LRv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3B84C433F1; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=d/l7BsFbkWwQfmOrlB4DTD4deaGWaxJirdYb7/cpxMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yi1I/LRvp5bFmf7e1UTMhwmzJMXxd3IM1SlSBwW+3aLqfnsuiaFE6CT/9gLZ4Pvtp 8bKflpKjd6CTD561KegURdSArnxIzRn/e5M21+IiDe8UzlZRVwgotoE/hj07ezAGTM dopTgMYk/f3niQhLK1VTIGXsXUXuDAT+ziBmVVFUhPvMipOIREaYpmfKL9iM7HRoc7 zSZ9qnj/J5fECL26uxi15P+QPxLcczQ/BifVeyq7/schkL5hh6W4yy9OSGDjrwd2Lb Br632HhvSvvQ0/CmDacDAXkJY1OIm30MRQ2dWirF8zGX7OmHDhIaAVSfuDqq58ILL8 falYxqgJnD28Q== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwq-00000000383-1kPa; Tue, 05 Mar 2024 09:14:52 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH v3 08/10] arm64: dts: qcom: sc8280xp-x13s: disable ASPM L0s for Wi-Fi Date: Tue, 5 Mar 2024 09:11:03 +0100 Message-ID: <20240305081105.11912-9-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Enabling ASPM L0s on the Lenovo Thinkpad X13s results in Correctable Errors (BadTLP, Timeout) when accessing the Wi-Fi controller so disable it for now. Fixes: 9f4f3dfad8cf ("PCI: qcom: Enable ASPM for platforms supporting 1.9.0 ops") Cc: stable@vger.kernel.org # 6.7 Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index eb8a16aa233e..9567b82db9a5 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -734,6 +734,7 @@ &pcie3a_phy { &pcie4 { max-link-speed = <2>; + aspm-no-l0s; perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; From patchwork Tue Mar 5 08:11:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581814 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7296580C02; Tue, 5 Mar 2024 08:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=IYqK1aICkTQK3Y+Phapf2NxEmj5smtQSILFLTmEt50KPKCEvNo4fJ4j5RZ4+xrtMHqXoyVcYn8G94zzJUE3vjRjmerwVrDBzf2Bq3a5KQN6YfEZxyaS5p+4EKVCOuuactILftp4M+98jT50ZtHrrJ3ztCCcvMxZgRd4d6hJnFJc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=YyzJd5EjL4gnLemAYI0eCwc4e5Q6VYtrbvPZbBch1h4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KttUUCcj8DUWoKmkMQ1eKCO3wL7R6QSLFC3K+ZNpudiDC0wv/dp5i9C06VJemDGPGyL6s7ySl6XHAeAd+r9s15COOrJ3wE+KwMI+9Y+0y8i1mhlg9FDGaHHnOlXpu5y/fbsmVjed2wp6HSAt+GUEFE4kDJmiZ2cYVhSfntymC3k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YMwah7VV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YMwah7VV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B890DC43141; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=YyzJd5EjL4gnLemAYI0eCwc4e5Q6VYtrbvPZbBch1h4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YMwah7VV7xvdtDONagk+i+LRvS5xXjX+HSCVwJElg938vGn5PTNe0nqWlOYx3KZip 76lj9PorAWeImUQficLJ2396rQaCNtd9gkzsQwpyxwxMRPcktxADS/mmQhG05dp278 rKICEpi888tvCfsVpYZRYRAleTt7flDkI6oFqviGDqeaNVYhsbf4ost9KMnbw5GBEc njiV1dwzcCT8/MzBLc3EvF5KZolrIiNINMsx65XfknQgAxzZc28MjTbszIm6foTvx8 YJjfyyBhP6OUBI7mOnlhgKtlu/FpOokQeIX1mwL2jKpIVZk1wZqxDmTBpOqgZg389w F6m2V21PNIAMg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwq-00000000385-2A4L; Tue, 05 Mar 2024 09:14:52 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH v3 09/10] arm64: dts: qcom: sc8280xp-x13s: disable ASPM L0s for NVMe and modem Date: Tue, 5 Mar 2024 09:11:04 +0100 Message-ID: <20240305081105.11912-10-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There are indications that ASPM L0s is not working very well on this machine so disable it also for the NVMe and modem controllers for now. Note that this is done as a precaution based on problems with the Wi-Fi on the X13s as well as the NVMe, modem and Wi-Fi on the sc8280xp-crd reference design (the NVMe controller on my X13s does not support L0s and the machine lacks a modem). Fixes: 9f4f3dfad8cf ("PCI: qcom: Enable ASPM for platforms supporting 1.9.0 ops") Cc: stable@vger.kernel.org # 6.7 Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 9567b82db9a5..057e4d9d3c0f 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -695,6 +695,8 @@ keyboard@68 { }; &pcie2a { + aspm-no-l0s; + perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; @@ -714,6 +716,8 @@ &pcie2a_phy { }; &pcie3a { + aspm-no-l0s; + perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; From patchwork Tue Mar 5 08:11:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13581816 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41C0380632; Tue, 5 Mar 2024 08:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; cv=none; b=iLVRmP7hdRz8RRMHpmS3gTGCK6zM7aOJsnWAql/ShdB7UXcIIdfobWRxYde1NB4zGNTizWuG8zoQb/EpRMRP0Nt9WdE5GfJodJpD1GS2d6fEC7LSec7V4amTPimekEov5ZnbM5bx1jG5pzb2RMRY0sMnC53oSS1CM4G685vy+1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626486; c=relaxed/simple; bh=RdyY/PZRclHf+VgiPUlJt+u4TDL/TN39E8sr3KrgD8Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BSgEVd1ykyf4ko2ub8roJs6I6JlvlGg/roA3U3JyoKAjZ7geClE6uYiygLu6pSJ7MKKpjA8QJ9ODITG1WQOWPWrC1o8iToDXrY9bGEdGzAjXH0oqFtQ5oVo/85CsHlCMmFRlHeqtQ49KCP9OXBQG7m4jp9Ywj7caovyUwVLw8kY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AyQZLLjj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AyQZLLjj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B685FC43609; Tue, 5 Mar 2024 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709626485; bh=RdyY/PZRclHf+VgiPUlJt+u4TDL/TN39E8sr3KrgD8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AyQZLLjjGDWkuWqqPTGU7l495gMLekYH1xscFLOVr0WKxjzYsoqFiPcGP9aKz+XV5 4McKIU22Ydf46mfz5Utqkvia1zXNdm6F1kgVTLbo7iSMWdCQa3fv81GTjH7Ui9flTw JahQBBuCv2tlTia9qimt8P5U2f02JOIN2AEbT6VWeo1cvG9pZLHgO5j0DYfWJ8uqXU +01Y4eoSgh0glwMxKov4jJwEiNsadCn0WqNTw3QiouE1onxmGv7USyRBrjqFg+rvdy v/DRpY7kM0LR2VoNflmS8aDnLzM1F0h2yD1Ph6ggmudmEwJdnufZIfKdAgNayVf7Be jNqm9BlqerczA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rhPwq-00000000387-2Rx6; Tue, 05 Mar 2024 09:14:52 +0100 From: Johan Hovold To: Bjorn Helgaas , Bjorn Andersson Cc: Konrad Dybcio , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 10/10] arm64: dts: qcom: sc8280xp: enable GICv3 ITS for PCIe Date: Tue, 5 Mar 2024 09:11:05 +0100 Message-ID: <20240305081105.11912-11-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305081105.11912-1-johan+linaro@kernel.org> References: <20240305081105.11912-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The DWC PCIe controller can be used with its internal MSI controller or with an external one such as the GICv3 Interrupt Translation Service (ITS). Add the msi-map properties needed to use the GIC ITS. This will also make Linux switch to the ITS implementation, which allows for assigning affinity to individual MSIs. Note that using the GIC ITS on SC8280XP will cause Advanced Error Reporting (AER) interrupts to be received on errors unlike when using the internal MSI controller. This will specifically lead to notifications about Correctable Errors being logged for the Wi-Fi controller on the Lenovo ThinkPad X13s when ASPM L0s is enabled. Suggested-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index 424d143ee26a..4708ba28c4d5 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -1737,6 +1737,8 @@ pcie4: pcie@1c00000 { linux,pci-domain = <6>; num-lanes = <1>; + msi-map = <0x0 &its 0xe0000 0x10000>; + interrupts = , , , @@ -1838,6 +1840,8 @@ pcie3b: pcie@1c08000 { linux,pci-domain = <5>; num-lanes = <2>; + msi-map = <0x0 &its 0xd0000 0x10000>; + interrupts = , , , @@ -1937,6 +1941,8 @@ pcie3a: pcie@1c10000 { linux,pci-domain = <4>; num-lanes = <4>; + msi-map = <0x0 &its 0xc0000 0x10000>; + interrupts = , , , @@ -2039,6 +2045,8 @@ pcie2b: pcie@1c18000 { linux,pci-domain = <3>; num-lanes = <2>; + msi-map = <0x0 &its 0xb0000 0x10000>; + interrupts = , , , @@ -2138,6 +2146,8 @@ pcie2a: pcie@1c20000 { linux,pci-domain = <2>; num-lanes = <4>; + msi-map = <0x0 &its 0xa0000 0x10000>; + interrupts = , , , @@ -4342,7 +4352,7 @@ intc: interrupt-controller@17a00000 { #size-cells = <2>; ranges; - msi-controller@17a40000 { + its: msi-controller@17a40000 { compatible = "arm,gic-v3-its"; reg = <0 0x17a40000 0 0x20000>; msi-controller;