FROMLIST: PCI: rockchip: Support configuring PERST# state via DT

I've found that different endpoints and board configurations have
required different behavior from the PCIe Reset (PERST#) signal when in
low-power system suspend (e.g., S3). Use the new of_pci helper to
request this state and assert (active low) PERST# before suspending.

Note that we reinitialize the link (including reconfiguring PERST#) at
resume time.

This requires that the board and system firmware supports driving this
signal low when the system is suspended, since PERST# may be pulled up
by the endpoint, and some GPIO banks are not active in S3.

Signed-off-by: Brian Norris <briannorris@chromium.org>
(am from https://patchwork.kernel.org/patch/10002883/)

BUG=b:65559913
TEST=observe WAKE# pin on scarlet

Change-Id: I61212a46b12276e0c92d92d6cf478b04d29943b1
Reviewed-on: https://chromium-review.googlesource.com/717453
Commit-Ready: Guenter Roeck <groeck@chromium.org>
Tested-by: Guenter Roeck <groeck@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
1 file changed