mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 01:21:49 +00:00
Add fan power enable GPIO for Peppy
BUG=chrome-os-partner:21847 BRANCH=peppy TEST=Manual. Check state of GPIO_P5000_FAN_EN with lid open and lid closed. Can also check with meter via TP109. Change-Id: I8a64c14d53dd84a5d586c0abb04ccb71de0e78b3 Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/65674
This commit is contained in:
@@ -75,13 +75,13 @@ const struct gpio_info gpio_list[] = {
|
||||
/* Outputs; all unasserted by default except for reset signals */
|
||||
{"CPU_PROCHOT", LM4_GPIO_B, (1<<1), GPIO_OUT_LOW, NULL},
|
||||
{"PP1350_EN", LM4_GPIO_H, (1<<5), GPIO_OUT_LOW, NULL},
|
||||
{"PP3300_DSW_GATED_EN", LM4_GPIO_J, (1<<3), GPIO_OUT_LOW, NULL},
|
||||
{"PP3300_DX_EN", LM4_GPIO_J, (1<<2), GPIO_OUT_LOW, NULL},
|
||||
{"PP3300_LTE_EN", LM4_GPIO_D, (1<<2), GPIO_OUT_LOW, NULL},
|
||||
{"PP3300_WLAN_EN", LM4_GPIO_J, (1<<0), GPIO_OUT_LOW, NULL},
|
||||
{"SUSP_VR_EN", LM4_GPIO_C, (1<<7), GPIO_OUT_LOW, NULL},
|
||||
{"VCORE_EN", LM4_GPIO_C, (1<<5), GPIO_OUT_LOW, NULL},
|
||||
{"PP5000_EN", LM4_GPIO_H, (1<<7), GPIO_OUT_LOW, NULL},
|
||||
{"PP5000_FAN_EN", LM4_GPIO_J, (1<<3), GPIO_OUT_LOW, NULL},
|
||||
{"SYS_PWROK", LM4_GPIO_H, (1<<2), GPIO_OUT_LOW, NULL},
|
||||
{"WLAN_OFF_L", LM4_GPIO_J, (1<<4), GPIO_OUT_LOW, NULL},
|
||||
{"CHARGE_L", LM4_GPIO_E, (1<<6), GPIO_OUT_LOW, NULL},
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define CONFIG_POWER_BUTTON
|
||||
#define CONFIG_POWER_BUTTON_X86
|
||||
#define CONFIG_PWM_FAN
|
||||
#define CONFIG_PWM_FAN_EN_GPIO GPIO_PP5000_FAN_EN
|
||||
#define CONFIG_TEMP_SENSOR
|
||||
#define CONFIG_TEMP_SENSOR_G781
|
||||
#define CONFIG_UART_HOST 2
|
||||
@@ -96,13 +97,13 @@ enum gpio_signal {
|
||||
/* Outputs */
|
||||
GPIO_CPU_PROCHOT, /* Force CPU to think it's overheated */
|
||||
GPIO_PP1350_EN, /* Enable 1.35V supply */
|
||||
GPIO_PP3300_DSW_GATED_EN, /* Enable DSW rails */
|
||||
GPIO_PP3300_DX_EN, /* Enable power to lots of peripherals */
|
||||
GPIO_PP3300_LTE_EN, /* Enable LTE radio */
|
||||
GPIO_PP3300_WLAN_EN, /* Enable WiFi power */
|
||||
GPIO_SUSP_VR_EN, /* Enable 1.05V regulator */
|
||||
GPIO_VCORE_EN, /* Stuffing option - not connected */
|
||||
GPIO_PP5000_EN, /* Enable 5V supply */
|
||||
GPIO_PP5000_FAN_EN, /* Enable fan power rail */
|
||||
GPIO_SYS_PWROK, /* EC thinks everything is up and ready */
|
||||
GPIO_WLAN_OFF_L, /* Disable WiFi radio */
|
||||
GPIO_CHARGE_L, /* Allow battery to charge when on AC */
|
||||
|
||||
@@ -48,6 +48,10 @@ void pwm_enable_fan(int enable)
|
||||
LM4_FAN_FANCTL |= (1 << FAN_CH_CPU);
|
||||
else
|
||||
LM4_FAN_FANCTL &= ~(1 << FAN_CH_CPU);
|
||||
|
||||
#ifdef CONFIG_PWM_FAN_EN_GPIO
|
||||
gpio_set_level(CONFIG_PWM_FAN_EN_GPIO, enable);
|
||||
#endif /* CONFIG_PWM_FAN_EN_GPIO */
|
||||
}
|
||||
|
||||
int pwm_get_fan_enabled(void)
|
||||
|
||||
@@ -465,6 +465,9 @@
|
||||
/* Compile support for PWM control of cooling fans */
|
||||
#undef CONFIG_PWM_FAN
|
||||
|
||||
/* Name of active high GPIO to control power to the cooling fan */
|
||||
#undef CONFIG_PWM_FAN_EN_GPIO
|
||||
|
||||
/* Compile support for PWM output to keyboard backlight */
|
||||
#undef CONFIG_PWM_KBLIGHT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user