coreboot-kgpe-d16/src
Furquan Shaikh 8302585c15 mb/google/zork: Add support for WiFi power sequencing
This change replaces variant_wifi_romstage_gpio_table() with
variant_pcie_power_reset_configure() to handle the reset and power
sequencing for WiFi devices pre- and post- v3 version of schematics.

These are the requirements that need to be satisfied:
1. As per PCI Express M.2 Specification Revision 3.0,
Version 1.2, Section 3.1.4 "Power-up Timing", PERST# should stay
disabled until `TPVPGL` time duration after device power has
stabilized.  Value of TPVPGL is implementation specific.
2. For Intel WiFi chip, it is known to get into a bad state if the
above requirement is violated and hence requires a power cycle.
3. On pre-v3 schematics:
  - For both dalboz and trembyle references, GPIO42 drives
  WIFI_AUX_RESET_L which is pulled up to PP3300_WIFI.
  - For both dalboz and trembyle references, PP3300_WIFI is controlled
  using GPIO29. This pad gets pulled high by default on PWRGOOD
  because of internal pull-up. But, at RESET# it is known to have a
  glitch. When GPIO29 gets pulled high, it causes WIFI_AUX_RESET_L to
  be pulled high as well. This violates the PCIe power sequencing
  requirements. Hence, for pre-v3 schematics on both dalboz and
  trembyle, following sequence needs to be followed:
   a. Assert WIFI_AUX_RESET_L.
   b. Disable power to WiFi.
   c. Wait 10ms to allow WiFi power to go low.
   d. Enable power to WiFi.
   e. Wait 50ms as per PCIe specification.
   f. Deassert WIFI_AUX_RESET_L.
4. On v3 schematics:
   - For trembyle: WIFI_AUX_RESET_L is driven by GPIO86 which has an
   internal PU as well as an external PU to PP3300_WIFI.
   - For dalboz: WIFI_AUX_RESET is driven by GPIO29. This is active
   high and has an internal PU. It also has an external 1K PD to
   overcome internal PU.
   - For both dalboz and trembyle references, PP3300_WIFI is
   controlled by GPIO42 which has an internal PU and external
   PD. Trembyle schematics have a comment saying strong PD of 2.2K but
   the stuffed resistor is a weak one (499K). ON dalboz, it uses a
   weak PD (which doesn't look correct and instead should be a strong
   PD just like trembyle). Having a strong PD ensures that the WiFi
   power is kept disabled when coming out of G3 until coreboot
   configures GPIO42 as high.
   - Thus, for v3 schematics, following sequence needs to be followed:
    a. Assert WIFI_AUX_RESET{_L} signal.
    b. Enable power to WiFi.
    c. Wait 50ms as per PCIe specification.
    d. Deassert WIFI_AUX_RESET{_L} signal.

BUG=b:157686402, b:158257076
TEST=Verified that QCA and AX200 cards both continue working. Tested
QCA on Dalboz and Trembyle. Tested AX200 on morphius.

Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: I532131ee911d5efb5130d8710f3e01578f6c9627
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42738
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-06-25 08:08:37 +00:00
..
acpi ACPI: Replace smm_setup_structures() 2020-06-24 11:49:15 +00:00
arch ACPI: Replace smm_setup_structures() 2020-06-24 11:49:15 +00:00
commonlib cbmem: Remove IDs for TSEG and BERT 2020-06-22 22:57:13 +00:00
console
cpu ACPI: Replace smm_setup_structures() 2020-06-24 11:49:15 +00:00
device Kconfig: Escape variable to accommodate new Kconfig versions 2020-06-19 15:29:04 +00:00
drivers src/*: Update makefiles to exclude x86 code from psp-verstage 2020-06-23 21:28:40 +00:00
ec ec/google/wilco: Suppress UCSI events in S0ix 2020-06-17 19:46:36 +00:00
include ACPI: Replace smm_setup_structures() 2020-06-24 11:49:15 +00:00
lib lib/hardwaremain: Drop HAVE_ACPI_RESUME guards 2020-06-18 13:01:08 +00:00
mainboard mb/google/zork: Add support for WiFi power sequencing 2020-06-25 08:08:37 +00:00
northbridge nb/intel/sandybridge/gma.c: Remove useless if condition 2020-06-22 12:18:53 +00:00
security lockdown: Add hint for how to check for lockdown support in boot log 2020-06-22 12:27:18 +00:00
soc soc/intel/cannonlake: Add missing USB_PORT_WAKE_ENABLE define 2020-06-25 04:21:10 +00:00
southbridge src: Report byte-sized access for GPE0 2020-06-24 11:50:50 +00:00
superio superio/winbond/w83977tf: Add suspend related fields 2020-06-16 20:17:26 +00:00
vendorcode vc/amd/fsp/picasso: Sync UPD and GUID files 2020-06-22 13:37:03 +00:00
Kconfig Kconfig: Escape variable to accommodate new Kconfig versions 2020-06-19 15:29:04 +00:00