From patchwork Fri Oct 29 20:03:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 12593685 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1F87C433EF for ; Fri, 29 Oct 2021 20:18:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BABB36101E for ; Fri, 29 Oct 2021 20:18:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BABB36101E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=WNoYS71GgBRmrnEzav8mJTZpz5BSD+VtFyFdleg9Clg=; b=HXOvtjd0ijjS2R U8lPgcQslBgqqWhTMhZ58vHS7j+6w2ahVLKtVcABFV465wvy2hFDRXQ83a48Hk43kPv0++0VfQXkx aZlSKRkcYU52oj9DcPnJzTqA15YVYXoRK1A4gB9zhjHLm+uijNRd0y58v6fO2cntLhBGTEcQsL8m3 FE/iwB0qDbShAsBbCnVS3EmwxnU+q6bRibCPXS8TfxSsQoc+QdqkjYMRYj93NrXUrldzrW7eH8YnM 2lQa5rrGTCOEsnhs8Xal9sZuHbp2uSQETTYYsznjTYWmdJATJl8Lrc1vbgJrUh2sIF7wQ7b8aCiId x1/T8devRLZxU0SstOog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgYJ2-00CD6X-MU; Fri, 29 Oct 2021 20:16:54 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgY61-00C9Ym-QW; Fri, 29 Oct 2021 20:03:28 +0000 Received: by mail-pj1-x102d.google.com with SMTP id gn3so7945371pjb.0; Fri, 29 Oct 2021 13:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=CD0Ppn2nedztgflSM0GT6miv660hCRYTlpvYGrTEVmc=; b=c40Rae/wnHyVhugcgh192ae3Q6rIm71vIlXZyddZ+BApyZvnhsj2KW21ZIoxspIbNB NfIOUjrGjI3T4v6U0yPoUfT9ZEJrWUO5ErGsnx3iu9TbBOWeKtgEXJ+BW2deeO03elW9 Sg9QV2srOzOUbmEiP2CuEHjaxcNJE6yiuMTW1jVYKMgNgfMpbsVyYRsKPVlN8C0fyhch lKRk1OoLddxC395H1BiT2gHTncnp6mJtXgVJ9otaG9fChs2jOQ0t0mdeqRH8tOTzkxho Nsgc9WKY55PEqSmEDXNDgyPYYh75S5ipXfkoUoxdvPVy8BljWMePEGCmy/FDzJu2kfWu 2Lig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CD0Ppn2nedztgflSM0GT6miv660hCRYTlpvYGrTEVmc=; b=AFxMiIQLTNQJYxj/bdgkhMXJlFVprxoRQMyTb5nI5tTdENLzFBTN9ZII3rMlqKzQdG WujZIhWMumQ5T1CX7tu4StXXp/Z1/IWn2/3lEi5tEEafBilJA5IDf6MKkKXE9VdBVW8V LWTmBGcVzShhre5Pe/HFsrvsyQ4ZDkTrkUorSCdP7pBbU3a7SywExItz5xHCMGcWSVFf i3Hs4zxEKVXyDDEW14Es4P69+9hi3bbgqE4Mei8tfKMag8mjJ+P4z5Dw5srntokAYM6e w7sXy+maKAjqC9NTSbdnERFnNMhN1ejrRPI2oEx69DyP4yvbD0wbjvPmpb9BWugLYMfl nvNg== X-Gm-Message-State: AOAM531GFotYYPVS70dkj8FvacIYpn+dr0XSr+HvMMwmjR6RW4nQcRAg UOqhew1dHM3AcXyGYaz4znY= X-Google-Smtp-Source: ABdhPJy/KfEnayPUU1Tvi9Lcz5RXzn6GtjdRqeUCch1RvSVVaIRIZN0uDw8aiq9PZTcYhoO8Aq09Cw== X-Received: by 2002:a17:90b:1bd1:: with SMTP id oa17mr13380789pjb.26.1635537804185; Fri, 29 Oct 2021 13:03:24 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.11.250]) by smtp.gmail.com with ESMTPSA id j16sm8775041pfj.16.2021.10.29.13.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 13:03:23 -0700 (PDT) From: Jim Quinlan To: linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Rob Herring , Mark Brown , bcm-kernel-feedback-list@broadcom.com, jim2101024@gmail.com, james.quinlan@broadcom.com Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , 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), Saenz Julienne Subject: [PATCH v6 0/9] PCI: brcmstb: have host-bridge turn on sub-device power Date: Fri, 29 Oct 2021 16:03:08 -0400 Message-Id: <20211029200319.23475-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-20211029_130325_947459_F6A279FE X-CRM114-Status: GOOD ( 17.18 ) 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 v6 -- Dropped the idea of a placeholder regulator property (brcm-ep-a-supply). (MarkB) -- device_initialize() now called once. Two commits were added for this. (GKH) -- In two cases, separated a single function into two or more functions (MarkB) -- "(void)foo();" => "foo()". Note that although foo() returns an int, in this instance it is being invoked within a function returning void, and foo() already executes a dev_err() on error. (MarkB) -- Added a commit to correct PCIe interrupts in YAML. -- Removed "device_type = "pci";" for the EP node in the YAML example. -- Updated the URL related to the voltage regulator names on GitHub. Note that I added vpciev3v3aux. v5 [NOTE: It has been a while since v4. Sorry] -- See "PCI: allow for callback to prepare nascent subdev" commit message for the cornerstone of this patchset and the reasons behind it. This is a new commit. -- The RC driver now looks into its DT children and turns on regulators for a sub-device, and this occurs prior to PCIe link as it must. -- Dropped commits not related to the focus of this patchset. v4 [NOTE: I'm not sure this fixes RobH and MarkB constraints but I'd like to use this pullreq as a basis for future discussion.] [Commit: Add bindings for ...] -- Fix syntax error in YAML bindings example (RobH) -- {vpcie12v,vpcie3v3}-supply props are back in root complex DT node (I believe RobH said this was okay) [Commit: Add control of ..] -- Do not do global search for regulator; now we look specifically for the property {vpcie12v,vpcie3v3}-supply in the root complex DT node and then call devm_regulator_bulk_get() (MarkB) -- Use devm_regulator_bulk_get() (Bjorn) -- s/EP/slot0 device/ (Bjorn) -- Spelling, capitalization (Bjorn) -- Have brcm_phy_stop() return a void (Bjorn) [Commit: Do not turn off ...] -- Capitalization (Bjorn) [Commit: Check return value ...] -- Commit message content (Bjorn) -- Move 6/6 hunk to 2/6 where it belongs (Bjorn) -- Move the rest of 6/6 before all other commits (Bjorn) v3 -- Driver now searches for EP DT subnode for any regulators to turn on. If present, these regulators have the property names "vpcie12v-supply" and "vpcie3v3-supply". The existence of these regulators in the EP subnode are currently pending as a pullreq in pci-bus.yaml at https://github.com/devicetree-org/dt-schema/pull/54 (MarkB, RobH). -- Check return of brcm_set_regulators() (Florian) -- Specify one regulator string per line for easier update (Florian) -- Author/Committer/Signoff email changed from that of V2 from 'james.quinlan@broadcom.com' to 'jim2101024@gmail.com'. v2 -- Use regulator bulk API rather than multiple calls (MarkB). v1 -- Bindings are added for fixed regulators that may power the EP device. -- The brcmstb RC driver is modified to control these regulators during probe, suspend, and resume. -- 7216 type SOCs have additional error reporting HW and a panic handler is added to dump its info. -- A missing return value check is added. Jim Quinlan (9): dt-bindings: PCI: correct brcmstb interrupts, interrupt-map. dt-bindings: PCI: Add bindings for Brcmstb EP voltage regulators PCI: move pci_device_add() call PCI: separate device_initialize() from pci_device_add() PCI: allow for callback to prepare nascent subdev PCI: brcmstb: split brcm_pcie_setup() into two funcs PCI: brcmstb: Add control of subdevice voltage regulators PCI: brcmstb: Do not turn off regulators if EP can wake up PCI: brcmstb: change brcm_phy_stop() to return void .../bindings/pci/brcm,stb-pcie.yaml | 35 ++- drivers/pci/controller/pcie-brcmstb.c | 243 ++++++++++++++++-- drivers/pci/iov.c | 1 + drivers/pci/probe.c | 61 +++-- include/linux/pci.h | 4 + 5 files changed, 308 insertions(+), 36 deletions(-)