mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 08:31:52 +00:00
This adds three new registers to the ACPI->EC interface, which will allow
the AP to set/clear two DPTF thermal threshold points for each temp sensor.
The registers are
EC_ACPI_MEM_TEMP_ID 0x05
EC_ACPI_MEM_TEMP_THRESHOLD 0x06
EC_ACPI_MEM_TEMP_COMMIT 0x07
It doesn't actually do anything yet, but the AP can now write those values.
BUG=chrome-os-partner:23970
BRANCH=none
TEST=manual
On the host:
dptf() {
[ "$#" -eq "2" ] || return;
iotools io_write8 0x66 0x81
iotools io_write8 0x62 $1
iotools io_write8 0x62 $2
}
Now watch the EC console while running on the host:
dptf 5 1
dptf 6 80
dptf 7 2
dptf 7 3
The EC should say
DPTF sensor 1, threshold 7 C, index 0, enabled
DPTF sensor 1, threshold 7 C, index 1, enabled
Change-Id: I71fa57e3ca7c7b5bb8892e63212bf294b44dece5
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/179778
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
24 lines
781 B
C
24 lines
781 B
C
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Functions used to provide the Intel DPTF interface over ACPI */
|
|
|
|
#ifndef __CROS_EC_DPTF_H
|
|
#define __CROS_EC_DPTF_H
|
|
|
|
/* 0-100% sets fixed duty cycle, out of range means let the EC drive */
|
|
void dptf_set_fan_duty_target(int pct);
|
|
|
|
/* 0-100% if in duty mode. -1 if not */
|
|
int dptf_get_fan_duty_target(void);
|
|
|
|
/* Each temp sensor can have up to two thresholds */
|
|
void dptf_set_temp_threshold(int sensor_id, /* zero-based sensor index */
|
|
int temp, /* in degrees K */
|
|
int idx, /* which threshold (0 or 1) */
|
|
int enable); /* true = on, false = off */
|
|
|
|
#endif /* __CROS_EC_DPTF_H */
|