Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1054724rwe; Fri, 14 Apr 2023 13:35:54 -0700 (PDT) X-Google-Smtp-Source: AKy350ZLPIH9dqWpsWlQYe05lHDIRBI+ujWgI/99hMpblLfZL0ng0GOjDk1or+txKfEkenfh1QR4 X-Received: by 2002:a17:90a:df91:b0:246:9c75:351a with SMTP id p17-20020a17090adf9100b002469c75351amr7460024pjv.12.1681504554453; Fri, 14 Apr 2023 13:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681504554; cv=none; d=google.com; s=arc-20160816; b=qx91GIk8usPT1DZ3kOdMqFUPUxQ/g0s7z1lgfNKg+9fZA+NUJQ3uswRsdw8q/kHGqE Tlb7APnbvZ62yGiBpI9cTLMqQ0RDkiAa+lp5mOJPvqyH7YOJv87iXKwf0sOwknzTqUEc DXWCb2qU95211O5yV6OIDKMRh4Cp8wA5TUuAvC4LClK40f+uQLe+rvOfOR4vmye7xdE7 6Td6W2lnAtDo9TL+5xHCVw+eQerNjJnLqCvKx7Trb0aKoNpVvS6QRgC3VE3Pi3aU/sPx DWlV/ipE9Gq8hMT6Q+Iy4DbLXfHEy2NctP3a1tv0w3vZTfPfDcl9xi9bScx/fPZWEjmE B4/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=A9roGqcC1mDVUMJXRS/xacmv96q0z+cHGLu3tX2K9YQ=; b=J00DNAYm+77nb3oQVd9wAmFGydHsFLDUhxBcoDt5dPYJ1P/WPIMaAuNh91dzBb1R5/ 90fNMuhc6XkBsYv1LrfIIYfrZZ9ltpfovv7Z7BQKlU5xHsYsmu5xuJAJ2mNpGPZ48/Ai 3MzWLv/a+HIS7SVRFhBi2XZf6aKtocKQvY5wt2zqJvkeymyNl+2E27gIDPkdgFg8Hcnm qSbLY/iZB02EghXkb5AVFm37g1uzqsng1q21/yGe3NCQ93rBmy6LAURXX+OriY3d6IPy cJVYj+7DHqBN8gd7hEaj5ZorD3WzWMc3e+pSOtFueMoBds/Qc+VEJwworsY9p+ffGG/Z osMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NvptJXJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jo13-20020a170903054d00b001a05a78f952si5146274plb.272.2023.04.14.13.35.39; Fri, 14 Apr 2023 13:35:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NvptJXJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbjDNU1Z (ORCPT + 99 others); Fri, 14 Apr 2023 16:27:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjDNU1Y (ORCPT ); Fri, 14 Apr 2023 16:27:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B12640DF; Fri, 14 Apr 2023 13:27:23 -0700 (PDT) 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 25E8A60BBF; Fri, 14 Apr 2023 20:27:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DAB6C433EF; Fri, 14 Apr 2023 20:27:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681504042; bh=mGto9gKSSTTM0gjfPcNOwu+t1VdaM4q/g495do+Uqt8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=NvptJXJfYZg8rRDRCNDqhhIXYMXWrNT6H/HO3Adt5dsfOmgNJDBm4RxAjf1RfS/c4 XzKK7VN/DJow762nJWUJh1ECAEVuljiC1xdR64Z5T4YNrT5R9cMjedIcWsJHO5eZBr 0x0rL2c8pf4fLTcAeHUkXmnrQ8HM/AjxDXo6HxQYg5jq49mSX3utwdWL0odxkt4n+2 gnPwFo65d1LHJsEjImH5PZcJt1KqE2B5+QUkofBHcOgZIPfrdPwkLpg2cz9ZCYqPDq y5cegzB+mg5DN9vK6TF35erBUchLXLC2YltXCwOlkiC4kAwLpIwHZc3+ryoa3JHff6 v0hTSj+rCxYdg== Date: Fri, 14 Apr 2023 15:27:20 -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 v2 2/3] PCI: brcmstb: CLKREQ# accomodations of downstream device Message-ID: <20230414202720.GA215111@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230411165919.23955-3-jim2101024@gmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This subject line no verb. Can you add a leading verb to suggest what this patch does? s/accomodations/accommodations/ On Tue, Apr 11, 2023 at 12:59:17PM -0400, Jim Quinlan wrote: > The Broadcom STB/CM PCIe HW core, which is also used in RPi SOCs, must be > deliberately set by the probe() into one of 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/CM > boards operate in this mode. But now there is interest in activating L1SS > power savings from STB/CM customers, and also interest in accomodating mode > (a) for designs such as the RPi CM4 with IO board. accommodating > The HW+driver is able to tell us when mode (a) mode is needed. But there > is no easy way to tell if L1SS mode should be configured. In certain > situations, getting this wrong may cause a panic during boot time. So we > rely on the DT prop "brcm,enable-l1ss" to tell us when mode (c) is desired. > Using this mode only makes sense when the downstream device is L1SS-capable > and the OS has been configured to activate L1SS > (e.g. policy==powersupersave). I'm really concerned about the user experience here. I assume users do not want to edit the DT based on what device they plug in. They shouldn't need to (and probably won't) know whether the device supports L1SS. I hate kernel/module parameters, but I think even that would be better then having to edit the DT. There's obviously a period of time when L1SS is supported but not yet enabled, so I'm *guessing* the "OS has been configured to activate L1SS" is not actually a requirement, and choosing (c) really just opens the possibility that L1SS can be used? Would be nice to have a hint (maybe a line or two of the panic message) to help users find the fix for a problem they're seeing. Obviously the ideal would be if we could use (c) in all cases, so I assume that's where a panic might happen. What situation would that be? An endpoint that doesn't support L1SS? One that supports L1SS but it's not enabled? Maybe if L1SS isn't configured correctly, e.g., LTR values programmed wrong? Bjorn