From patchwork Wed Apr 19 16:57:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 13217148 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 170EAC77B73 for ; Wed, 19 Apr 2023 16:58:39 +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: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:In-Reply-To:References: List-Owner; bh=u6Vu4bgzUOL1SqiiU8sX6O2hhA2JvgYDH17VWLZ0QXE=; b=vjty9CNWhjKYkX v/nSSe/Ta8dwL4NSe3YBecZTjG5NDyhKCTygIcqS41uV+3xSNzMtS/1jHR59L/BMQmYB8vR1OQES5 RhFbSh/H5/4S84yFp9Qoyn40qRshOn8yYNNRxLjKmj4/bg5LG/O3jtJTIb1Zrhymh0yQ4QzfKmq2O fLK4nGsmg1leuCGjUe7LRvwBzPeNzTYKw4KXFcErDJJSlqoDgQ7JtdG1vBrJ3qIrsO+Gl0Hh4MuDO L5aXBkfRmxLEFBWhqwDb2PpG2jqNAeU5wTp/0hwE6iXxeVWiyWTMt0R/tuCfwkV+KDYM/bYUoIEZ+ C/KHzoojTVesmfce535Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppB7q-005xee-0m; Wed, 19 Apr 2023 16:57:46 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppB7m-005xdU-26; Wed, 19 Apr 2023 16:57:44 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-63b5c830d5eso81399b3a.2; Wed, 19 Apr 2023 09:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681923459; x=1684515459; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aCtFefQeoNlfcoEaEZAtfKtoKxYMSHC3CSKmZgcOSYY=; b=CISPAvDnz44p1E4NVvkVGKQ2U1ZN8hvAZUGGR6ykOnHKv4talSoE+HHLPF4kC9nyAJ ImjW2cweJx+KnI0x3DlBZgsav/0bnGkyCYw7Zr/iFEzbcgMW08t6pji6Ew1Jr2wiaqxH o4ErSGdtZyYEGQZNlA8OneNaTdeJ2OKqbOVqBrYQD6aWuqhRGyMMoqfUqqDQgZcpGfoc zYjpnGoWx8KkK1A54T2POoN7GWWoe4fSY9hiJ2FjzC3D9tytrrYUNwtpCJGMkuocVVtF 7E44b7FBwgnCG7KuDzr0E4iQ6ay9jWGP3G2uDTyln3545sf0tCFrjoLlTApD3Q8srCjV 5FyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681923459; x=1684515459; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aCtFefQeoNlfcoEaEZAtfKtoKxYMSHC3CSKmZgcOSYY=; b=jSnIK3/IwmeTFGrXvNOItXPWAhujwijjkQLmPdMKNFUw9vR8d6c+eJaUf5JR/zxhdA o9YKefNNcfu9yvkcoOr0AR9PQiTb216bIs3e/G49RND1R/uMtiGCQhTSQ9tq55ejGu12 eDJkVW3qFFTxDEg0bw6v4VPL13sILkid8TPoGvUv2A0HWq8j8RM48mX2OcYHvZgHJC2b cajUTbC0bB0DPtDw2TLIKMA6vV68YbusW1tq9iL3B/ECNe+CsCmlxmj5kUV8aj7HmUXZ rgXpjDwkxQyCDBGLUc1aPzJbWgaiId5LqYZw+71H2XY/y1XMVEjm7TpqGV2OHU1JTT4L SA+A== X-Gm-Message-State: AAQBX9fslSHr3kdwbbpyOmLXmNPmmv20IRvAMyBqP+GMXIP06uMPZxfp ivwQvoSmPilYg8NcNWovb2I= X-Google-Smtp-Source: AKy350ZGiV1roeE6EXbCUPcXgtMlWq4nQ5ww9YqB7/shYYN8ncqJukgXHGd7WH1ATrkwPuE2I13LSg== X-Received: by 2002:a05:6a00:1814:b0:63b:7ab1:6c5c with SMTP id y20-20020a056a00181400b0063b7ab16c5cmr5199964pfa.18.1681923459286; Wed, 19 Apr 2023 09:57:39 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 09:57:38 -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: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Florian Fainelli , Krzysztof Kozlowski , Lorenzo Pieralisi , Rob Herring , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list), linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE) Subject: [PATCH v3 0/3] PCI: brcmstb: Configure appropriate HW CLKREQ# mode Date: Wed, 19 Apr 2023 12:57:17 -0400 Message-Id: <20230419165721.29533-1-jim2101024@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230419_095742_733116_DBD55275 X-CRM114-Status: GOOD ( 12.21 ) 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 Note: (a) With this series, all downstream devices should work w/o DT changes. Only if the user desires L1SS savings and has an L1SS-capable device is a DT change required (brcm,enable-l1ss). (b) No code changes between V2->V3 except to remove a dev_info() and change the string of another dev_info(). v3 -- Rewrote commit msgs and comments refering panics if L1SS is enabled/disabled; the code snippet that unadvertises L1SS eliminates the panic scenario. (Bjorn) -- Add reference for "400ns of CLKREQ# assertion" blurb (Bjorn) -- Put binding names in DT commit Subject (Bjorn) -- Add a verb to a commit's subject line (Bjorn) -- s/accomodat(\w+)/accommodat$1/g (Bjorn) -- Rewrote commit msgs and comments refering panics if L1SS is enabled/disabled; the code snippet that unadvertises L1SS eliminates the panic scenario. (Bjorn) v2 -- Changed binding property 'brcm,completion-timeout-msec' to 'brcm,completion-timeout-us'. (StefanW for standard suffix). -- Warn when clamping timeout value, and include clamped region in message. Also add min and max in YAML. (StefanW) -- Qualify description of "brcm,completion-timeout-us" so that it refers to PCIe transactions. (StefanW) -- Remvove mention of Linux specifics in binding description. (StefanW) -- s/clkreq#/CLKREQ#/g (Bjorn) -- Refactor completion-timeout-us code to compare max and min to value given by the property (as opposed to the computed value). v1 -- The current driver assumes the downstream devices can provide CLKREQ# for ASPM. These commits accomodate devices w/ or w/o clkreq# and also handle L1SS-capable devices. -- The Raspian Linux folks have already been using a PCIe RC property "brcm,enable-l1ss". These commits use the same property, in a backward-compatible manner, and the implementaion adds more detail and also automatically identifies devices w/o a clkreq# signal, i.e. most devices plugged into an RPi CM4 IO board. Jim Quinlan (3): dt-bindings: PCI: brcmstb: brcm,{enable-l1ss,completion-timeout-us} props PCI: brcmstb: Configure HW CLKREQ# mode appropriate for downstream device PCI: brcmstb: Set PCIe transaction completion timeout .../bindings/pci/brcm,stb-pcie.yaml | 16 +++ drivers/pci/controller/pcie-brcmstb.c | 99 +++++++++++++++++-- 2 files changed, 105 insertions(+), 10 deletions(-) base-commit: 76f598ba7d8e2bfb4855b5298caedd5af0c374a8 prerequisite-patch-id: f38de8681d8746126d60b3430eaf218d2dd169cd prerequisite-patch-id: 23e13189f200358976abf5bf3600973a20cf386c prerequisite-patch-id: edfbe6ea39ed6a4937e2cec3bb8ee0e60091546d prerequisite-patch-id: c87dd155e8506a2a277726c47d85bf3fa83727d5 prerequisite-patch-id: 579841e1dc179517506a7a7c42e0e651b3bc3649 prerequisite-patch-id: b5b079998ea451821edffd7c52cd3d89d06046a1 prerequisite-patch-id: b51b3918e554e279b2ace1f68ed6b4176f8ccc24 prerequisite-patch-id: 333e5188fb27d0ed010f5359e83e539172a67690 prerequisite-patch-id: bb107ee7b4811a9719508ea667cad2466933dec0