devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/9] PCI: introduce the concept of power sequencing of PCIe devices
@ 2024-01-04 13:01 Bartosz Golaszewski
  2024-01-04 13:01 ` [RFC 1/9] arm64: dts: qcom: sm8250: describe the PCIe port Bartosz Golaszewski
                   ` (11 more replies)
  0 siblings, 12 replies; 58+ messages in thread
From: Bartosz Golaszewski @ 2024-01-04 13:01 UTC (permalink / raw)
  To: 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,
	Nícolas F . R . A . Prado, Marek Szyprowski, Peng Fan,
	Robert Richter, Dan Williams, Jonathan Cameron, Terry Bowman,
	Kuppuswamy Sathyanarayanan, Ilpo Järvinen, Huacai Chen,
	Alex Elder, Srini Kandagatla, Greg Kroah-Hartman
  Cc: linux-wireless, netdev, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel, linux-pci, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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.

Bartosz Golaszewski (9):
  arm64: dts: qcom: sm8250: describe the PCIe port
  arm64: dts: qcom: qrb5165-rb5: describe the WLAN module of QCA6390
  PCI/portdrv: create platform devices for child OF nodes
  PCI: hold the rescan mutex when scanning for the first time
  PCI/pwrseq: add pwrseq core code
  dt-bindings: vendor-prefixes: add a PCI prefix for Qualcomm Atheros
  dt-bindings: wireless: ath11k: describe QCA6390
  PCI/pwrseq: add a pwrseq driver for QCA6390
  arm64: defconfig: enable the PCIe power sequencing for QCA6390

 .../net/wireless/qcom,ath11k-pci.yaml         |  14 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |   1 +
 arch/arm64/boot/dts/qcom/qrb5165-rb5.dts      |  24 +++
 arch/arm64/boot/dts/qcom/sm8250.dtsi          |  10 +
 arch/arm64/configs/defconfig                  |   2 +
 drivers/pci/pcie/Kconfig                      |   2 +
 drivers/pci/pcie/Makefile                     |   2 +
 drivers/pci/pcie/portdrv.c                    |   3 +-
 drivers/pci/pcie/pwrseq/Kconfig               |  19 ++
 drivers/pci/pcie/pwrseq/Makefile              |   4 +
 drivers/pci/pcie/pwrseq/pcie-pwrseq-qca6390.c | 197 ++++++++++++++++++
 drivers/pci/pcie/pwrseq/pwrseq.c              |  83 ++++++++
 drivers/pci/probe.c                           |   2 +
 include/linux/pcie-pwrseq.h                   |  24 +++
 14 files changed, 386 insertions(+), 1 deletion(-)
 create mode 100644 drivers/pci/pcie/pwrseq/Kconfig
 create mode 100644 drivers/pci/pcie/pwrseq/Makefile
 create mode 100644 drivers/pci/pcie/pwrseq/pcie-pwrseq-qca6390.c
 create mode 100644 drivers/pci/pcie/pwrseq/pwrseq.c
 create mode 100644 include/linux/pcie-pwrseq.h

-- 
2.40.1


^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2024-01-17 23:39 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04 13:01 [RFC 0/9] PCI: introduce the concept of power sequencing of PCIe devices Bartosz Golaszewski
2024-01-04 13:01 ` [RFC 1/9] arm64: dts: qcom: sm8250: describe the PCIe port Bartosz Golaszewski
2024-01-04 13:01 ` [RFC 2/9] arm64: dts: qcom: qrb5165-rb5: describe the WLAN module of QCA6390 Bartosz Golaszewski
2024-01-04 13:44   ` Dmitry Baryshkov
2024-01-04 15:13     ` Bartosz Golaszewski
2024-01-04 13:01 ` [RFC 3/9] PCI/portdrv: create platform devices for child OF nodes Bartosz Golaszewski
2024-01-06  1:05   ` Jeff Johnson
2024-01-09 14:43   ` Lukas Wunner
2024-01-10 12:55     ` Bartosz Golaszewski
2024-01-10 13:28       ` Lukas Wunner
2024-01-10 16:26         ` Bartosz Golaszewski
2024-01-10 16:41           ` Lukas Wunner
2024-01-10 20:18             ` Bartosz Golaszewski
2024-01-11 10:42               ` Lukas Wunner
2024-01-11 11:09                 ` Bartosz Golaszewski
2024-01-11 15:02                   ` Lukas Wunner
2024-01-11 16:16                     ` Bartosz Golaszewski
2024-01-11 21:43                       ` Geert Uytterhoeven
2024-01-12  9:43                         ` Bartosz Golaszewski
2024-01-12  9:47                           ` Lukas Wunner
2024-01-12  9:43                       ` Lukas Wunner
2024-01-17 23:38                         ` Rob Herring
2024-01-10 20:41         ` Dan Williams
2024-01-11 12:40           ` Manivannan Sadhasivam
2024-01-11 15:06             ` Lukas Wunner
2024-01-04 13:01 ` [RFC 4/9] PCI: hold the rescan mutex when scanning for the first time Bartosz Golaszewski
2024-01-04 13:01 ` [RFC 5/9] PCI/pwrseq: add pwrseq core code Bartosz Golaszewski
2024-01-06  1:25   ` Jeff Johnson
2024-01-04 13:01 ` [RFC 6/9] dt-bindings: vendor-prefixes: add a PCI prefix for Qualcomm Atheros Bartosz Golaszewski
2024-01-04 14:33   ` Rob Herring
2024-01-04 14:49   ` Sebastian Reichel
2024-01-08 19:10   ` Rob Herring
2024-01-08 19:22     ` Bartosz Golaszewski
2024-01-09  2:56       ` Rob Herring
2024-01-09  9:17         ` Krzysztof Kozlowski
2024-01-09  9:30           ` Bartosz Golaszewski
2024-01-04 13:01 ` [RFC 7/9] dt-bindings: wireless: ath11k: describe QCA6390 Bartosz Golaszewski
2024-01-04 15:57   ` Krzysztof Kozlowski
2024-01-09  9:13     ` Kalle Valo
2024-01-04 13:01 ` [RFC 8/9] PCI/pwrseq: add a pwrseq driver for QCA6390 Bartosz Golaszewski
2024-01-06  1:31   ` Jeff Johnson
2024-01-09  9:18     ` Kalle Valo
2024-01-09  9:34       ` Chen-Yu Tsai
2024-01-09 10:09         ` Kalle Valo
2024-01-09 10:14           ` Arnd Bergmann
2024-01-09 10:26             ` Chen-Yu Tsai
2024-01-09 10:38               ` Arnd Bergmann
2024-01-09 16:43             ` Kalle Valo
2024-01-09 16:46               ` Arnd Bergmann
2024-01-04 13:01 ` [RFC 9/9] arm64: defconfig: enable the PCIe power sequencing " Bartosz Golaszewski
2024-01-04 15:11 ` [RFC 0/9] PCI: introduce the concept of power sequencing of PCIe devices Sebastian Reichel
2024-01-08 15:24 ` Neil Armstrong
2024-01-08 16:10   ` Bartosz Golaszewski
2024-01-09  4:08 ` Florian Fainelli
2024-01-09  7:08   ` Chen-Yu Tsai
2024-01-09  7:41     ` Manivannan Sadhasivam
2024-01-09  9:29     ` Geert Uytterhoeven
2024-01-09  9:24   ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).