summaryrefslogtreecommitdiff
path: root/src/ec/google
diff options
context:
space:
mode:
authorSumeet Pawnikar <sumeet.r.pawnikar@intel.com>2022-03-14 17:13:33 +0530
committerFelix Held <felix-coreboot@felixheld.de>2022-06-10 13:12:45 +0000
commitedbbabcbe7d3f3dd4e636ab7f363b22687c0399e (patch)
tree6e6f0fbc82a83d7315ff49231e2040ba249d3add /src/ec/google
parent8d2bfbce23f6ff53cd8014286645a408886549a1 (diff)
ec/google/chromeec: Add support to report fan speed via ACPI
Add fan speed rpm control for DPTF based Active2 policy as per document #626708, by utilizing existing FAN0 variable from src/ec/google/chromeec/acpi/emem.asl#18. There is no corresponding EC change required for this policy support because EC fan code already exporting this rpm value using EC_MEMMAP_FAN for FAN0. BUG=b:224457192 BRANCH=None TEST=Built and booted on ADL-P based Brya system and verify the fan speed in rpm under sysfs path cat /sys/bus/acpi/devices/INTC1048\:00/fan_speed_rpm. Change-Id: Ibb1646b1fb1659fd853ece97d97bb9dee2a3f57e Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62789 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/ec/google')
-rw-r--r--src/ec/google/chromeec/ec_dptf_helpers.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec_dptf_helpers.c b/src/ec/google/chromeec/ec_dptf_helpers.c
index 94b13fb5d1..1238bcfbec 100644
--- a/src/ec/google/chromeec/ec_dptf_helpers.c
+++ b/src/ec/google/chromeec/ec_dptf_helpers.c
@@ -109,6 +109,12 @@ static void write_fan_fst(const struct device *ec)
acpigen_emit_namestring("TFST");
acpigen_write_integer(1);
acpigen_emit_byte(ZERO_OP); /* 3rd arg to Index */
+ acpigen_write_store();
+ acpigen_emit_namestring(acpi_device_path_join(ec, "FAN0"));
+ acpigen_emit_byte(INDEX_OP);
+ acpigen_emit_namestring("TFST");
+ acpigen_write_integer(2);
+ acpigen_emit_byte(ZERO_OP);
acpigen_emit_byte(RETURN_OP);
acpigen_emit_namestring("TFST");
acpigen_pop_len(); /* Method _FST */