diff options
author | Krishna Prasad Bhat <krishna.p.bhat.d@intel.com> | 2020-12-30 14:01:40 +0530 |
---|---|---|
committer | Karthik Ramasubramanian <kramasub@google.com> | 2021-01-08 01:51:23 +0000 |
commit | 830306cc84bc909e7484a9568a7475f89987f857 (patch) | |
tree | 42280728a93b763d5b6494ff1b0a3ec7a9483711 /src | |
parent | 7ae375d3bc77dc74eb76ac6e81313e3fdb010c16 (diff) |
soc/intel/jasperlake: Enable USB2 PHY SUS PG for s0ix qualification
USBSUSPGQDIS is a disqualifier bit which will allow platform
to enter s0ix even if USB2 PHY SUS is not power gated. Disabling this
bit will ensure that USB2 PHY SUS is power gated before entering s0ix.
BUG=b:175767084
BRANCH=dedede
TEST=s0ix works on drawcia and USB wake from s0ix works fine.
Change-Id: I20bad3f79141799c88a16272ea822b9e3dede504
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49012
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Evan Green <evgreen@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/jasperlake/finalize.c | 13 | ||||
-rw-r--r-- | src/soc/intel/jasperlake/include/soc/pmc.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/soc/intel/jasperlake/finalize.c b/src/soc/intel/jasperlake/finalize.c index d879db94fc..8219f0c1d5 100644 --- a/src/soc/intel/jasperlake/finalize.c +++ b/src/soc/intel/jasperlake/finalize.c @@ -40,6 +40,8 @@ static void pch_handle_sideband(config_t *config) static void pch_finalize(void) { + uint32_t reg32; + uint8_t *pmcbase; config_t *config; /* TCO Lock down */ @@ -62,6 +64,17 @@ static void pch_finalize(void) if (config->PmTimerDisabled) pmc_disable_acpi_timer(); + pmcbase = pmc_mmio_regs(); + if (config->s0ix_enable) { + /* + * Enable USBSUSPGQDIS qualification to ensure USB2 PHY SUS is power gated + * before entering s0ix. + */ + reg32 = read32(pmcbase + CPPMVRIC3); + reg32 &= ~USBSUSPGQDIS; + write32(pmcbase + CPPMVRIC3, reg32); + } + pch_handle_sideband(config); pmc_clear_pmcon_sts(); diff --git a/src/soc/intel/jasperlake/include/soc/pmc.h b/src/soc/intel/jasperlake/include/soc/pmc.h index 34172f8691..e65e884e64 100644 --- a/src/soc/intel/jasperlake/include/soc/pmc.h +++ b/src/soc/intel/jasperlake/include/soc/pmc.h @@ -122,6 +122,9 @@ #define CPPMVRIC 0x1B1C #define XTALSDQDIS (1 << 22) +#define CPPMVRIC3 0x1E4C +#define USBSUSPGQDIS (1 << 15) + #define IRQ_REG ACTL #define SCI_IRQ_ADJUST 0 #define ACTL 0x1BD8 |