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 E7FA7C46CD2 for ; Tue, 9 Jan 2024 04:09:06 +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: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Xsh9aMpoTpWUnO7xiH88Ix+633YjTE86cS3iDOmB48Q=; b=qVx8ctUms9UIoF VV6gkSkaLOJQxZUYJew6r+TMxEAFkNFM7DTTXYKHUPtD3pzLKIlkqpw5oQY5ZivEas4CKapWjGVW4 J28wxx6DC9e/Th+ExjslqanJDi99LEsmidRQcw1y3OypBM/sfvZA6O+G4gf7hrwtOZDbLZd1HD/iu 6ERZRfPLka+ZqGuWPYhxcqtyUuuK6BEw3hSUFZdv0s568/i9O3uSEp20GzZDHC8MgQblHx1dZVcqu r9D6nrVKCTr1TufmzWK04SwF7CYkcjJjmUxqiYJ8fLcQ0cSTJBsQYhRiWnpUrw5B5sbzOyW/+lBBf 6dCb93eqPZuhN0DqSrMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rN3Pu-006sZl-2y; Tue, 09 Jan 2024 04:08:42 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rN3Pr-006sXo-2j for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2024 04:08:41 +0000 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5ceb3fe708eso741732a12.3 for ; Mon, 08 Jan 2024 20:08:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704773318; x=1705378118; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=I/XC7+Hzrqaul1JzDjqFzwqKQMzBB3vpvjl8qHZ5in8=; b=Oj2LtpJC42rOdRJAgZVzbpBLKpIH/X60zJsg9ik1/azB9TeSTzmovOCqYb0s5XCC65 UGrzJoEAO8s9t9eAiKVY8dcedFGNNF9Fcq6JqoWBwkl7qCrf1E5142L0Q1icBKg6VIHP 8DzJ/WWVxLKbQ9XBGEoTkOjaGe5JnaYwZRyNnkEMdxVcPMruvK5K4xjusp6cEEuNDIO2 sYvZLVnpU+EYUaLgcNXneANLMyOkMMRq6MDUlRyoSutqnDfbFjRwB8GcZvUdAtIXs3go 2b1gI9wJkM/lAvIZczVKe8Swy2sC7LGs6UeNWVAb9INiLU1eKoqH8HNrUeSmEIEiXEmI lMZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704773318; x=1705378118; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=I/XC7+Hzrqaul1JzDjqFzwqKQMzBB3vpvjl8qHZ5in8=; b=VXjnZ73CWevjcK1/hAAvna5y4qLSjFvQ7vzjeJWG5rBlsVomqH84/6DtSC6JDaWwaL vsvp0EHV4k+CT+kwbabvxOkMtQcKeZTWYgepXPZ2WCXQBD4a0iAv4IPbOgX3FY1H7e0M nlNkOR0oXtjIMKOwSx3Bvos+bvR3y9DKBvlFc1RhOU/2vJJ0GH5lqB2vM6PHwAFouk0m ZfZ5FvkAseze6Sa0zWgGv/payOdxuAZMYdZLwlfOtj8abmKmUULSDKw8d5HC9zF6u8e5 3lMh4kzQ+GSPD3+VEL/5rdpLNjFF7yKIqmsNv9w0Rgz1yP+Zx3dG1oMZbbj18h56K70N fwkA== X-Gm-Message-State: AOJu0YwqHpNkY3S7l2CUpG3FcAoK9MtoFfmgcSQzhcb1dkhKxgHemO/N USfixla6QmkaejmqVp/RKZo= X-Google-Smtp-Source: AGHT+IHY1ya+YrOLTHexV8PosRb/mNRrliidXjZM2nUEIVPtdG0nc7kbSmQlzxZRWYZv+xROvd6Tgg== X-Received: by 2002:a17:902:dac8:b0:1d4:524d:96cb with SMTP id q8-20020a170902dac800b001d4524d96cbmr2692987plx.109.1704773317516; Mon, 08 Jan 2024 20:08:37 -0800 (PST) Received: from ?IPV6:2600:8802:b00:ba1:c927:f415:d49b:1377? ([2600:8802:b00:ba1:c927:f415:d49b:1377]) by smtp.gmail.com with ESMTPSA id z3-20020a170902834300b001d1d6f6b67dsm651885pln.147.2024.01.08.20.08.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jan 2024 20:08:36 -0800 (PST) Message-ID: Date: Mon, 8 Jan 2024 20:08:33 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 0/9] PCI: introduce the concept of power sequencing of PCIe devices Content-Language: en-US To: Bartosz Golaszewski , Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?UTF-8?Q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman , Jim Quinlan , james.quinlan@broadcom.com Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski References: <20240104130123.37115-1-brgl@bgdev.pl> From: Florian Fainelli In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240108_200839_883888_63980206 X-CRM114-Status: GOOD ( 21.97 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, On 1/4/2024 5:01 AM, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > During last year's Linux Plumbers we had several discussions centered > around the need to power-on PCI devices before they can be detected on > the bus. > > The consensus during the conference was that we need to introduce a > class of "PCI slot drivers" that would handle the power-sequencing. > > After some additional brain-storming with Manivannan and the realization > that the DT maintainers won't like adding any "fake" nodes not > representing actual devices, we decided to reuse the existing > infrastructure provided by the PCIe port drivers. > > The general idea is to instantiate platform devices for child nodes of > the PCIe port DT node. For those nodes for which a power-sequencing > driver exists, we bind it and let it probe. The driver then triggers a > rescan of the PCI bus with the aim of detecting the now powered-on > device. The device will consume the same DT node as the platform, > power-sequencing device. We use device links to make the latter become > the parent of the former. > > The main advantage of this approach is not modifying the existing DT in > any way and especially not adding any "fake" platform devices. There is prior work in that area which was applied, but eventually reverted: https://www.spinics.net/lists/linux-pci/msg119136.html and finally re-applied albeit in a different shape: https://lore.kernel.org/all/20220716222454.29914-1-jim2101024@gmail.com/ so we might want to think about how to have pcie-brcmstb.c converted over your proposed approach. AFAIR there is also pcie-rockchip.c which has some rudimentary support for voltage regulators of PCIe end-points. What does not yet appear in this RFC is support for suspend/resume, especially for power states where both the RC and the EP might be losing power. There also needs to be some thoughts given to wake-up enabled PCIe devices like Wi-Fi which might need to remain powered on to service Wake-on-WLAN frames if nothing else. I sense a potential for a lot of custom power sequencing drivers being added and ultimately leading to the decision to create a "generic" one which is entirely driven by Device Tree properties... Thanks for doing this! -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel