PCI: Add power sequencing driver for PCI slots
PATCH v2 1/1 PCI: Add power sequencing driver for PCI slots
Extend the PCI bridge driver to enable resources associated with PCI slots like clocks, power rails, and resets. This is modeled off of the PCI power control subsystem in Linux. The traditional compatible for PCI slots in U-Boot is pci-bridge, but Linux uses the more-systematic pciclass,0604 so add that as an option.
---
Changes in v2:
- Return early if there's not PERST GPIO
- Only mdelay if we need to
- Use CONFIG_IS_ENABLED to set .probe directly
drivers/pci/Kconfig | 8 ++++++ drivers/pci/pci-uclass.c | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+)
drivers/pci/Kconfig +8 -0
@@ -100,6 +100,14 @@ config PCI_ENHANCED_ALLOCATION Enable support for Enhanced Allocation which can be used by supported devices in place of traditional BARS for allocation of resources. +config PCI_PWRCTRL_SLOT + bool "PCI slot power control" + help + This is a generic driver that controls the power state of different + PCI slots. The clocks and resets for the PCI slots are expected to be + defined in the devicetree node of the PCI bridge. Say N if your PCI + busses don't have software-controlled clocks or power rails. + config PCI_ARID bool "Enable Alternate Routing-ID support for PCI" help
drivers/pci/pci-uclass.c +55 -0
80 lines not on this page · raw message
Signature · 4 lines
2.35.1.1320.gc452695387.dirty base-commit: 141be72e2a9d43aa4e3d1a6a6e0ab8f9eb8784c6 branch: pci_pwrseq
Hi Sean,
Quoted 10 lines · Sean Anderson
Extend the PCI bridge driver to enable resources associated with PCI slots like clocks, power rails, and resets. This is modeled off of the PCI power control subsystem in Linux. The traditional compatible for PCI slots in U-Boot is pci-bridge, but Linux uses the more-systematic pciclass,0604 so add that as an option.
Signed-off-by Sean Anderson <[email protected]>---
Quoted 8 lines
Changes in v2:
- Return early if there's not PERST GPIO
- Only mdelay if we need to
- UseCONFIG_IS_ENABLEDto set .probe directlydrivers/pci/Kconfig | 8 ++++++ drivers/pci/pci-uclass.c | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+)
You should be able to add a test for this.
Regards,
Simon