From patchwork Fri Oct 22 14:06:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 12577909 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 E09DEC433F5 for ; Fri, 22 Oct 2021 14:10:22 +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 AB16061213 for ; Fri, 22 Oct 2021 14:10:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AB16061213 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=z3M1lHdUFBm3QJQDZbd2ZkGm2Q9jfg+H4247Lj+2xiQ=; b=eUAQ6g5cJdeRCI yKSOusySJ1WcKOTciZSVM4p2sf1l5z0nBQsp1SS8jNs3PfDTPOTt6u2WUoDzZWvn9U3QtgTfnpOk9 LStdtMbAya6C0cdbnpC6lICXLntqWC6/oHmiRpGy3QcF7dWYEjJi2TiVtx4tmcva45Zk6HQ9tzHEq e571acYFTI1ErFL3iAbFBh5uoDpCcxrWGe+pMfg9LeMxk+4V676/AVc+5UsphPipoFxwoRkX4JDI6 1YO3CbBafRnNggHFtI1VCmMCDnL6GCc9l88zGRW7sTsZklhYMdTp417Flk/cBzdhTATTgvQFpzjEz a1un/hxarKDslR/QJTzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdvCf-00BBpV-DI; Fri, 22 Oct 2021 14:07:25 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdvCb-00BBoU-IP; Fri, 22 Oct 2021 14:07:23 +0000 Received: by mail-pg1-x533.google.com with SMTP id h193so3437380pgc.1; Fri, 22 Oct 2021 07:07:20 -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=/agOmz3U1kToZEfpYBZeBgjrCZIKo2iOjjILiNmM8SI=; b=d3sxm3/W05ryib4Gky/py2cbH7wU13kNcndQ+arph/+tRLtrUST0ILkziVU5hRxdFL tFkN2D9lSgK0UdB04rd4/e6nrWxa+ctJ31FRpvMB7NugBGNVBuACNtzAtpdOAIp1xk21 lFP8iGhBKr/1dU1KB37z+MQ4rbY9WxnDCFYaUygZm/6W69Hrf2qpo7w7aN7/HCFWVk3r tx2er1jnuRbGsrKXsBbTGSNCw+/o48o0zckbQ2sHe7JSfd9zn1/mom01ueO+1JRFdMqz pjQtYoOYwbgzyNqh8uafiDxRwJdVMzaCvMOpABzEkRdLb8EGgeD55xdoxY3ddqWsvjeH AXpw== 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=/agOmz3U1kToZEfpYBZeBgjrCZIKo2iOjjILiNmM8SI=; b=AIHLT/GroxnyD/sQ3oe+WAAFcPKdSY4Faa+oUmF9PXqez3WOnp3qXojPCtasI75spd 2HWzSLTrgzKaImqNRwUM73Yes9sLN2B3eQZtx5ChcfhwnjFcAV/WQVM+SaDnJ69YPL6s A2sx4gUJdp8g6c3QYjPqdVddZlas+nr3YBjVjgVBOn91/VI78nEBaD9+TVTc4mPd6jui 13m+ZvTaBUDSnM6Y13A4bfw/o7sGaTXmsuXQGiRwKfZD7iaq58/Q+s9JbbJ3rAP0/Nqq nSq1d+3xxQ+V0JOrl3iPdkyhiGY23ARPNaov6gu04+TZeziakK7b+kk6fmK3XJrWBddR BOkg== X-Gm-Message-State: AOAM531rGLpN1YBgp00OgJCJq/niC8f9k79JKNWO88pHq5Qqjh73Vy3/ o2++LyB+QviplXhca51gQlc= X-Google-Smtp-Source: ABdhPJzhIgzFcIrVWCevrBOk6am7e3ctM7HrhXOX6Kb2DYJntrfUXK6b1J+DZKiZ++UxKQu4kB7wyw== X-Received: by 2002:a65:6a0a:: with SMTP id m10mr9514pgu.82.1634911640310; Fri, 22 Oct 2021 07:07:20 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.11.250]) by smtp.gmail.com with ESMTPSA id e12sm9482990pfl.67.2021.10.22.07.07.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 07:07:19 -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: Andy Shevchenko , Bhaskar Chowdhury , Claire Chang , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), Greg Kroah-Hartman , Konrad Rzeszutek Wilk , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=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), Mauro Carvalho Chehab , "Rafael J. Wysocki" , Rajat Jain , Saenz Julienne , Saravana Kannan , Thomas Gleixner Subject: [PATCH v5 0/6] PCI: brcmstb: have host-bridge turn on sub-device power Date: Fri, 22 Oct 2021 10:06:53 -0400 Message-Id: <20211022140714.28767-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-20211022_070721_656159_E29CCB2F X-CRM114-Status: GOOD ( 16.63 ) 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 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 (6): dt-bindings: PCI: Add bindings for Brcmstb EP voltage regulators 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 | 23 ++ drivers/base/core.c | 5 + drivers/pci/controller/pcie-brcmstb.c | 231 ++++++++++++++++-- drivers/pci/probe.c | 47 +++- include/linux/device.h | 3 + include/linux/pci.h | 3 + 6 files changed, 286 insertions(+), 26 deletions(-)