Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp160676rdd; Mon, 8 Jan 2024 23:08:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEuaA4jut9XSNM1KxjcYaY2mmzeDN1/Fr+8TOUeK4PWtbC3mwEaJQ0wLP1qbvizyytB4zyF X-Received: by 2002:a50:b40f:0:b0:558:13f0:7b1f with SMTP id b15-20020a50b40f000000b0055813f07b1fmr46481edh.76.1704784135704; Mon, 08 Jan 2024 23:08:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704784135; cv=none; d=google.com; s=arc-20160816; b=Vg3/bW+0kG5NvpaLKWzQoKEL9BfWJgM25GvmsomlnsPJyXEVHY0iDfhLAGciewZVNk kMdRiFE0JxHagrSTj/fY9cC8WTuW5bKrFPGv/97zvEP+pNeNwrlRSX3gb5XuBlAVC1Jr 7B1HxtzefRGpDhthaH87XYtCUqgVRm2loT1GJCW7Zo7phumAEe89hPGV3JMWJYLgI3ny pD+AEim3sMzzvYWaqBRW+P5QXy0p+8A9zq17PrPHcRyv61G0n6qKTDpmKHqe0A7ZWJfF Fcd+q5r0MPQWprP3C96iuK9DscVUipJ6VJ5qzhk5FcVl2NgeNkX5KyUVf49tkKPn+3JA wxdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=LKZ+huI8zyF9y64Tci/e9CKNNCnYcIoMFreFA1gzux0=; fh=FdMkrdeKn2KSxxWaV9POYDPBgajDDNH80xAq/X/ZYGs=; b=QRwzZfw+bldJNXIQWcElVt+rNS/0H3Du9fWXArCR6aly+qgfz+yGDkCSIjglRErEsy hNXTot39GTff8XYrvkQNwbRQPfbrTB6MgGQBr4NWK10fqwtj0AFIY40bBTfEXW79jHg4 41Ow0jJfrMMIx2mWHU+PBzViPUtf4FNNUQrA28W3EIE6sXPHoDeN+uHntpvVdtiZKQka FumZ+yVzpc43JmDVBJ784WETKCBXlRoYNycIZB0y/7HttIxUKZ3N+piB+vmTZviJ+7hV 0izkHB9tj4bDQL2Y8whi9zkiX326uoG51nEDogj95bH3aTwuErMyUOPEdSOx48IDyzmZ JyuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BR3uNY2a; spf=pass (google.com: domain of linux-wireless+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s24-20020a508d18000000b005533fb37c69si522404eds.549.2024.01.08.23.08.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 23:08:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BR3uNY2a; spf=pass (google.com: domain of linux-wireless+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 742AC1F246EA for ; Tue, 9 Jan 2024 07:08:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 889A49455; Tue, 9 Jan 2024 07:08:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="BR3uNY2a" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B46AC8F52 for ; Tue, 9 Jan 2024 07:08:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2cd17a979bcso28235771fa.0 for ; Mon, 08 Jan 2024 23:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1704784124; x=1705388924; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LKZ+huI8zyF9y64Tci/e9CKNNCnYcIoMFreFA1gzux0=; b=BR3uNY2aqxJmT75o7xwDgxeATb4y9fom4lRLSxsyllBe4QDRq2d0GDZQ/OGt7N8LnX 1VYqXJ8lSMOZUvQiOTUjnqzIFT7ExjFMPLl5Lh8hTzl/FND/cT2ZEvzEX35ic27taei9 66Ymdhj+sS5Y0+j9M0Iti3pUvgQ13Bxv0xIDQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704784124; x=1705388924; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LKZ+huI8zyF9y64Tci/e9CKNNCnYcIoMFreFA1gzux0=; b=u/mDY/HbkOYobfbdgmNA/uqdj4tqVUtiwXNJOL+0Ei8u3WmaOuwUCGV95S6rtZu/RR 3tEKstBzEwXGYhhXTYtWUUcu1c/KWTYGudm0QV+OV6R+9zvZZg78heivc5xJMht4nX9n X7o2TukN3QPBhajmwGcbfx2SKRlYuqFROnC3EsRajWMCITzdz63P4l2kB5khOpVnWtqz qT+W5P6o0tfMuIjxRjVcOgQcp6DN2YBvqvZY6FOdlChocDsCrzqp6kk/bCAOTh2832T/ 94Tpl8PpJUZw3t3p2my/s5dAw7jLFbB7NrxBgNuu/EdN+r8jWQpdeGZ0MwifD9tPe5mS qmTg== X-Gm-Message-State: AOJu0YxD7ZuD9eubyCJ4UKJVrRLupbVOv86zZ9eswpRruf1B++fpzUt9 pal9NoZAVKbuV3CzhxKXMC3xSMPmm/i7rGCJYR3CSQfn8EFW X-Received: by 2002:a2e:a404:0:b0:2cd:1b40:5725 with SMTP id p4-20020a2ea404000000b002cd1b405725mr1063109ljn.212.1704784123625; Mon, 08 Jan 2024 23:08:43 -0800 (PST) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240104130123.37115-1-brgl@bgdev.pl> In-Reply-To: From: Chen-Yu Tsai Date: Tue, 9 Jan 2024 15:08:32 +0800 Message-ID: Subject: Re: [RFC 0/9] PCI: introduce the concept of power sequencing of PCIe devices To: Florian Fainelli Cc: 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?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , 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, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 9, 2024 at 12:09=E2=80=AFPM Florian Fainelli wrote: > > 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 realizatio= n > > 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 revert= ed: > > 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. I think the current in-tree approaches mostly target either PCIe slots, whether full size or mini-PCIe or M.2, or soldered-on components that either only have a single power rail, have internal regulators, or have surrounding circuitry that would be incorporated on a PCIe card. These all have standardized power rails (+12V, +3.3V, +3.3V aux, etc.). > 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... We can have one "generic" slot power sequencing driver, which just enables all the power rails together. I would very much like to see that. I believe the power sequencing in this series is currently targeting more tightly coupled designs that use power rails directly from the PMIC, and thus require more explicit power sequencing. ChenYu > 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