diff options
author | Raul E Rangel <rrangel@chromium.org> | 2021-05-26 16:58:30 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-06-07 11:35:47 +0000 |
commit | 6b4b4a8349209b4131f4524823c392bec64c7418 (patch) | |
tree | 0de6b062aa39bf45d9dbe7890a236b5189f66c3b /src/drivers/pcie/rtd3/device/Kconfig | |
parent | b9b6f4d0132b0ae77a52261efbf0c2f5b6011d0d (diff) |
drivers/pcie/rtd3/device: Add PCIe RTD3 driver
This driver was inspired from soc/intel/common/block/pci/rtd3. I decided
to copy and modify it because the Intel driver has a lot of Intel
specific code.
This driver has been stripped down to only provide a power resource and
set the StorageD3Enable property. This driver is SoC agnostic and does
not handle suspending the actual PCIe root port. That should be
implemented by an SoC specific driver.
This is required for Guybrush to suspend/resume properly because the
NVMe power is tied to the S0 power rails, so the kernel needs to place
the device into D3.
BUG=b:184617186
TEST=Guybrush is able to suspend/resume properly. Also see power
resource get enabled / disabled.
[ 56.075559] power-0416 __acpi_power_off : Power resource [RTD3] turned off
[ 56.075562] device_pm-0279 device_set_power : Device [PXSX] transitioned to D3cold
[ 56.075567] pci_pm_suspend_noirq: nvme 0000:02:00.0: PCI PM: Suspend power state: D3cold
[ 56.075569] nvme 0000:02:00.0: pci_pm_suspend_noirq+0x0/0x413 returned 0 after 15978 usecs
[ 123.464874] nvme 0000:02:00.0: calling pci_pm_resume_noirq+0x0/0x11d @ 7, parent: 0000:00:02.4
[ 123.464891] acpi_device_set_power: ACPI: \_SB_.PCI0.GP14.PXSX: Power state change: D3cold -> D0
[ 123.464982] power-0360 __acpi_power_on : Power resource [RTD3] turned on
[ 123.464984] device_pm-0279 device_set_power : Device [PXSX] transitioned to D0
[ 123.465039] nvme 0000:02:00.0: pci_pm_resume_noirq+0x0/0x11d returned 0 after 158 usecs
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I2adfc925183ff7a19ab97e89212bc87c40d552d0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54966
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/drivers/pcie/rtd3/device/Kconfig')
-rw-r--r-- | src/drivers/pcie/rtd3/device/Kconfig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/pcie/rtd3/device/Kconfig b/src/drivers/pcie/rtd3/device/Kconfig new file mode 100644 index 0000000000..7fecd57580 --- /dev/null +++ b/src/drivers/pcie/rtd3/device/Kconfig @@ -0,0 +1,6 @@ +config DRIVERS_PCIE_RTD3_DEVICE + bool + depends on HAVE_ACPI_TABLES + help + When enabled, this driver will add support for ACPI controlled + Runtime D3 using GPIOs for power/reset control of the PCIe device. |