skylake: Add Deep Sx configuration for wake pins
Add support for enabling various pins in Deep Sx by setting a register in the mainboard devicetree. BUG=chrome-os-partner:43079 BRANCH=none TEST=build and boot on glados Original-Change-Id: I1b4fb51f72b88bdc49096268bdd781750dcd089d Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/288920 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Change-Id: I7555a92fecc6e78b579ec0bc18da202cb0c824e2 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: http://review.coreboot.org/11170 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
committed by
Aaron Durbin
parent
4f7cf3a446
commit
edf1cb78e2
@ -217,6 +217,17 @@ static void config_deep_s3(int on)
|
||||
config_deep_sX(S3_PWRGATE_POL, S3DC_GATE_SUS | S3AC_GATE_SUS, 3, on);
|
||||
}
|
||||
|
||||
static void config_deep_sx(uint32_t deepsx_config)
|
||||
{
|
||||
uint32_t reg;
|
||||
uint8_t *pmcbase = pmc_mmio_regs();
|
||||
|
||||
reg = read32(pmcbase + DSX_CFG);
|
||||
reg &= ~DSX_CFG_MASK;
|
||||
reg |= deepsx_config;
|
||||
write32(pmcbase + DSX_CFG, reg);
|
||||
}
|
||||
|
||||
static void pmc_init(struct device *dev)
|
||||
{
|
||||
config_t *config = dev->chip_info;
|
||||
@ -231,6 +242,7 @@ static void pmc_init(struct device *dev)
|
||||
|
||||
config_deep_s3(config->deep_s3_enable);
|
||||
config_deep_s5(config->deep_s5_enable);
|
||||
config_deep_sx(config->deep_sx_config);
|
||||
}
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
Reference in New Issue
Block a user