diff options
-rw-r--r-- | baseboard/zork/variant_trembyle.c | 58 | ||||
-rw-r--r-- | board/ezkinil/board.c | 58 | ||||
-rw-r--r-- | board/morphius/board.c | 58 | ||||
-rw-r--r-- | board/trembyle/board.c | 58 |
4 files changed, 174 insertions, 58 deletions
diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c index 1f833c6dde..75dce91948 100644 --- a/baseboard/zork/variant_trembyle.c +++ b/baseboard/zork/variant_trembyle.c @@ -68,64 +68,6 @@ BUILD_ASSERT(ARRAY_SIZE(ioex_config) == USBC_PORT_COUNT); BUILD_ASSERT(CONFIG_IO_EXPANDER_PORT_COUNT == USBC_PORT_COUNT); /***************************************************************************** - * Fan - */ - -/* Physical fans. These are logically separate from pwm_channels. */ -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 = -1, -}; -const struct fan_rpm fan_rpm_0 = { - .rpm_min = 3100, - .rpm_start = 3100, - .rpm_max = 6900, -}; -const struct fan_t fans[] = { - [FAN_CH_0] = { - .conf = &fan_conf_0, - .rpm = &fan_rpm_0, - }, -}; -BUILD_ASSERT(ARRAY_SIZE(fans) == FAN_CH_COUNT); - -const static struct ec_thermal_config thermal_thermistor = { - .temp_host = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(75), - [EC_TEMP_THRESH_HALT] = C_TO_K(80), - }, - .temp_host_release = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(65), - }, - .temp_fan_off = C_TO_K(25), - .temp_fan_max = C_TO_K(50), -}; - -const static struct ec_thermal_config thermal_cpu = { - .temp_host = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(85), - [EC_TEMP_THRESH_HALT] = C_TO_K(95), - }, - .temp_host_release = { - [EC_TEMP_THRESH_HIGH] = C_TO_K(65), - }, - .temp_fan_off = C_TO_K(25), - .temp_fan_max = C_TO_K(50), -}; - -struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT]; - -static void setup_fans(void) -{ - thermal_params[TEMP_SENSOR_CHARGER] = thermal_thermistor; - thermal_params[TEMP_SENSOR_SOC] = thermal_thermistor; - thermal_params[TEMP_SENSOR_CPU] = thermal_cpu; -} -DECLARE_HOOK(HOOK_INIT, setup_fans, HOOK_PRIO_DEFAULT); - -/***************************************************************************** * MST hub */ diff --git a/board/ezkinil/board.c b/board/ezkinil/board.c index 219a02e668..1c88037340 100644 --- a/board/ezkinil/board.c +++ b/board/ezkinil/board.c @@ -266,3 +266,61 @@ void setup_fw_config(void) setup_mux(); } DECLARE_HOOK(HOOK_INIT, setup_fw_config, HOOK_PRIO_INIT_I2C + 2); + +/***************************************************************************** + * Fan + */ + +/* Physical fans. These are logically separate from pwm_channels. */ +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 = -1, +}; +const struct fan_rpm fan_rpm_0 = { + .rpm_min = 3100, + .rpm_start = 3100, + .rpm_max = 6900, +}; +const struct fan_t fans[] = { + [FAN_CH_0] = { + .conf = &fan_conf_0, + .rpm = &fan_rpm_0, + }, +}; +BUILD_ASSERT(ARRAY_SIZE(fans) == FAN_CH_COUNT); + +const static struct ec_thermal_config thermal_thermistor = { + .temp_host = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(75), + [EC_TEMP_THRESH_HALT] = C_TO_K(80), + }, + .temp_host_release = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(65), + }, + .temp_fan_off = C_TO_K(25), + .temp_fan_max = C_TO_K(50), +}; + +const static struct ec_thermal_config thermal_cpu = { + .temp_host = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(85), + [EC_TEMP_THRESH_HALT] = C_TO_K(95), + }, + .temp_host_release = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(65), + }, + .temp_fan_off = C_TO_K(25), + .temp_fan_max = C_TO_K(50), +}; + +struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT]; + +static void setup_fans(void) +{ + thermal_params[TEMP_SENSOR_CHARGER] = thermal_thermistor; + thermal_params[TEMP_SENSOR_SOC] = thermal_thermistor; + thermal_params[TEMP_SENSOR_CPU] = thermal_cpu; +} +DECLARE_HOOK(HOOK_INIT, setup_fans, HOOK_PRIO_DEFAULT); diff --git a/board/morphius/board.c b/board/morphius/board.c index 13c8319760..93d93e05d4 100644 --- a/board/morphius/board.c +++ b/board/morphius/board.c @@ -265,3 +265,61 @@ void setup_fw_config(void) setup_mux(); } DECLARE_HOOK(HOOK_INIT, setup_fw_config, HOOK_PRIO_INIT_I2C + 2); + +/***************************************************************************** + * Fan + */ + +/* Physical fans. These are logically separate from pwm_channels. */ +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 = -1, +}; +const struct fan_rpm fan_rpm_0 = { + .rpm_min = 3100, + .rpm_start = 3100, + .rpm_max = 6900, +}; +const struct fan_t fans[] = { + [FAN_CH_0] = { + .conf = &fan_conf_0, + .rpm = &fan_rpm_0, + }, +}; +BUILD_ASSERT(ARRAY_SIZE(fans) == FAN_CH_COUNT); + +const static struct ec_thermal_config thermal_thermistor = { + .temp_host = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(75), + [EC_TEMP_THRESH_HALT] = C_TO_K(80), + }, + .temp_host_release = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(65), + }, + .temp_fan_off = C_TO_K(25), + .temp_fan_max = C_TO_K(50), +}; + +const static struct ec_thermal_config thermal_cpu = { + .temp_host = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(85), + [EC_TEMP_THRESH_HALT] = C_TO_K(95), + }, + .temp_host_release = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(65), + }, + .temp_fan_off = C_TO_K(25), + .temp_fan_max = C_TO_K(50), +}; + +struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT]; + +static void setup_fans(void) +{ + thermal_params[TEMP_SENSOR_CHARGER] = thermal_thermistor; + thermal_params[TEMP_SENSOR_SOC] = thermal_thermistor; + thermal_params[TEMP_SENSOR_CPU] = thermal_cpu; +} +DECLARE_HOOK(HOOK_INIT, setup_fans, HOOK_PRIO_DEFAULT); diff --git a/board/trembyle/board.c b/board/trembyle/board.c index 135200d4e6..897cdc9c55 100644 --- a/board/trembyle/board.c +++ b/board/trembyle/board.c @@ -310,3 +310,61 @@ void setup_fw_config(void) setup_mux(); } DECLARE_HOOK(HOOK_INIT, setup_fw_config, HOOK_PRIO_INIT_I2C + 2); + +/***************************************************************************** + * Fan + */ + +/* Physical fans. These are logically separate from pwm_channels. */ +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 = -1, +}; +const struct fan_rpm fan_rpm_0 = { + .rpm_min = 3100, + .rpm_start = 3100, + .rpm_max = 6900, +}; +const struct fan_t fans[] = { + [FAN_CH_0] = { + .conf = &fan_conf_0, + .rpm = &fan_rpm_0, + }, +}; +BUILD_ASSERT(ARRAY_SIZE(fans) == FAN_CH_COUNT); + +const static struct ec_thermal_config thermal_thermistor = { + .temp_host = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(75), + [EC_TEMP_THRESH_HALT] = C_TO_K(80), + }, + .temp_host_release = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(65), + }, + .temp_fan_off = C_TO_K(25), + .temp_fan_max = C_TO_K(50), +}; + +const static struct ec_thermal_config thermal_cpu = { + .temp_host = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(85), + [EC_TEMP_THRESH_HALT] = C_TO_K(95), + }, + .temp_host_release = { + [EC_TEMP_THRESH_HIGH] = C_TO_K(65), + }, + .temp_fan_off = C_TO_K(25), + .temp_fan_max = C_TO_K(50), +}; + +struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT]; + +static void setup_fans(void) +{ + thermal_params[TEMP_SENSOR_CHARGER] = thermal_thermistor; + thermal_params[TEMP_SENSOR_SOC] = thermal_thermistor; + thermal_params[TEMP_SENSOR_CPU] = thermal_cpu; +} +DECLARE_HOOK(HOOK_INIT, setup_fans, HOOK_PRIO_DEFAULT); |