diff options
author | Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com> | 2022-02-10 10:33:08 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-17 11:20:41 +0000 |
commit | 55680f70d2a1e61c193fc78ff1d51c7437803683 (patch) | |
tree | e12ef58e7b092b03ac8925f2656acd612fec4239 /board/kinox/fans.c | |
parent | 7e464f4acaef417e315c1d48779c2ea67b14993d (diff) | |
download | chrome-ec-55680f70d2a1e61c193fc78ff1d51c7437803683.tar.gz |
kinox: Initial EC imagestabilize-quickfix-14526.91.B-mainstabilize-14526.89.B-mainstabilize-14526.84.B-mainstabilize-14526.73.B-mainstabilize-14526.67.B-mainstabilize-14526.57.B-mainrelease-R100-14526.B-main
Create the initial EC image for the kinox variant by copying the
brask reference board EC files into a new directory named for
the variant.
(Auto-Generated by create_initial_ec_image.sh version 1.5.0).
BUG=b:215049181
BRANCH=None
TEST=make BOARD=kinox
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: I604216664a0efc690ba9cd2c0c071a0e4650b228
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3448054
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'board/kinox/fans.c')
-rw-r--r-- | board/kinox/fans.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/board/kinox/fans.c b/board/kinox/fans.c new file mode 100644 index 0000000000..f2a70636d0 --- /dev/null +++ b/board/kinox/fans.c @@ -0,0 +1,50 @@ +/* Copyright 2022 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. + */ + +/* Physical fans. These are logically separate from pwm_channels. */ + +#include "common.h" +#include "compile_time_macros.h" +#include "console.h" +#include "fan_chip.h" +#include "fan.h" +#include "hooks.h" +#include "pwm.h" + +/* MFT channels. These are logically separate from pwm_channels. */ +const struct mft_t mft_channels[] = { + [MFT_CH_0] = { + .module = NPCX_MFT_MODULE_2, + .clk_src = TCKC_LFCLK, + .pwm_id = PWM_CH_FAN, + }, +}; +BUILD_ASSERT(ARRAY_SIZE(mft_channels) == MFT_CH_COUNT); + +static const struct fan_conf fan_conf_0 = { + .flags = FAN_USE_RPM_MODE, + .ch = MFT_CH_0, /* Use MFT id to control fan */ + .pgood_gpio = -1, + .enable_gpio = GPIO_EN_PP5000_FAN, +}; + +/* + * TOOD(b/197478860): need to update for real fan + * + * Prototype fan spins at about 7200 RPM at 100% PWM. + * Set minimum at around 30% PWM. + */ +static const struct fan_rpm fan_rpm_0 = { + .rpm_min = 2200, + .rpm_start = 2200, + .rpm_max = 7200, +}; + +const struct fan_t fans[FAN_CH_COUNT] = { + [FAN_CH_0] = { + .conf = &fan_conf_0, + .rpm = &fan_rpm_0, + }, +}; |