From patchwork Fri Jun 23 14:40: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: 13290767 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 41F5FEB64DD for ; Fri, 23 Jun 2023 14:41:52 +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-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-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yB7fVezWLMOT95kkU42eQiWzf9ffphjm/Z2AtE2CY/0=; b=fVrZ/qM6Ui1FbOTvnE2sZl6nB3 mjd9d0G7FmTLs3CVYV1cDJCGMwohWYyVKKAlub7oVXsUXc0rMCc51Kr1MAtAnLWVYxu8WNomAKShq +714Zs0ikAaklElxiULrlJkz5dr+M/NIDLl1AbfHc0E5b8sXWMnQdnoWvIEWNhVCBNiAxzNPlK19h Lbgm6Le/etJE4Z6RlUfviMNYz1I7qiuz0XLDgd9Rpm75qJSKooN3gA+T2CRRv4QOqo4MOQSYexaQc Cc+M/oV35U6OrzqlRXQODgB0/cRAUJ+JBAtG/M2C5s/DlX1X7yrQLmM3GxckjTziAvqmAOIBOKg/G Z4KVMyRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qChyT-003oNX-2R; Fri, 23 Jun 2023 14:41:21 +0000 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qChyI-003oIP-33 for linux-arm-kernel@lists.infradead.org; Fri, 23 Jun 2023 14:41:13 +0000 Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-76246351f0cso60446985a.1 for ; Fri, 23 Jun 2023 07:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1687531268; x=1690123268; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=8Fpd7b1ELJYkh4N7Xdv+f428e2r8crHJlvQBGQ+Y+iw=; b=eDY8oM1dDX4W4EZECLnidybYW026+Z/bNLR+mm4XR1gUrv9MSRndgV1Wh/4awsuIVf Sx05QO5WJFjHXMr059Tj51g3suAiV6OC68HPv0/ymK8kI/mn3wnUucunPGYXDjGfOQq+ 2TT2v4p9oThPoLG762wpj+g2u/7ISyco5yO7U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687531268; x=1690123268; 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=8Fpd7b1ELJYkh4N7Xdv+f428e2r8crHJlvQBGQ+Y+iw=; b=Mmjb1k/e0MH7XNH07WoG8qjWxP9hAqyP/1tX00YF5uQyl7GfRvs7wUca2AMBNEw9sM 2tE4FtinMf/RAGvhKksKoDc2oS1xZ6a+WbH2qUCA92QA/lz9S55DOUKVVNGLW/1u65FI R7lN9w7TD0jv5gAwc2cXKaapnkY2iWP6WXY1oRNlnXjW23g0P/VlmR8OjQ9khRjwHfYc 13uvN+iraMbPMVnA77/T7F8lzOUtoxqbLw1picES9LOTJTfCYKt3/rHxp/ozQTvttYPS PML7AnyQBP8VlD+FU4SKLuBJAYjA9VG1uI6/4yVhO8zf8FM5nsyFU/jFc0+w8ia8awLA FIIA== X-Gm-Message-State: AC+VfDzZXc7qzds57RSIo4eCz4CxxOfzrwIUz0TSCQcCEdoMwdSNWZSj ZJlh81kX9EDbAdqvAASEmAZuaw== X-Google-Smtp-Source: ACHHUZ6VEUGWHyC6gT/qBlxdtFs8HESOkMiVWwwv0lzZBtEqaLYNovEbLqSls92mOSWoka1L+bDJrg== X-Received: by 2002:a05:620a:424d:b0:75b:23a1:3606 with SMTP id w13-20020a05620a424d00b0075b23a13606mr15726420qko.23.1687531268377; Fri, 23 Jun 2023 07:41:08 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id i18-20020a05620a145200b007625382f4ccsm4564613qkl.69.2023.06.23.07.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 07:41:07 -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, james.quinlan@broadcom.com Cc: Jim Quinlan , Florian Fainelli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE), linux-rpi-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 v6 1/5] dt-bindings: PCI: brcmstb: Add brcm,enable-l1ss property Date: Fri, 23 Jun 2023 10:40:54 -0400 Message-Id: <20230623144100.34196-2-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230623144100.34196-1-james.quinlan@broadcom.com> References: <20230623144100.34196-1-james.quinlan@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230623_074110_986002_6A937981 X-CRM114-Status: GOOD ( 14.68 ) 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 adds the boolean "brcm,enable-l1ss" property: 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==powersupersave). This property is already present in the Raspian version of Linux, but the upstream driver implementation that follows adds more details and discerns between (a) and (b). Signed-off-by: Jim Quinlan Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml index 7e15aae7d69e..8b61c2179608 100644 --- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml @@ -64,6 +64,15 @@ 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.2 + of the PCI Express Mini CEM 2.0 specification. + type: boolean + brcm,scb-sizes: description: u64 giving the 64bit PCIe memory viewport size of a memory controller. There may be up to