From patchwork Mon Feb 12 16:50:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553667 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 962643D994; Mon, 12 Feb 2024 16:53:39 +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=1707756819; cv=none; b=s0QQyxJZBMdrKe/6oHrcAE44P1PtvQGvrjI9JXLRohjJ8luZcVQHWPLyAd4dz2OH6XEdIvgg62NRSk3/tH6qGqlUzoX1Gp3Dc8Ckr9Ocm0paxnb6A4GpE4KupFV1xC7/2pJ5nl+2xl9R2EFP3kydGuVkydOAH9B7M2G6T3wjs5I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=4qs5BSHr83bqWVSdSZwruslTHmTwWZz3mLyV0R3YqS4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ci9Zw5mN4h6B7Cj7CfxJbXqFgQhsnVspYY/dTyF3x4Ojf745PIVv73pa8/R7mPeun48QredL1Ea3xDxA5mQ6lKZ4IzS3taRUb7SM2DjDfvtC/JuJQoHtwf6I/60P1PnD/QqZYLtRv6Fa6szBAjIbYUBfXfarMOuggY94okhEnnY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FtHnJJuT; 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="FtHnJJuT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4E4AC43330; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=4qs5BSHr83bqWVSdSZwruslTHmTwWZz3mLyV0R3YqS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FtHnJJuTAEBUQdcH64Rcdc2knJufwOvhkGG4rT7AC3Ei9LhDfY7uf35++xo5GuKrR aPPdEhziCF/OeeVakVxvmCY2xgg3PKckELu+98kDGlpVbCV2WyzeDpvDBnZ5Gf65Wo AAhqQU/ABmeN2Lk95pRS2JvVks7kvEmIQW9I8XFOAOjeMOTJkGGIFWoF3Mijxcmiei eWMyjHpQiEJOvdf2hzw2gEhbvswEGGYBKRGNpvXaQmJJV7eFtq8WiL3EGHit1hGwt3 Wzsh2jDC01dd6u0TpvF/PowRDBD9t0y4J/Fku8nG8kCTmeYyyuRXu6MFdEPmeCEdkQ 44f29ol0P1W7Q== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ2-000000007Mz-1MLQ; Mon, 12 Feb 2024 17:53:52 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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 01/10] dt-bindings: PCI: qcom: Allow 'required-opps' Date: Mon, 12 Feb 2024 17:50:34 +0100 Message-ID: <20240212165043.26961-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@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. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml index a93ab3b54066..5eda4e72f681 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml @@ -123,6 +123,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 Mon Feb 12 16:50:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553666 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 962923D995; Mon, 12 Feb 2024 16:53:39 +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=1707756819; cv=none; b=ETnWtbnvXWydbMfBcePVQpIfXxjYE3RNj/lW7k2y5EwjfdvcLrVILiEawGMOTEhw/pvlEhYoiO5FFhR3sFK3snzqe84k8+MYNL84m5i/Bqk6m5v9i+4Cffw0aJeJeYcz2eVZgCb07e7Pcl0Eoa9Jn0c5vWoHQKNQpNFY80Aw68E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=b9sQBFDZU3VO1UBig2yVSwe4gu61tiUJKbyEVJ58Ty4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iat/uY6ci7hO9LXPxhWZ4JY/sVYjnUnogYtEUWWjZ+GtfK8tcpgq1PvHaKry/vea8WKusy3W0vAAFFAjKvwPcyzX8Cst2v/SpmbgIyfxR8ncZ1JHrcHiACBCkvCDhNXxtV/kB0y0TiGppW3HzqVhlOLrfkwLffA5nCYKNLEeCWY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kfDDJcXj; 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="kfDDJcXj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B72C2C43601; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=b9sQBFDZU3VO1UBig2yVSwe4gu61tiUJKbyEVJ58Ty4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kfDDJcXjc5rf9yM9juPLHJ15hJN5VnNveC0WNajBfuKrI7feA2TRUaNz5XDEwiaEi tXwZ87lDx9N4tHJWeEsy6HVRs9cJRkVz51BTFPS7IFeOt+rS0LZADGwHUSMgnkqHzx AIMc3MuvLGG2/fM6da9rri9R2G3y9yfoho2pxwlrwtJLJpeGs6KtaQs8P0r0KAnCVY 3vq/bT6r36QKxz10qDkHqcPQZEefqDbmY9nERSu0d6F+ZanBOQsBzpl8tbW4qWsVu3 lvlZH3dCBLwHVt5P0Bkz+p+v+1UAM1etCW9v7a/Du8hAQF7G6JAZDTLlO/Wc0WBnmE cUPH5vTax9gjA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ2-000000007N1-1kg7; Mon, 12 Feb 2024 17:53:52 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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 02/10] dt-bindings: PCI: qcom: Do not require 'msi-map-mask' Date: Mon, 12 Feb 2024 17:50:35 +0100 Message-ID: <20240212165043.26961-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@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. Signed-off-by: Johan Hovold Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml index 5eda4e72f681..b28517047db2 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml @@ -146,7 +146,6 @@ anyOf: - "#interrupt-cells" - required: - msi-map - - msi-map-mask allOf: - $ref: /schemas/pci/pci-bus.yaml# From patchwork Mon Feb 12 16:50:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553657 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 28A9D3D39F; Mon, 12 Feb 2024 16:53:38 +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=1707756819; cv=none; b=fwuHpYyKazjftVYW7clq+JHfnHLgYmX9PCkBS5mUBelOC3WXOEIspVnKWvjhaABxS3jfOInEsaJVhKNQe5neNFt6v8M4SFmt7gqRFO0qU8kJNXNZWSedoW/c1qlR3dA8Q1u0nqCq7p7S6HThah/UcFKDNoUanJVbgs9urPyJ0FM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=vk+Lt5I2JfW5rauqD9RI4ZcRRxFOCwrY7DdoHCOyR8M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xzp80FPJMtFQdEYdxQwtCYENiHSKJc584kJRqHMCtdd1dzEHHbC3pUex7Nx2StQgilZVitn2TWWnqi69puR8pwD3ABlEDzXf3Raw9kslT2GE0zZlu3uUeHlhoncsPmsgpurhwEMB9QmfCxYDQuV7vN4Vymjt5CIOxOSsT0JqIfI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kFI5Baa4; 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="kFI5Baa4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACA0DC433B1; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=vk+Lt5I2JfW5rauqD9RI4ZcRRxFOCwrY7DdoHCOyR8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kFI5Baa47zDEkpiFIS+is9qV7PpYX7LBgeSj8eFnmELiHBK4oOOFLZe6uIRYPyBcl 57uA+HZ3iEbEEJ1Ns03MItwhGmiU3ySRcTsjiUKSLwAYmaQpABdds7j4kyW8IQVgkj bSdOta3yIMNyykDASx8gYDSHf88hIQ2HcBPufi5lJ5iIh2e7iQF30W7GB+0zmYbzfp W7Vqbg0oqM2yxNvVXsgiysSEt3Us24ynKTYcnhKGhtDG8J0vc030TWkvNBVsMoZpOh 40fUWUb/1Tf2VNcO+OEZzLqVW1F7Z2JO3A+fB3zewCFIeIrvgJfHMZET3tk7kd0aLb SnTK1bjvPJ9Qw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ2-000000007N3-282y; Mon, 12 Feb 2024 17:53:52 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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 03/10] arm64: dts: qcom: sc8280xp: add missing PCIe minimum OPP Date: Mon, 12 Feb 2024 17:50:36 +0100 Message-ID: <20240212165043.26961-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@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 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 ae41b3051819..36382b1bd965 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 Mon Feb 12 16:50:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553660 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 28B103D3A8; Mon, 12 Feb 2024 16:53:38 +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=1707756819; cv=none; b=DSPDbv/osGyaFEtXwpl8mm5Do7eKkksxaEnBbx8MY7tcR4QTkIDfi/Ubu/PRkUr2/nBAsP/bwpgDHwp+tHKLBobsoQ6aU7KbOULwtt12s2MpuZxiPCATRLLODPvkoUIYfT/6A0k30UFDtYkJYNXEgTd45PVUocTjjiDYveRv4MM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=52V8VIBZ6Aa9byRanT+AhHOKtM3PttwSwaL5Jh235Ts=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IQVsSAFQo+ur65RE7ayKQAv5tS5/P4OeQAOTjtJ0Eszh2bknkLAN1sGkO6L8qxMv+Fus7S5OdoxwyXw/Lc5zvDKYsZkhSADpnBVe4shr4wYezMGYf3yZo20fMx6zbtRpIl0kryADaIvLWpHUfao3Sm86vByXRwfBj0sqdtkmyUs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DHZlh1Vz; 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="DHZlh1Vz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F34EC433F1; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=52V8VIBZ6Aa9byRanT+AhHOKtM3PttwSwaL5Jh235Ts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DHZlh1VzVUm+VRt1myKtgo3wHiiHaxhk32t7JnMbWdCainbIcl+pQsRJnMuI4rSiU OAZh0osLEpPBdP4csdJyFjT4niZARt5zCXz4l+q1tIftgTFGKWyJtNjTW7/Kxz0CIk I2/Cz5aB7KQcawEUxbePuzGOe2lvXMpasBQNGaQUh+IFDTPzIXIbtJcUIxIPRcNZqm RzLANQTh45BhFaw/H/jb8WclJionZ9njZI9BEt1535qFQA8qm6FeqSYOPmvLFDxTHZ uqNHthowf632JN0sLPmY1j7wcxEIa79XKBJ26fRK7As0ed5vlhQ4xtbFEVEfrCoxWb nrbivMPGoCqww== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ2-000000007N5-2R4q; Mon, 12 Feb 2024 17:53:52 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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 04/10] arm64: dts: qcom: sc8280xp-crd: limit pcie4 link speed Date: Mon, 12 Feb 2024 17:50:37 +0100 Message-ID: <20240212165043.26961-5-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Limit the WiFi PCIe link speed to Gen2 speed (500 GB/s), which is the speed that Windows uses. 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 f34c572253f5..8c1fccf8847a 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -563,6 +563,8 @@ &pcie3a_phy { }; &pcie4 { + max-link-speed = <2>; + perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; From patchwork Mon Feb 12 16:50:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553664 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 6DFF33D565; Mon, 12 Feb 2024 16:53:39 +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=1707756819; cv=none; b=T3bscHW8rqqFPhxNmbfhbad/8/0avyLV4Dumv2AZ16xD4O+oZkRbeND1N3hNZtxKTUfzPjchfHtIhQpIbBi8ZQs/WYkdrurD6Jhu5/EMFofJCp80QxbvwvFjAIzkfnoF2p3DMU2Ffaiy3T/TQiFyw98a43HnUHcmV3jC09pXsGk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=mFlQy5tvAhpclwFJjCDguvWh8qyMMwHvkbQ54iBIAmw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L2KuGIf8VnS+3eu1CLT1yd6fP4Z/4wB/y8HSbEhLvZKz0vkXKyjVOjeG8GX0BR8Sw+XpmmGqgGSw6TXkO8uLqRChIqUP7d1aJT5ms5GHKRxTMCYMGY9sda5A4iAfBbCUc2XpIC/61802pIq3Fc6/hNSwtRvzkNahgtObwchmKas= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QazmYjNS; 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="QazmYjNS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1915C43394; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=mFlQy5tvAhpclwFJjCDguvWh8qyMMwHvkbQ54iBIAmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QazmYjNSyuroI/MJ8mMKecXHVW5sxOkWkFowEUaf8GAOZB+a9A050hSJnzs2a11eI IJbeObTk2s8AqG8fQC3tBleFxU2HldiJzT/XbYZU+n4mmc/iNiO+lA6u6bRyNLLwxF pPQFzowW2rK+LM/PWFyNHWzeBkQbjU5jumldM+TxJXnSo1/vMqJDIsPsFOnquPneLE CFiuelrBWXjfaTdPXAaKo/HOenF46p0KRRBe7wPmd4jlYKhtvJ3OKfaMIdg9NZPwUC unUw2Gd+4A4yutjXN+LT13lpw+tk+i8zIbgbpAZwlly0EqTb3izU7gbV7NkRMUcR0y b9TR7sW40xLYQ== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ2-000000007N7-2kAz; Mon, 12 Feb 2024 17:53:52 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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 05/10] arm64: dts: qcom: sc8280xp-x13s: limit pcie4 link speed Date: Mon, 12 Feb 2024 17:50:38 +0100 Message-ID: <20240212165043.26961-6-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Limit the WiFi PCIe link speed to Gen2 speed (500 GB/s), which is the speed that the boot firmware has brought up the link at (and that Windows uses). This is specifically needed to avoid a large amount of link errors when restarting the link during boot (but which are currently not reported). This may potentially also help with intermittent failures to download the ath11k firmware during boot which can be seen when there is a longer delay between restarting the link and loading the WiFi driver (e.g. when using full disk encryption). Fixes: 123b30a75623 ("arm64: dts: qcom: sc8280xp-x13s: enable WiFi controller") Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Johan Hovold --- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++ 1 file changed, 2 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 511d53d9c5a1..ff4b896b1bbf 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -863,6 +863,8 @@ &pcie3a_phy { }; &pcie4 { + max-link-speed = <2>; + perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; From patchwork Mon Feb 12 16:50:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553662 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 6AED43D564; Mon, 12 Feb 2024 16:53:39 +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=1707756819; cv=none; b=lT+J3lXlhwXtyXCq6QzsbSAYNE1dRJzA7+0Q+cGS51eR+1hiVI9RmTmQF9npz/PCU507gQOnTOiS6mVldNMNe5Y4iOlyn/B6P40kWM1pPnmq2KA/pOs2n5LPdnuMMSBq1N7QQ07QxXr3uxlt10mnYA9XgVPrF+H8N0lY+MUCH8o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=do7qssSaOOsYhWX62CD8zYvmH36b7lYP/5NxcIsaPjs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UlInEwubJ7IFzxoUjN4G1nmL/8/AuaxTeLx9Wf80EQxt58OToiII3D6sIJf4+ApD36N3w0GyrIXskI1wtiBC3tv82xiWpojMj7M7N8vkiAKXozklrkxFoYnGZld0JLqCHSJgynbAZh/h/prUFZoTQR4u9aGOQbGCiVFtDzaKzYk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I3Qex5DE; 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="I3Qex5DE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF12FC433B2; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=do7qssSaOOsYhWX62CD8zYvmH36b7lYP/5NxcIsaPjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I3Qex5DEUTE0gyJzfX48bECZ6IBhE96hrd/5Q/RgbRDZYYPBP009ZSkMInwzN2DOm P6XanD8S/U6r/a8bOZ1iknkabkKPyLCRV7ZrfAtcwRWBlt/kxhnjStNqYrfovGHNch yVpvN/Ig+SjLgfCe37IhBTwMP8n+it1YSKvdltRT/1B8DOO9ldn5ZFkMpeal/B+tvz j550IwlH6yteAd5MAMPzD9EYFEEzK+soG6ModfzaGOD32MNADY7fsLxVjqvkX9yXiF 20UcLfoyOH63PzfYz5OSeRYw2NNlPnXCrYXYCj6e4iVFuivVhy33IpZJzxHYNwZ7J3 u4jgReaP0Xgtw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ2-000000007N9-34RA; Mon, 12 Feb 2024 17:53:52 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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 06/10] arm64: dts: qcom: sc8280xp: enable GICv3 ITS for PCIe Date: Mon, 12 Feb 2024 17:50:39 +0100 Message-ID: <20240212165043.26961-7-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@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 the Lenovo ThinkPad X13s when the AER driver is enabled. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio --- 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 36382b1bd965..ee6026f4f12c 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 = , , , @@ -4426,7 +4436,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; From patchwork Mon Feb 12 16:50:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553658 X-Patchwork-Delegate: kw@linux.com 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 28AC43D3A1; Mon, 12 Feb 2024 16:53:38 +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=1707756819; cv=none; b=P+CXdLnauS5sM1syTy4uBlQ60TQG0vk7Efie0VTYnf+TTELVNIfYx6q9/uxtp5RPZUjS9Z7z24oc3jfdJiI7zp+2iU/DEbW35/p2fWQmci3gg2rHgnLaeZFQ3DLV2KIHWyrjkeFo9UO1cUeg12k/rpWSJ8n6M1QSP5Qx5nGTP4k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=nc4MqV6YaWXP4nv2pZ90dCQqT4i4GYj2D270C7X4X5g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JAHlXxCIcRPm2CBOXOoLvs2rcJBhu+ByzTTC1BMvLSmtRamZFaIGpQ189yB3KF2ajHOrKwHQ3j3hgjkAKiNaZ2IyLXrn9a6+5bX8e7j9kZUpoqTdqa2KHS1wwKwSuhmHvOaGmAgry2n84nIeNnaGK1nusT8MQS5PSnPaCD7Wb2w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YkJ9Yqxe; 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="YkJ9Yqxe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5C7FC43399; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=nc4MqV6YaWXP4nv2pZ90dCQqT4i4GYj2D270C7X4X5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YkJ9Yqxe2rkvBsFYQXHVLOHTbYd1bYXt3mmVLH0Uis9itgcKVJJd7cDhi/KtBLHpM yWikgU5w6EiQaofDMr54Sh5raJbarLkP+olgFIvp+wlW16eOaAIQoZTbcT9HwH6b1D xhG0gJDLZMh/6dRjgMaZxMg8Sy2GAMPFyUfyYO2uZzp8AuhoE36LzLbPBuwa6XM2+s Q6uZTdQycmOaVNteQQGhxC7UElnZgVst+TVsyH4zg1ZICmQDzcOJA+35/0q08cjzv8 rQJqRlbvyRZTn9BnLXfESp38OPFYGrxCA87WqZ+Sa7arrIhP/h/M32J6h6duojKDiQ mUQ1RiocdSKNA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ2-000000007NB-3T1E; Mon, 12 Feb 2024 17:53:52 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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: [RFC 07/10] dt-bindings: PCI: qcom: Allow 'aspm-no-l0s' Date: Mon, 12 Feb 2024 17:50:40 +0100 Message-ID: <20240212165043.26961-8-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@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. Signed-off-by: Johan Hovold --- Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml index b28517047db2..4d1060b52592 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml @@ -130,6 +130,8 @@ properties: description: GPIO controlled connection to WAKE# signal maxItems: 1 + aspm-no-l0s: true + required: - compatible - reg From patchwork Mon Feb 12 16:50:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553659 X-Patchwork-Delegate: kw@linux.com 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 28AE93D3A5; Mon, 12 Feb 2024 16:53:38 +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=1707756819; cv=none; b=C8mddkwkVKSIEbSon21BfDqO9+WJR4S7DHmQd6NOunZoBzOtLxIX0VrTz4hLHTV+h9yyrcDS2kxe+61vF2hRRqKMBRuRAUwzUX4uvEE9Rd/vJRcdRiDcCapHci9iJkFcLX51saLDmPq4dvVnpTaf5zPTYE4LalMlo8SzRy8l7/Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=FW7pWyR6CDbZpSvqQAnPnh3O0BgUJoHXgLMGGLsnOac=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P7sYFh9FF82DjIwARA6I6b7ruy7MAuULifm2rwrXOl/Y6b/pEW1Dsru9U9wKY04iIJmGF0KVotqY6Fc1I495PyCOc4b+i7e+D+SBkZaVFWkaTuujPYZ1pkHVwlyt9wWmYt6qV9KohznLk4sIScXkryXEd+VNuO+sbeRZDMDa2cI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iJeVWBXD; 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="iJeVWBXD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3619C43390; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=FW7pWyR6CDbZpSvqQAnPnh3O0BgUJoHXgLMGGLsnOac=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iJeVWBXDa0zorvvqAbyrlHXWCaGRup8RZbadOxfQrtGqDt/6zQKGpjvLuZbVoZLjK MnZNItAjt20yVUEilA7r5PXQ3hS4M7BBFZc0egOrZ7d3mU+mXl+ENkQuvqMpTXva97 GDao5hw2Ns9PmMpJ2Nd7/LLTQApVIco45bkwmGctYJ6TECGYEAwf1yBz+CFYabZ5E7 reXZoLV+xf3V4ZGFJCmUPp2Mf1uV6YlNSqgmQUkkxRrNeBhYtKcbMjZLdHOWd9XDJF +GgCspH9nSSzWMJO3qP96ZWpp8fLhakLFmtwaIOemQ52rbrg7ycLHnQCGMoIPR+IzJ +aQBu6xTozjkQ== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ2-000000007ND-3qOe; Mon, 12 Feb 2024 17:53:52 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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: [RFC 08/10] PCI: qcom: Add support for disabling ASPM L0s in devicetree Date: Mon, 12 Feb 2024 17:50:41 +0100 Message-ID: <20240212165043.26961-9-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 A recent commit 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: a9a023c05697 ("PCI: qcom: Add support for disabling ASPM L0s in devicetree") 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 2455decc574a..071741b81644 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 Mon Feb 12 16:50:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553665 X-Patchwork-Delegate: kw@linux.com 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 9723D3D996; Mon, 12 Feb 2024 16:53:39 +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=1707756819; cv=none; b=XCdlHDIyKMnbFwFlelDuLCAimX83J3ZAQQGhQfpxZ6kRL+tXFVyEGHkvpBqnYuXQx2R36TTOAla5X1sWpczHRFpI33qeEpUoh5CTcMZ1Q8qg+Zb4OdoVj5GfljjQZScVThxJmAInzObXoAiksBWqVCJ1fqmVRrtONwForKhtrwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=nc3KMv6LaxhZJZMcRLz/F3lbKNxPeRWIM/UQNUFhBwo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A/Qpxm+PCN0D7/CnolXMmdGdNhj8wbSx6ThI4qbRMJlhLkJ8RK7GrNu1U/Rl+ROahTucW3cNkSm5ZsTqw7G9Yob6eDw4U7aaQNXYK+lHQzxgrzcRJ1G/nWhhLzSIBEO5doqyTtijQt5e8V/GTj6QXkIRjt8gWQUQL7+2ci97Zkc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p8rGL4pv; 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="p8rGL4pv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDBF1C32781; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=nc3KMv6LaxhZJZMcRLz/F3lbKNxPeRWIM/UQNUFhBwo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p8rGL4pvSvJ8SJXhzR6YZt4uxpFW2O6EKr/IfVHspDA6tIcbJiTJkUU3+xp0RmEVM YX/rEdOmlQbCoxEOpN3zcbnDtwF6NKzych7w9+JDth73pWQdZiEQV9n5wuyM8LTxHT HmKIhddBIRGWm16YTuw1GfFRvit6ch806/mWpcBk3lF5NjbhzwBc44So/YJy+pu09r hddkBd+sPF7dJR76fOMHh4PECQYNrGuYPqoj11F5EOAUqDDcJrcA+qIGO32P7zEBY+ G5MWve+W9ziqS6B391s1ScXfw1ivWxxichFfAi+uBdS2uQNLpfTd76uOxFzfiBZ2mW /dXCBhAp8neDg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ2-000000007NF-4AyO; Mon, 12 Feb 2024 17:53:53 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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: [RFC 09/10] arm64: dts: qcom: sc8280xp-crd: disable ASPM L0s for NVMe Date: Mon, 12 Feb 2024 17:50:42 +0100 Message-ID: <20240212165043.26961-10-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@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") 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 8c1fccf8847a..a428ba624ce1 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 Mon Feb 12 16:50:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13553663 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 6C7283D560; Mon, 12 Feb 2024 16:53:39 +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=1707756819; cv=none; b=p221Uh9qeoY3HWNI4R6o+q7BsOKcGpmXPu44v1rKGi0AGr4XuUluu3QmDWICpJ+277kC5FMZyuS/j+rd+e40EBPBqxIuEUcmBXQvMYlbSI5Nkl0Ds/M9CcJb+vemB8dvWISiWOpM5X0Ov9wshAmBAJzfwXc3qN5L3k6MG7QbQt4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756819; c=relaxed/simple; bh=BEJ/GlZcEcIeY41YB328X8vzZf6tkBr888FPIZPHjzg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nMU7u8L/wSd2joYBP1TvOqXH+fmh8KIUmxhKjpvptjqR8xu2h8rVTZCNjFojnZt2ZxPNFuO4VoGaeS1N54biuYL0mwM27zcMIFm0pAU65sdiSnKvf1Z/txvLOgmmsvcleku5UanzfdB3CbN+yA6V6isjUxUe6uqspmAEbkxZcDw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YitcKmDa; 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="YitcKmDa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB2C3C41630; Mon, 12 Feb 2024 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707756818; bh=BEJ/GlZcEcIeY41YB328X8vzZf6tkBr888FPIZPHjzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YitcKmDaWTdTmxZSSRNlNxyqvhf9hP/VT58cE8Km+Vp1YXZurJTs2p+iEhJGUa5CH R237iE22Xgo+4OIFWNBI4AifareOBc9my3nmTQr7k/AKzNZFvvSyZ7sM0ZngjN69RR 1XTbDmYx5BNoftwz1S/2Y3OEYIwCTqN5SSUnWx2hizGlpmDyVBAKrwokQpEztin70P 4H1HMqBkXgM38f8szZaDPLhD0PfL1lFBfw3bHphT220ix3Sx2LOeDJsVnLaTbebZ9g dkai6btbr9tz1cByfR07ib6i0sy9U40sh7pGbHhayES3qrxjJBc5zSTsgpUkfgaUSi tqQCJBnKWjCXg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZZZ3-000000007NH-0J18; Mon, 12 Feb 2024 17:53:53 +0100 From: Johan Hovold To: Bjorn Andersson , Bjorn Helgaas 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 10/10] arm64: dts: qcom: sc8280xp-x13s: disable ASPM L0s for Wi-Fi Date: Mon, 12 Feb 2024 17:50:43 +0100 Message-ID: <20240212165043.26961-11-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212165043.26961-1-johan+linaro@kernel.org> References: <20240212165043.26961-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@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") 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 ff4b896b1bbf..aed857feface 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -864,6 +864,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>;