diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2020-05-29 14:29:53 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-07-07 17:22:46 +0000 |
commit | 46f6fcf88f2db397759f69d0c7ddf11d88b61e03 (patch) | |
tree | c520011ec212b4fae6522f4f49b0f5149c10c15b /src/drivers/intel/dptf | |
parent | 3a9cde9ab630fa34240b16f7e6ae10b5a61aa67e (diff) |
dptf: Add support for Charger Performance States
This change generates the DPTF TCHG.PPSS table in the SSDT. This table
describes different charging rates which are available to use. DPTF
can pick different rates in order to passively cool (or not) the
system.
BUG=b:143539650
TEST=compiles
Change-Id: I6df6bfbac628fa4e4d313e38b8e6c53fce70a7f2
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41888
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/drivers/intel/dptf')
-rw-r--r-- | src/drivers/intel/dptf/chip.h | 4 | ||||
-rw-r--r-- | src/drivers/intel/dptf/dptf.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/intel/dptf/chip.h b/src/drivers/intel/dptf/chip.h index 8d77603f9e..528ba8354e 100644 --- a/src/drivers/intel/dptf/chip.h +++ b/src/drivers/intel/dptf/chip.h @@ -11,6 +11,10 @@ struct drivers_intel_dptf_config { struct dptf_critical_policy critical[DPTF_MAX_CRITICAL_POLICIES]; struct dptf_passive_policy passive[DPTF_MAX_PASSIVE_POLICIES]; } policies; + + struct { + struct dptf_charger_perf charger_perf[DPTF_MAX_CHARGER_PERF_STATES]; + } controls; }; #endif /* _DRIVERS_INTEL_DPTF_CHIP_H_ */ diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c index 5cad07dade..a20087fff3 100644 --- a/src/drivers/intel/dptf/dptf.c +++ b/src/drivers/intel/dptf/dptf.c @@ -72,6 +72,9 @@ static void dptf_fill_ssdt(const struct device *dev) dptf_write_critical_policies(config->policies.critical, DPTF_MAX_CRITICAL_POLICIES); + /* Controls */ + dptf_write_charger_perf(config->controls.charger_perf, DPTF_MAX_CHARGER_PERF_STATES); + printk(BIOS_INFO, "\\_SB.DPTF: %s at %s\n", dev->chip_ops->name, dev_path(dev)); } |