From patchwork Fri Apr 28 22:34:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 13226876 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 83DB3C77B60 for ; Fri, 28 Apr 2023 22:36:03 +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=r/Nw5bjwDsH4hlTG3cWQ5vJx9zTTIkrpVPcmATdUBVQ=; b=eZzdcZq7JxVcSL 6YWIxbh5dElgzEZzR3YMPK+pDpO+x6p4Wk7h5ksYI1UI2eeD8KSVrvNYxP5Hu7FIj/OpklzDwm1LM U/EA+kNxVMukYVzOeRQMsnjXbqtyAgV4Am1dSZdAZ3jzYkrlXfPxoQ13KXkOScFZFfijGAsE+/56w xYZv6fmo7QKDbl003w6iWpLWvIHcwiwD27M7ON/FuhX70gTGGrr4c/ba22owxEDDtbENEb429r68Q Q8VaTN7K/thO1csi6zs0vXWrqwOqLVQef8mY4R2+W4hUt7XOqFh+4e6vD0XqorNF9oYP3CDSC8cSY YWj6QMotii1a70RVOZFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1psWgJ-00BsW9-2B; Fri, 28 Apr 2023 22:35:11 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1psWgG-00BsVS-2J; Fri, 28 Apr 2023 22:35:10 +0000 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-64115eef620so15830785b3a.1; Fri, 28 Apr 2023 15:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682721307; x=1685313307; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0vOstVtn4U8mVVNUS55u/MqJkN03FQpeD41b7DE/zvQ=; b=aQkEHaPbVzJTVRn5eLWNhdigjeLnXKk61110YoRAN3h3EK2ggBAeoddYsq6XUGiBfm hPSYUu3gSFNsiWTG7ZEwBn7uCxK7bE+WHELl5usL7qr85b3rAztOCoCRACKrPNgEAM2N b2hM6es99qBqw2gtEyU/rFb82TXY5ezHANUCJc9AdTWakdh/BXr92AqMvJSR3bbzYLdt sBBaf4JaPcb8qgVO0n0jjgpXrHRIlxAkvXWSNRDgBtGP43TokEFpzPfpeTlRbAllzCeD RzXn9xcjd9je7/cKKc2nzOI7Vl9lzsUlU27EI6NngJAMBtIpIEkvV+DrYZGk1ATWygjT f17w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682721307; x=1685313307; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0vOstVtn4U8mVVNUS55u/MqJkN03FQpeD41b7DE/zvQ=; b=AOwxlMWLLJB30kb5oZk/KcD3iyKopgpidBSg1LeZu3UJ2tVeFPtEmb4YU+z9ErxYt2 M0VzbLwr6rmHVmkW0fep4EDdnCE/u3Nj6KBBe1O/SzaBkkKS7AbY/2laJo52Q2Anlhld faaZY+HaH3OomYcrRCOwS9C6+MgpaE3yMPc7k9EvjVNt0Xe6JWEn7gAcYdjt3IbqenlD psxXMiz77Am/z9TWSIv7uKWgoizjoWu+ZKJGYCKBDCfwQ5BGD9/oUhkMAs7rwPaQ8HoZ qUtYbRbRqBZqX0/Xw0CdpHmTgfkjn7py8645aM/5Ch9MquloIuP9MaE8qD2HvXcBVr77 yZSA== X-Gm-Message-State: AC+VfDy1XxiGmHDr9p5/inqBEjD8jiKXbDq0vQunAHn2XSFJB4XARgiJ B6bW/KSrw4rFPhB6JtPnQFQ= X-Google-Smtp-Source: ACHHUZ6QG3ghkGKfTSWfvYQJQSzF/pfh+oV51JpO9QHWz6Ekec0JtrzTBlBQ1pF31lSqfXmD5cLtJw== X-Received: by 2002:a17:902:e551:b0:19c:3d78:6a54 with SMTP id n17-20020a170902e55100b0019c3d786a54mr8053221plf.14.1682721307102; Fri, 28 Apr 2023 15:35:07 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id j8-20020a170902690800b001a1b66af22fsm13657847plk.62.2023.04.28.15.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 15:35:06 -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 v4 0/5] PCI: brcmstb: Configure appropriate HW CLKREQ# mode Date: Fri, 28 Apr 2023 18:34:54 -0400 Message-Id: <20230428223500.23337-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-20230428_153508_759137_4E441756 X-CRM114-Status: GOOD ( 12.89 ) 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(). v4 -- New commit that asserts PERST# for 2711/RPi SOCs at PCIe RC driver probe() time. This is done in Raspian Linux and its absence may be the cause of a failing test case. -- New commit that removes stale comment. 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 (5): 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 PCI: brcmstb: Don't assume 2711 bootloader leaves PERST# asserted PCI: brcmstb: Remove stale comment .../bindings/pci/brcm,stb-pcie.yaml | 16 +++ drivers/pci/controller/pcie-brcmstb.c | 105 ++++++++++++++++-- 2 files changed, 110 insertions(+), 11 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 Tested-By: Cyril Brulebois