diff options
author | Chris Ching <chingcodes@google.com> | 2017-10-11 16:33:24 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-10-13 21:55:20 -0700 |
commit | 8373a0f86c24f17bdc21fff0f59044828923c49d (patch) | |
tree | 4d1603c8731660d66ac015ddd5057e45bc29f50a | |
parent | 2e1ec23353c758a7553c86bfd224b3364f6504a6 (diff) | |
download | chrome-ec-8373a0f86c24f17bdc21fff0f59044828923c49d.tar.gz |
[fan] Add CONFIG_FAN_SPEED option to override EC fan speed
Fans will be initialed at the given RPM, and not the max speed.
Changed kahlee to use new method and set speed to ~50%, down from 75%
BUG=b:67055475
TEST=run on kahlee board
BRANCH=none
Change-Id: Iad40a58b531f46ac80572b47aef9378b47222be1
Signed-off-by: Chris Ching <chingcodes@google.com>
Reviewed-on: https://chromium-review.googlesource.com/714386
Commit-Ready: Chris Ching <chingcodes@chromium.org>
Tested-by: Chris Ching <chingcodes@chromium.org>
Reviewed-by: Chris Ching <chingcodes@chromium.org>
-rw-r--r-- | board/kahlee/board.c | 5 | ||||
-rw-r--r-- | board/kahlee/board.h | 2 | ||||
-rw-r--r-- | common/fan.c | 6 | ||||
-rw-r--r-- | include/config.h | 3 |
4 files changed, 9 insertions, 7 deletions
diff --git a/board/kahlee/board.c b/board/kahlee/board.c index b361574e21..dd57f8edcd 100644 --- a/board/kahlee/board.c +++ b/board/kahlee/board.c @@ -448,11 +448,6 @@ static void board_chipset_startup(void) /* Enable Codec */ gpio_set_level(GPIO_EN_ALC_CLK, 1); - - /* - * TODO: Remove after thermal control table is provided - */ - fan_set_duty(0, 75); } DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_chipset_startup, HOOK_PRIO_DEFAULT); diff --git a/board/kahlee/board.h b/board/kahlee/board.h index 7d74ab20cf..ccab23ac86 100644 --- a/board/kahlee/board.h +++ b/board/kahlee/board.h @@ -117,6 +117,8 @@ #define CONFIG_POWER_SIGNAL_INTERRUPT_STORM_DETECT_THRESHOLD 30 #define CONFIG_PWM #define CONFIG_FANS 1 +#undef CONFIG_FAN_INIT_SPEED +#define CONFIG_FAN_INIT_SPEED 50 #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_G781 #define CONFIG_SCI_GPIO GPIO_PCH_SCI_L diff --git a/common/fan.c b/common/fan.c index 6f4425bdc9..07d93723a4 100644 --- a/common/fan.c +++ b/common/fan.c @@ -447,9 +447,11 @@ static void pwm_fan_init(void) fan_set_rpm_target(fans[fan].ch, prev->fan_rpm); } } else { - /* Set initial fan speed to maximum */ + /* Set initial fan speed */ for (fan = 0; fan < CONFIG_FANS; fan++) - fan_set_rpm_target(fans[fan].ch, fans[fan].rpm_max); + fan_set_rpm_target(fans[fan].ch, + fan_percent_to_rpm(fans[fan].ch, + CONFIG_FAN_INIT_SPEED)); } for (fan = 0; fan < CONFIG_FANS; fan++) diff --git a/include/config.h b/include/config.h index 876ff4f5e8..5a176670c7 100644 --- a/include/config.h +++ b/include/config.h @@ -1048,6 +1048,9 @@ /* Number of cooling fans. Undef if none. */ #undef CONFIG_FANS +/* Percentage to which all fans are set at initiation */ +#define CONFIG_FAN_INIT_SPEED 100 + /* Support fan control while in low-power idle */ #undef CONFIG_FAN_DSLEEP |