From patchwork Wed May 31 09:21:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 13261908 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDD32C77B7C for ; Wed, 31 May 2023 10:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235874AbjEaKNs (ORCPT ); Wed, 31 May 2023 06:13:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbjEaKNj (ORCPT ); Wed, 31 May 2023 06:13:39 -0400 Received: from imap5.colo.codethink.co.uk (imap5.colo.codethink.co.uk [78.40.148.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CC78129 for ; Wed, 31 May 2023 03:13:31 -0700 (PDT) Received: from [167.98.27.226] (helo=rainbowdash) by imap5.colo.codethink.co.uk with esmtpsa (Exim 4.94.2 #2 (Debian)) id 1q4I1C-0086KL-Jl; Wed, 31 May 2023 10:21:23 +0100 Received: from ben by rainbowdash with local (Exim 4.96) (envelope-from ) id 1q4I1C-001DuC-25; Wed, 31 May 2023 10:21:22 +0100 From: Ben Dooks To: devicetree@vger.kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com Cc: Conor Dooley , Rob Herring , Sudip Mukherjee , Jude Onyenegecha , Greentime Hu , Jeegar Lakhani , Ben Dooks , Ben Dooks Subject: [PATCH 1/2] PCI: of: update max-link-speed for gen5 links Date: Wed, 31 May 2023 10:21:20 +0100 Message-Id: <20230531092121.291770-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Ben Dooks Update max-link-speed to be up to 6, for newer systems that could have up to gen6 pci describe in device-tree. Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks --- drivers/pci/of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 2c25f4fa0225..da0cc01e923e 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -639,7 +639,7 @@ int of_pci_get_max_link_speed(struct device_node *node) u32 max_link_speed; if (of_property_read_u32(node, "max-link-speed", &max_link_speed) || - max_link_speed == 0 || max_link_speed > 4) + max_link_speed == 0 || max_link_speed > 6) return -EINVAL; return max_link_speed; From patchwork Wed May 31 09:21:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 13261907 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70548C77B7C for ; Wed, 31 May 2023 10:13:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235851AbjEaKNa (ORCPT ); Wed, 31 May 2023 06:13:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234838AbjEaKN3 (ORCPT ); Wed, 31 May 2023 06:13:29 -0400 Received: from imap5.colo.codethink.co.uk (imap5.colo.codethink.co.uk [78.40.148.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0599124 for ; Wed, 31 May 2023 03:13:26 -0700 (PDT) Received: from [167.98.27.226] (helo=rainbowdash) by imap5.colo.codethink.co.uk with esmtpsa (Exim 4.94.2 #2 (Debian)) id 1q4I1D-0086Kd-WF; Wed, 31 May 2023 10:21:24 +0100 Received: from ben by rainbowdash with local (Exim 4.96) (envelope-from ) id 1q4I1E-001DuJ-0S; Wed, 31 May 2023 10:21:24 +0100 From: Ben Dooks To: devicetree@vger.kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com Cc: Conor Dooley , Rob Herring , Sudip Mukherjee , Jude Onyenegecha , Greentime Hu , Jeegar Lakhani , Ben Dooks , Krzysztof Kozlowski Subject: [PATCH 2/2] dt-bindings: updated max-link-speed for newer generations Date: Wed, 31 May 2023 10:21:21 +0100 Message-Id: <20230531092121.291770-2-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230531092121.291770-1-ben.dooks@codethink.co.uk> References: <20230531092121.291770-1-ben.dooks@codethink.co.uk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Add updated max-link-speed values for newer generation PCIe link speeds. Signed-off-by: Ben Dooks Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Acked-by: Conor Dooley --- Documentation/devicetree/bindings/pci/pci.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt index 6a8f2874a24d..56391e193fc4 100644 --- a/Documentation/devicetree/bindings/pci/pci.txt +++ b/Documentation/devicetree/bindings/pci/pci.txt @@ -22,8 +22,9 @@ driver implementation may support the following properties: If present this property specifies PCI gen for link capability. Host drivers could add this as a strategy to avoid unnecessary operation for unsupported link speed, for instance, trying to do training for - unsupported link speed, etc. Must be '4' for gen4, '3' for gen3, '2' - for gen2, and '1' for gen1. Any other values are invalid. + unsupported link speed, etc. Must be '6' for gen6, '5' for gen5, + '4' for gen4, '3' for gen3, '2' for gen2, and '1' for gen1. + Any other values are invalid. - reset-gpios: If present this property specifies PERST# GPIO. Host drivers can parse the GPIO and apply fundamental reset to endpoints.