diff options
author | Rob Barnes <robbarnes@google.com> | 2021-08-09 13:14:38 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-25 16:48:01 +0000 |
commit | 1f7fe895f3316496317597c1f8e68a9e35b4007e (patch) | |
tree | 92d38073ec4a02a641b168622699dae69023261a /board/dewatt | |
parent | 65e82a3f49ab5077021e8dd16e1816d71f3d96cc (diff) | |
download | chrome-ec-1f7fe895f3316496317597c1f8e68a9e35b4007e.tar.gz |
guybrush: Enable AMD STT
Enable AMD STT driver. The AMD STT driver will read the SOC and ambient
temperature sensors every second and send the result to the SOC via SB
RMI on the i2c bus.
BUG=b:176994331
TEST=stt debug
BRANCH=None
Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I45157acf172dcce00c24971be70c5ec609d460dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3082326
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/dewatt')
-rw-r--r-- | board/dewatt/board.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/board/dewatt/board.c b/board/dewatt/board.c index b773499326..d0762fa595 100644 --- a/board/dewatt/board.c +++ b/board/dewatt/board.c @@ -360,15 +360,26 @@ static void board_chipset_startup(void) DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_chipset_startup, HOOK_PRIO_DEFAULT); -int board_get_soc_temp(int idx, int *temp_k) +int board_get_soc_temp_k(int idx, int *temp_k) { - uint32_t board_version = get_board_version(); + if (chipset_in_state(CHIPSET_STATE_HARD_OFF)) + return EC_ERROR_NOT_POWERED; + + return tmp112_get_val_k(idx, temp_k); +} +int board_get_soc_temp_mk(int *temp_mk) +{ if (chipset_in_state(CHIPSET_STATE_HARD_OFF)) return EC_ERROR_NOT_POWERED; - if (board_version == 1) - return get_temp_3v3_30k9_47k_4050b(ADC_TEMP_SENSOR_SOC, temp_k); + return tmp112_get_val_mk(TMP112_SOC, temp_mk); +} - return tmp112_get_val_k(idx, temp_k); +int board_get_ambient_temp_mk(int *temp_mk) +{ + if (chipset_in_state(CHIPSET_STATE_HARD_OFF)) + return EC_ERROR_NOT_POWERED; + + return tmp112_get_val_mk(TMP112_AMB, temp_mk); } |