diff options
author | Boris Mittelberg <bmbm@google.com> | 2022-04-14 11:38:33 -0700 |
---|---|---|
committer | Boris Mittelberg <bmbm@google.com> | 2022-04-14 11:38:33 -0700 |
commit | 10cf54860dc2f7ac36610799919f1a0cf1d501bb (patch) | |
tree | ac982e3f9c46d97c7ec713ac5e15ee284179fec7 /board/kano/sensors.c | |
parent | 59ede6b1714c313de3e003c0497c70725bf625d5 (diff) | |
parent | 265691a2fe290e0fa54ecccba151a5c63dd73e47 (diff) | |
download | chrome-ec-10cf54860dc2f7ac36610799919f1a0cf1d501bb.tar.gz |
Merge remote-tracking branch cros/main into firmware-brya-14505.B-mainfirmware-brya-14505.71.B-main
Generated by: util/update_release_branch.py --baseboard brya
--relevant_paths_file baseboard/brya/relevant-paths.txt
firmware-brya-14505.B-main
Relevant changes:
git log --oneline 59ede6b17..265691a2f -- baseboard/brya board/agah
board/anahera board/banshee board/brya board/crota board/felwinter
board/gimble board/kano board/primus board/redrix board/taeko
board/taniks board/vell board/volmar driver/bc12/pi3usb9201_public.*
driver/charger/bq25710.* driver/ppc/nx20p348x.*
driver/ppc/syv682x_public.* driver/retimer/bb_retimer_public.*
driver/tcpm/nct38xx.* driver/tcpm/ps8xxx_public.* driver/tcpm/tcpci.*
include/power/alderlake* include/intel_x86.h power/alderlake*
power/intel_x86.c util/getversion.sh
98493ee98 crota: remove type-c port 2 to avoid confusion
88a19dd1b anahera: Tune USBA retimer EQ revision 2
37d45dd56 kano: Support 28w cpu fan table
BRANCH=None
BUG=b:228775653 b:203837657 b:219176652
TEST=`make -j buildall`
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Change-Id: Ia775339f54ad90ecdbc81ce1543b1b38f94f3b3b
Diffstat (limited to 'board/kano/sensors.c')
-rw-r--r-- | board/kano/sensors.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/board/kano/sensors.c b/board/kano/sensors.c index fd7d0f01ad..e3e2f9d920 100644 --- a/board/kano/sensors.c +++ b/board/kano/sensors.c @@ -12,6 +12,7 @@ #include "driver/accelgyro_icm426xx.h" #include "driver/accelgyro_icm_common.h" #include "driver/accel_kionix.h" +#include "fw_config.h" #include "gpio.h" #include "hooks.h" #include "motion_sense.h" @@ -354,12 +355,30 @@ __maybe_unused static const struct ec_thermal_config thermal_cpu = THERMAL_CPU; .temp_host_release = { \ [EC_TEMP_THRESH_HIGH] = C_TO_K(68), \ }, \ - .temp_fan_off = C_TO_K(25), \ + .temp_fan_off = C_TO_K(37), \ .temp_fan_max = C_TO_K(90), \ } __maybe_unused static const struct ec_thermal_config thermal_fan = THERMAL_FAN; /* + * TODO(b/202062363): Remove when clang is fixed. + */ +#define THERMAL_FAN_28W \ + { \ + .temp_host = { \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(85), \ + [EC_TEMP_THRESH_HALT] = C_TO_K(90), \ + }, \ + .temp_host_release = { \ + [EC_TEMP_THRESH_HIGH] = C_TO_K(68), \ + }, \ + .temp_fan_off = C_TO_K(37), \ + .temp_fan_max = C_TO_K(62), \ + } +__maybe_unused static const struct ec_thermal_config thermal_fan_28w = + THERMAL_FAN_28W; + +/* * Set value to zero to disable charger thermal control. */ /* @@ -387,3 +406,23 @@ struct ec_thermal_config thermal_params[] = { [TEMP_SENSOR_3_CHARGER] = THERMAL_CHARGER, }; BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); + +static void setup_thermal(void) +{ + unsigned int table = ec_cfg_thermal_solution(); + /* Configure Fan */ + switch (table) { + /* 28w CPU fan table */ + case THERMAL_SOLUTION_28W: + cprints(CC_THERMAL, "Fan table set to 28w CPU scheme"); + thermal_params[TEMP_SENSOR_2_FAN] = thermal_fan_28w; + break; + /* Default fan table */ + case THERMAL_SOLUTION_15W: + default: + cprints(CC_THERMAL, "Fan table set to 15w CPU scheme"); + break; + } +} +/* setup_thermal should be called before HOOK_INIT/HOOK_PRIO_DEFAULT */ +DECLARE_HOOK(HOOK_INIT, setup_thermal, HOOK_PRIO_DEFAULT - 1); |