Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp211181rdd; Tue, 9 Jan 2024 01:25:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGoYuu1nDirdrRRQ4+1WS3PrsxYZc5ZaMs7A3QxCbjfaeR4dDTu4KGxA5xN+WfaJZu58BtR X-Received: by 2002:ad4:5dc8:0:b0:680:feef:16fc with SMTP id m8-20020ad45dc8000000b00680feef16fcmr5160371qvh.71.1704792302837; Tue, 09 Jan 2024 01:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704792302; cv=none; d=google.com; s=arc-20160816; b=r+YGAJZ3NH3lwj5jn9N9ljjqnmFKhikyvb2/uGZ6AESG8tkwhgonsR3Lo1Dt/qKjIy v4ZYt0YCxJcmf0ih7RTRgc+7V730n/7JJwiAIIBQ9safksvhJjiVYzSsHC9ki+7hxYXW 30dsPSkG2ADPIYenL2U/Ph/jyrO8j8NHvwhXY4uz97H2WK6EpiMiiS1Rat83YIzbnm3H R8J5cXUI4tWLWpcriahHGoZ6brA0hDOTkVgM5SevWYfKeNT4GDtvDDutcMSLAr6S0Dgp o4l4w9tStObgQnX4gmAhC0JFi72BbYZZoTZuaShfSiUPg9m+X5FvtIT+zfszWO+dome+ qzoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=7UTUltZGmeo9A3YuZO0dfCl5WFOio6yQD2HEgGWBndU=; fh=767z1FxDNO80ZChGBP2fHJMLiTAULEomyGd+DcnbfEU=; b=LmvRmodWmnNWW14mFBFIIqfFt243dY55vQ68woLrqVbRypKbRlZ+GT46vhn/XDI21/ a03R2Blf/iHfffRWRRfwjMxAsXd5GJGBd1hXCZbm1iotS2jM5tQKQAqTS+ld0sxJ5ru4 xxAQrlJK7VQBNkbXMryLe6pbSAjh2BUgNBm7YwTqmq/zRL61ffzf9muCeQCjpM9jyjhv DiJVuEiNbS8zvO1Gjr2FwKm6bgCzUK3E0JSH4NRiFGuFmQMNP89Kva1VFyK6AgDwDQ+m pemJuGIuMWohNVL5CxPfhZHlII0tpiYBcuryUB7DetJkKrlZPHwfye1cdkBhD0oJeE1w 5JBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lq2HYh++; spf=pass (google.com: domain of linux-wireless+bounces-1621-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g8-20020a0cf088000000b0067f86ad4e84si1741137qvk.456.2024.01.09.01.25.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 01:25:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1621-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Lq2HYh++; spf=pass (google.com: domain of linux-wireless+bounces-1621-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 879BC1C23D10 for ; Tue, 9 Jan 2024 09:25:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E5B92E634; Tue, 9 Jan 2024 09:24:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Lq2HYh++" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 589A835883; Tue, 9 Jan 2024 09:24:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F47FC43399; Tue, 9 Jan 2024 09:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704792284; bh=C7H7w4SCOHPEKSbdH/8LWP/KZNEqQ1r60F5xiy24wvc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Lq2HYh++x5jwY2PFeXFXc90GyBmZyuoFgbvB2Rty2xkTZA5Rc0Pxws+mzVIq++Hx7 ++fodCbaSjc5utdR+5Y91ANd/JrtWeSvjnL5h5vWb3tAvAnQtWjWolpyvMU4d7aDN+ 9LST/UQvhWAb2VhEhm4wr0nAMqnyJneKpHiTRJ+Xf5u+6L7EDu6lum44x9YVevJagv VHy2DRqubgZwhGtms3c7ozDyo+IPgNBsjUv3ea0WSZgZcc0CZb8pzX/wdkrsmr+sat fu2lSeO8fl9BbF5JGIMcoSzNr4aWEBB9cO6MEjq26++yfer9+c76Mofl4hALQACL5b /Fd1nO+/5Mqww== From: Kalle Valo To: Florian Fainelli Cc: Bartosz Golaszewski , "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 . R . A . Prado , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , Ilpo =?utf-8?Q?J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman , Jim Quinlan , james.quinlan@broadcom.com, 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 Subject: Re: [RFC 0/9] PCI: introduce the concept of power sequencing of PCIe devices References: <20240104130123.37115-1-brgl@bgdev.pl> Date: Tue, 09 Jan 2024 11:24:35 +0200 In-Reply-To: (Florian Fainelli's message of "Mon, 8 Jan 2024 20:08:33 -0800") Message-ID: <87frz6zwoc.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Florian Fainelli writes: > 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. Good point, suspend and resume is very important for ath11k and ath12k. And although I'm not expecting any issues with hibernation please also consider that. Currently ath11k hibernation is broken because of MHI and it has been pain trying to fix that. So best to make sure these cases work from the beginning. > 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! A big thank you from me too! It's great to finally see this solved so that ath11k and ath12k can be used in wider range of devices. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches