From patchwork Wed Apr 19 16:57:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 13217150 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7AA87C6FD18 for ; Wed, 19 Apr 2023 16:58:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xULhN5/Wha/nhrYWP0liY5yqMO6m6UlYaesBocwK/C8=; b=Y17pPwqqDghCxC NqHZEajkLlOGnfN2G0cO32BIeq9q4TqYCgllhnCvKKyt/W39X+Vdlabes77aHITQw2XtnkI09xe98 CvEhS4NIn7RMTgIgoiFoxfoQ866cBfwEw6WZqqkB/qe1mRHB44/CLRDmK5v1CF2SVPS5lswmZKhN8 a8E5eH+C7lAPj5QpzJ1rGC/9PR0VeNt85mT3MuKGaOHhhinsQ44GHbH8b4QOTHChQq1mT8J6Jx6KF hx9hKrt/mdGR9TkBMIo5mlh8eTWlA84E/o2XJOPYUqn1ocN6Si8KbZALn1uYuxrn5hR3MxSYjfO7n qayapG0nhiJtL6b6SSCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppB7x-005xgk-16; Wed, 19 Apr 2023 16:57:53 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppB7p-005xdu-1q; Wed, 19 Apr 2023 16:57:46 +0000 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-63b5c830d5eso81449b3a.2; Wed, 19 Apr 2023 09:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681923462; x=1684515462; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=0Mw/lDYFPiHA1u/ehv8REC3ysizEB/FCc0wvc8nJSI8=; b=auM5BcDmbwNVZAKCgqfU9qTBa0DnxHy8uM6XisJiCcrCHfHXxVPZ0K51eR0VI1osir uQFKoReanval4NDO6Qf/nKO8IuorbZwjh7zAtOjGElD64zXg62MMqooCSHChva19OyYO cdCpU04ia9883BWR9dDzX8docR8aAXXKMaEOD0gxT8oLp9Kf3K1kQyHjOuLMVlXzbC0W GCYmoTsthaHH+wjZybNXvzK6NoNcw/FvN8bvImrio3UfSztLIorL/LT58M7GjbaZ0tBW 0L7cUHKvY3l+XHYXzMIBVUk7GW/brtUEd4YWZ0mk8CEcsJ0vYKeA317isIQf4cJpV9yE JdTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681923462; x=1684515462; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0Mw/lDYFPiHA1u/ehv8REC3ysizEB/FCc0wvc8nJSI8=; b=WHHytINA/jbqTnJDii44/ZAXYT5Woq3UrErghUklYjVfJOJ4KcR+wEqV++9L812luH o9XwndXYJekDKiG+3gkdsauwea2mqb7OQg9gYCfxslU2r6Q4MePnCz6Rfo0/Xb5AAZ2G /4alkwlTG8iDOiPdbEaQGInnU2SvtDSNnsjmd8ecXZXftmeFz3lmRUrgk5o4aCJGBco0 J+4IJWAkb6DpeLPJbE1tsRATDURUEVLFz9ewiZMB4SOjkEPENkpCPYXmhzGf+Cie1QVY 5A/XpLsHkTlJgkmyuRD7UqP/nWHUaxnS6G7rBaTdZK5UArmqbXQbM/HXrOOO5JxkSGir /G8g== X-Gm-Message-State: AAQBX9c2tNMB928q84JpIAPOYR0w+AlvE+k9ljGK8UUhD/4QBLBCof2D rcMCyHNeoGOYWk5JZA82+fY= X-Google-Smtp-Source: AKy350ZYBKCGDhd1cY26gDxbN66Pg1rTaanb9zPQNkQznfkbuskiyk8zKOAlndFEZ6/Ge7NH8GL3cQ== X-Received: by 2002:a05:6a00:21d3:b0:627:f85c:b7ee with SMTP id t19-20020a056a0021d300b00627f85cb7eemr4641542pfj.2.1681923462439; Wed, 19 Apr 2023 09:57:42 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id s9-20020aa78d49000000b005abc30d9445sm11188135pfe.180.2023.04.19.09.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 09:57:42 -0700 (PDT) From: Jim Quinlan To: linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, jim2101024@gmail.com, james.quinlan@broadcom.com Cc: Florian Fainelli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 1/3] dt-bindings: PCI: brcmstb: brcm,{enable-l1ss,completion-timeout-us} props Date: Wed, 19 Apr 2023 12:57:18 -0400 Message-Id: <20230419165721.29533-2-jim2101024@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230419165721.29533-1-jim2101024@gmail.com> References: <20230419165721.29533-1-jim2101024@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230419_095745_609152_4E449AA5 X-CRM114-Status: GOOD ( 16.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This commit introduces two new properties: brcm,enable-l1ss (bool): The Broadcom STB/CM PCIe HW -- a core that is also used by RPi SOCs -- requires the driver probe() to deliberately place the HW one of three CLKREQ# modes: (a) CLKREQ# driven by the RC unconditionally (b) CLKREQ# driven by the EP for ASPM L0s, L1 (c) Bidirectional CLKREQ#, as used for L1 Substates (L1SS). The HW+driver can tell the difference between downstream devices that need (a) and (b), but does not know when to configure (c). All devices should work fine when the driver chooses (a) or (b), but (c) may be desired to realize the extra power savings that L1SS offers. So we introduce the boolean "brcm,enable-l1ss" property to inform the driver that (c) is desired. Setting this property only makes sense when the downstream device is L1SS-capable and the OS is configured to activate this mode (e.g. policy==superpowersave). This property is already present in the Raspian version of Linux, but the upstream driver implementaion that follows adds more details and discerns between (a) and (b). brcm,completion-timeout-us (u32): Our HW will cause a CPU abort on any PCI transaction completion abort error. It makes sense then to increase the timeout value for this type of error in hopes that the response is merely delayed. Further, L1SS-capable devices may have a long L1SS exit time and may require a custom timeout value: we've been asked by our customers to make this configurable for just this reason. Signed-off-by: Jim Quinlan Reviewed-by: Rob Herring --- .../devicetree/bindings/pci/brcm,stb-pcie.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml index 7e15aae7d69e..239cc95545bd 100644 --- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml @@ -64,6 +64,22 @@ properties: aspm-no-l0s: true + brcm,enable-l1ss: + description: Indicates that PCIe L1SS power savings + are desired, the downstream device is L1SS-capable, and the + OS has been configured to enable this mode. For boards + using a mini-card connector, this mode may not meet the + TCRLon maximum time of 400ns, as specified in 3.2.5.2.5 + of the PCI Express Mini CEM 2.0 specification. + type: boolean + + brcm,completion-timeout-us: + description: Number of microseconds before PCI transaction + completion timeout abort is signalled. + minimum: 16 + default: 1000000 + maximum: 19884107 + brcm,scb-sizes: description: u64 giving the 64bit PCIe memory viewport size of a memory controller. There may be up to