From mboxrd@z Thu Jan 1 00:00:00 1970 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 14777C76196 for ; Thu, 6 Apr 2023 19:10:56 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=5Sy5aPnKq8VPJBVlQFMGAnh1XWxEwXlAZkK2KVcKJiM=; b=qhkfiDp5rRg53e +u8a0c8YvABxr85v5+USmykrexZKQQT5m+gzXqIAjl3tMJIVV/l3a6Hc+hvyE1j2SmhPDimpBsdoU HTxC8eFgsD3qJcOvhrloQcv4ia0EZeTdCcuOBkMFHHXKmCgNCqw4tPI3oZtTYb7gbl75nayUk4vJe 7YTE4100WJ0doFAAb7HyEQ28XHAzq9lwE+h42fiU8w+UmmxhTCkNj4nQEH0cnF0QEnq0hYRcHMeYl 977H2wWIAW8q5bQmbWYea2JRxrQY1MAdUInZYc9BlaW5IOnD4ZEQwvuObqzzaV68AMep6nwiUOzdF GfxdU/RvRbnyO8JHawUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkUzg-008MYp-0t; Thu, 06 Apr 2023 19:10:00 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkUzc-008MXz-23; Thu, 06 Apr 2023 19:09:58 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 08EF664B3D; Thu, 6 Apr 2023 19:09:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 308F4C433D2; Thu, 6 Apr 2023 19:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680808195; bh=rtqkcb59ixCCeS2OlmeTgAhzrvTyCZZpGEB8R8r/rVE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=bNEnr4aWDv/gAiOH3jT9VYhR2mgl5quTDbYFoX6dUu/GwA5ZebY6PYOdfw5w3UI5r 3jTPBfEdBc8ABAai+MCb4V4xIya9Hjbw+ACebmDsLrUTYrY7rUPtR3BakxJO3OB3v9 pl8DI8q7v5Hn/YhfgfBJjmtpBUNsTJ+lVR2R4EOERZ3ppp2xMUZYZKrH1jmp6Q/HY0 u1yFrTcGV7gVxTWa+1SqWoQQI8KoV3sm1Fu3ZqC+7PuROAqn5I+JGQTkrtdViD4UVG 3DBhUJxORVwPVkB7oYdUDsPNIZHNe3FO4HwSKoaVEr9++9q8XQCd/HijdCNvzuihTi TwdPyK4yq3+JQ== Date: Thu, 6 Apr 2023 14:09:53 -0500 From: Bjorn Helgaas To: Jim Quinlan Cc: linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com, Florian Fainelli , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Subject: Re: [PATCH v1 2/3] PCI: brcmstb: Clkreq# accomodations of downstream device Message-ID: <20230406190953.GA3723665@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230406124625.41325-3-jim2101024@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230406_120956_752191_0FC0A8AA X-CRM114-Status: GOOD ( 21.86 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 06, 2023 at 08:46:23AM -0400, Jim Quinlan wrote: > The Broadcom STB/CM PCIe HW core, which is also used in RPi SOCs, may be > set into three mutually exclusive modes: > > (a) No clkreq# expected or required, refclk is always available. > (b) Clkreq# is expected to be driven by downstream device when needed. > (c) Bidirectional clkreq# for L1SS capable devices. > > Previously, only (b) was supported by the driver, as almost all STB boards > operate in this mode. But now there is interest in activating L1SS power > savings from STB customers, and also interest in accomodating mode (a) for > designs such as the RPi CM4 with IO board. > > The HW can tell us when mode (a) mode is needed. But there is no easy way > to tell if L1SS mode is needed. Unfortunately, getting this wrong causes a > panic during boot time. So we rely on the DT prop "brcm,enable-l1ss" to > tell us when mode (c) is desired. This property has already been in > use by Raspian Linux, but this immplementation adds more details and > discerns between (a) and (b) automatically. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=217276 > Signed-off-by: Jim Quinlan > + * We have "seen" clkreq# if it is asserted or has been in the past. > + * Note that the CLKREQ_IN_MASK is 1 if clkreq# is asserted. "CLKREQ#" to match PCIe spec and comments below. > + if (l1ss && IS_ENABLED(CONFIG_PCIEASPM)) { > + /* > + * Note: This (l1ss) mode may not meet requirement for > + * Endpoints that require CLKREQ# assertion to clock active > + * within 400ns. > + */ > + clkreq_set |= PCIE_MISC_HARD_PCIE_HARD_DEBUG_L1SS_ENABLE_MASK; > + dev_info(pcie->dev, "bi-dir clkreq; l1ss-capable devs only\n"); > + dev_info(pcie->dev, "ASPM policy must be set to powersupersave\n"); Seems problematic since L1SS can be enabled/disabled at run-time: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-bus-pci?id=v6.2#n420 The simplistic answer is to advertise L1SS support if and only if you can safely support it. I don't know why this is an issue for this device but not others. Is it because there's some problem in the way the board is designed? Or (after skimming the bugzilla) maybe a problem with the plug-in cards? Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel